@ampath/esm-dha-workflow-app 4.0.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +12 -0
- package/.eslintignore +2 -0
- package/.eslintrc +57 -0
- package/.husky/pre-commit +7 -0
- package/.husky/pre-push +6 -0
- package/.prettierignore +14 -0
- package/.turbo.json +18 -0
- package/.yarn/plugins/@yarnpkg/plugin-outdated.cjs +35 -0
- package/LICENSE +401 -0
- package/README.md +37 -0
- package/__mocks__/react-i18next.js +50 -0
- package/dist/184.js +2 -0
- package/dist/184.js.LICENSE.txt +14 -0
- package/dist/184.js.map +1 -0
- package/dist/197.js +1 -0
- package/dist/255.js +1 -0
- package/dist/255.js.map +1 -0
- package/dist/282.js +2 -0
- package/dist/282.js.LICENSE.txt +32 -0
- package/dist/282.js.map +1 -0
- package/dist/300.js +1 -0
- package/dist/335.js +1 -0
- package/dist/353.js +1 -0
- package/dist/353.js.map +1 -0
- package/dist/420.js +1 -0
- package/dist/420.js.map +1 -0
- package/dist/540.js +2 -0
- package/dist/540.js.LICENSE.txt +9 -0
- package/dist/540.js.map +1 -0
- package/dist/55.js +1 -0
- package/dist/561.js +2 -0
- package/dist/561.js.LICENSE.txt +14 -0
- package/dist/561.js.map +1 -0
- package/dist/652.js +1 -0
- package/dist/70.js +1 -0
- package/dist/70.js.map +1 -0
- package/dist/731.js +2 -0
- package/dist/731.js.LICENSE.txt +39 -0
- package/dist/731.js.map +1 -0
- package/dist/819.js +1 -0
- package/dist/819.js.map +1 -0
- package/dist/91.js +1 -0
- package/dist/91.js.map +1 -0
- package/dist/961.js +2 -0
- package/dist/961.js.LICENSE.txt +19 -0
- package/dist/961.js.map +1 -0
- package/dist/99.js +1 -0
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -0
- package/dist/openmrs-esm-home-app.js +1 -0
- package/dist/openmrs-esm-home-app.js.buildmanifest.json +580 -0
- package/dist/openmrs-esm-home-app.js.map +1 -0
- package/dist/routes.json +1 -0
- package/e2e/README.md +115 -0
- package/e2e/core/global-setup.ts +32 -0
- package/e2e/core/index.ts +1 -0
- package/e2e/core/test.ts +20 -0
- package/e2e/fixtures/api.ts +26 -0
- package/e2e/fixtures/index.ts +1 -0
- package/e2e/pages/index.ts +1 -0
- package/e2e/pages/root-page.ts +32 -0
- package/e2e/specs/template-app.spec.ts +23 -0
- package/e2e/support/github/Dockerfile +34 -0
- package/e2e/support/github/docker-compose.yml +24 -0
- package/e2e/support/github/run-e2e-docker-env.sh +37 -0
- package/example.env +6 -0
- package/jest.config.js +33 -0
- package/package.json +111 -0
- package/playwright.config.ts +32 -0
- package/prettier.config.js +8 -0
- package/src/boxes/extensions/blue-box.component.tsx +15 -0
- package/src/boxes/extensions/box.scss +23 -0
- package/src/boxes/extensions/brand-box.component.tsx +15 -0
- package/src/boxes/extensions/red-box.component.tsx +15 -0
- package/src/boxes/slot/boxes.component.tsx +25 -0
- package/src/boxes/slot/boxes.scss +29 -0
- package/src/config-schema.ts +43 -0
- package/src/declarations.d.ts +5 -0
- package/src/greeter/greeter.component.tsx +42 -0
- package/src/greeter/greeter.scss +20 -0
- package/src/greeter/greeter.test.tsx +28 -0
- package/src/index.ts +46 -0
- package/src/patient-getter/patient-getter.component.tsx +40 -0
- package/src/patient-getter/patient-getter.resource.ts +39 -0
- package/src/patient-getter/patient-getter.scss +16 -0
- package/src/patient-getter/patient-getter.test.tsx +40 -0
- package/src/registry/registry.component.tsx +7 -0
- package/src/resources/resources.component.tsx +56 -0
- package/src/resources/resources.scss +68 -0
- package/src/root.component.tsx +39 -0
- package/src/root.scss +15 -0
- package/src/root.test.tsx +51 -0
- package/src/routes.json +19 -0
- package/src/side-nav/side-menu.scss +38 -0
- package/src/side-nav-menu/nav-links.tsx +22 -0
- package/src/widgets/workflow-registry-link.extension.tsx +12 -0
- package/tools/i18next-parser.config.js +89 -0
- package/tools/setup-tests.ts +1 -0
- package/tools/update-openmrs-deps.mjs +43 -0
- package/translations/am.json +24 -0
- package/translations/en.json +24 -0
- package/translations/es.json +24 -0
- package/translations/fr.json +24 -0
- package/translations/he.json +24 -0
- package/translations/km.json +24 -0
- package/tsconfig.json +24 -0
- package/webpack.config.js +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
Mozilla Public License, version 2.0
|
|
2
|
+
|
|
3
|
+
1. Definitions
|
|
4
|
+
|
|
5
|
+
1.1. "Contributor"
|
|
6
|
+
|
|
7
|
+
means each individual or legal entity that creates, contributes to the
|
|
8
|
+
creation of, or owns Covered Software.
|
|
9
|
+
|
|
10
|
+
1.2. "Contributor Version"
|
|
11
|
+
|
|
12
|
+
means the combination of the Contributions of others (if any) used by a
|
|
13
|
+
Contributor and that particular Contributor's Contribution.
|
|
14
|
+
|
|
15
|
+
1.3. "Contribution"
|
|
16
|
+
|
|
17
|
+
means Covered Software of a particular Contributor.
|
|
18
|
+
|
|
19
|
+
1.4. "Covered Software"
|
|
20
|
+
|
|
21
|
+
means Source Code Form to which the initial Contributor has attached the
|
|
22
|
+
notice in Exhibit A, the Executable Form of such Source Code Form, and
|
|
23
|
+
Modifications of such Source Code Form, in each case including portions
|
|
24
|
+
thereof.
|
|
25
|
+
|
|
26
|
+
1.5. "Incompatible With Secondary Licenses"
|
|
27
|
+
means
|
|
28
|
+
|
|
29
|
+
a. that the initial Contributor has attached the notice described in
|
|
30
|
+
Exhibit B to the Covered Software; or
|
|
31
|
+
|
|
32
|
+
b. that the Covered Software was made available under the terms of
|
|
33
|
+
version 1.1 or earlier of the License, but not also under the terms of
|
|
34
|
+
a Secondary License.
|
|
35
|
+
|
|
36
|
+
1.6. "Executable Form"
|
|
37
|
+
|
|
38
|
+
means any form of the work other than Source Code Form.
|
|
39
|
+
|
|
40
|
+
1.7. "Larger Work"
|
|
41
|
+
|
|
42
|
+
means a work that combines Covered Software with other material, in a
|
|
43
|
+
separate file or files, that is not Covered Software.
|
|
44
|
+
|
|
45
|
+
1.8. "License"
|
|
46
|
+
|
|
47
|
+
means this document.
|
|
48
|
+
|
|
49
|
+
1.9. "Licensable"
|
|
50
|
+
|
|
51
|
+
means having the right to grant, to the maximum extent possible, whether
|
|
52
|
+
at the time of the initial grant or subsequently, any and all of the
|
|
53
|
+
rights conveyed by this License.
|
|
54
|
+
|
|
55
|
+
1.10. "Modifications"
|
|
56
|
+
|
|
57
|
+
means any of the following:
|
|
58
|
+
|
|
59
|
+
a. any file in Source Code Form that results from an addition to,
|
|
60
|
+
deletion from, or modification of the contents of Covered Software; or
|
|
61
|
+
|
|
62
|
+
b. any new file in Source Code Form that contains any Covered Software.
|
|
63
|
+
|
|
64
|
+
1.11. "Patent Claims" of a Contributor
|
|
65
|
+
|
|
66
|
+
means any patent claim(s), including without limitation, method,
|
|
67
|
+
process, and apparatus claims, in any patent Licensable by such
|
|
68
|
+
Contributor that would be infringed, but for the grant of the License,
|
|
69
|
+
by the making, using, selling, offering for sale, having made, import,
|
|
70
|
+
or transfer of either its Contributions or its Contributor Version.
|
|
71
|
+
|
|
72
|
+
1.12. "Secondary License"
|
|
73
|
+
|
|
74
|
+
means either the GNU General Public License, Version 2.0, the GNU Lesser
|
|
75
|
+
General Public License, Version 2.1, the GNU Affero General Public
|
|
76
|
+
License, Version 3.0, or any later versions of those licenses.
|
|
77
|
+
|
|
78
|
+
1.13. "Source Code Form"
|
|
79
|
+
|
|
80
|
+
means the form of the work preferred for making modifications.
|
|
81
|
+
|
|
82
|
+
1.14. "You" (or "Your")
|
|
83
|
+
|
|
84
|
+
means an individual or a legal entity exercising rights under this
|
|
85
|
+
License. For legal entities, "You" includes any entity that controls, is
|
|
86
|
+
controlled by, or is under common control with You. For purposes of this
|
|
87
|
+
definition, "control" means (a) the power, direct or indirect, to cause
|
|
88
|
+
the direction or management of such entity, whether by contract or
|
|
89
|
+
otherwise, or (b) ownership of more than fifty percent (50%) of the
|
|
90
|
+
outstanding shares or beneficial ownership of such entity.
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
2. License Grants and Conditions
|
|
94
|
+
|
|
95
|
+
2.1. Grants
|
|
96
|
+
|
|
97
|
+
Each Contributor hereby grants You a world-wide, royalty-free,
|
|
98
|
+
non-exclusive license:
|
|
99
|
+
|
|
100
|
+
a. under intellectual property rights (other than patent or trademark)
|
|
101
|
+
Licensable by such Contributor to use, reproduce, make available,
|
|
102
|
+
modify, display, perform, distribute, and otherwise exploit its
|
|
103
|
+
Contributions, either on an unmodified basis, with Modifications, or
|
|
104
|
+
as part of a Larger Work; and
|
|
105
|
+
|
|
106
|
+
b. under Patent Claims of such Contributor to make, use, sell, offer for
|
|
107
|
+
sale, have made, import, and otherwise transfer either its
|
|
108
|
+
Contributions or its Contributor Version.
|
|
109
|
+
|
|
110
|
+
2.2. Effective Date
|
|
111
|
+
|
|
112
|
+
The licenses granted in Section 2.1 with respect to any Contribution
|
|
113
|
+
become effective for each Contribution on the date the Contributor first
|
|
114
|
+
distributes such Contribution.
|
|
115
|
+
|
|
116
|
+
2.3. Limitations on Grant Scope
|
|
117
|
+
|
|
118
|
+
The licenses granted in this Section 2 are the only rights granted under
|
|
119
|
+
this License. No additional rights or licenses will be implied from the
|
|
120
|
+
distribution or licensing of Covered Software under this License.
|
|
121
|
+
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
|
122
|
+
Contributor:
|
|
123
|
+
|
|
124
|
+
a. for any code that a Contributor has removed from Covered Software; or
|
|
125
|
+
|
|
126
|
+
b. for infringements caused by: (i) Your and any other third party's
|
|
127
|
+
modifications of Covered Software, or (ii) the combination of its
|
|
128
|
+
Contributions with other software (except as part of its Contributor
|
|
129
|
+
Version); or
|
|
130
|
+
|
|
131
|
+
c. under Patent Claims infringed by Covered Software in the absence of
|
|
132
|
+
its Contributions.
|
|
133
|
+
|
|
134
|
+
This License does not grant any rights in the trademarks, service marks,
|
|
135
|
+
or logos of any Contributor (except as may be necessary to comply with
|
|
136
|
+
the notice requirements in Section 3.4).
|
|
137
|
+
|
|
138
|
+
2.4. Subsequent Licenses
|
|
139
|
+
|
|
140
|
+
No Contributor makes additional grants as a result of Your choice to
|
|
141
|
+
distribute the Covered Software under a subsequent version of this
|
|
142
|
+
License (see Section 10.2) or under the terms of a Secondary License (if
|
|
143
|
+
permitted under the terms of Section 3.3).
|
|
144
|
+
|
|
145
|
+
2.5. Representation
|
|
146
|
+
|
|
147
|
+
Each Contributor represents that the Contributor believes its
|
|
148
|
+
Contributions are its original creation(s) or it has sufficient rights to
|
|
149
|
+
grant the rights to its Contributions conveyed by this License.
|
|
150
|
+
|
|
151
|
+
2.6. Fair Use
|
|
152
|
+
|
|
153
|
+
This License is not intended to limit any rights You have under
|
|
154
|
+
applicable copyright doctrines of fair use, fair dealing, or other
|
|
155
|
+
equivalents.
|
|
156
|
+
|
|
157
|
+
2.7. Conditions
|
|
158
|
+
|
|
159
|
+
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
|
|
160
|
+
Section 2.1.
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
3. Responsibilities
|
|
164
|
+
|
|
165
|
+
3.1. Distribution of Source Form
|
|
166
|
+
|
|
167
|
+
All distribution of Covered Software in Source Code Form, including any
|
|
168
|
+
Modifications that You create or to which You contribute, must be under
|
|
169
|
+
the terms of this License. You must inform recipients that the Source
|
|
170
|
+
Code Form of the Covered Software is governed by the terms of this
|
|
171
|
+
License, and how they can obtain a copy of this License. You may not
|
|
172
|
+
attempt to alter or restrict the recipients' rights in the Source Code
|
|
173
|
+
Form.
|
|
174
|
+
|
|
175
|
+
3.2. Distribution of Executable Form
|
|
176
|
+
|
|
177
|
+
If You distribute Covered Software in Executable Form then:
|
|
178
|
+
|
|
179
|
+
a. such Covered Software must also be made available in Source Code Form,
|
|
180
|
+
as described in Section 3.1, and You must inform recipients of the
|
|
181
|
+
Executable Form how they can obtain a copy of such Source Code Form by
|
|
182
|
+
reasonable means in a timely manner, at a charge no more than the cost
|
|
183
|
+
of distribution to the recipient; and
|
|
184
|
+
|
|
185
|
+
b. You may distribute such Executable Form under the terms of this
|
|
186
|
+
License, or sublicense it under different terms, provided that the
|
|
187
|
+
license for the Executable Form does not attempt to limit or alter the
|
|
188
|
+
recipients' rights in the Source Code Form under this License.
|
|
189
|
+
|
|
190
|
+
3.3. Distribution of a Larger Work
|
|
191
|
+
|
|
192
|
+
You may create and distribute a Larger Work under terms of Your choice,
|
|
193
|
+
provided that You also comply with the requirements of this License for
|
|
194
|
+
the Covered Software. If the Larger Work is a combination of Covered
|
|
195
|
+
Software with a work governed by one or more Secondary Licenses, and the
|
|
196
|
+
Covered Software is not Incompatible With Secondary Licenses, this
|
|
197
|
+
License permits You to additionally distribute such Covered Software
|
|
198
|
+
under the terms of such Secondary License(s), so that the recipient of
|
|
199
|
+
the Larger Work may, at their option, further distribute the Covered
|
|
200
|
+
Software under the terms of either this License or such Secondary
|
|
201
|
+
License(s).
|
|
202
|
+
|
|
203
|
+
3.4. Notices
|
|
204
|
+
|
|
205
|
+
You may not remove or alter the substance of any license notices
|
|
206
|
+
(including copyright notices, patent notices, disclaimers of warranty, or
|
|
207
|
+
limitations of liability) contained within the Source Code Form of the
|
|
208
|
+
Covered Software, except that You may alter any license notices to the
|
|
209
|
+
extent required to remedy known factual inaccuracies.
|
|
210
|
+
|
|
211
|
+
3.5. Application of Additional Terms
|
|
212
|
+
|
|
213
|
+
You may choose to offer, and to charge a fee for, warranty, support,
|
|
214
|
+
indemnity or liability obligations to one or more recipients of Covered
|
|
215
|
+
Software. However, You may do so only on Your own behalf, and not on
|
|
216
|
+
behalf of any Contributor. You must make it absolutely clear that any
|
|
217
|
+
such warranty, support, indemnity, or liability obligation is offered by
|
|
218
|
+
You alone, and You hereby agree to indemnify every Contributor for any
|
|
219
|
+
liability incurred by such Contributor as a result of warranty, support,
|
|
220
|
+
indemnity or liability terms You offer. You may include additional
|
|
221
|
+
disclaimers of warranty and limitations of liability specific to any
|
|
222
|
+
jurisdiction.
|
|
223
|
+
|
|
224
|
+
4. Inability to Comply Due to Statute or Regulation
|
|
225
|
+
|
|
226
|
+
If it is impossible for You to comply with any of the terms of this License
|
|
227
|
+
with respect to some or all of the Covered Software due to statute,
|
|
228
|
+
judicial order, or regulation then You must: (a) comply with the terms of
|
|
229
|
+
this License to the maximum extent possible; and (b) describe the
|
|
230
|
+
limitations and the code they affect. Such description must be placed in a
|
|
231
|
+
text file included with all distributions of the Covered Software under
|
|
232
|
+
this License. Except to the extent prohibited by statute or regulation,
|
|
233
|
+
such description must be sufficiently detailed for a recipient of ordinary
|
|
234
|
+
skill to be able to understand it.
|
|
235
|
+
|
|
236
|
+
5. Termination
|
|
237
|
+
|
|
238
|
+
5.1. The rights granted under this License will terminate automatically if You
|
|
239
|
+
fail to comply with any of its terms. However, if You become compliant,
|
|
240
|
+
then the rights granted under this License from a particular Contributor
|
|
241
|
+
are reinstated (a) provisionally, unless and until such Contributor
|
|
242
|
+
explicitly and finally terminates Your grants, and (b) on an ongoing
|
|
243
|
+
basis, if such Contributor fails to notify You of the non-compliance by
|
|
244
|
+
some reasonable means prior to 60 days after You have come back into
|
|
245
|
+
compliance. Moreover, Your grants from a particular Contributor are
|
|
246
|
+
reinstated on an ongoing basis if such Contributor notifies You of the
|
|
247
|
+
non-compliance by some reasonable means, this is the first time You have
|
|
248
|
+
received notice of non-compliance with this License from such
|
|
249
|
+
Contributor, and You become compliant prior to 30 days after Your receipt
|
|
250
|
+
of the notice.
|
|
251
|
+
|
|
252
|
+
5.2. If You initiate litigation against any entity by asserting a patent
|
|
253
|
+
infringement claim (excluding declaratory judgment actions,
|
|
254
|
+
counter-claims, and cross-claims) alleging that a Contributor Version
|
|
255
|
+
directly or indirectly infringes any patent, then the rights granted to
|
|
256
|
+
You by any and all Contributors for the Covered Software under Section
|
|
257
|
+
2.1 of this License shall terminate.
|
|
258
|
+
|
|
259
|
+
5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
|
|
260
|
+
license agreements (excluding distributors and resellers) which have been
|
|
261
|
+
validly granted by You or Your distributors under this License prior to
|
|
262
|
+
termination shall survive termination.
|
|
263
|
+
|
|
264
|
+
6. Disclaimer of Warranty
|
|
265
|
+
|
|
266
|
+
Covered Software is provided under this License on an "as is" basis,
|
|
267
|
+
without warranty of any kind, either expressed, implied, or statutory,
|
|
268
|
+
including, without limitation, warranties that the Covered Software is free
|
|
269
|
+
of defects, merchantable, fit for a particular purpose or non-infringing.
|
|
270
|
+
The entire risk as to the quality and performance of the Covered Software
|
|
271
|
+
is with You. Should any Covered Software prove defective in any respect,
|
|
272
|
+
You (not any Contributor) assume the cost of any necessary servicing,
|
|
273
|
+
repair, or correction. This disclaimer of warranty constitutes an essential
|
|
274
|
+
part of this License. No use of any Covered Software is authorized under
|
|
275
|
+
this License except under this disclaimer.
|
|
276
|
+
|
|
277
|
+
7. Limitation of Liability
|
|
278
|
+
|
|
279
|
+
Under no circumstances and under no legal theory, whether tort (including
|
|
280
|
+
negligence), contract, or otherwise, shall any Contributor, or anyone who
|
|
281
|
+
distributes Covered Software as permitted above, be liable to You for any
|
|
282
|
+
direct, indirect, special, incidental, or consequential damages of any
|
|
283
|
+
character including, without limitation, damages for lost profits, loss of
|
|
284
|
+
goodwill, work stoppage, computer failure or malfunction, or any and all
|
|
285
|
+
other commercial damages or losses, even if such party shall have been
|
|
286
|
+
informed of the possibility of such damages. This limitation of liability
|
|
287
|
+
shall not apply to liability for death or personal injury resulting from
|
|
288
|
+
such party's negligence to the extent applicable law prohibits such
|
|
289
|
+
limitation. Some jurisdictions do not allow the exclusion or limitation of
|
|
290
|
+
incidental or consequential damages, so this exclusion and limitation may
|
|
291
|
+
not apply to You.
|
|
292
|
+
|
|
293
|
+
8. Litigation
|
|
294
|
+
|
|
295
|
+
Any litigation relating to this License may be brought only in the courts
|
|
296
|
+
of a jurisdiction where the defendant maintains its principal place of
|
|
297
|
+
business and such litigation shall be governed by laws of that
|
|
298
|
+
jurisdiction, without reference to its conflict-of-law provisions. Nothing
|
|
299
|
+
in this Section shall prevent a party's ability to bring cross-claims or
|
|
300
|
+
counter-claims.
|
|
301
|
+
|
|
302
|
+
9. Miscellaneous
|
|
303
|
+
|
|
304
|
+
This License represents the complete agreement concerning the subject
|
|
305
|
+
matter hereof. If any provision of this License is held to be
|
|
306
|
+
unenforceable, such provision shall be reformed only to the extent
|
|
307
|
+
necessary to make it enforceable. Any law or regulation which provides that
|
|
308
|
+
the language of a contract shall be construed against the drafter shall not
|
|
309
|
+
be used to construe this License against a Contributor.
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
10. Versions of the License
|
|
313
|
+
|
|
314
|
+
10.1. New Versions
|
|
315
|
+
|
|
316
|
+
Mozilla Foundation is the license steward. Except as provided in Section
|
|
317
|
+
10.3, no one other than the license steward has the right to modify or
|
|
318
|
+
publish new versions of this License. Each version will be given a
|
|
319
|
+
distinguishing version number.
|
|
320
|
+
|
|
321
|
+
10.2. Effect of New Versions
|
|
322
|
+
|
|
323
|
+
You may distribute the Covered Software under the terms of the version
|
|
324
|
+
of the License under which You originally received the Covered Software,
|
|
325
|
+
or under the terms of any subsequent version published by the license
|
|
326
|
+
steward.
|
|
327
|
+
|
|
328
|
+
10.3. Modified Versions
|
|
329
|
+
|
|
330
|
+
If you create software not governed by this License, and you want to
|
|
331
|
+
create a new license for such software, you may create and use a
|
|
332
|
+
modified version of this License if you rename the license and remove
|
|
333
|
+
any references to the name of the license steward (except to note that
|
|
334
|
+
such modified license differs from this License).
|
|
335
|
+
|
|
336
|
+
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
|
337
|
+
Licenses If You choose to distribute Source Code Form that is
|
|
338
|
+
Incompatible With Secondary Licenses under the terms of this version of
|
|
339
|
+
the License, the notice described in Exhibit B of this License must be
|
|
340
|
+
attached.
|
|
341
|
+
|
|
342
|
+
Exhibit A - Source Code Form License Notice
|
|
343
|
+
|
|
344
|
+
This Source Code Form is subject to the
|
|
345
|
+
terms of the Mozilla Public License, v.
|
|
346
|
+
2.0. If a copy of the MPL was not
|
|
347
|
+
distributed with this file, You can
|
|
348
|
+
obtain one at
|
|
349
|
+
http://mozilla.org/MPL/2.0/.
|
|
350
|
+
|
|
351
|
+
If it is not possible or desirable to put the notice in a particular file,
|
|
352
|
+
then You may include the notice in a location (such as a LICENSE file in a
|
|
353
|
+
relevant directory) where a recipient would be likely to look for such a
|
|
354
|
+
notice.
|
|
355
|
+
|
|
356
|
+
You may add additional accurate notices of copyright ownership.
|
|
357
|
+
|
|
358
|
+
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
|
359
|
+
|
|
360
|
+
This Source Code Form is "Incompatible
|
|
361
|
+
With Secondary Licenses", as defined by
|
|
362
|
+
the Mozilla Public License, v. 2.0.
|
|
363
|
+
|
|
364
|
+
---------------------
|
|
365
|
+
|
|
366
|
+
Healthcare Disclaimer
|
|
367
|
+
|
|
368
|
+
In the United States, or any other jurisdictions where they may apply, the
|
|
369
|
+
following additional disclaimer of warranty and limitation of liability are
|
|
370
|
+
hereby incorporated into the terms and conditions of MPL 2.0:
|
|
371
|
+
|
|
372
|
+
1. No warranties of any kind whatsoever are made as to the results that
|
|
373
|
+
You will obtain from relying upon the covered code (or any information
|
|
374
|
+
or content obtained by way of the covered code), including but not
|
|
375
|
+
limited to compliance with privacy laws or regulations or clinical
|
|
376
|
+
care industry standards and protocols. Use of the covered code is not
|
|
377
|
+
a substitute for a health care providers standard practice or
|
|
378
|
+
professional judgment. Any decision with regard to the appropriateness
|
|
379
|
+
of treatment, or the validity or reliability of information or content
|
|
380
|
+
made available by the covered code, is the sole responsibility of the
|
|
381
|
+
health care provider. Consequently, it is incumbent upon each health
|
|
382
|
+
care provider to verify all medical history and treatment plans with
|
|
383
|
+
each patient.
|
|
384
|
+
|
|
385
|
+
2. Under no circumstances and under no legal theory, whether tort
|
|
386
|
+
(including negligence), contract, or otherwise, shall any Contributor,
|
|
387
|
+
or anyone who distributes Covered Software as permitted by the
|
|
388
|
+
license, be liable to You for any indirect, special, incidental,
|
|
389
|
+
consequential damages of any character including, without limitation,
|
|
390
|
+
damages for loss of goodwill, work stoppage, computer failure or
|
|
391
|
+
malfunction, or any and all other damages or losses, of any nature
|
|
392
|
+
whatsoever (direct or otherwise) on account of or associated with the
|
|
393
|
+
use or inability to use the covered content (including, without
|
|
394
|
+
limitation, the use of information or content made available by the
|
|
395
|
+
covered code, all documentation associated therewith, and the failure
|
|
396
|
+
of the covered code to comply with privacy laws and regulations or
|
|
397
|
+
clinical care industry standards and protocols), even if such party
|
|
398
|
+
shall have been informed of the possibility of such damages.
|
|
399
|
+
|
|
400
|
+
Copyright (c) OpenMRS Inc.
|
|
401
|
+
OpenMRS is a registered trademark and the OpenMRS graphic logo is a trademark of OpenMRS Inc.
|
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# OpenMRS ESM Template App
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
This repository serves as a template for building OpenMRS frontend modules. For detailed guidance, see the [Creating a Frontend Module](https://openmrs.atlassian.net/wiki/x/rIIBCQ) documentation.
|
|
6
|
+
|
|
7
|
+
For more information, please see the [OpenMRS Frontend Developer Documentation](https://openmrs.atlassian.net/wiki/x/IABBHg).
|
|
8
|
+
|
|
9
|
+
The [Setup](https://openmrs.atlassian.net/wiki/x/PIIBCQ) section will help you get started with frontend module development.
|
|
10
|
+
|
|
11
|
+
## Running this code
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
yarn # to install dependencies
|
|
15
|
+
yarn start # to run the dev server
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Once it is running, a browser window should open running the O3 reference application. Log in and then navigate to `/openmrs/spa/root`.
|
|
19
|
+
|
|
20
|
+
## Adapting the code
|
|
21
|
+
|
|
22
|
+
1. Replace all instances of "template" with your frontend module's name
|
|
23
|
+
2. Update `index.ts` with your feature name, page name, and route
|
|
24
|
+
3. Rename the `root.*` files to match your first page
|
|
25
|
+
4. Clear `config-schema` objects and rebuild as needed
|
|
26
|
+
5. Delete the `greeter` and `patient-getter` directories and clear `root.component.tsx`
|
|
27
|
+
6. Clear `translations/en.json`
|
|
28
|
+
7. Update `.github/workflows` for your deployment needs
|
|
29
|
+
8. Replace this README with documentation for your module
|
|
30
|
+
|
|
31
|
+
At this point, you should be able to write your first page as a React application.
|
|
32
|
+
|
|
33
|
+
See the [Medication dispensing app](https://github.com/openmrs/openmrs-esm-dispensing-app) for a complete example of a non-trivial frontend module built using this template.
|
|
34
|
+
|
|
35
|
+
## Integration
|
|
36
|
+
|
|
37
|
+
See [Creating a Frontend Module](https://openmrs.atlassian.net/wiki/x/rIIBCQ) for details on how to integrate your custom frontend module into the OpenMRS reference application.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** At present, this entire mock is boilerplate. */
|
|
2
|
+
const React = require('react');
|
|
3
|
+
const reactI18next = require('react-i18next');
|
|
4
|
+
|
|
5
|
+
const hasChildren = (node) => node && (node.children || (node.props && node.props.children));
|
|
6
|
+
|
|
7
|
+
const getChildren = (node) => (node && node.children ? node.children : node.props && node.props.children);
|
|
8
|
+
|
|
9
|
+
const renderNodes = (reactNodes) => {
|
|
10
|
+
if (typeof reactNodes === 'string') {
|
|
11
|
+
return reactNodes;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return Object.keys(reactNodes).map((key, i) => {
|
|
15
|
+
const child = reactNodes[key];
|
|
16
|
+
const isElement = React.isValidElement(child);
|
|
17
|
+
|
|
18
|
+
if (typeof child === 'string') {
|
|
19
|
+
return child;
|
|
20
|
+
}
|
|
21
|
+
if (hasChildren(child)) {
|
|
22
|
+
const inner = renderNodes(getChildren(child));
|
|
23
|
+
return React.cloneElement(child, { ...child.props, key: i }, inner);
|
|
24
|
+
}
|
|
25
|
+
if (typeof child === 'object' && !isElement) {
|
|
26
|
+
return Object.keys(child).reduce((str, childKey) => `${str}${child[childKey]}`, '');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return child;
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const useMock = [(k) => k, {}];
|
|
34
|
+
useMock.t = (k, o) => (o && o.defaultValue) || (typeof o === 'string' ? o : k);
|
|
35
|
+
useMock.i18n = {};
|
|
36
|
+
|
|
37
|
+
module.exports = {
|
|
38
|
+
// this mock makes sure any components using the translate HoC receive the t function as a prop
|
|
39
|
+
Trans: ({ children }) => renderNodes(children),
|
|
40
|
+
Translation: ({ children }) => children((k) => k, { i18n: {} }),
|
|
41
|
+
useTranslation: () => useMock,
|
|
42
|
+
|
|
43
|
+
// mock if needed
|
|
44
|
+
I18nextProvider: reactI18next.I18nextProvider,
|
|
45
|
+
initReactI18next: reactI18next.initReactI18next,
|
|
46
|
+
setDefaults: reactI18next.setDefaults,
|
|
47
|
+
getDefaults: reactI18next.getDefaults,
|
|
48
|
+
setI18n: reactI18next.setI18n,
|
|
49
|
+
getI18n: reactI18next.getI18n,
|
|
50
|
+
};
|
package/dist/184.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 184.js.LICENSE.txt */
|
|
2
|
+
"use strict";(globalThis.webpackChunk_ampath_esm_dha_workflow_app=globalThis.webpackChunk_ampath_esm_dha_workflow_app||[]).push([[184],{63184:(t,e,r)=>{r.r(e),r.d(e,{ArgumentOutOfRangeError:()=>xt,AsyncSubject:()=>it,BehaviorSubject:()=>Y,ConnectableObservable:()=>C,EMPTY:()=>L,EmptyError:()=>gt,GroupedObservable:()=>V,NEVER:()=>be,Notification:()=>$,NotificationKind:()=>B,ObjectUnsubscribedError:()=>I,Observable:()=>E,ReplaySubject:()=>rt,Scheduler:()=>q,Subject:()=>N,Subscriber:()=>v,Subscription:()=>p,TimeoutError:()=>Et,UnsubscriptionError:()=>f,VirtualAction:()=>mt,VirtualTimeScheduler:()=>yt,animationFrame:()=>vt,animationFrameScheduler:()=>bt,asap:()=>lt,asapScheduler:()=>at,async:()=>pt,asyncScheduler:()=>ft,bindCallback:()=>jt,bindNodeCallback:()=>kt,combineLatest:()=>Lt,concat:()=>ee,config:()=>u,defer:()=>re,empty:()=>W,forkJoin:()=>ne,from:()=>Gt,fromEvent:()=>oe,fromEventPattern:()=>ue,generate:()=>ce,identity:()=>_,iif:()=>ae,interval:()=>fe,isObservable:()=>_t,merge:()=>de,never:()=>ve,noop:()=>wt,observable:()=>w,of:()=>Q,onErrorResumeNext:()=>ye,pairs:()=>me,partition:()=>Se,pipe:()=>x,queue:()=>H,queueScheduler:()=>U,race:()=>Ie,range:()=>Ne,scheduled:()=>Bt,throwError:()=>X,timer:()=>ke,using:()=>Ce,zip:()=>Pe});var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)};function i(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function o(t){return"function"==typeof t}var s=!1,u={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,s=t},get useDeprecatedSynchronousErrorHandling(){return s}};function c(t){setTimeout((function(){throw t}),0)}var h={closed:!0,next:function(t){},error:function(t){if(u.useDeprecatedSynchronousErrorHandling)throw t;c(t)},complete:function(){}},a=function(){return Array.isArray||function(t){return t&&"number"==typeof t.length}}();function l(t){return null!==t&&"object"==typeof t}var f=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}(),p=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var e;if(!this.closed){var r=this,n=r._parentOrParents,i=r._ctorUnsubscribe,s=r._unsubscribe,u=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(var c=0;c<n.length;++c)n[c].remove(this);if(o(s)){i&&(this._unsubscribe=void 0);try{s.call(this)}catch(t){e=t instanceof f?d(t.errors):[t]}}if(a(u)){c=-1;for(var h=u.length;++c<h;){var p=u[c];if(l(p))try{p.unsubscribe()}catch(t){e=e||[],t instanceof f?e=e.concat(d(t.errors)):e.push(t)}}}if(e)throw new f(e)}},t.prototype.add=function(e){var r=e;if(!e)return t.EMPTY;switch(typeof e){case"function":r=new t(e);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof t)){var n=r;(r=new t)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var i=r._parentOrParents;if(null===i)r._parentOrParents=this;else if(i instanceof t){if(i===this)return r;r._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return r;i.push(this)}var o=this._subscriptions;return null===o?this._subscriptions=[r]:o.push(r),r},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var r=e.indexOf(t);-1!==r&&e.splice(r,1)}},t.EMPTY=function(t){return t.closed=!0,t}(new t),t}();function d(t){return t.reduce((function(t,e){return t.concat(e instanceof f?e.errors:e)}),[])}var b=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),v=function(t){function e(r,n,i){var o=t.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=h;break;case 1:if(!r){o.destination=h;break}if("object"==typeof r){r instanceof e?(o.syncErrorThrowable=r.syncErrorThrowable,o.destination=r,r.add(o)):(o.syncErrorThrowable=!0,o.destination=new y(o,r));break}default:o.syncErrorThrowable=!0,o.destination=new y(o,r,n,i)}return o}return i(e,t),e.prototype[b]=function(){return this},e.create=function(t,r,n){var i=new e(t,r,n);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(p),y=function(t){function e(e,r,n,i){var s,u=t.call(this)||this;u._parentSubscriber=e;var c=u;return o(r)?s=r:r&&(s=r.next,n=r.error,i=r.complete,r!==h&&(o((c=Object.create(r)).unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=s,u._error=n,u._complete=i,u}return i(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;u.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,r=u.useDeprecatedSynchronousErrorHandling;if(this._error)r&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)r?(e.syncErrorValue=t,e.syncErrorThrown=!0):c(t),this.unsubscribe();else{if(this.unsubscribe(),r)throw t;c(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var r=function(){return t._complete.call(t._context)};u.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,r),this.unsubscribe()):(this.__tryOrUnsub(r),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),u.useDeprecatedSynchronousErrorHandling)throw t;c(t)}},e.prototype.__tryOrSetError=function(t,e,r){if(!u.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,r)}catch(e){return u.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(c(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(v);function m(t){for(;t;){var e=t,r=e.closed,n=e.destination,i=e.isStopped;if(r||i)return!1;t=n&&n instanceof v?n:null}return!0}var w=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function _(t){return t}function x(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return g(t)}function g(t){return 0===t.length?_:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var E=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this.operator,i=function(t,e,r){if(t){if(t instanceof v)return t;if(t[b])return t[b]()}return t||e||r?new v(t,e,r):new v(h)}(t,e,r);if(n?i.add(n.call(i,this.source)):i.add(this.source||u.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),u.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){u.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),m(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=S(e))((function(e,n){var i;i=r.subscribe((function(e){try{t(e)}catch(t){n(t),i&&i.unsubscribe()}}),n,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[w]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:g(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=S(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function S(t){if(t||(t=u.Promise||Promise),!t)throw new Error("no Promise impl found");return t}var I=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}(),T=function(t){function e(e,r){var n=t.call(this)||this;return n.subject=e,n.subscriber=r,n.closed=!1,n}return i(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var r=e.indexOf(this.subscriber);-1!==r&&e.splice(r,1)}}},e}(p),j=function(t){function e(e){var r=t.call(this,e)||this;return r.destination=e,r}return i(e,t),e}(v),N=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return i(e,t),e.prototype[b]=function(){return new j(this)},e.prototype.lift=function(t){var e=new O(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new I;if(!this.isStopped)for(var e=this.observers,r=e.length,n=e.slice(),i=0;i<r;i++)n[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new I;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,r=e.length,n=e.slice(),i=0;i<r;i++)n[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new I;this.isStopped=!0;for(var t=this.observers,e=t.length,r=t.slice(),n=0;n<e;n++)r[n].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new I;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new I;return this.hasError?(t.error(this.thrownError),p.EMPTY):this.isStopped?(t.complete(),p.EMPTY):(this.observers.push(t),new T(this,t))},e.prototype.asObservable=function(){var t=new E;return t.source=this,t},e.create=function(t,e){return new O(t,e)},e}(E),O=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return i(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):p.EMPTY},e}(N),k=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var r=this.connectable;r._refCount++;var n=new A(t,r),i=e.subscribe(n);return n.closed||(n.connection=r.connect()),i},t}(),A=function(t){function e(e,r){var n=t.call(this,e)||this;return n.connectable=r,n}return i(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var r=this.connection,n=t._connection;this.connection=null,!n||r&&n!==r||n.unsubscribe()}}else this.connection=null},e}(v),C=function(t){function e(e,r){var n=t.call(this)||this;return n.source=e,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n}return i(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new p).add(this.source.subscribe(new P(this.getSubject(),this))),t.closed&&(this._connection=null,t=p.EMPTY)),t},e.prototype.refCount=function(){return(t=this).lift(new k(t));var t},e}(E),P=function(t){function e(e,r){var n=t.call(this,e)||this;return n.connectable=r,n}return i(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(j),V=function(t){function e(e,r,n){var i=t.call(this)||this;return i.key=e,i.groupSubject=r,i.refCountSubscription=n,i}return i(e,t),e.prototype._subscribe=function(t){var e=new p,r=this.refCountSubscription,n=this.groupSubject;return r&&!r.closed&&e.add(new F(r)),e.add(n.subscribe(t)),e},e}(E),F=function(t){function e(e){var r=t.call(this)||this;return r.parent=e,e.count++,r}return i(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(p),Y=function(t){function e(e){var r=t.call(this)||this;return r._value=e,r}return i(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var r=t.prototype._subscribe.call(this,e);return r&&!r.closed&&e.next(this._value),r},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new I;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(N),M=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n.pending=!1,n}return i(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var r=this.id,n=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(n,r,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(n,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),setInterval(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){if(void 0===r&&(r=0),null!==r&&this.delay===r&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var r=!1,n=void 0;try{this.work(t)}catch(t){r=!0,n=!!t&&t||new Error(t)}if(r)return this.unsubscribe(),n},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,r=e.actions,n=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&r.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,r){return t.call(this)||this}return i(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(p)),R=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return i(e,t),e.prototype.schedule=function(e,r){return void 0===r&&(r=0),r>0?t.prototype.schedule.call(this,e,r):(this.delay=r,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,r){return r>0||this.closed?t.prototype.execute.call(this,e,r):this._execute(e,r)},e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0?t.prototype.requestAsyncId.call(this,e,r,n):e.flush(this)},e}(M),q=function(){function t(e,r){void 0===r&&(r=t.now),this.SchedulerAction=e,this.now=r}return t.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(r,e)},t.now=function(){return Date.now()},t}(),D=function(t){function e(r,n){void 0===n&&(n=q.now);var i=t.call(this,r,(function(){return e.delegate&&e.delegate!==i?e.delegate.now():n()}))||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return i(e,t),e.prototype.schedule=function(r,n,i){return void 0===n&&(n=0),e.delegate&&e.delegate!==this?e.delegate.schedule(r,n,i):t.prototype.schedule.call(this,r,n,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var r;this.active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}}},e}(q),U=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(D))(R),H=U,L=new E((function(t){return t.complete()}));function W(t){return t?function(t){return new E((function(e){return t.schedule((function(){return e.complete()}))}))}(t):L}function z(t){return t&&"function"==typeof t.schedule}var B,G=function(t){return function(e){for(var r=0,n=t.length;r<n&&!e.closed;r++)e.next(t[r]);e.complete()}};function J(t,e){return new E((function(r){var n=new p,i=0;return n.add(e.schedule((function(){i!==t.length?(r.next(t[i++]),r.closed||n.add(this.schedule())):r.complete()}))),n}))}function K(t,e){return e?J(t,e):new E(G(t))}function Q(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[t.length-1];return z(r)?(t.pop(),J(t,r)):K(t)}function X(t,e){return new E(e?function(r){return e.schedule(Z,0,{error:t,subscriber:r})}:function(e){return e.error(t)})}function Z(t){var e=t.error;t.subscriber.error(e)}B||(B={});var $=function(){function t(t,e,r){this.kind=t,this.value=e,this.error=r,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,r){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return r&&r()}},t.prototype.accept=function(t,e,r){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,r)},t.prototype.toObservable=function(){switch(this.kind){case"N":return Q(this.value);case"E":return X(this.error);case"C":return W()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}(),tt=function(t){function e(e,r,n){void 0===n&&(n=0);var i=t.call(this,e)||this;return i.scheduler=r,i.delay=n,i}return i(e,t),e.dispatch=function(t){var e=t.notification,r=t.destination;e.observe(r),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new et(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage($.createNext(t))},e.prototype._error=function(t){this.scheduleMessage($.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage($.createComplete()),this.unsubscribe()},e}(v),et=function(){return function(t,e){this.notification=t,this.destination=e}}(),rt=function(t){function e(e,r,n){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=n,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=r<1?1:r,r===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return i(e,t),e.prototype.nextInfiniteTimeWindow=function(e){if(!this.isStopped){var r=this._events;r.push(e),r.length>this._bufferSize&&r.shift()}t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this.isStopped||(this._events.push(new nt(this._getNow(),e)),this._trimBufferThenGetEvents()),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=n.length;if(this.closed)throw new I;if(this.isStopped||this.hasError?e=p.EMPTY:(this.observers.push(t),e=new T(this,t)),i&&t.add(t=new tt(t,i)),r)for(var s=0;s<o&&!t.closed;s++)t.next(n[s]);else for(s=0;s<o&&!t.closed;s++)t.next(n[s].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||H).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,r=this._windowTime,n=this._events,i=n.length,o=0;o<i&&!(t-n[o].time<r);)o++;return i>e&&(o=Math.max(o,i-e)),o>0&&n.splice(0,o),n},e}(N),nt=function(){return function(t,e){this.time=t,this.value=e}}(),it=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return i(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),p.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),p.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(N),ot=1,st=function(){return Promise.resolve()}(),ut={};function ct(t){return t in ut&&(delete ut[t],!0)}var ht=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return i(e,t),e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e.scheduled||(e.scheduled=(i=e.flush.bind(e,null),o=ot++,ut[o]=!0,st.then((function(){return ct(o)&&i()})),o)));var i,o},e.prototype.recycleAsyncId=function(e,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);0===e.actions.length&&(ct(r),e.scheduled=void 0)},e}(M),at=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,r=this.actions,n=-1,i=r.length;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while(++n<i&&(t=r.shift()));if(this.active=!1,e){for(;++n<i&&(t=r.shift());)t.unsubscribe();throw e}},e}(D))(ht),lt=at,ft=new D(M),pt=ft,dt=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return i(e,t),e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);0===e.actions.length&&(cancelAnimationFrame(r),e.scheduled=void 0)},e}(M),bt=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,r=this.actions,n=-1,i=r.length;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while(++n<i&&(t=r.shift()));if(this.active=!1,e){for(;++n<i&&(t=r.shift());)t.unsubscribe();throw e}},e}(D))(dt),vt=bt,yt=function(t){function e(e,r){void 0===e&&(e=mt),void 0===r&&(r=Number.POSITIVE_INFINITY);var n=t.call(this,e,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return i(e,t),e.prototype.flush=function(){for(var t,e,r=this.actions,n=this.maxFrames;(e=r[0])&&e.delay<=n&&(r.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=r.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10,e}(D),mt=function(t){function e(e,r,n){void 0===n&&(n=e.index+=1);var i=t.call(this,e,r)||this;return i.scheduler=e,i.work=r,i.index=n,i.active=!0,i.index=e.index=n,i}return i(e,t),e.prototype.schedule=function(r,n){if(void 0===n&&(n=0),!this.id)return t.prototype.schedule.call(this,r,n);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(r,n)},e.prototype.requestAsyncId=function(t,r,n){void 0===n&&(n=0),this.delay=t.frame+n;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,r){void 0===r&&(r=0)},e.prototype._execute=function(e,r){if(!0===this.active)return t.prototype._execute.call(this,e,r)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(M);function wt(){}function _t(t){return!!t&&(t instanceof E||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var xt=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}(),gt=function(){function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t}(),Et=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}();function St(t,e){return function(r){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new It(t,e))}}var It=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new Tt(t,this.project,this.thisArg))},t}(),Tt=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.project=r,i.count=0,i.thisArg=n||i,i}return i(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(v);function jt(t,e,r){if(e){if(!z(e))return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return jt(t,r).apply(void 0,n).pipe(St((function(t){return a(t)?e.apply(void 0,t):e(t)})))};r=e}return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i,o=this,s={context:o,subject:i,callbackFunc:t,scheduler:r};return new E((function(n){if(r){var u={args:e,subscriber:n,params:s};return r.schedule(Nt,0,u)}if(!i){i=new it;try{t.apply(o,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.next(t.length<=1?t[0]:t),i.complete()}]))}catch(t){m(i)?i.error(t):console.warn(t)}}return i.subscribe(n)}))}}function Nt(t){var e=this,r=t.args,n=t.subscriber,i=t.params,o=i.callbackFunc,s=i.context,u=i.scheduler,c=i.subject;if(!c){c=i.subject=new it;try{o.apply(s,r.concat([function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=t.length<=1?t[0]:t;e.add(u.schedule(Ot,0,{value:n,subject:c}))}]))}catch(t){c.error(t)}}this.add(c.subscribe(n))}function Ot(t){var e=t.value,r=t.subject;r.next(e),r.complete()}function kt(t,e,r){if(e){if(!z(e))return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return kt(t,r).apply(void 0,n).pipe(St((function(t){return a(t)?e.apply(void 0,t):e(t)})))};r=e}return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i={subject:void 0,args:e,callbackFunc:t,scheduler:r,context:this};return new E((function(n){var o=i.context,s=i.subject;if(r)return r.schedule(At,0,{params:i,subscriber:n,context:o});if(!s){s=i.subject=new it;try{t.apply(o,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t.shift();r?s.error(r):(s.next(t.length<=1?t[0]:t),s.complete())}]))}catch(t){m(s)?s.error(t):console.warn(t)}}return s.subscribe(n)}))}}function At(t){var e=this,r=t.params,n=t.subscriber,i=t.context,o=r.callbackFunc,s=r.args,u=r.scheduler,c=r.subject;if(!c){c=r.subject=new it;try{o.apply(i,s.concat([function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=t.shift();if(n)e.add(u.schedule(Pt,0,{err:n,subject:c}));else{var i=t.length<=1?t[0]:t;e.add(u.schedule(Ct,0,{value:i,subject:c}))}}]))}catch(t){this.add(u.schedule(Pt,0,{err:t,subject:c}))}}this.add(c.subscribe(n))}function Ct(t){var e=t.value,r=t.subject;r.next(e),r.complete()}function Pt(t){var e=t.err;t.subject.error(e)}var Vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.notifyNext=function(t,e,r,n,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(v),Ft=function(t){function e(e,r,n){var i=t.call(this)||this;return i.parent=e,i.outerValue=r,i.outerIndex=n,i.index=0,i}return i(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(v);function Yt(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}var Mt=Yt(),Rt=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function qt(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}var Dt=function(t){if(t&&"function"==typeof t[w])return n=t,function(t){var e=n[w]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(Rt(t))return G(t);if(qt(t))return r=t,function(t){return r.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,c),t};if(t&&"function"==typeof t[Mt])return e=t,function(t){for(var r=e[Mt]();;){var n=void 0;try{n=r.next()}catch(e){return t.error(e),t}if(n.done){t.complete();break}if(t.next(n.value),t.closed)break}return"function"==typeof r.return&&t.add((function(){r.return&&r.return()})),t};var e,r,n,i=l(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+i+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")};function Ut(t,e,r,n,i){if(void 0===i&&(i=new Ft(t,r,n)),!i.closed)return e instanceof E?e.subscribe(i):Dt(e)(i)}var Ht={};function Lt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=void 0,n=void 0;return z(t[t.length-1])&&(n=t.pop()),"function"==typeof t[t.length-1]&&(r=t.pop()),1===t.length&&a(t[0])&&(t=t[0]),K(t,n).lift(new Wt(r))}var Wt=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new zt(t,this.resultSelector))},t}(),zt=function(t){function e(e,r){var n=t.call(this,e)||this;return n.resultSelector=r,n.active=0,n.values=[],n.observables=[],n}return i(e,t),e.prototype._next=function(t){this.values.push(Ht),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var r=0;r<e;r++){var n=t[r];this.add(Ut(this,n,void 0,r))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,r){var n=this.values,i=n[r],o=this.toRespond?i===Ht?--this.toRespond:this.toRespond:0;n[r]=e,0===o&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(Vt);function Bt(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[w]}(t))return function(t,e){return new E((function(r){var n=new p;return n.add(e.schedule((function(){var i=t[w]();n.add(i.subscribe({next:function(t){n.add(e.schedule((function(){return r.next(t)})))},error:function(t){n.add(e.schedule((function(){return r.error(t)})))},complete:function(){n.add(e.schedule((function(){return r.complete()})))}}))}))),n}))}(t,e);if(qt(t))return function(t,e){return new E((function(r){var n=new p;return n.add(e.schedule((function(){return t.then((function(t){n.add(e.schedule((function(){r.next(t),n.add(e.schedule((function(){return r.complete()})))})))}),(function(t){n.add(e.schedule((function(){return r.error(t)})))}))}))),n}))}(t,e);if(Rt(t))return J(t,e);if(function(t){return t&&"function"==typeof t[Mt]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new E((function(r){var n,i=new p;return i.add((function(){n&&"function"==typeof n.return&&n.return()})),i.add(e.schedule((function(){n=t[Mt](),i.add(e.schedule((function(){if(!r.closed){var t,e;try{var i=n.next();t=i.value,e=i.done}catch(t){return void r.error(t)}e?r.complete():(r.next(t),this.schedule())}})))}))),i}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}function Gt(t,e){return e?Bt(t,e):t instanceof E?t:new E(Dt(t))}var Jt=function(t){function e(e){var r=t.call(this)||this;return r.parent=e,r}return i(e,t),e.prototype._next=function(t){this.parent.notifyNext(t)},e.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},e}(v),Kt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.destination.complete()},e}(v);function Qt(t,e){if(!e.closed){if(t instanceof E)return t.subscribe(e);var r;try{r=Dt(t)(e)}catch(t){e.error(t)}return r}}function Xt(t,e,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof e?function(n){return n.pipe(Xt((function(r,n){return Gt(t(r,n)).pipe(St((function(t,i){return e(r,t,n,i)})))}),r))}:("number"==typeof e&&(r=e),function(e){return e.lift(new Zt(t,r))})}var Zt=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new $t(t,this.project,this.concurrent))},t}(),$t=function(t){function e(e,r,n){void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=r,i.concurrent=n,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return i(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,r=this.index++;try{e=this.project(t,r)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e)},e.prototype._innerSub=function(t){var e=new Jt(this),r=this.destination;r.add(e);var n=Qt(t,e);n!==e&&r.add(n)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(Kt);function te(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Xt(_,t)}function ee(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return te(1)(Q.apply(void 0,t))}function re(t){return new E((function(e){var r;try{r=t()}catch(t){return void e.error(t)}return(r?Gt(r):W()).subscribe(e)}))}function ne(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){var r=t[0];if(a(r))return ie(r,null);if(l(r)&&Object.getPrototypeOf(r)===Object.prototype){var n=Object.keys(r);return ie(n.map((function(t){return r[t]})),n)}}if("function"==typeof t[t.length-1]){var i=t.pop();return ie(t=1===t.length&&a(t[0])?t[0]:t,null).pipe(St((function(t){return i.apply(void 0,t)})))}return ie(t,null)}function ie(t,e){return new E((function(r){var n=t.length;if(0!==n)for(var i=new Array(n),o=0,s=0,u=function(u){var c=Gt(t[u]),h=!1;r.add(c.subscribe({next:function(t){h||(h=!0,s++),i[u]=t},error:function(t){return r.error(t)},complete:function(){++o!==n&&h||(s===n&&r.next(e?e.reduce((function(t,e,r){return t[e]=i[r],t}),{}):i),r.complete())}}))},c=0;c<n;c++)u(c);else r.complete()}))}function oe(t,e,r,n){return o(r)&&(n=r,r=void 0),n?oe(t,e,r).pipe(St((function(t){return a(t)?n.apply(void 0,t):n(t)}))):new E((function(n){se(t,e,(function(t){arguments.length>1?n.next(Array.prototype.slice.call(arguments)):n.next(t)}),n,r)}))}function se(t,e,r,n,i){var o;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){var s=t;t.addEventListener(e,r,i),o=function(){return s.removeEventListener(e,r,i)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){var u=t;t.on(e,r),o=function(){return u.off(e,r)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){var c=t;t.addListener(e,r),o=function(){return c.removeListener(e,r)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var h=0,a=t.length;h<a;h++)se(t[h],e,r,n,i)}n.add(o)}function ue(t,e,r){return r?ue(t,e).pipe(St((function(t){return a(t)?r.apply(void 0,t):r(t)}))):new E((function(r){var n,i=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r.next(1===t.length?t[0]:t)};try{n=t(i)}catch(t){return void r.error(t)}if(o(e))return function(){return e(i,n)}}))}function ce(t,e,r,n,i){var o,s;if(1==arguments.length){var u=t;s=u.initialState,e=u.condition,r=u.iterate,o=u.resultSelector||_,i=u.scheduler}else void 0===n||z(n)?(s=t,o=_,i=n):(s=t,o=n);return new E((function(t){var n=s;if(i)return i.schedule(he,0,{subscriber:t,iterate:r,condition:e,resultSelector:o,state:n});for(;;){if(e){var u=void 0;try{u=e(n)}catch(e){return void t.error(e)}if(!u){t.complete();break}}var c=void 0;try{c=o(n)}catch(e){return void t.error(e)}if(t.next(c),t.closed)break;try{n=r(n)}catch(e){return void t.error(e)}}}))}function he(t){var e=t.subscriber,r=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(t){return void e.error(t)}else t.needIterate=!0;if(r){var n=void 0;try{n=r(t.state)}catch(t){return void e.error(t)}if(!n)return void e.complete();if(e.closed)return}var i;try{i=t.resultSelector(t.state)}catch(t){return void e.error(t)}if(!e.closed&&(e.next(i),!e.closed))return this.schedule(t)}}function ae(t,e,r){return void 0===e&&(e=L),void 0===r&&(r=L),re((function(){return t()?e:r}))}function le(t){return!a(t)&&t-parseFloat(t)+1>=0}function fe(t,e){return void 0===t&&(t=0),void 0===e&&(e=pt),(!le(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=pt),new E((function(r){return r.add(e.schedule(pe,t,{subscriber:r,counter:0,period:t})),r}))}function pe(t){var e=t.subscriber,r=t.counter,n=t.period;e.next(r),this.schedule({subscriber:e,counter:r+1,period:n},n)}function de(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Number.POSITIVE_INFINITY,n=null,i=t[t.length-1];return z(i)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(r=t.pop())):"number"==typeof i&&(r=t.pop()),null===n&&1===t.length&&t[0]instanceof E?t[0]:te(r)(K(t,n))}var be=new E(wt);function ve(){return be}function ye(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return L;var r=t[0],n=t.slice(1);return 1===t.length&&a(r)?ye.apply(void 0,r):new E((function(t){var e=function(){return t.add(ye.apply(void 0,n).subscribe(t))};return Gt(r).subscribe({next:function(e){t.next(e)},error:e,complete:e})}))}function me(t,e){return new E(e?function(r){var n=Object.keys(t),i=new p;return i.add(e.schedule(we,0,{keys:n,index:0,subscriber:r,subscription:i,obj:t})),i}:function(e){for(var r=Object.keys(t),n=0;n<r.length&&!e.closed;n++){var i=r[n];t.hasOwnProperty(i)&&e.next([i,t[i]])}e.complete()})}function we(t){var e=t.keys,r=t.index,n=t.subscriber,i=t.subscription,o=t.obj;if(!n.closed)if(r<e.length){var s=e[r];n.next([s,o[s]]),i.add(this.schedule({keys:e,index:r+1,subscriber:n,subscription:i,obj:o}))}else n.complete()}function _e(t,e){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=t,r.thisArg=e,r}function xe(t,e){return function(r){return r.lift(new ge(t,e))}}var ge=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new Ee(t,this.predicate,this.thisArg))},t}(),Ee=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.predicate=r,i.thisArg=n,i.count=0,i}return i(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(v);function Se(t,e,r){return[xe(e,r)(new E(Dt(t))),xe(_e(e,r))(new E(Dt(t)))]}function Ie(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!a(t[0]))return t[0];t=t[0]}return K(t,void 0).lift(new Te)}var Te=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new je(t))},t}(),je=function(t){function e(e){var r=t.call(this,e)||this;return r.hasFirst=!1,r.observables=[],r.subscriptions=[],r}return i(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var r=0;r<e&&!this.hasFirst;r++){var n=Ut(this,t[r],void 0,r);this.subscriptions&&this.subscriptions.push(n),this.add(n)}this.observables=null}},e.prototype.notifyNext=function(t,e,r){if(!this.hasFirst){this.hasFirst=!0;for(var n=0;n<this.subscriptions.length;n++)if(n!==r){var i=this.subscriptions[n];i.unsubscribe(),this.remove(i)}this.subscriptions=null}this.destination.next(e)},e}(Vt);function Ne(t,e,r){return void 0===t&&(t=0),new E((function(n){void 0===e&&(e=t,t=0);var i=0,o=t;if(r)return r.schedule(Oe,0,{index:i,count:e,start:t,subscriber:n});for(;;){if(i++>=e){n.complete();break}if(n.next(o++),n.closed)break}}))}function Oe(t){var e=t.start,r=t.index,n=t.count,i=t.subscriber;r>=n?i.complete():(i.next(e),i.closed||(t.index=r+1,t.start=e+1,this.schedule(t)))}function ke(t,e,r){void 0===t&&(t=0);var n=-1;return le(e)?n=Number(e)<1?1:Number(e):z(e)&&(r=e),z(r)||(r=pt),new E((function(e){var i=le(t)?t:+t-r.now();return r.schedule(Ae,i,{index:0,period:n,subscriber:e})}))}function Ae(t){var e=t.index,r=t.period,n=t.subscriber;if(n.next(e),!n.closed){if(-1===r)return n.complete();t.index=e+1,this.schedule(t,r)}}function Ce(t,e){return new E((function(r){var n,i;try{n=t()}catch(t){return void r.error(t)}try{i=e(n)}catch(t){return void r.error(t)}var o=(i?Gt(i):L).subscribe(r);return function(){o.unsubscribe(),n&&n.unsubscribe()}}))}function Pe(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=t[t.length-1];return"function"==typeof r&&t.pop(),K(t,void 0).lift(new Ve(r))}var Ve=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Fe(t,this.resultSelector))},t}(),Fe=function(t){function e(e,r,n){void 0===n&&(n=Object.create(null));var i=t.call(this,e)||this;return i.resultSelector=r,i.iterators=[],i.active=0,i.resultSelector="function"==typeof r?r:void 0,i}return i(e,t),e.prototype._next=function(t){var e=this.iterators;a(t)?e.push(new Me(t)):"function"==typeof t[Mt]?e.push(new Ye(t[Mt]())):e.push(new Re(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var r=0;r<e;r++){var n=t[r];n.stillUnsubscribed?this.destination.add(n.subscribe()):this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,r=this.destination,n=0;n<e;n++)if("function"==typeof(s=t[n]).hasValue&&!s.hasValue())return;var i=!1,o=[];for(n=0;n<e;n++){var s,u=(s=t[n]).next();if(s.hasCompleted()&&(i=!0),u.done)return void r.complete();o.push(u.value)}this.resultSelector?this._tryresultSelector(o):r.next(o),i&&r.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(v),Ye=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return Boolean(t&&t.done)},t}(),Me=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[Mt]=function(){return this},t.prototype.next=function(t){var e=this.index++,r=this.array;return e<this.length?{value:r[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),Re=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.parent=r,i.observable=n,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return i(e,t),e.prototype[Mt]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t){this.buffer.push(t),this.parent.checkIterators()},e.prototype.subscribe=function(){return Qt(this.observable,new Jt(this))},e}(Kt)}}]);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */
|