31 | {{ app.subtitle }} 32 |
33 |34 | Last updated {{ $filters.time( app.last_updated ) }} 35 |
36 |64 | {{ app.subtitle }} 65 |
66 |67 | Last updated {{ $filters.time( app.last_updated ) }} 68 |
69 |Author message: "{{ publisher.deprecation.message }}"
34 |{{ publisher.description }}
40 |
48 | {{ happ.title }}:
49 | {{ happ.subtitle }}
50 | (deprecated)
51 |
52 | {{ happ.description || 'No description' }}
53 |
54 |
55 | hApp has no releases
56 |
57 |
58 | Latest Release: {{ happ_release?.version }}
59 |
60 |
61 | Latest Release does not have an official GUI
62 |
63 |
64 |
88 | {{ gui.name }}
89 | (deprecated)
90 |
91 | {{ gui.description || 'No description' }}
92 |
93 |
94 | GUI has no releases
95 |
96 |
97 | Latest Release: v{{ gui_release?.version }}
98 |
99 |
40 | {{ happ.title }}:
41 | {{ happ.subtitle }}
42 | (deprecated)
43 |
44 | {{ happ.description || 'No description' }}
45 |
46 |
47 | hApp has no releases
48 |
49 |
50 | Latest Release: {{ happ_release?.version }}
51 |
52 |
53 | Latest Release does not have an official GUI
54 |
55 |
56 |
80 | {{ gui.name }}
81 | (deprecated)
82 |
83 | {{ gui.description || 'No description' }}
84 |
85 |
86 | GUI has no releases
87 |
88 |
89 | Latest Release: v{{ gui_release?.version }}
90 |
91 |
31 |33 |{{ moderator_action.message }}
32 |
Author message: "{{ app.deprecation.message }}"
58 |67 | {{ publisher.name }} 68 | ({{ publisher.location.region }}, {{ publisher.location.country }}) 69 |
70 |
79 | {{ happ.title }}:
80 | {{ happ.subtitle }}
81 | (deprecated)
82 |
83 | {{ happ.description || 'No description' }}
84 |
85 | Latest Release: {{ happ_release?.version }}
86 |
100 | {{ gui.name }}
101 | (deprecated)
102 |
103 | {{ gui.description || 'No description' }}
104 |
105 | Latest Release: {{ gui_release?.version }}
106 |
{{ action.author }}| Control | 172 |Setting | 173 |
|---|---|
| {{ key }} | 178 |{{ value }} |
179 |
{{ action.message }}
186 | ${path_id}`,
284 | `${err.name}: ${err.message}`,
285 | ],
286 | });
287 | }
288 |
289 | throw err;
290 | }
291 | },
292 | async createMereMemoryEntry ( bytes ) {
293 | const path = `appstore/memory/${common.randomHex()}`;
294 | this.$openstate.mutable[path] = bytes;
295 | const addr = await this.$openstate.write( path );
296 | this.$openstate.purge( path );
297 | return addr;
298 | },
299 |
300 | ...common,
301 |
302 | isViewpointAdmin () {
303 | if ( !this.$root.viewpoint )
304 | return false;
305 | if ( !this.$root.agent )
306 | return false;
307 |
308 | return common.isViewpointAdmin( this.$root.viewpoint, this.$root.agent.pubkey.initial )
309 | },
310 | isViewpointMember () {
311 | if ( !this.$root.viewpoint )
312 | return false;
313 | if ( !this.$root.agent )
314 | return false;
315 |
316 | return common.isViewpointMember( this.$root.viewpoint, this.$root.agent.pubkey.initial )
317 | },
318 | },
319 | });
320 |
321 | Object.assign( app.config.globalProperties, {
322 | window,
323 | document,
324 | history,
325 | location,
326 | "$clients": [appstore],
327 | "$filters": filters,
328 | "$openstate": openstate,
329 | breadcrumb_mapping,
330 | });
331 |
332 | app.config.compilerOptions.isCustomElement = (tag) => {
333 | if ( tag.startsWith("router") )
334 | return false;
335 |
336 | return tag.includes('-');
337 | };
338 |
339 | app.config.errorHandler = function (err, vm, info) {
340 | log.error("Vue App Error (%s):", info, err, vm );
341 | $root.errors.push( err.message );
342 | };
343 |
344 | window.addEventListener("unhandledrejection", (event) => {
345 | $root.errors.push( event.reason );
346 | });
347 | window.addEventListener("error", (err) => {
348 | $root.errors.push( err.message );
349 | });
350 |
351 |
352 | app.use( router );
353 | app.mount("#app");
354 |
355 | global._App = app;
356 | global._Router = router;
357 |
358 | log.info("Finished App configuration and mounting");
359 | })(window);
360 |
--------------------------------------------------------------------------------
/src/app_controllers.js:
--------------------------------------------------------------------------------
1 | const { Logger } = require('@whi/weblogger');
2 | const log = new Logger("apps");
3 |
4 | const common = require('./common.js');
5 | const { HoloHash,
6 | DnaHash,
7 | EntryHash,
8 | AgentPubKey } = holohash;
9 |
10 |
11 | module.exports = async function () {
12 | async function create () {
13 | return {
14 | "template": await common.load_html("/templates/apps/create.html"),
15 | "data": function() {
16 | return {
17 | "datapath": `app/${common.randomHex()}`,
18 | "happ_hrl": null,
19 | "gui_hrl": null,
20 | "invalid_happ_hrl": null,
21 | "invalid_gui_hrl": null,
22 | "use_official_gui": true,
23 | };
24 | },
25 | "computed": {
26 | ...common.scopedPathComputed( c => c.datapath, "app" ),
27 | ...common.scopedPathComputed( `agent/me/publishers`, "publishers", { "get": true }),
28 |
29 | happ_datapath () {
30 | return this.app$.devhub_address.happ
31 | ? `${this.app$.devhub_address.dna}/happ/${this.app$.devhub_address.happ}`
32 | : this.$openstate.DEADEND;
33 | },
34 | happ_release_datapath () {
35 | return this.app$.devhub_address.happ
36 | ? `${this.app$.devhub_address.dna}/happ/${this.app$.devhub_address.happ}/releases/latest`
37 | : this.$openstate.DEADEND;
38 | },
39 | gui_datapath () {
40 | return this.app$.devhub_address.gui
41 | ? `${this.app$.devhub_address.dna}/gui/${this.app$.devhub_address.gui}`
42 | : this.$openstate.DEADEND;
43 | },
44 | gui_release_datapath () {
45 | return this.app$.devhub_address.gui
46 | ? `${this.app$.devhub_address.dna}/gui/${this.app$.devhub_address.gui}/releases/latest`
47 | : this.$openstate.DEADEND;
48 | },
49 | ...common.scopedPathComputed( c => c.happ_datapath, "happ" ),
50 | ...common.scopedPathComputed( c => c.happ_release_datapath, "happ_release" ),
51 | ...common.scopedPathComputed( c => c.gui_datapath, "gui" ),
52 | ...common.scopedPathComputed( c => c.gui_release_datapath, "gui_release" ),
53 | },
54 | "methods": {
55 | refreshDevHubPaths () {
56 | this.readDevHubHapp();
57 | this.readDevHubGUI();
58 | },
59 | async readDevHubHapp () {
60 | if ( this.happ_datapath === this.$openstate.DEADEND )
61 | return;
62 |
63 | const happ = await this.$openstate.read( this.happ_datapath );
64 |
65 | if ( !this.app$.title )
66 | this.app$.title = happ.title;
67 | if ( !this.app$.subtitle )
68 | this.app$.subtitle = happ.subtitle;
69 | if ( !this.app$.description )
70 | this.app$.description = happ.description;
71 |
72 | await this.$openstate.read( this.happ_release_datapath );
73 | },
74 | async readDevHubGUI () {
75 | if ( this.gui_datapath === this.$openstate.DEADEND )
76 | return;
77 |
78 | await this.$openstate.read( this.gui_datapath );
79 | await this.$openstate.read( this.gui_release_datapath );
80 | },
81 | clearErrors () {
82 | this.app_errors.write = null;
83 | },
84 | handleHappHRL ( hrl ) {
85 | if ( !hrl ) {
86 | this.invalid_happ_hrl = "HRL is required";
87 | return;
88 | }
89 |
90 | log.info("hApp HRL:", hrl );
91 | try {
92 | let [dna_hash, happ_hash] = common.parseHRL( hrl );
93 |
94 | this.app$.devhub_address.dna = dna_hash;
95 | this.setDevHubHapp( happ_hash );
96 | this.invalid_happ_hrl = false;
97 | } catch (err) {
98 | this.invalid_happ_hrl = String(err);
99 | }
100 | },
101 | handleGUIHRL ( hrl ) {
102 | if ( !hrl ) {
103 | this.invalid_gui_hrl = "HRL is required";
104 | return;
105 | }
106 |
107 | log.info("GUI HRL:", hrl );
108 | try {
109 | let [dna_hash, gui_hash] = common.parseHRL( hrl );
110 |
111 | if ( String(dna_hash) !== String(this.app$.devhub_address.dna) )
112 | throw new Error(`DNA hash from GUI HRL does not match the DNA hash in the hApp HRL`);
113 |
114 | this.setDevHubGUI( gui_hash );
115 | this.invalid_gui_hrl = false;
116 | } catch (err) {
117 | this.invalid_gui_hrl = String(err);
118 | }
119 | },
120 | setDevHubHapp ( happ_id ) {
121 | this.app$.devhub_address.happ = happ_id;
122 | this.readDevHubHapp();
123 | },
124 | setDevHubGUI ( gui_id ) {
125 | this.app$.devhub_address.gui = gui_id;
126 | this.readDevHubGUI();
127 | },
128 | resetDevHubAddress () {
129 | this.app$.devhub_address.happ = null;
130 | this.app$.devhub_address.gui = null;
131 | this.gui_hrl = null;
132 | this.use_official_gui = true;
133 | },
134 | async compressIcon () {
135 | if ( !this.app$.icon )
136 | return;
137 |
138 | if ( this.app$.icon.file.name.endsWith(".svg") ) {
139 | this.app$.metadata.icon_mime_type = "image/svg+xml";
140 | return;
141 | }
142 |
143 | delete this.app$.metadata.icon_mime_type;
144 |
145 | const compressed = await common.compressImage( this.app$.icon, {
146 | "mimeType": "image/jpeg",
147 | "maxWidth": 512,
148 | "maxHeight": 512,
149 | "convertSize": 50_000,
150 | });
151 | this.app$.icon = compressed.result;
152 | },
153 | async create () {
154 | console.log("Writing", this.app$ );
155 | await this.$openstate.write( this.datapath );
156 |
157 | const new_id = this.app.$id;
158 | this.$openstate.purge( this.datapath );
159 |
160 | await this.$openstate.read("apps");
161 |
162 | this.$router.push( "/apps/" + new_id );
163 | },
164 |
165 | actionErrors () {
166 | const errors = [];
167 | errors.push( ...this.app_rejections );
168 |
169 | const error = this.app_errors.write;
170 | if ( error ) {
171 | const name = error.name;
172 | if ( name === "RibosomeDeserializeError" ) {
173 | const message = error.message.split('[')[0];
174 | const json = this.$debug( error.data );
175 | errors.push( `${name}: ${message}\n\n${json}` );
176 | }
177 | else
178 | errors.push( this.app_errors.write );
179 | }
180 |
181 | return errors;
182 | },
183 | },
184 | };
185 | };
186 |
187 | async function single () {
188 | return {
189 | "template": await common.load_html("/templates/apps/single.html"),
190 | "data": function() {
191 | const id = this.getPathId("id");
192 |
193 | return {
194 | id,
195 | "datapath": `app/${id}`,
196 | "publisher_datapath": `app/${id}/publisher`,
197 | "package_datapath": `app/${id}/package`,
198 | "ma_history_datapath": `app/${id}/moderator/actions`,
199 | "ma_datapath": `app/${id}/moderator/state`,
200 | };
201 | },
202 | async created () {
203 | await this.mustGet(async () => {
204 | this.$openstate.read( this.publisher_datapath );
205 | await this.$openstate.read( this.datapath );
206 | await this.$openstate.get( this.ma_datapath );
207 | });
208 |
209 | this.readDevHubHapp();
210 | if ( this.app.devhub_address.gui )
211 | this.readDevHubGUI();
212 | },
213 | "computed": {
214 | happ_datapath () {
215 | return this.app?.devhub_address.happ
216 | ? `${this.app.devhub_address.dna}/happ/${this.app.devhub_address.happ}`
217 | : this.$openstate.DEADEND;
218 | },
219 | happ_release_datapath () {
220 | return this.app?.devhub_address.happ
221 | ? `${this.app.devhub_address.dna}/happ/${this.app.devhub_address.happ}/releases/latest`
222 | : this.$openstate.DEADEND;
223 | },
224 | gui_datapath () {
225 | return this.app?.devhub_address.gui
226 | ? `${this.app.devhub_address.dna}/gui/${this.app.devhub_address.gui}`
227 | : this.$openstate.DEADEND;
228 | },
229 | gui_release_datapath () {
230 | return this.app?.devhub_address.gui
231 | ? `${this.app.devhub_address.dna}/gui/${this.app.devhub_address.gui}/releases/latest`
232 | : this.$openstate.DEADEND;
233 | },
234 | ...common.scopedPathComputed( c => c.datapath, "app" ),
235 | ...common.scopedPathComputed( c => c.publisher_datapath, "publisher" ),
236 | ...common.scopedPathComputed( c => c.package_datapath, "package" ),
237 | ...common.scopedPathComputed( c => c.happ_datapath, "happ" ),
238 | ...common.scopedPathComputed( c => c.happ_release_datapath, "happ_release" ),
239 | ...common.scopedPathComputed( c => c.gui_datapath, "gui" ),
240 | ...common.scopedPathComputed( c => c.gui_release_datapath, "gui_release" ),
241 | ...common.scopedPathComputed( c => c.ma_history_datapath, "moderator_actions" ),
242 | ...common.scopedPathComputed( c => c.ma_datapath, "moderator_action" ),
243 |
244 | deprecationModal () {
245 | return new bootstrap.Modal( this.$refs["deprecation-modal"], {
246 | "backdrop": "static",
247 | "keyboard": false,
248 | });
249 | },
250 |
251 | moderatorModal () {
252 | return new bootstrap.Modal( this.$refs["moderator-modal"], {
253 | "backdrop": "static",
254 | "keyboard": false,
255 | });
256 | },
257 | },
258 | "methods": {
259 | refresh () {
260 | this.$openstate.read( this.datapath );
261 | this.$openstate.read( this.publisher_datapath );
262 | },
263 | async readDevHubHapp () {
264 | await this.$openstate.read( this.happ_datapath );
265 | await this.$openstate.read( this.happ_release_datapath );
266 | },
267 | async readDevHubGUI () {
268 | await this.$openstate.read( this.gui_datapath );
269 | await this.$openstate.read( this.gui_release_datapath );
270 | },
271 | async downloadApp () {
272 | if ( this.$package.reading )
273 | return;
274 |
275 | const bytes = await this.$openstate.read( this.package_datapath, {
276 | "rememberState": false,
277 | });
278 |
279 | console.log("App pacakge:", bytes );
280 | this.download( `${this.app.title}.webhapp`, bytes );
281 | },
282 | showModeratorModal ( remove = true ) {
283 | this.moderator_action$.message = "";
284 | this.moderator_action$.metadata.remove = remove;
285 |
286 | this.moderatorModal.show();
287 | },
288 | async confirmDeprecation () {
289 | log.normal("Deprecating App %s", this.app.title );
290 | await this.$openstate.write( this.datapath, "deprecation" );
291 |
292 | this.deprecationModal.hide();
293 | },
294 | async confirmModerator () {
295 | log.normal("Removing App %s", this.app.title );
296 | await this.$openstate.write( this.ma_datapath );
297 | await this.$openstate.resetMutable( this.ma_datapath );
298 |
299 | this.moderatorModal.hide();
300 | },
301 | },
302 | };
303 | };
304 |
305 | async function update () {
306 | return {
307 | "template": await common.load_html("/templates/apps/update.html"),
308 | "data": function() {
309 | const id = this.getPathId("id");
310 |
311 | return {
312 | id,
313 | "datapath": `app/${id}`,
314 | "new_icon": null,
315 | "happ_hrl": null,
316 | "gui_hrl": null,
317 | "invalid_happ_hrl": null,
318 | "invalid_gui_hrl": null,
319 | "use_official_gui": true,
320 | };
321 | },
322 | "computed": {
323 | happ_datapath () {
324 | return this.app$.devhub_address.happ
325 | ? `${this.app$.devhub_address.dna}/happ/${this.app$.devhub_address.happ}`
326 | : this.$openstate.DEADEND;
327 | },
328 | happ_release_datapath () {
329 | return this.app$.devhub_address.happ
330 | ? `${this.app$.devhub_address.dna}/happ/${this.app$.devhub_address.happ}/releases/latest`
331 | : this.$openstate.DEADEND;
332 | },
333 | gui_datapath () {
334 | return this.app$.devhub_address.gui
335 | ? `${this.app$.devhub_address.dna}/gui/${this.app$.devhub_address.gui}`
336 | : this.$openstate.DEADEND;
337 | },
338 | gui_release_datapath () {
339 | return this.app$.devhub_address.gui
340 | ? `${this.app$.devhub_address.dna}/gui/${this.app$.devhub_address.gui}/releases/latest`
341 | : this.$openstate.DEADEND;
342 | },
343 | ...common.scopedPathComputed( c => c.datapath, "app" ),
344 | ...common.scopedPathComputed( `agent/me/publishers`, "publishers", { "get": true }),
345 | ...common.scopedPathComputed( c => c.happ_datapath, "happ" ),
346 | ...common.scopedPathComputed( c => c.happ_release_datapath, "happ_release" ),
347 | ...common.scopedPathComputed( c => c.gui_datapath, "gui" ),
348 | ...common.scopedPathComputed( c => c.gui_release_datapath, "gui_release" ),
349 | },
350 | async created () {
351 | await this.mustGet(async () => {
352 | await this.$openstate.get( this.datapath );
353 |
354 | this.use_official_gui = !this.app$.devhub_address.gui;
355 | });
356 |
357 | this.readDevHubHapp();
358 | if ( this.app$.devhub_address.gui )
359 | this.readDevHubGUI();
360 | },
361 | "methods": {
362 | refreshDevHubPaths () {
363 | this.readDevHubHapp();
364 | this.readDevHubGUI();
365 | },
366 | async readDevHubHapp () {
367 | await this.$openstate.read( this.happ_datapath );
368 | await this.$openstate.read( this.happ_release_datapath );
369 | },
370 | async readDevHubGUI () {
371 | await this.$openstate.read( this.gui_datapath );
372 | await this.$openstate.read( this.gui_release_datapath );
373 | },
374 | handleHappHRL ( hrl ) {
375 | if ( !hrl ) {
376 | this.invalid_happ_hrl = "HRL is required";
377 | return;
378 | }
379 |
380 | log.info("hApp HRL:", hrl );
381 | try {
382 | let [dna_hash, happ_hash] = common.parseHRL( hrl );
383 |
384 | this.app$.devhub_address.dna = dna_hash;
385 | this.setDevHubHapp( happ_hash );
386 | this.invalid_happ_hrl = false;
387 | } catch (err) {
388 | this.invalid_happ_hrl = String(err);
389 | }
390 | },
391 | handleGUIHRL ( hrl ) {
392 | if ( !hrl ) {
393 | this.invalid_gui_hrl = "HRL is required";
394 | return;
395 | }
396 |
397 | log.info("GUI HRL:", hrl );
398 | try {
399 | let [dna_hash, gui_hash] = common.parseHRL( hrl );
400 |
401 | if ( String(dna_hash) !== String(this.app$.devhub_address.dna) )
402 | throw new Error(`DNA hash from GUI HRL does not match the DNA hash in the hApp HRL`);
403 |
404 | this.setDevHubGUI( gui_hash );
405 | this.invalid_gui_hrl = false;
406 | } catch (err) {
407 | this.invalid_gui_hrl = String(err);
408 | }
409 | },
410 | setDevHubHapp ( happ_id ) {
411 | this.app$.devhub_address.happ = happ_id;
412 | this.readDevHubHapp();
413 | },
414 | setDevHubGUI ( gui_id ) {
415 | this.app$.devhub_address.gui = gui_id;
416 | this.readDevHubGUI();
417 | },
418 | resetDevHubAddress () {
419 | this.app$.devhub_address.happ = null;
420 | this.app$.devhub_address.gui = null;
421 | this.gui_hrl = null;
422 | this.use_official_gui = true;
423 | },
424 | async compressIcon () {
425 | if ( !this.new_icon )
426 | return;
427 |
428 | if ( this.new_icon.file?.name.endsWith(".svg") )
429 | return;
430 |
431 | const compressed = await common.compressImage( this.new_icon, {
432 | "mimeType": "image/jpeg",
433 | "maxWidth": 512,
434 | "maxHeight": 512,
435 | "convertSize": 50_000,
436 | });
437 | this.new_icon = compressed.result;
438 | },
439 | async update () {
440 | console.log("Writing", this.app$ );
441 |
442 | let current_icon_bytes = this.$openstate.state[`appstore/memory/${this.app$.icon}`];
443 | if ( this.new_icon &&
444 | !common.equalUint8Arrays( this.new_icon, current_icon_bytes ) ) {
445 | this.app$.icon = this.new_icon;
446 |
447 | if ( this.new_icon.file?.name.endsWith(".svg") )
448 | this.app$.metadata.icon_mime_type = "image/svg+xml";
449 | else
450 | delete this.app$.metadata.icon_mime_type;
451 | }
452 | await this.$openstate.write( this.datapath );
453 |
454 | this.new_icon = null;
455 | await this.$openstate.read("apps");
456 |
457 | this.$router.push( "/apps/" + this.id );
458 | },
459 |
460 | actionErrors () {
461 | const errors = [];
462 | errors.push( ...this.app_rejections );
463 |
464 | const error = this.app_errors.write;
465 | if ( error ) {
466 | const name = error.name;
467 | if ( name === "RibosomeDeserializeError" ) {
468 | const message = error.message.split('[')[0];
469 | const json = this.$debug( error.data );
470 | errors.push( `${name}: ${message}\n\n${json}` );
471 | }
472 | else
473 | errors.push( this.app_errors.write );
474 | }
475 |
476 | return errors;
477 | },
478 | },
479 | };
480 | };
481 |
482 | return {
483 | create,
484 | update,
485 | single,
486 | };
487 | };
488 |
--------------------------------------------------------------------------------
/flake.lock:
--------------------------------------------------------------------------------
1 | {
2 | "nodes": {
3 | "cargo-chef": {
4 | "flake": false,
5 | "locked": {
6 | "lastModified": 1672901199,
7 | "narHash": "sha256-MHTuR4aQ1rQaBKx1vWDy2wbvcT0ZAzpkVB2zylSC+k0=",
8 | "owner": "LukeMathWalker",
9 | "repo": "cargo-chef",
10 | "rev": "5c9f11578a2e0783cce27666737d50f84510b8b5",
11 | "type": "github"
12 | },
13 | "original": {
14 | "owner": "LukeMathWalker",
15 | "ref": "main",
16 | "repo": "cargo-chef",
17 | "type": "github"
18 | }
19 | },
20 | "cargo-rdme": {
21 | "flake": false,
22 | "locked": {
23 | "lastModified": 1675118998,
24 | "narHash": "sha256-lrYWqu3h88fr8gG3Yo5GbFGYaq5/1Os7UtM+Af0Bg4k=",
25 | "owner": "orium",
26 | "repo": "cargo-rdme",
27 | "rev": "f9dbb6bccc078f4869f45ae270a2890ac9a75877",
28 | "type": "github"
29 | },
30 | "original": {
31 | "owner": "orium",
32 | "ref": "v1.1.0",
33 | "repo": "cargo-rdme",
34 | "type": "github"
35 | }
36 | },
37 | "crane": {
38 | "inputs": {
39 | "flake-compat": "flake-compat",
40 | "flake-utils": "flake-utils",
41 | "nixpkgs": [
42 | "holochain-flake",
43 | "nixpkgs"
44 | ],
45 | "rust-overlay": "rust-overlay"
46 | },
47 | "locked": {
48 | "lastModified": 1675475924,
49 | "narHash": "sha256-KWdfV9a6+zG6Ij/7PZYLnomjBZZUu8gdRy+hfjGrrJQ=",
50 | "owner": "ipetkov",
51 | "repo": "crane",
52 | "rev": "1bde9c762ebf26de9f8ecf502357c92105bc4577",
53 | "type": "github"
54 | },
55 | "original": {
56 | "owner": "ipetkov",
57 | "repo": "crane",
58 | "type": "github"
59 | }
60 | },
61 | "crate2nix": {
62 | "flake": false,
63 | "locked": {
64 | "lastModified": 1675642992,
65 | "narHash": "sha256-uDBDZuiq7qyg82Udp82/r4zg5HKfIzBQqgl2U9THiQM=",
66 | "owner": "kolloch",
67 | "repo": "crate2nix",
68 | "rev": "45fc83132c8c91c77a1cd61fe0c945411d1edba8",
69 | "type": "github"
70 | },
71 | "original": {
72 | "owner": "kolloch",
73 | "repo": "crate2nix",
74 | "type": "github"
75 | }
76 | },
77 | "flake-compat": {
78 | "flake": false,
79 | "locked": {
80 | "lastModified": 1673956053,
81 | "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
82 | "owner": "edolstra",
83 | "repo": "flake-compat",
84 | "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
85 | "type": "github"
86 | },
87 | "original": {
88 | "owner": "edolstra",
89 | "repo": "flake-compat",
90 | "type": "github"
91 | }
92 | },
93 | "flake-compat_2": {
94 | "flake": false,
95 | "locked": {
96 | "lastModified": 1673956053,
97 | "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
98 | "owner": "edolstra",
99 | "repo": "flake-compat",
100 | "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
101 | "type": "github"
102 | },
103 | "original": {
104 | "owner": "edolstra",
105 | "repo": "flake-compat",
106 | "type": "github"
107 | }
108 | },
109 | "flake-parts": {
110 | "inputs": {
111 | "nixpkgs-lib": "nixpkgs-lib"
112 | },
113 | "locked": {
114 | "lastModified": 1675295133,
115 | "narHash": "sha256-dU8fuLL98WFXG0VnRgM00bqKX6CEPBLybhiIDIgO45o=",
116 | "owner": "hercules-ci",
117 | "repo": "flake-parts",
118 | "rev": "bf53492df08f3178ce85e0c9df8ed8d03c030c9f",
119 | "type": "github"
120 | },
121 | "original": {
122 | "id": "flake-parts",
123 | "type": "indirect"
124 | }
125 | },
126 | "flake-utils": {
127 | "locked": {
128 | "lastModified": 1667395993,
129 | "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
130 | "owner": "numtide",
131 | "repo": "flake-utils",
132 | "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
133 | "type": "github"
134 | },
135 | "original": {
136 | "owner": "numtide",
137 | "repo": "flake-utils",
138 | "type": "github"
139 | }
140 | },
141 | "flake-utils_2": {
142 | "locked": {
143 | "lastModified": 1659877975,
144 | "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
145 | "owner": "numtide",
146 | "repo": "flake-utils",
147 | "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
148 | "type": "github"
149 | },
150 | "original": {
151 | "owner": "numtide",
152 | "repo": "flake-utils",
153 | "type": "github"
154 | }
155 | },
156 | "holochain": {
157 | "flake": false,
158 | "locked": {
159 | "lastModified": 1694632043,
160 | "narHash": "sha256-5QWUpWnwuzUi3hROrOZyQNla8iGdr+oGCH2nniRePBE=",
161 | "owner": "holochain",
162 | "repo": "holochain",
163 | "rev": "1f59d33623031eefe76b5f3573970c9c33f21877",
164 | "type": "github"
165 | },
166 | "original": {
167 | "owner": "holochain",
168 | "ref": "holochain-0.2.2",
169 | "repo": "holochain",
170 | "type": "github"
171 | }
172 | },
173 | "holochain-flake": {
174 | "inputs": {
175 | "cargo-chef": "cargo-chef",
176 | "cargo-rdme": "cargo-rdme",
177 | "crane": "crane",
178 | "crate2nix": "crate2nix",
179 | "flake-compat": "flake-compat_2",
180 | "flake-parts": "flake-parts",
181 | "holochain": "holochain",
182 | "lair": "lair",
183 | "launcher": [
184 | "holochain-flake",
185 | "versions",
186 | "launcher"
187 | ],
188 | "nix-filter": "nix-filter",
189 | "nixpkgs": "nixpkgs",
190 | "pre-commit-hooks-nix": "pre-commit-hooks-nix",
191 | "rust-overlay": "rust-overlay_2",
192 | "scaffolding": [
193 | "holochain-flake",
194 | "versions",
195 | "scaffolding"
196 | ],
197 | "versions": "versions"
198 | },
199 | "locked": {
200 | "lastModified": 1679465852,
201 | "narHash": "sha256-NPTidQcJn6XTmGXxN9ue2DEJqzcgmTzGtmmi8KITVJc=",
202 | "owner": "holochain",
203 | "repo": "holochain",
204 | "rev": "f6e8935c46f68f4a5ed6400838afa6a99b62e276",
205 | "type": "github"
206 | },
207 | "original": {
208 | "owner": "holochain",
209 | "repo": "holochain",
210 | "type": "github"
211 | }
212 | },
213 | "holochain-nix-versions": {
214 | "inputs": {
215 | "holochain": "holochain_3",
216 | "lair": "lair_3",
217 | "launcher": "launcher_2",
218 | "scaffolding": "scaffolding_2"
219 | },
220 | "locked": {
221 | "dir": "versions/0_2",
222 | "lastModified": 1684218489,
223 | "narHash": "sha256-k6FKy1k+/8qhnXWwWZcAR5F28Ip3CV+/ERoJ1xCSsCA=",
224 | "owner": "holochain",
225 | "repo": "holochain",
226 | "rev": "e6d3e965814d0bf8f4c77a2f7c4116a27446ab4a",
227 | "type": "github"
228 | },
229 | "original": {
230 | "dir": "versions/0_2",
231 | "owner": "holochain",
232 | "repo": "holochain",
233 | "type": "github"
234 | }
235 | },
236 | "holochain_2": {
237 | "flake": false,
238 | "locked": {
239 | "lastModified": 1681507583,
240 | "narHash": "sha256-lRnums2gv1oXVwo4gMF2QAnzEu8prwxg1uKjUzNwJV4=",
241 | "owner": "holochain",
242 | "repo": "holochain",
243 | "rev": "ac50baed6b53e9d0552729e69e1e20312e4edc08",
244 | "type": "github"
245 | },
246 | "original": {
247 | "owner": "holochain",
248 | "ref": "holochain-0.1.4",
249 | "repo": "holochain",
250 | "type": "github"
251 | }
252 | },
253 | "holochain_3": {
254 | "flake": false,
255 | "locked": {
256 | "lastModified": 1684139928,
257 | "narHash": "sha256-uno5MTiBwf9RiEiX6iKzJsB+3srJFKwV/1ReXzaZVVw=",
258 | "owner": "holochain",
259 | "repo": "holochain",
260 | "rev": "a91b262e87653f5f2e3a50c06eaac2bb81fb88d3",
261 | "type": "github"
262 | },
263 | "original": {
264 | "owner": "holochain",
265 | "ref": "holochain-0.2.1-beta-dev.0",
266 | "repo": "holochain",
267 | "type": "github"
268 | }
269 | },
270 | "lair": {
271 | "flake": false,
272 | "locked": {
273 | "lastModified": 1691746070,
274 | "narHash": "sha256-CHsTI4yIlkfnYWx2sNgzAoDBvKTLIChybzyJNbB1sMU=",
275 | "owner": "holochain",
276 | "repo": "lair",
277 | "rev": "6ab41b60744515f1760669db6fc5272298a5f324",
278 | "type": "github"
279 | },
280 | "original": {
281 | "owner": "holochain",
282 | "ref": "lair_keystore-v0.3.0",
283 | "repo": "lair",
284 | "type": "github"
285 | }
286 | },
287 | "lair_2": {
288 | "flake": false,
289 | "locked": {
290 | "lastModified": 1670953460,
291 | "narHash": "sha256-cqOr7iWzsNeomYQiiFggzG5Dr4X0ysnTkjtA8iwDLAQ=",
292 | "owner": "holochain",
293 | "repo": "lair",
294 | "rev": "cbfbefefe43073904a914c8181a450209a74167b",
295 | "type": "github"
296 | },
297 | "original": {
298 | "owner": "holochain",
299 | "ref": "lair_keystore-v0.2.3",
300 | "repo": "lair",
301 | "type": "github"
302 | }
303 | },
304 | "lair_3": {
305 | "flake": false,
306 | "locked": {
307 | "lastModified": 1682356264,
308 | "narHash": "sha256-5ZYJ1gyyL3hLR8hCjcN5yremg8cSV6w1iKCOrpJvCmc=",
309 | "owner": "holochain",
310 | "repo": "lair",
311 | "rev": "43be404da0fd9d57bf4429c44def405bd6490f61",
312 | "type": "github"
313 | },
314 | "original": {
315 | "owner": "holochain",
316 | "ref": "lair_keystore-v0.2.4",
317 | "repo": "lair",
318 | "type": "github"
319 | }
320 | },
321 | "launcher": {
322 | "flake": false,
323 | "locked": {
324 | "lastModified": 1677270906,
325 | "narHash": "sha256-/xT//6nqhjpKLMMv41JE0W3H5sE9jKMr8Dedr88D4N8=",
326 | "owner": "holochain",
327 | "repo": "launcher",
328 | "rev": "1ad188a43900c139e52df10a21e3722f41dfb967",
329 | "type": "github"
330 | },
331 | "original": {
332 | "owner": "holochain",
333 | "ref": "holochain-0.1",
334 | "repo": "launcher",
335 | "type": "github"
336 | }
337 | },
338 | "launcher_2": {
339 | "flake": false,
340 | "locked": {
341 | "lastModified": 1683619203,
342 | "narHash": "sha256-Nyfn+Bt5mJh14d2Y3N3RcYelfZwW3mkvvJFtTkCNEX0=",
343 | "owner": "holochain",
344 | "repo": "launcher",
345 | "rev": "b2f3658a4412dc00a8739d3b51f95a518d109432",
346 | "type": "github"
347 | },
348 | "original": {
349 | "owner": "holochain",
350 | "ref": "holochain-0.2",
351 | "repo": "launcher",
352 | "type": "github"
353 | }
354 | },
355 | "nix-filter": {
356 | "locked": {
357 | "lastModified": 1675361037,
358 | "narHash": "sha256-CTbDuDxFD3U3g/dWUB+r+B/snIe+qqP1R+1myuFGe2I=",
359 | "owner": "numtide",
360 | "repo": "nix-filter",
361 | "rev": "e1b2f96c2a31415f362268bc48c3fccf47dff6eb",
362 | "type": "github"
363 | },
364 | "original": {
365 | "owner": "numtide",
366 | "repo": "nix-filter",
367 | "type": "github"
368 | }
369 | },
370 | "nixpkgs": {
371 | "locked": {
372 | "lastModified": 1679262748,
373 | "narHash": "sha256-DQCrrAFrkxijC6haUzOC5ZoFqpcv/tg2WxnyW3np1Cc=",
374 | "owner": "NixOS",
375 | "repo": "nixpkgs",
376 | "rev": "60c1d71f2ba4c80178ec84523c2ca0801522e0a6",
377 | "type": "github"
378 | },
379 | "original": {
380 | "id": "nixpkgs",
381 | "ref": "nixos-unstable",
382 | "type": "indirect"
383 | }
384 | },
385 | "nixpkgs-lib": {
386 | "locked": {
387 | "dir": "lib",
388 | "lastModified": 1675183161,
389 | "narHash": "sha256-Zq8sNgAxDckpn7tJo7V1afRSk2eoVbu3OjI1QklGLNg=",
390 | "owner": "NixOS",
391 | "repo": "nixpkgs",
392 | "rev": "e1e1b192c1a5aab2960bf0a0bd53a2e8124fa18e",
393 | "type": "github"
394 | },
395 | "original": {
396 | "dir": "lib",
397 | "owner": "NixOS",
398 | "ref": "nixos-unstable",
399 | "repo": "nixpkgs",
400 | "type": "github"
401 | }
402 | },
403 | "pre-commit-hooks-nix": {
404 | "flake": false,
405 | "locked": {
406 | "lastModified": 1676513100,
407 | "narHash": "sha256-MK39nQV86L2ag4TmcK5/+r1ULpzRLPbbfvWbPvIoYJE=",
408 | "owner": "cachix",
409 | "repo": "pre-commit-hooks.nix",
410 | "rev": "5f0cba88ac4d6dd8cad5c6f6f1540b3d6a21a798",
411 | "type": "github"
412 | },
413 | "original": {
414 | "owner": "cachix",
415 | "repo": "pre-commit-hooks.nix",
416 | "type": "github"
417 | }
418 | },
419 | "root": {
420 | "inputs": {
421 | "flake-parts": [
422 | "holochain-flake",
423 | "flake-parts"
424 | ],
425 | "holochain-flake": "holochain-flake",
426 | "holochain-nix-versions": "holochain-nix-versions",
427 | "nixpkgs": [
428 | "holochain-flake",
429 | "nixpkgs"
430 | ]
431 | }
432 | },
433 | "rust-overlay": {
434 | "inputs": {
435 | "flake-utils": [
436 | "holochain-flake",
437 | "crane",
438 | "flake-utils"
439 | ],
440 | "nixpkgs": [
441 | "holochain-flake",
442 | "crane",
443 | "nixpkgs"
444 | ]
445 | },
446 | "locked": {
447 | "lastModified": 1675391458,
448 | "narHash": "sha256-ukDKZw922BnK5ohL9LhwtaDAdCsJL7L6ScNEyF1lO9w=",
449 | "owner": "oxalica",
450 | "repo": "rust-overlay",
451 | "rev": "383a4acfd11d778d5c2efcf28376cbd845eeaedf",
452 | "type": "github"
453 | },
454 | "original": {
455 | "owner": "oxalica",
456 | "repo": "rust-overlay",
457 | "type": "github"
458 | }
459 | },
460 | "rust-overlay_2": {
461 | "inputs": {
462 | "flake-utils": "flake-utils_2",
463 | "nixpkgs": [
464 | "holochain-flake",
465 | "nixpkgs"
466 | ]
467 | },
468 | "locked": {
469 | "lastModified": 1679451618,
470 | "narHash": "sha256-gWFYRgmeT+8xDYHK4HSuCY9Pi7mSxC+2illHrmDkG7A=",
471 | "owner": "oxalica",
472 | "repo": "rust-overlay",
473 | "rev": "a89d328ca7d106c3fdbbd072b6c7088ab5b798a3",
474 | "type": "github"
475 | },
476 | "original": {
477 | "owner": "oxalica",
478 | "repo": "rust-overlay",
479 | "type": "github"
480 | }
481 | },
482 | "scaffolding": {
483 | "flake": false,
484 | "locked": {
485 | "lastModified": 1677514461,
486 | "narHash": "sha256-xflYnH6whXRqXFAqY2MHVXTWWcesn9OzZuyNhdXjsgo=",
487 | "owner": "holochain",
488 | "repo": "scaffolding",
489 | "rev": "c245d306110f3a5408f1dbe15d6a3725884ef3f4",
490 | "type": "github"
491 | },
492 | "original": {
493 | "owner": "holochain",
494 | "ref": "holochain-0.1",
495 | "repo": "scaffolding",
496 | "type": "github"
497 | }
498 | },
499 | "scaffolding_2": {
500 | "flake": false,
501 | "locked": {
502 | "lastModified": 1683890859,
503 | "narHash": "sha256-/nG2TGU4Q7zy0KGS/opcW1836LZ7FJhA+/OEh5gNj34=",
504 | "owner": "holochain",
505 | "repo": "scaffolding",
506 | "rev": "1ca1092ad5d147bd23a75444874830cc033aa9cf",
507 | "type": "github"
508 | },
509 | "original": {
510 | "owner": "holochain",
511 | "ref": "holochain-0.2",
512 | "repo": "scaffolding",
513 | "type": "github"
514 | }
515 | },
516 | "versions": {
517 | "inputs": {
518 | "holochain": "holochain_2",
519 | "lair": "lair_2",
520 | "launcher": "launcher",
521 | "scaffolding": "scaffolding"
522 | },
523 | "locked": {
524 | "dir": "versions/0_1",
525 | "lastModified": 1684163217,
526 | "narHash": "sha256-haXBmyqyufhckmsVd9BnquhhlbmJF7vKrN9u7SmPeYA=",
527 | "owner": "holochain",
528 | "repo": "holochain",
529 | "rev": "8d9d5837a46599fb165b08cdeb8ecd0ed023de07",
530 | "type": "github"
531 | },
532 | "original": {
533 | "dir": "versions/0_1",
534 | "owner": "holochain",
535 | "repo": "holochain",
536 | "type": "github"
537 | }
538 | }
539 | },
540 | "root": "root",
541 | "version": 7
542 | }
543 |
--------------------------------------------------------------------------------
/static/popper-v2/popper-v2.9.2.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @popperjs/core v2.9.2 - MIT License
3 | */
4 |
5 | "use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function n(e){return null==e?window:"[object Window]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function o(e){return{scrollLeft:(e=n(e)).pageXOffset,scrollTop:e.pageYOffset}}function r(e){return e instanceof n(e).Element||e instanceof Element}function i(e){return e instanceof n(e).HTMLElement||e instanceof HTMLElement}function a(e){return"undefined"!=typeof ShadowRoot&&(e instanceof n(e).ShadowRoot||e instanceof ShadowRoot)}function s(e){return e?(e.nodeName||"").toLowerCase():null}function f(e){return((r(e)?e.ownerDocument:e.document)||window.document).documentElement}function p(e){return t(f(e)).left+o(e).scrollLeft}function c(e){return n(e).getComputedStyle(e)}function l(e){return e=c(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function u(e,r,a){void 0===a&&(a=!1);var c=f(r);e=t(e);var u=i(r),d={scrollLeft:0,scrollTop:0},m={x:0,y:0};return(u||!u&&!a)&&(("body"!==s(r)||l(c))&&(d=r!==n(r)&&i(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:o(r)),i(r)?((m=t(r)).x+=r.clientLeft,m.y+=r.clientTop):c&&(m.x=p(c))),{x:e.left+d.scrollLeft-m.x,y:e.top+d.scrollTop-m.y,width:e.width,height:e.height}}function d(e){var n=t(e),o=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(n.width-o)&&(o=n.width),1>=Math.abs(n.height-r)&&(r=n.height),{x:e.offsetLeft,y:e.offsetTop,width:o,height:r}}function m(e){return"html"===s(e)?e:e.assignedSlot||e.parentNode||(a(e)?e.host:null)||f(e)}function h(e){return 0<=["html","body","#document"].indexOf(s(e))?e.ownerDocument.body:i(e)&&l(e)?e:h(m(e))}function v(e,t){var o;void 0===t&&(t=[]);var r=h(e);return e=r===(null==(o=e.ownerDocument)?void 0:o.body),o=n(r),r=e?[o].concat(o.visualViewport||[],l(r)?r:[]):r,t=t.concat(r),e?t:t.concat(v(m(r)))}function g(e){return i(e)&&"fixed"!==c(e).position?e.offsetParent:null}function y(e){for(var t=n(e),o=g(e);o&&0<=["table","td","th"].indexOf(s(o))&&"static"===c(o).position;)o=g(o);if(o&&("html"===s(o)||"body"===s(o)&&"static"===c(o).position))return t;if(!o)e:{if(o=-1!==navigator.userAgent.toLowerCase().indexOf("firefox"),-1===navigator.userAgent.indexOf("Trident")||!i(e)||"fixed"!==c(e).position)for(e=m(e);i(e)&&0>["html","body"].indexOf(s(e));){var r=c(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||o&&"filter"===r.willChange||o&&r.filter&&"none"!==r.filter){o=e;break e}e=e.parentNode}o=null}return o||t}function b(e){function t(e){o.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){o.has(e)||(e=n.get(e))&&t(e)})),r.push(e)}var n=new Map,o=new Set,r=[];return e.forEach((function(e){n.set(e.name,e)})),e.forEach((function(e){o.has(e.name)||t(e)})),r}function w(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function x(e){return e.split("-")[0]}function O(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&a(n))do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t);return!1}function j(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function E(e,r){if("viewport"===r){r=n(e);var a=f(e);r=r.visualViewport;var s=a.clientWidth;a=a.clientHeight;var l=0,u=0;r&&(s=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=r.offsetLeft,u=r.offsetTop)),e=j(e={width:s,height:a,x:l+p(e),y:u})}else i(r)?((e=t(r)).top+=r.clientTop,e.left+=r.clientLeft,e.bottom=e.top+r.clientHeight,e.right=e.left+r.clientWidth,e.width=r.clientWidth,e.height=r.clientHeight,e.x=e.left,e.y=e.top):(u=f(e),e=f(u),s=o(u),r=null==(a=u.ownerDocument)?void 0:a.body,a=_(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),l=_(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),u=-s.scrollLeft+p(u),s=-s.scrollTop,"rtl"===c(r||e).direction&&(u+=_(e.clientWidth,r?r.clientWidth:0)-a),e=j({width:a,height:l,x:u,y:s}));return e}function D(e,t,n){return t="clippingParents"===t?function(e){var t=v(m(e)),n=0<=["absolute","fixed"].indexOf(c(e).position)&&i(e)?y(e):e;return r(n)?t.filter((function(e){return r(e)&&O(e,n)&&"body"!==s(e)})):[]}(e):[].concat(t),(n=(n=[].concat(t,[n])).reduce((function(t,n){return n=E(e,n),t.top=_(n.top,t.top),t.right=U(n.right,t.right),t.bottom=U(n.bottom,t.bottom),t.left=_(n.left,t.left),t}),E(e,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function L(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function P(e){var t=e.reference,n=e.element,o=(e=e.placement)?x(e):null;e=e?e.split("-")[1]:null;var r=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(o){case"top":r={x:r,y:t.y-n.height};break;case"bottom":r={x:r,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:i};break;case"left":r={x:t.x-n.width,y:i};break;default:r={x:t.x,y:t.y}}if(null!=(o=o?L(o):null))switch(i="y"===o?"height":"width",e){case"start":r[o]-=t[i]/2-n[i]/2;break;case"end":r[o]+=t[i]/2-n[i]/2}return r}function M(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function k(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function A(e,n){void 0===n&&(n={});var o=n;n=void 0===(n=o.placement)?e.placement:n;var i=o.boundary,a=void 0===i?"clippingParents":i,s=void 0===(i=o.rootBoundary)?"viewport":i;i=void 0===(i=o.elementContext)?"popper":i;var p=o.altBoundary,c=void 0!==p&&p;o=M("number"!=typeof(o=void 0===(o=o.padding)?0:o)?o:k(o,C));var l=e.elements.reference;p=e.rects.popper,a=D(r(c=e.elements[c?"popper"===i?"reference":"popper":i])?c:c.contextElement||f(e.elements.popper),a,s),c=P({reference:s=t(l),element:p,strategy:"absolute",placement:n}),p=j(Object.assign({},p,c)),s="popper"===i?p:s;var u={top:a.top-s.top+o.top,bottom:s.bottom-a.bottom+o.bottom,left:a.left-s.left+o.left,right:s.right-a.right+o.right};if(e=e.modifiersData.offset,"popper"===i&&e){var d=e[n];Object.keys(u).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";u[e]+=d[n]*t}))}return u}function W(){for(var e=arguments.length,t=Array(e),n=0;n