@operato/scene-firebase 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ### [0.1.6](https://github.com/things-scene/operato-scene/compare/v0.1.5...v0.1.6) (2022-04-22)
7
+
8
+
9
+ ### :rocket: New Features
10
+
11
+ * migrated firebase from things-factory ([d6212ed](https://github.com/things-scene/operato-scene/commit/d6212edfc28b50a85c5f87f36f9ed466c1aa28b9))
12
+
13
+
14
+ ### :bug: Bug Fix
15
+
16
+ * @hatiolab/things-scene@2.8.2 ([1a5c8ff](https://github.com/things-scene/operato-scene/commit/1a5c8ff968a7e285846026ca77d5a2f92f5d5d63))
17
+ * upgrade [@operato](https://github.com/operato) and [@things-factory](https://github.com/things-factory) ([91ce29f](https://github.com/things-scene/operato-scene/commit/91ce29fe9775fedb8e9ed1d3793b1208e187c7f0))
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Hearty, Oh
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # things-scene-firebase
2
+
3
+ ## build
4
+
5
+ `$ yarn build`
6
+
7
+ | type | filename | for | tested |
8
+ | ---- | --------------------------- | -------------- | ------ |
9
+ | UMD | things-scene-firebase.js | modern browser | O |
10
+ | UMD | things-scene-firebase-ie.js | ie 11 | O |
11
+ | ESM | things-scene-firebase.mjs | modern browser | O |
12
+
13
+ ## publish
14
+
15
+ `$ yarn publish`
Binary file
@@ -0,0 +1,212 @@
1
+ <!--
2
+ @license
3
+ Copyright © 2017 HatioLab Inc. All rights reserved.
4
+ -->
5
+ <!doctype html>
6
+
7
+ <html>
8
+ <head>
9
+ <meta charset="utf-8">
10
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
11
+ <title>firebase Demo</title>
12
+ <script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
13
+
14
+ <link rel="import" href="../../things-scene-viewer/things-scene-viewer.html">
15
+ <link rel="import" href="../../things-scene-viewer/things-scene-layer.html">
16
+ <link rel="import" href="../../things-scene-viewer/things-scene-handler.html">
17
+
18
+ <link rel="import" href="../../things-designer-elements/things-editor-properties.html">
19
+
20
+ <link rel="import" href="./things-scene-firebase.html">
21
+
22
+ <style is="custom-style">
23
+
24
+ things-scene-viewer {
25
+ display: block;
26
+ width: 640px;
27
+ height: 480px;
28
+ }
29
+ </style>
30
+ </head>
31
+ <body unresolved>
32
+
33
+ <template is="dom-bind" id="app">
34
+ <p>An example of <code>&lt;firebase&gt;</code>:</p>
35
+
36
+ <things-scene-viewer id='scene'
37
+ scene='{{scene}}'
38
+ selected='{{selected}}'
39
+ model='[[model]]'
40
+ mode="0">
41
+ <things-scene-layer type="selection-layer"></things-scene-layer>
42
+ <things-scene-layer type="modeling-layer"></things-scene-layer>
43
+ <things-scene-handler type="text-editor"></things-scene-handler>
44
+ <things-scene-handler type="move-handler"></things-scene-handler>
45
+ </things-scene-viewer>
46
+
47
+ <p>Properties</p>
48
+ <things-editor-properties id='props' target="{{props}}" props="[[selected.0.nature.properties]]">
49
+ </things-editor-properties>
50
+
51
+ </template>
52
+
53
+ <script>
54
+ window.addEventListener('WebComponentsReady', function(e) {
55
+ var app = document.querySelector('#app')
56
+
57
+ app.props = {}
58
+
59
+ setTimeout(function() {
60
+ app.scene.on('selected', function(after) {
61
+ var target = after[0]
62
+ var props = {}
63
+ if(target) {
64
+ target.nature.properties.forEach(function(prop) {
65
+ var property = prop.property
66
+ props[property] = target.model[property]
67
+ })
68
+ }
69
+ app.props = props
70
+ });
71
+ });
72
+
73
+ app.$.props.addEventListener('change', function() {
74
+ app.selected[0].set(app.props)
75
+ });
76
+
77
+ app.model = {
78
+ width: 800,
79
+ height: 800,
80
+ components: [{
81
+ type: "rect",
82
+ left: 150,
83
+ top: 150,
84
+ rotation: 10,
85
+ width: 20,
86
+ height: 20,
87
+ strokeStyle: "black",
88
+ templatePrefix: "RECT-",
89
+ retention: 10000,
90
+ data: {
91
+ location: {
92
+ x: 100,
93
+ y: 100
94
+ },
95
+ status: 1
96
+ },
97
+ animation: {
98
+ oncreate: {
99
+ type: "rotation",
100
+ duration: 2000,
101
+ tilt: 30,
102
+ cycle: 50,
103
+ theta: 3.14,
104
+ roundtrip: true,
105
+ scale: 1.3,
106
+ repeat: false
107
+ }
108
+ },
109
+ mappings: [{
110
+ accessor: "location",
111
+ target: "(self)",
112
+ property: "location",
113
+ rule: "value"
114
+ }, {
115
+ accessor: "status",
116
+ target: "(self)",
117
+ property: "fillStyle",
118
+ rule: "map",
119
+ param: {
120
+ 1: "blue",
121
+ 2: "green",
122
+ 3: "red",
123
+ 4: "gray",
124
+ 5: "lightgray",
125
+ 6: "darkgray",
126
+ 7: "yellow",
127
+ 8: "white",
128
+ 9: "black",
129
+ default: "cyan"
130
+ }
131
+ }, {
132
+ accessor: "status",
133
+ target: "(self)",
134
+ property: "rotation",
135
+ rule: "value"
136
+ }]
137
+ }, {
138
+ type: "ellipse",
139
+ strokeStyle: "black",
140
+ cx: 50,
141
+ cy: 50,
142
+ rx: 10,
143
+ ry: 10,
144
+ templatePrefix: "CIRC-",
145
+ retention: 10000,
146
+ animation: {
147
+ oncreate: {
148
+ type: "heartbeat",
149
+ duration: 2000,
150
+ tilt: 30,
151
+ cycle: 50,
152
+ theta: 1,
153
+ roundtrip: true,
154
+ scale: 1.3,
155
+ repeat: false
156
+ }
157
+ },
158
+ data: {
159
+ location: {
160
+ x: 200,
161
+ y: 200
162
+ },
163
+ status: 2
164
+ },
165
+ mappings: [{
166
+ accessor: "location",
167
+ target: "(self)",
168
+ property: "location",
169
+ rule: "value"
170
+ }, {
171
+ accessor: "status",
172
+ target: "(self)",
173
+ property: "fillStyle",
174
+ rule: "map",
175
+ param: {
176
+ 1: "blue",
177
+ 2: "green",
178
+ 3: "red",
179
+ 4: "gray",
180
+ 5: "lightgray",
181
+ 6: "darkgray",
182
+ 7: "yellow",
183
+ 8: "white",
184
+ 9: "black",
185
+ default: "cyan"
186
+ }
187
+ }]
188
+ }, {
189
+ type: 'firebase',
190
+ top: 50,
191
+ left: 50,
192
+ width: 30,
193
+ height: 30,
194
+ fillStyle: '#00ff00',
195
+ strokeStyle: '#000',
196
+ lineWidth: 2,
197
+
198
+ apiKey: "AIzaSyCfqM_viu8mcuUbIupgv0Qh2xD6NWf1thA",
199
+ authDomain: "things-board-399e6.firebaseapp.com",
200
+ databaseURL: "https://things-board-399e6.firebaseio.com",
201
+ projectId: "things-board-399e6",
202
+ storageBucket: "things-board-399e6.appspot.com",
203
+ messagingSenderId: "74237077394",
204
+ childDataPath: "boards/template/data",
205
+ email: 'test@example.com',
206
+ password: 'testpass'
207
+ }]
208
+ };
209
+ });
210
+ </script>
211
+ </body>
212
+ </html>
@@ -0,0 +1,59 @@
1
+ /*
2
+ * Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ var firebase = require('firebase')
5
+
6
+ firebase.initializeApp({
7
+ apiKey: "AIzaSyCfqM_viu8mcuUbIupgv0Qh2xD6NWf1thA",
8
+ authDomain: "things-board-399e6.firebaseapp.com",
9
+ databaseURL: "https://things-board-399e6.firebaseio.com",
10
+ projectId: "things-board-399e6",
11
+ storageBucket: "things-board-399e6.appspot.com",
12
+ messagingSenderId: "74237077394",
13
+ })
14
+
15
+ var email = 'test@example.com';
16
+ var password = 'testpass';
17
+ var mo_path = "boards/template/data/CIRC-03";
18
+ var simulation_path = "boards/template/simulation/CIRC-03";
19
+
20
+ this._database = firebase.database();
21
+
22
+ const auth = firebase.auth();
23
+
24
+ var self = this
25
+ var exit = false
26
+
27
+ auth.onAuthStateChanged(firebaseUser => {
28
+ if (firebaseUser) {
29
+ console.log('logged in');
30
+ var ref_mo = firebase.database().ref().child(mo_path);
31
+ var ref_sim = firebase.database().ref().child(simulation_path);
32
+ setInterval(() => {
33
+ var data = {
34
+ location: {
35
+ x: Math.round(Math.random() * 400),
36
+ y: Math.round(Math.random() * 400)
37
+ },
38
+ status: Math.floor(Math.random() * 5)
39
+ }
40
+ ref_mo.set(data); // Moving Object가 없는 경우에는 set을 해야할 것 같음.
41
+ // ref_mo.update(data);
42
+ ref_sim.push(data);
43
+ }, 1000)
44
+ } else {
45
+ if (exit) {
46
+ console.log('logged out, about to exit');
47
+ process.exit(1);
48
+ }
49
+ }
50
+ })
51
+
52
+ const promise = email ? auth.signInWithEmailAndPassword(email, password) : auth.signInAnonymously();
53
+
54
+ promise.catch(e => console.log(e.message))
55
+
56
+ setTimeout(() => {
57
+ exit = true;
58
+ firebase.auth().signOut();
59
+ }, 100000);
@@ -0,0 +1,5 @@
1
+ <!--
2
+ @license
3
+ Copyright © 2017 HatioLab Inc. All rights reserved.
4
+ -->
5
+ <script src="../things-scene-firebase.js"></script>
@@ -0,0 +1,32 @@
1
+ import { Shape } from '@hatiolab/things-scene';
2
+ declare global {
3
+ var firebase: any;
4
+ }
5
+ declare const Firebase_base: (new (...args: any[]) => {
6
+ isDataSource(): boolean;
7
+ _convertDataFormat(data: any, format: string): any;
8
+ }) & typeof Shape;
9
+ export default class Firebase extends Firebase_base {
10
+ private static _image;
11
+ private _firebase_app;
12
+ private _firebase_auth;
13
+ private _firebase_ref;
14
+ static get image(): HTMLImageElement;
15
+ added(): void;
16
+ _onValue(snapshot: any): void;
17
+ _initFirebase(): void;
18
+ dispose(): void;
19
+ _draw(context: CanvasRenderingContext2D): void;
20
+ get nature(): {
21
+ mutable: boolean;
22
+ resizable: boolean;
23
+ rotatable: boolean;
24
+ properties: {
25
+ type: string;
26
+ label: string;
27
+ name: string;
28
+ property: string;
29
+ }[];
30
+ };
31
+ }
32
+ export {};
@@ -0,0 +1,134 @@
1
+ /*
2
+ * Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import { Component, DataSource, error, RectPath, ScriptLoader, Shape } from '@hatiolab/things-scene';
5
+ const NATURE = {
6
+ mutable: false,
7
+ resizable: true,
8
+ rotatable: true,
9
+ properties: [
10
+ {
11
+ type: 'string',
12
+ label: 'api-key',
13
+ name: 'apiKey',
14
+ property: 'apiKey'
15
+ },
16
+ {
17
+ type: 'string',
18
+ label: 'auth-domain',
19
+ name: 'authDomain',
20
+ property: 'authDomain'
21
+ },
22
+ {
23
+ type: 'string',
24
+ label: 'database-url',
25
+ name: 'databaseURL',
26
+ property: 'databaseURL'
27
+ },
28
+ {
29
+ type: 'string',
30
+ label: 'project-id',
31
+ name: 'projectId',
32
+ property: 'projectId'
33
+ },
34
+ {
35
+ type: 'string',
36
+ label: 'storage-bucket',
37
+ name: 'storageBucket',
38
+ property: 'storageBucket'
39
+ },
40
+ {
41
+ type: 'string',
42
+ label: 'messaging-sender-id',
43
+ name: 'messagingSenderId',
44
+ property: 'messagingSenderId'
45
+ },
46
+ {
47
+ type: 'string',
48
+ label: 'child-data-path',
49
+ name: 'childDataPath',
50
+ property: 'childDataPath'
51
+ },
52
+ {
53
+ type: 'string',
54
+ label: 'email-id',
55
+ name: 'email',
56
+ property: 'email'
57
+ },
58
+ {
59
+ type: 'string',
60
+ label: 'password',
61
+ name: 'password',
62
+ property: 'password'
63
+ }
64
+ ]
65
+ // help: 'scene/component/firebase'
66
+ };
67
+ const FIREBASE_IMAGE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAABiVBMVEVHcEz/01z/vkLztDj/xkr1szn9wEX7v0j5uD//11n1sjf/w0b9vUT/xUb/sS3poSb/rST/tTrxqSv/sjD/tjjsoyT/qx7/tTbpoST/ryn/00r/riX/tDT/tz7/rynpoibooCXpnSj/0UL/rSL/zzv/xE7/0UL/sjHuqyXuqybtqCfqpCb/00r/qhv/zjb/0UL/zjj/zTT/sS//ryf/uEH4skL/1lf/uUD/yir/zC//yyz/yy7/yy3/zDD1ggv1ggz2gw31gQr0gAn+pAz1fQv/0Sr+ogr0gAz/4UT9pg73lw73gAz9og3/zynvbQD/zSn4mg77oA36nQ38zVPudA33jg3wkxD0lA7ucQr1iAz8yVD2uSjwbwDzsyf/0y/7wir/4EH5vij/0C7wrif4kgD+yCvxjA7ubgj9xSjpgQr8yULydQD/qBT/pAn/pxL/pg//qRf/phH/pQ7/oQT/phD/qBb/qx3/pQ3/pAv/2ED/zDH/pA3/tz//ySf+pQ/+0lT/yyv/ySP/yinifeuoAAAAOHRSTlMAFFwZRQgrDiHhNFE8a7py7INK/nfS3o+WnXr+ZqGusIZZnNDJA7vR7fjlvq705o3Z89/GrcqI9AO1jy8AAApzSURBVHhe7NjdjtJQFIZhqYUZhWkgm0i04onBOZETROem1tr/uy3M+HvlMhuKbamcEfZK+l7Bk6ZZ/dIXZ+vq6urqGs3XQ2rmuyfGnia0zDHjWisWkULPLUjpihUp9Bctd/HsjpB5MebyOT2+oYO+zcCjnZzQQcc7ri9nPToHD+Q+kDMy6JmVh3J2SwX94YgGmFNBf7Syr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VC/bczUtOG4CTm+4d078z9uUj+MzZ32tyfu4QbUyQ7f+/fChzHvxYpkH6VSRYZuAx//+pPgVfEmftznuW6lbJpZFWkAfwfvCxN0jDyYRgzMzMzM1/dCbx3RzPDJwAAAABJRU5ErkJggg==';
68
+ var idx = 0;
69
+ export default class Firebase extends DataSource(RectPath(Shape)) {
70
+ static get image() {
71
+ if (!Firebase._image) {
72
+ Firebase._image = new Image();
73
+ Firebase._image.src = FIREBASE_IMAGE;
74
+ }
75
+ return Firebase._image;
76
+ }
77
+ added() {
78
+ ScriptLoader.load('https://www.gstatic.com/firebasejs/4.6.2/firebase.js').then(() => {
79
+ if (!this.app.isViewMode || this._firebase_app)
80
+ return;
81
+ this._initFirebase();
82
+ }, error);
83
+ }
84
+ _onValue(snapshot) {
85
+ this.data = snapshot.val();
86
+ }
87
+ _initFirebase() {
88
+ var { apiKey, authDomain, databaseURL, projectId, storageBucket, messagingSenderId, childDataPath, authToken, email, password } = this.model;
89
+ var self = this;
90
+ this._firebase_app = firebase.initializeApp({ apiKey, authDomain, databaseURL, projectId, storageBucket, messagingSenderId }, 'FBAPP-' + ++idx);
91
+ this._firebase_auth = firebase.auth(this._firebase_app);
92
+ this._firebase_auth.onAuthStateChanged((firebaseUser) => {
93
+ if (firebaseUser) {
94
+ console.log('logged in', firebaseUser);
95
+ self._firebase_ref = this._firebase_app.database().ref().child(childDataPath);
96
+ self._firebase_ref.on('value', self._onValue, self);
97
+ }
98
+ else {
99
+ console.log('not logged in.');
100
+ }
101
+ });
102
+ var promise = email
103
+ ? this._firebase_auth.signInWithEmailAndPassword(email, password)
104
+ : this._firebase_auth.signInAnonymously();
105
+ promise.catch((e) => console.log(e.message));
106
+ }
107
+ dispose() {
108
+ if (this._firebase_app) {
109
+ try {
110
+ this._firebase_ref && this._firebase_ref.off('value', this._onValue, this);
111
+ this._firebase_auth && this._firebase_auth.signOut();
112
+ this._firebase_app && this._firebase_app.delete();
113
+ console.log('disposed - firebase');
114
+ }
115
+ catch (e) {
116
+ console.error(e);
117
+ }
118
+ }
119
+ delete this._firebase_auth;
120
+ delete this._firebase_ref;
121
+ delete this._firebase_app;
122
+ super.dispose();
123
+ }
124
+ _draw(context) {
125
+ var { left, top, width, height } = this.bounds;
126
+ context.beginPath();
127
+ this.drawImage(context, Firebase.image, left, top, width, height);
128
+ }
129
+ get nature() {
130
+ return NATURE;
131
+ }
132
+ }
133
+ Component.register('firebase', Firebase);
134
+ //# sourceMappingURL=firebase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"firebase.js","sourceRoot":"","sources":["../src/firebase.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAMpG,MAAM,MAAM,GAAG;IACb,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;SACnB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,YAAY;SACvB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,aAAa;YACnB,QAAQ,EAAE,aAAa;SACxB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,WAAW;YACjB,QAAQ,EAAE,WAAW;SACtB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,gBAAgB;YACvB,IAAI,EAAE,eAAe;YACrB,QAAQ,EAAE,eAAe;SAC1B;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,qBAAqB;YAC5B,IAAI,EAAE,m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AAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;gBAC1E,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAA;gBACpD,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAA;gBAEjD,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA;aACnC;YAAC,OAAO,CAAC,EAAE;gBACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;aACjB;SACF;QAED,OAAO,IAAI,CAAC,cAAc,CAAA;QAC1B,OAAO,IAAI,CAAC,aAAa,CAAA;QACzB,OAAO,IAAI,CAAC,aAAa,CAAA;QAEzB,KAAK,CAAC,OAAO,EAAE,CAAA;IACjB,CAAC;IAED,KAAK,CAAC,OAAiC;QACrC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,CAAA;QAE9C,OAAO,CAAC,SAAS,EAAE,CAAA;QACnB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;IACnE,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { Component, DataSource, error, RectPath, ScriptLoader, Shape } from '@hatiolab/things-scene'\n\ndeclare global {\n var firebase: any\n}\n\nconst NATURE = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'api-key',\n name: 'apiKey',\n property: 'apiKey'\n },\n {\n type: 'string',\n label: 'auth-domain',\n name: 'authDomain',\n property: 'authDomain'\n },\n {\n type: 'string',\n label: 'database-url',\n name: 'databaseURL',\n property: 'databaseURL'\n },\n {\n type: 'string',\n label: 'project-id',\n name: 'projectId',\n property: 'projectId'\n },\n {\n type: 'string',\n label: 'storage-bucket',\n name: 'storageBucket',\n property: 'storageBucket'\n },\n {\n type: 'string',\n label: 'messaging-sender-id',\n name: 'messagingSenderId',\n property: 'messagingSenderId'\n },\n {\n type: 'string',\n label: 'child-data-path',\n name: 'childDataPath',\n property: 'childDataPath'\n },\n {\n type: 'string',\n label: 'email-id',\n name: 'email',\n property: 'email'\n },\n {\n type: 'string',\n label: 'password',\n name: 'password',\n property: 'password'\n }\n ]\n // help: 'scene/component/firebase'\n}\n\nconst FIREBASE_IMAGE =\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAABiVBMVEVHcEz/01z/vkLztDj/xkr1szn9wEX7v0j5uD//11n1sjf/w0b9vUT/xUb/sS3poSb/rST/tTrxqSv/sjD/tjjsoyT/qx7/tTbpoST/ryn/00r/riX/tDT/tz7/rynpoibooCXpnSj/0UL/rSL/zzv/xE7/0UL/sjHuqyXuqybtqCfqpCb/00r/qhv/zjb/0UL/zjj/zTT/sS//ryf/uEH4skL/1lf/uUD/yir/zC//yyz/yy7/yy3/zDD1ggv1ggz2gw31gQr0gAn+pAz1fQv/0Sr+ogr0gAz/4UT9pg73lw73gAz9og3/zynvbQD/zSn4mg77oA36nQ38zVPudA33jg3wkxD0lA7ucQr1iAz8yVD2uSjwbwDzsyf/0y/7wir/4EH5vij/0C7wrif4kgD+yCvxjA7ubgj9xSjpgQr8yULydQD/qBT/pAn/pxL/pg//qRf/phH/pQ7/oQT/phD/qBb/qx3/pQ3/pAv/2ED/zDH/pA3/tz//ySf+pQ/+0lT/yyv/ySP/yinifeuoAAAAOHRSTlMAFFwZRQgrDiHhNFE8a7py7INK/nfS3o+WnXr+ZqGusIZZnNDJA7vR7fjlvq705o3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zsTXmQZgR24SD3Wnbk/q+R5kLSd0qM0yP1ZJ19szUaOcWfi/uyziuVBDbsz9zcdWdEc1ABn7m9CcvP90/q1t8H9Tc1tbF67szD9BfAOPmLZKdo94cz7t/XgXUSlJHzSmfAytL/hY9No7OfM/WXwZvykrRH7OHN/DuCZsRG7Hs5iwP7ZGJsdF/nImUx/C3AAHhvCh863/ZPcnyOYscHHzkjcn0MESXVC/bczUtOG4CTm+4d078z9uUj+MzZ32tyfu4QbUyQ7f+/fChzHvxYpkH6VSRYZuAx//+pPgVfEmftznuW6lbJpZFWkAfwfvCxN0jDyYRgzMzMzM1/dCbx3RzPDJwAAAABJRU5ErkJggg=='\n\nvar idx = 0\n\nexport default class Firebase extends DataSource(RectPath(Shape)) {\n private static _image: HTMLImageElement\n private _firebase_app: any\n private _firebase_auth: any\n private _firebase_ref: any\n\n static get image() {\n if (!Firebase._image) {\n Firebase._image = new Image()\n Firebase._image.src = FIREBASE_IMAGE\n }\n\n return Firebase._image\n }\n\n added() {\n ScriptLoader.load('https://www.gstatic.com/firebasejs/4.6.2/firebase.js').then(() => {\n if (!this.app.isViewMode || this._firebase_app) return\n\n this._initFirebase()\n }, error)\n }\n\n _onValue(snapshot: any) {\n this.data = snapshot.val()\n }\n\n _initFirebase() {\n var {\n apiKey,\n authDomain,\n databaseURL,\n projectId,\n storageBucket,\n messagingSenderId,\n childDataPath,\n authToken,\n email,\n password\n } = this.model\n\n var self = this\n\n this._firebase_app = firebase.initializeApp(\n { apiKey, authDomain, databaseURL, projectId, storageBucket, messagingSenderId },\n 'FBAPP-' + ++idx\n )\n this._firebase_auth = firebase.auth(this._firebase_app)\n\n this._firebase_auth.onAuthStateChanged((firebaseUser: any) => {\n if (firebaseUser) {\n console.log('logged in', firebaseUser)\n self._firebase_ref = this._firebase_app.database().ref().child(childDataPath)\n self._firebase_ref.on('value', self._onValue, self)\n } else {\n console.log('not logged in.')\n }\n })\n\n var promise = email\n ? this._firebase_auth.signInWithEmailAndPassword(email, password)\n : this._firebase_auth.signInAnonymously()\n\n promise.catch((e: Error) => console.log(e.message))\n }\n\n dispose() {\n if (this._firebase_app) {\n try {\n this._firebase_ref && this._firebase_ref.off('value', this._onValue, this)\n this._firebase_auth && this._firebase_auth.signOut()\n this._firebase_app && this._firebase_app.delete()\n\n console.log('disposed - firebase')\n } catch (e) {\n console.error(e)\n }\n }\n\n delete this._firebase_auth\n delete this._firebase_ref\n delete this._firebase_app\n\n super.dispose()\n }\n\n _draw(context: CanvasRenderingContext2D) {\n var { left, top, width, height } = this.bounds\n\n context.beginPath()\n this.drawImage(context, Firebase.image, left, top, width, height)\n }\n\n get nature() {\n return NATURE\n }\n}\n\nComponent.register('firebase', Firebase)\n"]}
@@ -0,0 +1 @@
1
+ export { default as Firebase } from './firebase';
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ /*
2
+ * Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ export { default as Firebase } from './firebase';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nexport { default as Firebase } from './firebase'\n"]}
@@ -0,0 +1,3 @@
1
+ # firebase[ko]
2
+ ![컴포넌트-데이터 소스][data-source-02]
3
+ 파이어베이스
@@ -0,0 +1,3 @@
1
+ # firebase[en]
2
+ ![Data-Source][data-source-02]
3
+ Firebase
@@ -0,0 +1,3 @@
1
+ # firebase[zh]
2
+ ![Data-Source][data-source-02]
3
+ Firebase
Binary file
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@operato/scene-firebase",
3
+ "description": "Firebase datasource component for things-scene.",
4
+ "license": "MIT",
5
+ "author": "heartyoh",
6
+ "version": "0.1.6",
7
+ "main": "dist/index.js",
8
+ "module": "dist/index.js",
9
+ "things-scene": true,
10
+ "publishConfig": {
11
+ "access": "public",
12
+ "@oprato:registry": "https://registry.npmjs.org"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/things-scene/operato-scene.git",
17
+ "directory": "packages/firebase"
18
+ },
19
+ "scripts": {
20
+ "serve": "tsc && things-factory-dev",
21
+ "start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
22
+ "build": "tsc",
23
+ "prepublish": "tsc",
24
+ "lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
25
+ "format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
26
+ "migration": "things-factory-migration"
27
+ },
28
+ "dependencies": {
29
+ "@hatiolab/things-scene": "^2.8.2"
30
+ },
31
+ "devDependencies": {
32
+ "@hatiolab/prettier-config": "^1.0.0",
33
+ "@operato/board": "^0.4.6",
34
+ "@things-factory/builder": "^4.3.0-alpha.0",
35
+ "@things-factory/operato-board": "^4.3.0-alpha.0",
36
+ "@typescript-eslint/eslint-plugin": "^4.33.0",
37
+ "@typescript-eslint/parser": "^4.33.0",
38
+ "@web/dev-server": "^0.1.28",
39
+ "concurrently": "^5.3.0",
40
+ "eslint": "^7.32.0",
41
+ "eslint-config-prettier": "^8.3.0",
42
+ "husky": "^4.3.8",
43
+ "lint-staged": "^10.5.4",
44
+ "prettier": "^2.4.1",
45
+ "tslib": "^2.3.1",
46
+ "typescript": "^4.5.2"
47
+ },
48
+ "prettier": "@hatiolab/prettier-config",
49
+ "husky": {
50
+ "hooks": {
51
+ "pre-commit": "lint-staged"
52
+ }
53
+ },
54
+ "lint-staged": {
55
+ "*.ts": [
56
+ "eslint --fix",
57
+ "prettier --write"
58
+ ]
59
+ },
60
+ "gitHead": "c198c2bdefddc23e73722904dd7d6a324e63ed81"
61
+ }
@@ -0,0 +1,177 @@
1
+ /*
2
+ * Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+
5
+ import { Component, DataSource, error, RectPath, ScriptLoader, Shape } from '@hatiolab/things-scene'
6
+
7
+ declare global {
8
+ var firebase: any
9
+ }
10
+
11
+ const NATURE = {
12
+ mutable: false,
13
+ resizable: true,
14
+ rotatable: true,
15
+ properties: [
16
+ {
17
+ type: 'string',
18
+ label: 'api-key',
19
+ name: 'apiKey',
20
+ property: 'apiKey'
21
+ },
22
+ {
23
+ type: 'string',
24
+ label: 'auth-domain',
25
+ name: 'authDomain',
26
+ property: 'authDomain'
27
+ },
28
+ {
29
+ type: 'string',
30
+ label: 'database-url',
31
+ name: 'databaseURL',
32
+ property: 'databaseURL'
33
+ },
34
+ {
35
+ type: 'string',
36
+ label: 'project-id',
37
+ name: 'projectId',
38
+ property: 'projectId'
39
+ },
40
+ {
41
+ type: 'string',
42
+ label: 'storage-bucket',
43
+ name: 'storageBucket',
44
+ property: 'storageBucket'
45
+ },
46
+ {
47
+ type: 'string',
48
+ label: 'messaging-sender-id',
49
+ name: 'messagingSenderId',
50
+ property: 'messagingSenderId'
51
+ },
52
+ {
53
+ type: 'string',
54
+ label: 'child-data-path',
55
+ name: 'childDataPath',
56
+ property: 'childDataPath'
57
+ },
58
+ {
59
+ type: 'string',
60
+ label: 'email-id',
61
+ name: 'email',
62
+ property: 'email'
63
+ },
64
+ {
65
+ type: 'string',
66
+ label: 'password',
67
+ name: 'password',
68
+ property: 'password'
69
+ }
70
+ ]
71
+ // help: 'scene/component/firebase'
72
+ }
73
+
74
+ const FIREBASE_IMAGE =
75
+ 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAABiVBMVEVHcEz/01z/vkLztDj/xkr1szn9wEX7v0j5uD//11n1sjf/w0b9vUT/xUb/sS3poSb/rST/tTrxqSv/sjD/tjjsoyT/qx7/tTbpoST/ryn/00r/riX/tDT/tz7/rynpoibooCXpnSj/0UL/rSL/zzv/xE7/0UL/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XumQdTHjKw2SHRWniH1UZSB6Apl4zxdzwz9Oilz/rukRBNzyp4ZejNpfYwK2v2zYgbVx1IQactM/d8dGb+QeF0yWhkzq8QHm2UZiM6WWSW+9xZl3cykN3jcpPUxsdq2Mvqn8LibI8nWpf36QVaeGVqbTrYuGVfnmeWZqXOJ0jG/naVnro98AujJxassmbk+kvxenj+7zDwbym2+WyskgX572fyMeqf8brfsUhyEoTB6QRxLKQiC4FsVEKzdQH+e72O4CwhGjAjdRGHoyqeZ6XChTMFWYzPgWcHhksOXvndGkmUIL5MDpG2t1JR3FqJuEx+GEayrTumpnAWeqrUHw1ls5VHp4wTOhOcq/oBxiEq5V/ujpb8oK5MsIhiPcFNrtbfqjNRsQhgVP61qre05I3J/o5GDdy1SawvvmfuzwTI2RY7vTNhV8RJsEZWNVr2U+zsTXmQZgR24SD3Wnbk/q+R5kLSd0qM0yP1ZJ19szUaOcWfi/uyziuVBDbsz9zcdWdEc1ABn7m9CcvP90/q1t8H9Tc1tbF67szD9BfAOPmLZKdo94cz7t/XgXUSlJHzSmfAytL/hY9No7OfM/WXwZvykrRH7OHN/DuCZsRG7Hs5iwP7ZGJsdF/nImUx/C3AAHhvCh863/ZPcnyOYscHHzkjcn0MESXVC/bczUtOG4CTm+4d078z9uUj+MzZ32tyfu4QbUyQ7f+/fChzHvxYpkH6VSRYZuAx//+pPgVfEmftznuW6lbJpZFWkAfwfvCxN0jDyYRgzMzMzM1/dCbx3RzPDJwAAAABJRU5ErkJggg=='
76
+
77
+ var idx = 0
78
+
79
+ export default class Firebase extends DataSource(RectPath(Shape)) {
80
+ private static _image: HTMLImageElement
81
+ private _firebase_app: any
82
+ private _firebase_auth: any
83
+ private _firebase_ref: any
84
+
85
+ static get image() {
86
+ if (!Firebase._image) {
87
+ Firebase._image = new Image()
88
+ Firebase._image.src = FIREBASE_IMAGE
89
+ }
90
+
91
+ return Firebase._image
92
+ }
93
+
94
+ added() {
95
+ ScriptLoader.load('https://www.gstatic.com/firebasejs/4.6.2/firebase.js').then(() => {
96
+ if (!this.app.isViewMode || this._firebase_app) return
97
+
98
+ this._initFirebase()
99
+ }, error)
100
+ }
101
+
102
+ _onValue(snapshot: any) {
103
+ this.data = snapshot.val()
104
+ }
105
+
106
+ _initFirebase() {
107
+ var {
108
+ apiKey,
109
+ authDomain,
110
+ databaseURL,
111
+ projectId,
112
+ storageBucket,
113
+ messagingSenderId,
114
+ childDataPath,
115
+ authToken,
116
+ email,
117
+ password
118
+ } = this.model
119
+
120
+ var self = this
121
+
122
+ this._firebase_app = firebase.initializeApp(
123
+ { apiKey, authDomain, databaseURL, projectId, storageBucket, messagingSenderId },
124
+ 'FBAPP-' + ++idx
125
+ )
126
+ this._firebase_auth = firebase.auth(this._firebase_app)
127
+
128
+ this._firebase_auth.onAuthStateChanged((firebaseUser: any) => {
129
+ if (firebaseUser) {
130
+ console.log('logged in', firebaseUser)
131
+ self._firebase_ref = this._firebase_app.database().ref().child(childDataPath)
132
+ self._firebase_ref.on('value', self._onValue, self)
133
+ } else {
134
+ console.log('not logged in.')
135
+ }
136
+ })
137
+
138
+ var promise = email
139
+ ? this._firebase_auth.signInWithEmailAndPassword(email, password)
140
+ : this._firebase_auth.signInAnonymously()
141
+
142
+ promise.catch((e: Error) => console.log(e.message))
143
+ }
144
+
145
+ dispose() {
146
+ if (this._firebase_app) {
147
+ try {
148
+ this._firebase_ref && this._firebase_ref.off('value', this._onValue, this)
149
+ this._firebase_auth && this._firebase_auth.signOut()
150
+ this._firebase_app && this._firebase_app.delete()
151
+
152
+ console.log('disposed - firebase')
153
+ } catch (e) {
154
+ console.error(e)
155
+ }
156
+ }
157
+
158
+ delete this._firebase_auth
159
+ delete this._firebase_ref
160
+ delete this._firebase_app
161
+
162
+ super.dispose()
163
+ }
164
+
165
+ _draw(context: CanvasRenderingContext2D) {
166
+ var { left, top, width, height } = this.bounds
167
+
168
+ context.beginPath()
169
+ this.drawImage(context, Firebase.image, left, top, width, height)
170
+ }
171
+
172
+ get nature() {
173
+ return NATURE
174
+ }
175
+ }
176
+
177
+ Component.register('firebase', Firebase)
package/src/index.ts ADDED
@@ -0,0 +1,4 @@
1
+ /*
2
+ * Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ export { default as Firebase } from './firebase'
@@ -0,0 +1,67 @@
1
+ <!doctype html>
2
+ <!--
3
+ @license
4
+ Copyright © 2017 HatioLab Inc. All rights reserved.
5
+ -->
6
+ <html>
7
+ <head>
8
+ <meta charset="utf-8">
9
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
10
+
11
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
12
+ <script src="../../web-component-tester/browser.js"></script>
13
+
14
+ <!-- Step 1: import the element to test -->
15
+ <link rel="import" href="../things-scene-firebase.html">
16
+ </head>
17
+ <body>
18
+
19
+ <!-- You can use the document as a place to set up your fixtures. -->
20
+ <test-fixture id="things-scene-firebase-fixture">
21
+ <template>
22
+ <things-scene-firebase>
23
+ <h2>things-scene-firebase</h2>
24
+ </things-scene-firebase>
25
+ </template>
26
+ </test-fixture>
27
+
28
+ <script>
29
+ suite('<things-scene-firebase>', function() {
30
+
31
+ var myEl;
32
+
33
+ setup(function() {
34
+ myEl = fixture('things-scene-firebase-fixture');
35
+ });
36
+
37
+ test('defines the "author" property', function() {
38
+ assert.equal(myEl.author.name, 'Dimitri Glazkov');
39
+ assert.equal(myEl.author.image, 'http://addyosmani.com/blog/wp-content/uploads/2013/04/unicorn.jpg');
40
+ });
41
+
42
+ test('says hello', function() {
43
+ assert.equal(myEl.sayHello(), 'things-scene-firebase says, Hello World!');
44
+
45
+ var greetings = myEl.sayHello('greetings Earthlings');
46
+ assert.equal(greetings, 'things-scene-firebase says, greetings Earthlings');
47
+ });
48
+
49
+ test('fires lasers', function(done) {
50
+ myEl.addEventListener('things-scene-firebase-lasers', function(event) {
51
+ assert.equal(event.detail.sound, 'Pew pew!');
52
+ done();
53
+ });
54
+ myEl.fireLasers();
55
+ });
56
+
57
+ test('distributed children', function() {
58
+ var els = myEl.getContentChildren();
59
+ assert.equal(els.length, 1, 'one distributed node');
60
+ assert.equal(els[0], myEl.querySelector('h2'), 'content distributed correctly');
61
+ });
62
+
63
+ });
64
+ </script>
65
+
66
+ </body>
67
+ </html>
@@ -0,0 +1,22 @@
1
+ <!DOCTYPE html>
2
+ <!--
3
+ @license
4
+ Copyright © 2017 HatioLab Inc. All rights reserved.
5
+ -->
6
+ <html><head>
7
+ <meta charset="utf-8">
8
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
9
+
10
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
11
+ <script src="../../web-component-tester/browser.js"></script>
12
+ </head>
13
+ <body>
14
+ <script>
15
+ // Load and run all tests (.html, .js):
16
+ WCT.loadSuites([
17
+ 'basic-test.html',
18
+ 'basic-test.html?dom=shadow'
19
+ ]);
20
+ </script>
21
+
22
+ </body></html>
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import './util'
5
+
6
+ import { expect } from 'chai'
7
+
8
+ import '../../bower_components/things-scene-core/things-scene-min'
9
+ import { Firebase } from '../../src/index'
10
+
11
+ describe('Firebase', function () {
12
+
13
+ var board;
14
+
15
+ beforeEach(function () {
16
+ board = scene.create({
17
+ model: {
18
+ components: [{
19
+ id: 'firebase',
20
+ type: 'firebase'
21
+ }]
22
+ }
23
+ })
24
+ });
25
+
26
+ it('component should be found by its id.', function () {
27
+
28
+ var component = board.findById('firebase')
29
+
30
+ expect(!!component).not.to.equal(false);
31
+ });
32
+ });
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ var noop = () => {}
5
+
6
+ global.Canvas = require('canvas');
7
+
8
+ Canvas.prototype.setAttribute = noop;
9
+ Canvas.prototype.style = {};
10
+
11
+ global.Image = Canvas.Image;
12
+ global.screen = {
13
+ width: 1280,
14
+ height: 800
15
+ };
16
+
17
+ global.window = global;
18
+
19
+ global.addEventListener = noop;
20
+ global.location = {};
21
+ global.getComputedStyle = noop;
@@ -0,0 +1,30 @@
1
+ const icon = new URL('./icons/firebase.png', import.meta.url).href
2
+
3
+ var templates = [
4
+ {
5
+ type: 'firebase',
6
+ description: 'firebase',
7
+ group: 'dataSource',
8
+ icon,
9
+ model: {
10
+ type: 'firebase',
11
+ top: 50,
12
+ left: 50,
13
+ width: 100,
14
+ height: 100,
15
+ apiKey: 'AIzaSyBtJayCKxuU-_lPaZvbLmOgqFlynMIu_sM',
16
+ authDomain: 'things-rtls.firebaseapp.com',
17
+ databaseURL: 'https://things-rtls.firebaseio.com',
18
+ projectId: 'things-rtls',
19
+ storageBucket: 'things-rtls.appspot.com',
20
+ messagingSenderId: '32358989541',
21
+ childDataPath: 'boards/template/data',
22
+ email: 'test@example.com',
23
+ password: 'testpass'
24
+ }
25
+ }
26
+ ]
27
+
28
+ export default {
29
+ templates
30
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2018",
4
+ "module": "esnext",
5
+ "moduleResolution": "node",
6
+ "noEmitOnError": true,
7
+ "lib": ["es2017", "dom"],
8
+ "strict": true,
9
+ "esModuleInterop": false,
10
+ "allowSyntheticDefaultImports": true,
11
+ "experimentalDecorators": true,
12
+ "importHelpers": true,
13
+ "outDir": "dist",
14
+ "sourceMap": true,
15
+ "inlineSources": true,
16
+ "rootDir": "src",
17
+ "declaration": true,
18
+ "incremental": true,
19
+ "types": ["node"]
20
+ },
21
+ "include": ["**/*.ts", "*.d.ts"]
22
+ }
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@hatiolab/things-scene/things-scene.d.ts","./src/firebase.ts","./src/index.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"89f78430e422a0f06d13019d60d5a45b37ec2d28e67eb647f73b1b0d19a46b72","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"abba1071bfd89e55e88a054b0c851ea3e8a494c340d0f3fab19eb18f6afb0c9e","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"d071129cba6a5f2700be09c86c07ad2791ab67d4e5ed1eb301d6746c62745ea4","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"12f4cfe2fe60b810c3174537bc2ddb20c1067b7768643d12cb1266fd183afb75","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","fe4a2042d087990ebfc7dc0142d5aaf5a152e4baea86b45f283f103ec1e871ea","d88a479cccf787b4aa82362150fbeba5211a32dbfafa7b92ba6995ecaf9a1a89","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","ae9930989ed57478eb03b9b80ad3efa7a3eacdfeff0f78ecf7894c4963a64f93","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","6ac6f24aff52e62c3950461aa17eab26e3a156927858e6b654baef0058b4cd1e",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"848f18360730573ec986925b80565ca07898a672aacdac858d230c006abf4b4b",{"version":"5d710d763cc24f6222891fc2bbf13d2fdbe09254dc60cbf3b666c2a4c3f82769","signature":"dbe3e5ee4587c0627ea12d74d30c37087588bd46a60fd70543126f6de1ff0ec1","affectsGlobalScope":true},{"version":"90775e7d9ecf06209058940ee88539d3b6fa7fb73cb4a6e7c133993636e59323","signature":"c2fdffc89e2a4d1ee0f0772c080dd3abb805699a3f2817317d094d9e3bcddbb8"},"0cba3a5d7b81356222594442753cf90dd2892e5ccfe1d262aaca6896ba6c1380","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"c2ab70bbc7a24c42a790890739dd8a0ba9d2e15038b40dff8163a97a5d148c00","affectsGlobalScope":true},"422dbb183fdced59425ca072c8bd09efaa77ce4e2ab928ec0d8a1ce062d2a45a",{"version":"48d40223f385f00deb112cbc469ddf33e78bd746f6a88d05577f9f75dd614545","affectsGlobalScope":true},"1dab5ab6bcf11de47ab9db295df8c4f1d92ffa750e8f095e88c71ce4c3299628","f71f46ccd5a90566f0a37b25b23bc4684381ab2180bdf6733f4e6624474e1894",{"version":"54e65985a3ee3cec182e6a555e20974ea936fc8b8d1738c14e8ed8a42bd921d4","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","98a3ebfa494b46265634a73459050befba5da8fdc6ca0ef9b7269421780f4ff3","34e5de87d983bc6aefef8b17658556e3157003e8d9555d3cb098c6bef0b5fbc8","cc0b61316c4f37393f1f9595e93b673f4184e9d07f4c127165a490ec4a928668","f27371653aded82b2b160f7a7033fb4a5b1534b6f6081ef7be1468f0f15327d3","c762cd6754b13a461c54b59d0ae0ab7aeef3c292c6cf889873f786ee4d8e75c9","f4ea7d5df644785bd9fbf419930cbaec118f0d8b4160037d2339b8e23c059e79",{"version":"bfea28e6162ed21a0aeed181b623dcf250aa79abf49e24a6b7e012655af36d81","affectsGlobalScope":true},"7a5459efa09ea82088234e6533a203d528c594b01787fb90fba148885a36e8b6","ae97e20f2e10dbeec193d6a2f9cd9a367a1e293e7d6b33b68bacea166afd7792","10d4796a130577d57003a77b95d8723530bbec84718e364aa2129fa8ffba0378","ad41bb744149e92adb06eb953da195115620a3f2ad48e7d3ae04d10762dae197","bf73c576885408d4a176f44a9035d798827cc5020d58284cb18d7573430d9022","7ae078ca42a670445ae0c6a97c029cb83d143d62abd1730efb33f68f0b2c0e82",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"5d0a9ea09d990b5788f867f1c79d4878f86f7384cb7dab38eecbf22f9efd063d","12eea70b5e11e924bb0543aea5eadc16ced318aa26001b453b0d561c2fd0bd1e","08777cd9318d294646b121838574e1dd7acbb22c21a03df84e1f2c87b1ad47f2","08a90bcdc717df3d50a2ce178d966a8c353fd23e5c392fd3594a6e39d9bb6304",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"2a12d2da5ac4c4979401a3f6eaafa874747a37c365e4bc18aa2b171ae134d21b","002b837927b53f3714308ecd96f72ee8a053b8aeb28213d8ec6de23ed1608b66","1dc9c847473bb47279e398b22c740c83ea37a5c88bf66629666e3cf4c5b9f99c","a9e4a5a24bf2c44de4c98274975a1a705a0abbaad04df3557c2d3cd8b1727949","00fa7ce8bc8acc560dc341bbfdf37840a8c59e6a67c9bfa3fa5f36254df35db2","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"cfe724f7c694aab65a9bdd1acb05997848c504548c9d4c71645c187a091cfa2a","5f0ed51db151c2cdc4fa3bb0f44ce6066912ad001b607a34e65a96c52eb76248",{"version":"3345c276cab0e76dda86c0fb79104ff915a4580ba0f3e440870e183b1baec476","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","e383ff72aabf294913f8c346f5da1445ae6ad525836d28efd52cbadc01a361a6","f52fbf64c7e480271a9096763c4882d356b05cab05bf56a64e68a95313cd2ce2","59bdb65f28d7ce52ccfc906e9aaf422f8b8534b2d21c32a27d7819be5ad81df7",{"version":"0c5004386ed814334d2d4abd1d8f2f0b63ea2134d5717d8fb2fb8aabc05288ef","affectsGlobalScope":true},"28a2e7383fd898c386ffdcacedf0ec0845e5d1a86b5a43f25b86bc315f556b79","3aff9c8c36192e46a84afe7b926136d520487155154ab9ba982a8b544ea8fc95","a880cf8d85af2e4189c709b0fea613741649c0e40fffb4360ec70762563d5de0","85bbf436a15bbeda4db888be3062d47f99c66fd05d7c50f0f6473a9151b6a070","9f9c49c95ecd25e0cb2587751925976cf64fd184714cb11e213749c80cf0f927","f0c75c08a71f9212c93a719a25fb0320d53f2e50ca89a812640e08f8ad8c408c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"9cafe917bf667f1027b2bb62e2de454ecd2119c80873ad76fc41d941089753b8"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":false,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitOnError":true,"outDir":"./dist","rootDir":"./src","sourceMap":true,"strict":true,"target":5},"fileIdsList":[[53,100],[41,43,44,45,46,47,48,49,50,51,52,53,100],[41,42,44,45,46,47,48,49,50,51,52,53,100],[42,43,44,45,46,47,48,49,50,51,52,53,100],[41,42,43,45,46,47,48,49,50,51,52,53,100],[41,42,43,44,46,47,48,49,50,51,52,53,100],[41,42,43,44,45,47,48,49,50,51,52,53,100],[41,42,43,44,45,46,48,49,50,51,52,53,100],[41,42,43,44,45,46,47,49,50,51,52,53,100],[41,42,43,44,45,46,47,48,50,51,52,53,100],[41,42,43,44,45,46,47,48,49,51,52,53,100],[41,42,43,44,45,46,47,48,49,50,52,53,100],[41,42,43,44,45,46,47,48,49,50,51,53,100],[41,42,43,44,45,46,47,48,49,50,51,52,100],[57,100],[60,100],[61,66,100],[62,72,73,80,89,99,100],[62,63,72,80,100],[64,100],[65,66,73,81,100],[66,89,96,100],[67,69,72,80,100],[68,100],[69,70,100],[71,72,100],[72,100],[72,73,74,89,99,100],[72,73,74,89,100],[100],[75,80,89,99,100],[72,73,75,76,80,89,96,99,100],[75,77,89,96,99,100],[57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106],[72,78,100],[79,99,100],[69,72,80,89,100],[81,100],[82,100],[60,83,100],[84,98,100,104],[85,100],[86,100],[72,87,100],[87,88,100,102],[72,89,90,91,100],[89,91,100],[89,90,100],[92,100],[93,100],[72,94,95,100],[94,95,100],[66,80,89,96,100],[97,100],[80,98,100],[61,75,86,99,100],[66,100],[89,100,101],[100,102],[100,103],[61,66,72,74,83,89,99,100,102,104],[89,100,105],[40,54,100],[40,55,100],[54],[55]],"referencedMap":[[54,1],[42,2],[43,3],[41,4],[44,5],[45,6],[46,7],[47,8],[48,9],[49,10],[50,11],[51,12],[52,13],[53,14],[57,15],[58,15],[60,16],[61,17],[62,18],[63,19],[64,20],[65,21],[66,22],[67,23],[68,24],[69,25],[70,25],[71,26],[72,27],[73,28],[74,29],[59,30],[106,30],[75,31],[76,32],[77,33],[107,34],[78,35],[79,36],[80,37],[81,38],[82,39],[83,40],[84,41],[85,42],[86,43],[87,44],[88,45],[89,46],[91,47],[90,48],[92,49],[93,50],[94,51],[95,52],[96,53],[97,54],[98,55],[99,56],[100,57],[101,58],[102,59],[103,60],[104,61],[105,62],[40,30],[8,30],[10,30],[9,30],[2,30],[11,30],[12,30],[13,30],[14,30],[15,30],[16,30],[17,30],[18,30],[3,30],[4,30],[22,30],[19,30],[20,30],[21,30],[23,30],[24,30],[25,30],[5,30],[26,30],[27,30],[28,30],[29,30],[6,30],[30,30],[31,30],[32,30],[33,30],[7,30],[38,30],[34,30],[35,30],[36,30],[37,30],[1,30],[39,30],[55,63],[56,64]],"exportedModulesMap":[[54,1],[42,2],[43,3],[41,4],[44,5],[45,6],[46,7],[47,8],[48,9],[49,10],[50,11],[51,12],[52,13],[53,14],[57,15],[58,15],[60,16],[61,17],[62,18],[63,19],[64,20],[65,21],[66,22],[67,23],[68,24],[69,25],[70,25],[71,26],[72,27],[73,28],[74,29],[59,30],[106,30],[75,31],[76,32],[77,33],[107,34],[78,35],[79,36],[80,37],[81,38],[82,39],[83,40],[84,41],[85,42],[86,43],[87,44],[88,45],[89,46],[91,47],[90,48],[92,49],[93,50],[94,51],[95,52],[96,53],[97,54],[98,55],[99,56],[100,57],[101,58],[102,59],[103,60],[104,61],[105,62],[40,30],[8,30],[10,30],[9,30],[2,30],[11,30],[12,30],[13,30],[14,30],[15,30],[16,30],[17,30],[18,30],[3,30],[4,30],[22,30],[19,30],[20,30],[21,30],[23,30],[24,30],[25,30],[5,30],[26,30],[27,30],[28,30],[29,30],[6,30],[30,30],[31,30],[32,30],[33,30],[7,30],[38,30],[34,30],[35,30],[36,30],[37,30],[1,30],[39,30],[55,65],[56,66]],"semanticDiagnosticsPerFile":[54,42,43,41,44,45,46,47,48,49,50,51,52,53,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,59,106,75,76,77,107,78,79,80,81,82,83,84,85,86,87,88,89,91,90,92,93,94,95,96,97,98,99,100,101,102,103,104,105,40,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,38,34,35,36,37,1,39,55,56]},"version":"4.5.5"}