Compare commits

...

335 Commits

Author SHA1 Message Date
6491af19e3 🚀RELEASE v0.17.0
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-15 13:35:48 +01:00
61328d20ed new license file version [CI SKIP] 2023-03-15 12:34:41 +00:00
0a6d92a1f3 Switched license generation to cache registry and pnpm
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-15 13:34:14 +01:00
3a576d1073 Pinned pnpm in dockerfile, thx @philipp
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-15 13:29:33 +01:00
b30b98b521 Pinned ci node version 2023-03-15 13:25:59 +01:00
43d82a2af0 Fixed pnpm being called without being installed
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-15 13:18:07 +01:00
6a4495b813 Merge pull request 'bugfix/162-create_card_modal' (#163) from bugfix/162-create_card_modal into dev
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #163
2023-03-15 12:15:24 +00:00
e8a0ad6647 You can now create cards from runners by searching via #runnerid
ref #162
2023-03-15 13:12:42 +01:00
92b89cc4d8 Fixed double space in label
ref #162
2023-03-15 13:09:07 +01:00
268b1b1d98 Removed unused log
ref #162
2023-03-15 13:07:49 +01:00
75bc89ca30 Fixed runners not showing up
ref #162
2023-03-15 13:06:56 +01:00
0625937068 Merge pull request 'filter by runner full names + "#<ID>"' (#160) from feature/159-cardsoverview-filter-for-runner-full-names-and-id into dev
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #160
2023-03-15 11:20:05 +00:00
32a9074963 Wow this api is fun
ref #159
2023-03-15 12:14:39 +01:00
b869b5fd2a remodelled for early return
ref #159
2023-03-15 11:39:51 +01:00
3a3e2f7157 add ThFilterRunner
ref #159
2023-03-15 11:10:08 +01:00
bea57aa03a fix styling for table filters th border
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-15 11:08:05 +01:00
30991d5364 UsersOverview: drop pfp
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-14 09:53:16 +01:00
5cc8b0811c UsersOverview: change profilepic scaling
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-14 09:51:40 +01:00
2c73b9862d package dependency fixes, bumps, lockfile update
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-14 09:51:23 +01:00
732b2f061e wip: pnpm + node version 2023-03-14 09:29:27 +01:00
3680533eef 🚀RELEASE v0.16.5
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-14 09:25:11 +01:00
1307d72c9d Merge branch 'dev' of https://git.odit.services/lfk/frontend into dev
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-14 09:24:54 +01:00
405dfa0c34 new license file version [CI SKIP] 2023-03-14 08:24:37 +00:00
5c2d154ad1 🚀RELEASE v0.16.4 2023-03-14 09:24:31 +01:00
f2bf8d9bac fix: OrgDetail: clicking on address will toggle selfservice
All checks were successful
continuous-integration/drone/push Build is passing
close #158
2023-03-14 09:23:55 +01:00
f9cfd6bd06 🚀RELEASE v0.16.3
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-23 14:01:35 +01:00
287f63fa52 Merge branch 'dev' of git.odit.services:lfk/frontend into dev
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-23 14:00:20 +01:00
5fe47634e8 Bumped vite build targets 2023-02-23 13:59:27 +01:00
a6590910cf new license file version [CI SKIP] 2023-02-23 12:54:38 +00:00
ad454c386c Merge pull request 'feature/156-pdf_names' (#157) from feature/156-pdf_names into dev
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #157
2023-02-23 12:54:04 +00:00
0b2c296de0 Added ids for generated pdfs
ref #156
2023-02-23 09:59:07 +01:00
0e85940cba 🚀RELEASE v0.16.2
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-23 08:36:54 +01:00
8d479c32f8 Merge pull request 'feature/147-cardoverview_performance' (#153) from feature/147-cardoverview_performance into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #153
2023-02-23 07:34:46 +00:00
549785cf7d Merge pull request 'Fixed scanmodal' (#155) from bugfix/154-scan_select_runner_by_id into dev
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #155
2023-02-23 07:34:39 +00:00
aafc4c8d62 Removed unused console log
ref #154
2023-02-22 18:39:41 +01:00
47dedbdc73 Fixed scanmodal
fixes #154
2023-02-22 18:38:21 +01:00
6fe134afc8 i18n import
ref #147
2023-02-22 18:33:42 +01:00
63a50f92e7 Merge branch 'feature/147-cardoverview_performance' of git.odit.services:lfk/frontend into feature/147-cardoverview_performance 2023-02-22 18:32:29 +01:00
ca6da15ef7 i18n
ref #147
2023-02-22 18:32:25 +01:00
8dfa19fa0f Fixed all filter
ref #147
2023-02-22 18:31:36 +01:00
0feee0ae2f Fixed edit update bug
ref #147
2023-02-22 18:06:53 +01:00
2a6a39916a rename: ThFilterGroup -> ThFilterStatus
ref #147
2023-02-19 15:14:09 +01:00
f0a2b2859f Added custom status filter 2023-02-18 19:27:13 +01:00
32ddb66fc8 Trigger edit modal 2023-02-18 19:24:28 +01:00
df63c2388d Added old formatting for runner and status
ref #147
2023-02-18 19:22:42 +01:00
757655ea63 Bsic datatable conversion
ref #147
2023-02-18 19:20:29 +01:00
329c1cc037 Merge pull request 'fix: RunnerDetail: set .phone to null if empty' (#152) from bugfix/151-runnerdetail--cannot-unset-phone-number into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #152
2023-02-18 16:37:56 +00:00
da6dd55d13 set .phone to null if empty 2023-02-18 17:30:01 +01:00
0e5490f1c8 new license file version [CI SKIP] 2023-02-18 16:18:28 +00:00
b82d638de1 Merge pull request 'feature/146-runner-table-performance-data-table' (#150) from feature/146-runner-table-performance-data-table into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #150
2023-02-18 16:17:51 +00:00
224034dcc6 fix: z-index on action buttons 2023-02-18 17:17:04 +01:00
026d3d41c1 new license file version [CI SKIP] 2023-02-18 16:13:06 +00:00
fd1a06b359 Merge pull request 'feature/148-dashboard_statscards' (#149) from feature/148-dashboard_statscards into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #149
2023-02-18 16:12:30 +00:00
452d010183 Updated breakpoints
ref #148
2023-02-18 16:27:58 +01:00
eb1c17e3ac Dasboard Cards redesign 2023-02-18 16:24:13 +01:00
a101873eb0 Tailwind bump
ref #148
2023-02-18 16:24:02 +01:00
3d2acb692a Fixed top checkbox state 2023-02-18 15:53:47 +01:00
0900c2691e Fixed checkbox show 2023-02-18 15:52:59 +01:00
1337676e08 Basic checkbox fix 2023-02-18 15:49:24 +01:00
2e075eafab RunnersOverview loading fix
ref #146
2023-02-16 15:43:11 +01:00
14d64b6070 add group filtering to table
ref #146
2023-02-16 15:05:41 +01:00
81b8fbf4e3 1st datatable try with @vincjo/datatables 2023-02-16 12:27:45 +01:00
24d074752f formatting 2023-02-16 11:48:30 +01:00
08047a9307 cleaned up table search 2023-02-16 11:47:59 +01:00
1b0cd5b90b improved runner search 2023-02-16 11:45:38 +01:00
65e8998894 set table-layout:fixed + display when loaded
ref #146
2023-02-16 11:26:37 +01:00
449948050b 🚀RELEASE v0.16.1
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-15 15:05:33 +01:00
cf97281592 fix: donor detail: sponsorings: unset middlename will show as "null"
All checks were successful
continuous-integration/drone/push Build is passing
close #145
2023-02-15 15:05:01 +01:00
75684efa1a 🚀RELEASE v0.16.0
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-03 14:07:27 +01:00
2c4f27a943 new license file version [CI SKIP] 2023-02-03 13:05:38 +00:00
53b7dec7cd Merge pull request 'feature/143-beamershow_clients' (#144) from feature/143-beamershow_clients into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #144
2023-02-03 13:05:01 +00:00
e0cbfb000b Tailwind bump 2023-02-02 17:27:18 +01:00
3a66f4c862 new license file version [CI SKIP] 2023-02-02 16:23:56 +00:00
85ceaa464f Merge branch 'dev' into feature/143-beamershow_clients 2023-02-02 17:23:33 +01:00
976755338b Updated docker base images
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-02 17:21:58 +01:00
1c980059cf Switched drone to kaniko 2023-02-02 17:20:01 +01:00
2d8c4c1698 Ignore pnpm lock 2023-02-02 17:19:51 +01:00
19a333d7bd Added missing translation
ref #143
2023-02-02 17:16:24 +01:00
96c55db63d Added translation
ref #143
2023-02-02 17:13:16 +01:00
fecb07ee37 Re-added copy modal
ref #143
2023-02-02 17:11:46 +01:00
e10c6480a5 Removed Key after creation
ref #143
2023-02-02 17:08:29 +01:00
f3cc07c009 Fixed imports and naming 2023-02-02 17:05:34 +01:00
068076dd47 Added Statsclients to sidebar
ref #143
2023-02-02 17:03:18 +01:00
02158605be Basic statsclient detail
ref #143
2023-02-02 17:00:49 +01:00
674e6a90ec Updated mounted variables 2023-02-02 16:54:37 +01:00
f679330466 Updated Add modal
ref #143
2023-02-02 16:51:39 +01:00
93fc7c2e83 Updated deletion modal
ref #143
2023-02-02 16:46:18 +01:00
f299617c60 First page for statsclients
ref #143
2023-02-02 16:42:17 +01:00
28cbc5b98c Bumped apiclient
ref #143
2023-02-02 16:21:11 +01:00
c28f1ee0bc Bumped apiclient
ref #143
2023-02-02 16:04:21 +01:00
cff112d705 Pinned versions
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-02 16:02:52 +01:00
9fc4ad63c4 🚀RELEASE v0.15.6
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-19 17:52:02 +02:00
97054a71c1 new license file version [CI SKIP] 2021-07-19 15:49:32 +00:00
2391668a25 Fixed donations getting reduced to the first one on certificates
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-19 17:47:27 +02:00
717d33547c 🚀RELEASE v0.15.5
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-05 17:23:43 +02:00
997be32679 Merge pull request 'Fixed kilometer conversion' (#142) from bugfix/141-runner_kilometers into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #142
2021-07-05 15:22:55 +00:00
134f00c40e Fixed kilometer conversion
ref #141
2021-07-05 17:15:50 +02:00
47c898bdfd Merge branch 'dev' of https://git.odit.services/lfk/frontend into dev
All checks were successful
continuous-integration/drone/push Build is passing
2021-07-05 17:01:59 +02:00
e752ee12d1 new license file version [CI SKIP] 2021-07-05 15:01:42 +00:00
cc4515ff66 🚀RELEASE v0.15.4 2021-07-05 17:01:31 +02:00
f190292171 Merge pull request 'fix total donation sum in dashboard' (#140) from bugfix/139-total-donation-sum-is-wrong into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #140

close #139
2021-07-05 15:00:44 +00:00
b246f2b349 divide by 100 + toFixes(2)
ref #139
2021-07-05 13:30:17 +02:00
76b69d851a 🚀RELEASE v0.15.3
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-16 18:22:27 +02:00
224f586368 Small bugfix (null got displayed) 🛠 2021-04-16 18:22:00 +02:00
9add6c8ff1 🚀RELEASE v0.15.2
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-16 18:10:50 +02:00
7a63d4eed1 Merge branch 'dev' of https://git.odit.services/lfk/frontend into dev
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-16 18:09:37 +02:00
e54a4807f7 NGINX cache assets 2021-04-16 18:09:30 +02:00
cee04c1d6f Footer - noopener link 2021-04-16 18:09:22 +02:00
cbec78589d Hotfix: Team change recognition 🐞
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-16 18:06:53 +02:00
a85db7cb3f 🚀RELEASE v0.15.1
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-16 17:53:38 +02:00
2bd3779839 Merge pull request '🐞🐳 fix Dockerfile' (#138) from bugfix/136-opacity_reactivity into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #138
2021-04-16 15:51:37 +00:00
303e33cafb 🐞🐳 fix Dockerfile
ref #136
2021-04-16 17:46:15 +02:00
b4e689dddf Dockerfile now uses selfhosted registry
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-15 19:50:37 +02:00
98a0b036c5 new license file version [CI SKIP] 2021-04-15 17:46:04 +00:00
fb3f30fb10 Merge pull request 'Opacity import fix bugfix/136-opacity_reactivity' (#137) from bugfix/136-opacity_reactivity into dev
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #137
2021-04-15 17:44:49 +00:00
6213952007 Added bs import fix
ref #136
2021-04-15 19:43:43 +02:00
07ac041d69 🚚 move to tailwind
ref #136
2021-04-15 19:22:57 +02:00
5c02028841 🚀RELEASE v0.15.0
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-15 18:30:38 +02:00
c561b53670 Merge pull request 'Mark donations as payed feature/133-donation_payments' (#135) from feature/133-donation_payments into dev
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #135
2021-04-15 16:29:39 +00:00
dcd0d5a362 Merge branch 'feature/133-donation_payments' of https://git.odit.services/lfk/frontend into feature/133-donation_payments 2021-04-15 18:27:47 +02:00
18acac83bc AddDonationModal - vertical alignment for paid status
ref #133
2021-04-15 18:27:35 +02:00
d7d44470bb DonationsOverview contrast on action
ref #133
2021-04-15 18:25:52 +02:00
0f0aae7ba4 Fixed chante recognition bug for fixed donation
ref #133
2021-04-15 18:21:23 +02:00
4c0886a5d9 Fixed typo
ref #133
2021-04-15 18:04:03 +02:00
04a3038369 Added missing updated comparison
ref #133
2021-04-15 16:56:03 +02:00
bdcf5d3fc0 Added payment updating via detail
ref #133
2021-04-15 15:54:14 +02:00
c7a858eed7 Sorted translations
ref #133
2021-04-15 15:42:47 +02:00
de5aa9237d Added **all** missing toast translations
ref #133
2021-04-15 15:42:29 +02:00
d015f97395 Added translations 🌎
ref #113
2021-04-15 15:34:36 +02:00
57618156b4 Added msiisng runner id conversion
ref #133
2021-04-15 15:30:23 +02:00
865254d646 Fixed styling
ref #133
2021-04-15 15:25:17 +02:00
1dbab03fe7 You can now add payments from the donation overview
ref #133
2021-04-15 15:24:31 +02:00
a943aaf5fc You can now open a modal to add a payment to a donation from the donation overview
ref #133
2021-04-15 15:05:05 +02:00
6e6e8b2617 Added Add Payment button to donor overview
ref #133
2021-04-15 14:40:46 +02:00
4c2c24af2c Changed top info style for donation overview
ref #133
2021-04-15 14:33:35 +02:00
3d3a10aafb You can now mark fixed donations as already paid on creation
ref #133
2021-04-15 14:31:24 +02:00
000fc97beb Changed top info style for donation detail
ref #133
2021-04-15 14:18:28 +02:00
5645eeaafa Added paid donation amount and status to donation detail
ref #133
2021-04-15 14:17:28 +02:00
961477d522 Added total donation amount to donation overview
ref #133
2021-04-15 14:12:11 +02:00
a5f71015a6 Added total donation amount to donor detail
ref #133
2021-04-15 14:10:35 +02:00
e42ea943b7 Added total donation amount to donor overview
ref #133
2021-04-15 14:09:23 +02:00
9c5fc6b61c 🚀RELEASE v0.14.0
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-14 19:28:00 +02:00
302caf015f new license file version [CI SKIP] 2021-04-14 17:27:30 +00:00
e11296071a Merge pull request 'added donor receipt list download to DonorsOverview' (#134) from feature/132-export-donors-receipt-list into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #134
close #132
2021-04-14 17:26:10 +00:00
112eb29f93 Switched to selfhosted images
ref #132
2021-04-14 19:24:06 +02:00
c6c97516b3 Sorted translations 🌎
ref #132
2021-04-14 19:23:26 +02:00
03676b2894 Fixed typos in translations
ref #132
2021-04-14 19:23:07 +02:00
9ca57fac2e bump @odit/lfk-client-js@0.11.0
ref #132
2021-04-14 18:58:57 +02:00
18f151c1fb general version bump
ref #132
2021-04-14 18:57:14 +02:00
e90e56d8b2 replace donationAmount with paidDonationAmount
ref #132
2021-04-14 18:54:05 +02:00
d241ca5698 added donor receipt list download to DonorsOverview
ref #132
2021-04-14 18:43:51 +02:00
b512cf8667 🚀RELEASE v0.13.1
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-11 21:14:03 +02:00
a24d2923c6 For await fix
Some checks failed
continuous-integration/drone/push Build is failing
2021-04-11 21:13:44 +02:00
467808abef 🚀RELEASE v0.13.0
Some checks failed
continuous-integration/drone/push Build is failing
2021-04-11 21:08:58 +02:00
861f1f2216 Merge pull request 'Better org pdf generation feature/130-org_doc_splitting' (#131) from feature/130-org_doc_splitting into dev
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #131
2021-04-11 19:07:53 +00:00
509b22bea0 Org certificate generation now runs in sequence
ref #130
2021-04-11 21:00:33 +02:00
7447b2f4c1 Fixed const -> let
ref #130
2021-04-11 20:54:38 +02:00
fef14b6e4f Org card generation now runs in sequence
ref #130
2021-04-11 20:53:58 +02:00
01d2a7e6aa Org contract generation now runs in sequence
ref #130
2021-04-11 20:48:20 +02:00
ac586fec5a Hotfix: Org * generation🐞
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-11 20:17:34 +02:00
5476808683 Emergency document server url change
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-11 20:10:08 +02:00
331d737796 🚀RELEASE v0.12.5
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-08 19:30:20 +02:00
ef81b8adf9 Merge pull request 'Added runner team's parentorg name to runenr overciew' (#129) from feature/128-runner_orgs into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #129
2021-04-08 17:29:27 +00:00
8a7d635cef Switched to html entity
ref #128
2021-04-08 18:00:47 +02:00
4c259c1eef Added runner team's parentorg name to runenr overciew
ref #128
2021-04-08 17:58:49 +02:00
5b4ede5e2f 🚀RELEASE v0.12.4
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-08 17:34:32 +02:00
d0ab3dda78 🚑 [HOTFIX] - drop "svelte-infinite-loading"
Some checks failed
continuous-integration/drone/push Build is failing
2021-04-08 17:34:04 +02:00
d9cf51b4bb 🚀RELEASE v0.12.3
Some checks failed
continuous-integration/drone/push Build is failing
2021-04-08 17:30:23 +02:00
aa17f24220 new license file version [CI SKIP] 2021-04-08 15:28:50 +00:00
cf60edf7d4 Merge pull request 'fix' (#126) from bugfix/125-mobile into dev
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #126
close #125
2021-04-08 15:27:22 +00:00
ffbc243194 custom css fix for collapsed_navigation
ref #125
2021-04-07 21:44:29 +02:00
b6b07cf30c 🐞 bugfix for svelte x tailwind class names
ref #125
2021-04-07 21:35:01 +02:00
495a6b22bd almost fixed... 2021-04-07 21:28:21 +02:00
0acaffbdfa fix
ref #125
2021-04-07 20:25:04 +02:00
6043bc4517 🚀RELEASE v0.12.2
Some checks failed
continuous-integration/drone/push Build is failing
2021-04-07 20:11:21 +02:00
e6ed066e3f Merge pull request 'feature/110-virtual_list' (#124) from feature/110-virtual_list into dev
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #124
2021-04-07 18:10:02 +00:00
ee4e8655b8 Merge branch 'dev' into feature/110-virtual_list 2021-04-07 20:09:35 +02:00
37970d2be6 pre-merge fixes
ref #110
2021-04-07 18:59:46 +02:00
1376788016 updated virtual scroll list 2021-04-07 18:38:52 +02:00
4cad86cf85 fixed height table 2021-04-07 18:19:58 +02:00
6304116edb wip on virtuallist 2021-04-06 22:16:24 +02:00
834ff8fa63 🚀RELEASE v0.12.1
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-06 16:47:37 +02:00
1f428a535e Merge pull request 'ImportRunnerModal Cancel Button feature/122-import_cancel' (#123) from feature/112-import_cancel into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #123
2021-04-06 14:42:37 +00:00
0c40966970 Added cancel button for the first stage of runner import
ref #112
2021-04-05 16:23:24 +02:00
9da071fe9b Escape now triggers foll modal close (including reset) instead of just hiding th modal
ref #112
2021-04-05 16:14:43 +02:00
892a04f289 🚀RELEASE v0.12.0
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-05 16:09:17 +02:00
27cc9727f1 Fixed package version
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-05 16:08:41 +02:00
f0738d451b Merge pull request 'Implmented certificate generation feature/119-Certificate_generation' (#120) from feature/119-Certificate_generation into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #120
2021-04-05 14:05:38 +00:00
9e6a8daf2c Sorted translations 🌍
ref #119
2021-04-05 16:04:44 +02:00
bfacfec765 The PFS Prefixes now get translated via i18n
ref #119
2021-04-05 16:04:26 +02:00
0bae5bf32b sponsoring pdf names now include their locale
ref #119
2021-04-05 15:37:12 +02:00
22b09d16d0 Cleaned up generation strings and added the schem for single runner generations for sponsoring contracts
ref #119
2021-04-05 15:36:01 +02:00
9c867e106e Cleaned up generation strings and added the schem for single runner generations for cards
ref #119
2021-04-05 15:33:55 +02:00
304f28a3c1 certificate pdf names now include their locale
ref #119
2021-04-05 15:31:52 +02:00
d65d3793de Changed the basic nameing generation for runenr certificate files
ref #119
2021-04-05 15:31:01 +02:00
3638d87bd2 Runnercard pdfs now include their locale
ref #119
2021-04-05 15:28:13 +02:00
b97a92860d Fixed wrong permissiong getting checked
ref #119
2021-04-05 15:24:42 +02:00
7c86a5eeb3 added missing/ wrong translations + formatting!
ref #119
2021-04-05 12:02:18 +02:00
d23dbaaf69 Removed useless console.log
ref #119
2021-04-03 20:05:27 +02:00
e6ffc371e1 Certificate generation from org detail
ref #119
2021-04-03 20:03:57 +02:00
3177c6eaa3 Certificate generation from org overview
ref #119
2021-04-03 20:02:52 +02:00
acd2f0519d Certificate generation from team detail
ref #119
2021-04-03 20:00:51 +02:00
18ec100c33 Certificate generation from team overview
ref #119
2021-04-03 19:59:34 +02:00
fa55fce76e Merge branch 'feature/119-Certificate_generation' of git.odit.services:lfk/frontend into feature/119-Certificate_generation 2021-04-03 19:59:20 +02:00
f47d5e347d Copy-paste fix
ref #119
2021-04-03 19:59:18 +02:00
7488a8b597 Copy-paste fix
ref #119
2021-04-03 19:58:24 +02:00
2e3ac154be Implemented generation for orgs
ref #119
2021-04-03 19:52:41 +02:00
2472640755 Implemented generation for teams
ref #119
2021-04-03 19:51:01 +02:00
7b685d6cad Added certificate generation from runner overview and detail
ref #119
2021-04-03 19:48:31 +02:00
17f6f4e616 Added i18n
ref #119
2021-04-03 19:46:17 +02:00
48cfc15cfb Removed useless console log
ref #119
2021-04-03 19:44:57 +02:00
bb9b779cee You can now generate certificates from the runner overview
ref #119
2021-04-03 19:44:26 +02:00
af63ce67ae Added basic certificate generation component
ref #119
2021-04-03 19:38:54 +02:00
5cc4871ec4 new license file version [CI SKIP] 2021-04-03 17:18:28 +00:00
c8cfe669b8 Merge pull request 'feature/108_vite_migration' (#118) from feature/108_vite_migration into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #118
close #108
2021-04-03 17:17:23 +00:00
8b74d6d759 bump @odit/lfk-client-js@0.10.1
ref #108
2021-04-03 19:16:53 +02:00
a9227768de 🐞 fix await for esNext
ref #108
2021-04-03 19:13:05 +02:00
d966e1d4de Merge branch 'dev' into feature/108_vite_migration
# Conflicts:
#	index.html
#	package.json
#	public/licenses.json
#	src/App.svelte
#	src/components/orgs/OrgOverview.svelte
#	src/components/teams/TeamsOverview.svelte
2021-04-03 19:10:10 +02:00
ceb2146c1b 🔨 dev container open
ref #108
2021-04-03 18:31:03 +02:00
8d006d8c74 version bump: vite-plugin-windicss@0.12.2
ref #108
2021-04-03 18:22:00 +02:00
777304f259 🔨🔥 alpine based devcontainer with working yarn PnP
ref #108
2021-04-02 21:57:56 +02:00
12433f7c23 🧹 reorder + fix package
ref #108
2021-04-02 21:56:57 +02:00
44b53da345 🚚 move @svitejs/vite-plugin-svelte to @sveltejs/vite-plugin-svelte
ref #108
2021-04-02 21:47:43 +02:00
ab45fc144e upgrade vite-plugin-windicss@0.12.1
ref #108
2021-04-02 21:20:48 +02:00
e99e9e0708 update licenses.json
ref #108
2021-04-02 21:20:05 +02:00
467404bfc8 🐞 fix main.js linking
ref #108
2021-04-02 21:19:49 +02:00
ce50fa2a62 🧹 drop unused dependencies
ref #108
2021-04-02 21:19:29 +02:00
10a011d842 🐞 fix vite config for production system
ref #108
2021-04-02 21:07:16 +02:00
5352410d0c 🐞 fix NGINX config
ref #108
2021-04-02 21:06:57 +02:00
c5d155396a 💾 prevent env.js from being cached
ref #108
2021-04-01 19:35:27 +02:00
93187099d3 🔨 re-added VS Code devcontainer config
ref #108
2021-04-01 19:35:10 +02:00
aa24b1dce5 📃 added readme
ref #108
2021-04-01 19:32:10 +02:00
eb3ede9593 fix dev script
ref #108
2021-04-01 19:30:31 +02:00
d7fecfbd0b version bumps
ref #108
2021-04-01 19:30:15 +02:00
b065b4ff21 📍 version bump + pin
ref #108
2021-03-30 18:36:20 +02:00
87370d24be Merge branch 'dev' of git.odit.services:lfk/frontend into dev
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-30 18:29:03 +02:00
8f8b9988ad new license file version [CI SKIP] 2021-03-30 16:29:19 +00:00
f8ccf4f5d8 🚀RELEASE v0.11.0 2021-03-30 18:28:53 +02:00
25d8b86efd Merge pull request 'Generate and print bulk blank cards feature/116-download_blanc_cards' (#117) from feature/116-download_blanc_cards into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #117
2021-03-30 16:27:48 +00:00
0cd3e937d8 bump vite to 2.1.3
ref #108
2021-03-30 18:21:18 +02:00
89bb9c215e Sorted translations
ref #116
2021-03-29 18:52:25 +02:00
2d18686ce7 Bumped lfk client js version
ref #116
2021-03-29 18:52:10 +02:00
1d999d4910 Now returning cards on creation with pdf
ref #116
2021-03-29 18:23:17 +02:00
7dfaa7579a Bumped lfk-client-js
ref #116
2021-03-29 18:15:00 +02:00
08cb079e97 Fixed button styling
ref #116
2021-03-29 17:57:34 +02:00
450aa83592 Merge branch 'feature/116-download_blanc_cards' of git.odit.services:lfk/frontend into feature/116-download_blanc_cards
# Conflicts:
#	src/components/cards/AddCardBulkModal.svelte
2021-03-29 17:47:18 +02:00
0614c76e92 Added button (including translations
ref #116
2021-03-29 17:46:56 +02:00
97e338f9d4 Added button (including translations
ref #116
2021-03-29 17:46:51 +02:00
636f018daa Added comment
ref #116
2021-03-29 17:44:59 +02:00
c8d639024a Added function for generating cards with pdf
ref #116
2021-03-29 17:44:30 +02:00
6be2ee626a package cleanup 2021-03-26 21:22:46 +01:00
f7fc1967a5 🚀RELEASE v0.10.0
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-26 20:07:14 +01:00
aedb8a765b new license file version [CI SKIP] 2021-03-26 19:06:59 +00:00
cf58bd15c3 Bumped lfk-client version 🔝
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-26 20:05:26 +01:00
34f4f68524 new license file version [CI SKIP] 2021-03-26 19:04:28 +00:00
09b8144080 Merge pull request 'Implemented password strength test feature/106-password_strength' (#115) from feature/106-password_strength into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #115
2021-03-26 19:03:03 +00:00
f1e6fb4ce7 Merge branch 'dev' into feature/106-password_strength 2021-03-26 19:59:47 +01:00
2ca63fd1f6 🚀RELEASE v0.9.1
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-26 19:59:29 +01:00
a5d25e7d92 Merge pull request 'Org selfservice Link feature/112-org_registration_links' (#114) from feature/112-org_registration_links into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #114
2021-03-26 18:58:34 +00:00
4167819e7a Formatting🛠
ref #106
2021-03-26 19:52:31 +01:00
5bd3a463f0 Sorted translations 🌍
ref #106
2021-03-26 19:51:57 +01:00
79c447b4c6 Added translations
ref #106
2021-03-26 19:51:27 +01:00
540304f947 User creation can now only be triggered if pw is strong enoug
ref #106
2021-03-26 19:48:42 +01:00
75d8f7331b Reset can now only be triggered if pw is strong enoug
ref #106
2021-03-26 19:47:26 +01:00
b2509e9e53 Module now exports functions that check if a password is strong enough and equal to a potential confirmation field
ref #106
2021-03-26 19:45:53 +01:00
7862f44653 Now using pw strength component for user creation
ref #106
2021-03-26 19:31:21 +01:00
962dd0c1bb Added missing exports
ref #106
2021-03-26 19:29:47 +01:00
5d5f7c7f5c Now using pw strength component for reset
ref #106
2021-03-26 19:29:37 +01:00
6aaf838451 Now using pw strength component
ref #106
2021-03-26 19:29:25 +01:00
ad3bd312e9 Added a password strength verification
ref #106
2021-03-26 19:26:26 +01:00
5fa9939696 Added more cirteria to the password strength component
ref #106
2021-03-26 19:02:09 +01:00
4956bb0e9c Implemented a custom password strength component
ref #106
2021-03-26 18:47:24 +01:00
c074c12be7 Sorted translations
ref #112
2021-03-26 18:11:49 +01:00
ddbc293e9c Added translations
ref #112
2021-03-26 18:11:23 +01:00
a3921b45c7 Copy now 100% worX
ref #112
2021-03-26 18:11:10 +01:00
38e1c8c5a1 Merge branch 'feature/112-org_registration_links' of git.odit.services:lfk/frontend into feature/112-org_registration_links 2021-03-26 18:04:08 +01:00
c2d29ff233 Added check if key exists
ref #112
2021-03-26 18:04:05 +01:00
2316baa898 Added check if key exists 2021-03-26 18:03:58 +01:00
f185d559c0 Formatting
ref #112
2021-03-26 18:01:34 +01:00
73d95bc004 Fixed changes in wrong file
ref #112
2021-03-26 18:01:17 +01:00
fcd55f89d7 You can now copy the selfservice links to your clipboard
ref #112
2021-03-26 17:59:46 +01:00
f9fe793573 Added checkbox to enable registration
ref #112
2021-03-26 17:37:54 +01:00
bc36411993 Merge branch 'main' into dev
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-26 16:17:51 +00:00
48506236bf Merge branch 'dev' of git.odit.services:lfk/frontend into dev
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-26 17:15:51 +01:00
ded9b589fe new license file version [CI SKIP] 2021-03-26 16:16:10 +00:00
67c3732fad 🚀RELEASE v0.9.0 2021-03-26 17:15:42 +01:00
2932f4591e Merge pull request 'Runner cards feature/94-runnercard_mgnt' (#111) from feature/94-runnercard_mgnt into dev
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #111
2021-03-26 16:14:45 +00:00
df53c07450 CardsOverview - move to 'enabled' language key
ref #94
2021-03-26 17:13:55 +01:00
40899e9d80 drop console log - CardDetailModal
ref #94
2021-03-26 17:13:38 +01:00
f794af0950 ✒ typo - "Geb" -> "Gebe"
ref #94
2021-03-26 17:01:40 +01:00
1665a1a093 Sorted translations 🌍
ref #94
2021-03-26 16:22:10 +01:00
4a36fb6d95 Added card generation/printing from detail
ref #94
2021-03-26 16:21:46 +01:00
acf78a8822 Added a new runenrcard logo
ref #94
2021-03-26 16:12:40 +01:00
f5c1ec9939 Fixed counting bug
ref #94
2021-03-26 16:05:49 +01:00
4b3d38b05b Now with working org runenrcard generation
ref #94
2021-03-26 16:05:39 +01:00
23e0b53107 Added runnercard generation for teams
ref #94
2021-03-26 15:58:39 +01:00
c907486c4d Working runner runnercard generation
ref #94
2021-03-26 15:53:04 +01:00
6b5945add8 Added translations
ref #94
2021-03-26 15:34:38 +01:00
55693de934 Removed debug info
ref #94
2021-03-26 15:34:01 +01:00
d467475b6d Basic card generation worX 🎉🎉
ref #94
2021-03-26 15:32:27 +01:00
44bc14820f Fuggin snowpack bs
ref #94
2021-03-26 14:47:56 +01:00
ec447e2e36 Merge branch 'dev' into feature/94-runnercard_mgnt 2021-03-25 20:30:31 +01:00
0af2647965 🚀RELEASE v0.8.7
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-25 20:30:06 +01:00
08442154f4 Fixed listen on wrong permission🐞
Some checks failed
continuous-integration/drone/push Build is failing
2021-03-25 20:29:33 +01:00
9f7d2234fb Formatting
ref #94
2021-03-25 20:22:01 +01:00
ddd82a71a7 Moved the pdf generation related componenets to their own folder
ref #94
2021-03-25 20:20:21 +01:00
014ba3bf67 Teams now use the new sponsoring contracts module
ref #94
2021-03-25 20:17:48 +01:00
c87321f804 Fixed org generation not hiding the generation toast
ref #94
2021-03-25 20:12:32 +01:00
8b451b3c67 Orgs now use the new sponsoring contracts module
ref #94
2021-03-25 20:09:43 +01:00
0cfc87fbe6 Moved contract generation to it's own component
ref #94
2021-03-25 20:06:35 +01:00
ae9673070c Now w/ working dialog🎉🎉🎉
ref #94
2021-03-25 19:14:15 +01:00
008027db0e added windicss settings for VSCode
ref #108
2021-03-25 18:57:33 +01:00
aec5e3473e for await fix - ViteJS
ref #108
2021-03-25 18:56:18 +01:00
95c8fde72f updated default entrypoint
ref #108
2021-03-25 18:56:02 +01:00
0f32968fae 🐳 new Dockerfiles
ref #108
2021-03-25 18:55:43 +01:00
ae79e9fea1 basic ViteJS migration
ref #108
2021-03-25 18:55:24 +01:00
1a52aaf8d1 Moved modal import to overview for simplification
ref #94
2021-03-25 18:55:16 +01:00
d6c315ab8e Sorted translations 🌍
ref #94
2021-03-25 18:39:03 +01:00
983ce56048 Merge branch 'dev' into feature/94-runnercard_mgnt
# Conflicts:
#	src/locales/de.json
#	src/locales/en.json
2021-03-25 18:38:31 +01:00
de2fe0e9f1 Sorted translations
ref #94
2021-03-25 18:36:51 +01:00
fac059f02c Now w/working editing
ref #94
2021-03-24 16:58:06 +01:00
0313f8cc49 Added runnercard detail/edit modal
ref #94
2021-03-24 16:43:05 +01:00
7ad6b73574 Implemented bulk creation
ref #94
2021-03-23 19:55:55 +01:00
3cd0468b19 Bumped lfk client lib version
ref #94
2021-03-23 18:57:13 +01:00
f46ccb610e Added bulk creation modal to cards view
ref #94
2021-03-23 18:41:00 +01:00
8a32569a3b Added bulk card creation modal
ref #94
2021-03-23 18:35:21 +01:00
535b23ae91 Implemented Add card modal
ref #94
2021-03-23 17:58:13 +01:00
4715978f81 Added message for missing runner/blanco card)
ref #94
2021-03-23 17:39:14 +01:00
a516aa7775 Formatting
ref #94
2021-03-23 17:34:25 +01:00
77e9c205f9 Now importing runner overview
ref #94
2021-03-23 17:34:01 +01:00
e852305400 Now routing the cards page
ref #94
2021-03-23 17:31:11 +01:00
c6a15264b3 Added basic card overview
ref #94
2021-03-23 17:29:21 +01:00
2d0beaaaad Added CardsEmptyState + Emtystate graphic
ref #94
2021-03-23 17:19:10 +01:00
5c5ef95d2b Added basic cards page
ref #94
2021-03-23 17:13:31 +01:00
9aa8e7edff Merge pull request 'first merge to main 🚀' (#71) from dev into main
Reviewed-on: #71
Reviewed-by: Nicolai Ort <info@nicolai-ort.com>
2021-02-19 17:03:02 +00:00
13204 changed files with 1902307 additions and 2811 deletions

6
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,6 @@
FROM mcr.microsoft.com/vscode/devcontainers/base:alpine-3.12
RUN apk update
RUN apk add --upgrade nodejs-current npm
RUN npm i -g yarn rimraf
RUN rimraf node_modules
RUN yarn set version berry

View File

@@ -0,0 +1,20 @@
{
"name": "Node.js",
"build": {
"dockerfile": "Dockerfile"
},
"settings": {
"terminal.integrated.shell.linux": "/bin/sh"
},
"extensions": [
"dbaeumer.vscode-eslint",
"2gua.rainbow-brackets",
"christian-kohler.npm-intellisense",
"remimarsal.prettier-now",
"svelte.svelte-vscode",
"lokalise.i18n-ally",
"fivethree.vscode-svelte-snippets",
"voorjaar.windicss-intellisense"
],
"postCreateCommand": "yarn && yarn dev --open"
}

View File

@@ -1,3 +1 @@
public/env.sample.js
public/workbox-*.js
public/workbox-*.js.map

View File

@@ -27,10 +27,11 @@ name: build:dev
steps:
- name: run full license export
depends_on: ["clone"]
image: node:alpine
image: registry.odit.services/hub/library/node:19.7.0-alpine3.16
commands:
- yarn
- yarn licenses:export
- npm config set registry http://npm-cache.drone.svc.cluster.local:8080 && npm i -g pnpm
- pnpm i
- pnpm licenses:export
- name: push new licenses file to repo
depends_on: ["run full license export"]
image: appleboy/drone-git-push
@@ -43,18 +44,23 @@ steps:
ssh_key:
from_secret: git_ssh
- name: build dev
image: plugins/docker
depends_on: [clone]
depends_on: ["clone"]
image: registry.odit.services/library/drone-kaniko
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: registry.odit.services/lfk/frontend
build_args:
- NPM_REGISTRY_DOMAIN:
from_secret: npmjs_domain
- NPM_REGISTRY_TOKEN:
from_secret: npmjs_token
repo: lfk/frontend
tags:
- dev
cache: true
registry: registry.odit.services
mtu: 1000
trigger:
branch:
- dev
@@ -67,18 +73,23 @@ type: kubernetes
name: build:tags
steps:
- name: build $DRONE_TAG
image: plugins/docker
depends_on: [clone]
depends_on: ["clone"]
image: registry.odit.services/library/drone-kaniko
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: registry.odit.services/lfk/frontend
build_args:
- NPM_REGISTRY_DOMAIN:
from_secret: npmjs_domain
- NPM_REGISTRY_TOKEN:
from_secret: npmjs_token
repo: lfk/frontend
tags:
- '${DRONE_TAG}'
- "${DRONE_TAG}"
cache: true
registry: registry.odit.services
mtu: 1000
trigger:
event:
- tag

8
.gitignore vendored
View File

@@ -1,11 +1,5 @@
node_modules
build
package-lock.json
yarn.lock
*.map
public/env.js
public/sw.js
public/index.html
public/workbox-*.js
svelte.config.js
public/index.html
/dist

View File

@@ -0,0 +1,34 @@
var baseHasIn = require('./_baseHasIn'),
hasPath = require('./_hasPath');
/**
* Checks if `path` is a direct or inherited property of `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
* @example
*
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
*
* _.hasIn(object, 'a');
* // => true
*
* _.hasIn(object, 'a.b');
* // => true
*
* _.hasIn(object, ['a', 'b']);
* // => true
*
* _.hasIn(object, 'b');
* // => false
*/
function hasIn(object, path) {
return object != null && hasPath(object, path, baseHasIn);
}
module.exports = hasIn;

View File

@@ -0,0 +1,2 @@
var convert = require('./convert');
module.exports = convert(require('../function'));

View File

@@ -0,0 +1,39 @@
/**
Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag.
@param flag - CLI flag to look for. The `--` prefix is optional.
@param argv - CLI arguments. Default: `process.argv`.
@returns Whether the flag exists.
@example
```
// $ ts-node foo.ts -f --unicorn --foo=bar -- --rainbow
// foo.ts
import hasFlag = require('has-flag');
hasFlag('unicorn');
//=> true
hasFlag('--unicorn');
//=> true
hasFlag('f');
//=> true
hasFlag('-f');
//=> true
hasFlag('foo=bar');
//=> true
hasFlag('foo');
//=> false
hasFlag('rainbow');
//=> false
```
*/
declare function hasFlag(flag: string, argv?: string[]): boolean;
export = hasFlag;

View File

@@ -0,0 +1,52 @@
{
"name": "prelude-ls",
"version": "1.1.2",
"author": "George Zahariev <z@georgezahariev.com>",
"description": "prelude.ls is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, LiveScript.",
"keywords": [
"prelude",
"livescript",
"utility",
"ls",
"coffeescript",
"javascript",
"library",
"functional",
"array",
"list",
"object",
"string"
],
"main": "lib/",
"files": [
"lib/",
"README.md",
"LICENSE"
],
"homepage": "http://preludels.com",
"bugs": "https://github.com/gkz/prelude-ls/issues",
"licenses": [
{
"type": "MIT",
"url": "https://raw.github.com/gkz/prelude-ls/master/LICENSE"
}
],
"engines": {
"node": ">= 0.8.0"
},
"repository": {
"type": "git",
"url": "git://github.com/gkz/prelude-ls.git"
},
"scripts": {
"test": "make test"
},
"devDependencies": {
"livescript": "~1.4.0",
"uglify-js": "~2.4.12",
"mocha": "~2.2.4",
"istanbul": "~0.2.4",
"browserify": "~3.24.13",
"sinon": "~1.10.2"
}
}

View File

@@ -0,0 +1,36 @@
'use strict';
require('../auto');
var runTests = require('./tests');
var test = require('tape');
var defineProperties = require('define-properties');
var callBind = require('call-bind');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = require('functions-have-names')();
test('shimmed', function (t) {
t.equal(String.prototype.trimEnd.length, 0, 'String#trimEnd has a length of 0');
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal((/^(?:trimRight|trimEnd)$/).test(String.prototype.trimEnd.name), true, 'String#trimEnd has name "trimRight" or "trimEnd"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(String.prototype, 'trimEnd'), 'String#trimEnd is not enumerable');
et.end();
});
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
t.test('bad string/this value', { skip: !supportsStrictMode }, function (st) {
st['throws'](function () { return String.prototype.trimEnd.call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return String.prototype.trimEnd.call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});
runTests(callBind(String.prototype.trimEnd), t);
t.end();
});

View File

@@ -0,0 +1,7 @@
/**
* https://tc39.es/ecma402/#sec-coerceoptionstoobject
* @param options
* @returns
*/
export declare function CoerceOptionsToObject<T>(options?: T): T;
//# sourceMappingURL=CoerceOptionsToObject.d.ts.map

View File

@@ -0,0 +1,67 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var internal = require('./internal/index.js');
function onMount() { }
function beforeUpdate() { }
function afterUpdate() { }
Object.defineProperty(exports, 'SvelteComponent', {
enumerable: true,
get: function () {
return internal.SvelteComponentDev;
}
});
Object.defineProperty(exports, 'SvelteComponentTyped', {
enumerable: true,
get: function () {
return internal.SvelteComponentTyped;
}
});
Object.defineProperty(exports, 'createEventDispatcher', {
enumerable: true,
get: function () {
return internal.createEventDispatcher;
}
});
Object.defineProperty(exports, 'getAllContexts', {
enumerable: true,
get: function () {
return internal.getAllContexts;
}
});
Object.defineProperty(exports, 'getContext', {
enumerable: true,
get: function () {
return internal.getContext;
}
});
Object.defineProperty(exports, 'hasContext', {
enumerable: true,
get: function () {
return internal.hasContext;
}
});
Object.defineProperty(exports, 'onDestroy', {
enumerable: true,
get: function () {
return internal.onDestroy;
}
});
Object.defineProperty(exports, 'setContext', {
enumerable: true,
get: function () {
return internal.setContext;
}
});
Object.defineProperty(exports, 'tick', {
enumerable: true,
get: function () {
return internal.tick;
}
});
exports.afterUpdate = afterUpdate;
exports.beforeUpdate = beforeUpdate;
exports.onMount = onMount;

View File

@@ -0,0 +1,133 @@
# Changelog
All the changes made to toastify-js library.
## [1.12.0] - 2022-07-21
* Accessibility fix: Support aria-live for the toast
* Accessibility fix: Add aria-label for close icon
## [1.11.2] - 2021-10-06
* Bugfix: Style Options: "backgroundColor" not working! (#81)
* Bugfix: "ShadowRoot is undefined" in older browsers (#83)
## [1.11.1] - 2021-07-15
* Bugfix: IE11 support broke since style option #77
## [1.11.0] - 2021-04-25
* New property `oldestFirst` allows to set the order of adding new toasts to page (#70 and #71)
## [1.10.0] - 2021-03-25
* `selector` now supports a DOM Node, along with ID string ([#65](https://github.com/apvarun/toastify-js/pull/65))
* New property - `escapeMarkup` - Toggle the default behavior of escaping HTML markup
* New property - `style` - Use the HTML DOM Style properties to add any style directly to toast
* Adds `toastify-es.js`, to be used from node_modules until there are no compatibility issues
### Deprecations:
* `backgroundColor` is deprecated. Use `style.background` instead
## [1.9.3] - 2020-10-10
* Offset IE11 compatibility #64
## [1.9.2] - 2020-09-24
* Bugfix: Max width problem for firefox browser #61
## [1.9.1] - 2020-08-13
* Bugfix: Avatar positioning based on toast position
## [1.9.0] - 2020-07-22
* Add support for providing toast `offset`
* Updated docs: offset
## [1.8.0] - 2020-05-29
* Add option to provide a node instead of text
* Updated docs: permanent toast duration
## [1.7.0] - 2020-03-01
* To be able to set `stopOnFocus` for toasts without close icon
* Bugfix: `duration` can be infinite by setting as `0`
* Bugfix: Prevent errors when parent node is removed from DOM while using frameworks
* Bugfix: IE 9/10 compatibility fix
## [1.6.2] - 2020-01-03
* Bugfix: Closing the toast when custom close icon from icon fonts are used
## [1.6.1] - 2019-06-29
* Bugfix: Disabling `stopOnFocus`
## [1.6.0] - 2019-06-29
* **Deprecation Warning**: Migrating from `positionLeft` property to `position`
* Property `position` to support `center` as a value along with `left` and `right` - Useful for centering toast messages in the page
## [1.5.0] - 2019-05-30
* Added persistant toast option with ability to programatically close it
## [1.4.0] - 2019-05-12
* **Breaking Change**: Manually import CSS while using as module in your modern JavaScript applications
* Ability to pause the toast dismiss timer on hover (Using `stopOnFocus` property)
## [1.3.2] - 2018-12-6
* Added z-index attribute
## [1.2.1] - 2018-05-31
* Added support for Classes. Now custom classes can be added to the toast while creating it
## [1.2.0] - 2018-03-05
* Fix issue when `destination` and `close` options is used at the same time
## [1.1.0] - 2018-02-18
* Browser support extended to IE10+ without any polyfills
## [1.0.0] - 2018-02-17
* Support for modules
## [0.0.6] - 2017-09-09
* Support for changing background [Options]
* Optimized toast positioning logic
* Added changelog for library update tracking
## [0.0.5] - 2017-09-06
* Support for toast messages on mobile screens
* Tweaked close icon
## [0.0.4] - 2017-09-05
* Support for positioning of toasts on the page
## [0.0.3] - 2017-09-05
* Close buton for toasts [Options]
## [0.0.2] - 2017-09-04
* Option to add on-click link for toasts
* Updated comments for code readability
## [0.0.1] - 2017-09-02
* Initial Release
* Added Preview page
* Optimized function structure

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('defaultsAll', require('../defaults'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,126 @@
import { Component, toChildArray } from 'preact';
import { suspended } from './suspense.js';
// Indexes to linked list nodes (nodes are stored as arrays to save bytes).
const SUSPENDED_COUNT = 0;
const RESOLVED_COUNT = 1;
const NEXT_NODE = 2;
// Having custom inheritance instead of a class here saves a lot of bytes.
export function SuspenseList() {
this._next = null;
this._map = null;
}
// Mark one of child's earlier suspensions as resolved.
// Some pending callbacks may become callable due to this
// (e.g. the last suspended descendant gets resolved when
// revealOrder === 'together'). Process those callbacks as well.
const resolve = (list, child, node) => {
if (++node[RESOLVED_COUNT] === node[SUSPENDED_COUNT]) {
// The number a child (or any of its descendants) has been suspended
// matches the number of times it's been resolved. Therefore we
// mark the child as completely resolved by deleting it from ._map.
// This is used to figure out when *all* children have been completely
// resolved when revealOrder is 'together'.
list._map.delete(child);
}
// If revealOrder is falsy then we can do an early exit, as the
// callbacks won't get queued in the node anyway.
// If revealOrder is 'together' then also do an early exit
// if all suspended descendants have not yet been resolved.
if (
!list.props.revealOrder ||
(list.props.revealOrder[0] === 't' && list._map.size)
) {
return;
}
// Walk the currently suspended children in order, calling their
// stored callbacks on the way. Stop if we encounter a child that
// has not been completely resolved yet.
node = list._next;
while (node) {
while (node.length > 3) {
node.pop()();
}
if (node[RESOLVED_COUNT] < node[SUSPENDED_COUNT]) {
break;
}
list._next = node = node[NEXT_NODE];
}
};
// Things we do here to save some bytes but are not proper JS inheritance:
// - call `new Component()` as the prototype
// - do not set `Suspense.prototype.constructor` to `Suspense`
SuspenseList.prototype = new Component();
SuspenseList.prototype._suspended = function(child) {
const list = this;
const delegated = suspended(list._vnode);
let node = list._map.get(child);
node[SUSPENDED_COUNT]++;
return unsuspend => {
const wrappedUnsuspend = () => {
if (!list.props.revealOrder) {
// Special case the undefined (falsy) revealOrder, as there
// is no need to coordinate a specific order or unsuspends.
unsuspend();
} else {
node.push(unsuspend);
resolve(list, child, node);
}
};
if (delegated) {
delegated(wrappedUnsuspend);
} else {
wrappedUnsuspend();
}
};
};
SuspenseList.prototype.render = function(props) {
this._next = null;
this._map = new Map();
const children = toChildArray(props.children);
if (props.revealOrder && props.revealOrder[0] === 'b') {
// If order === 'backwards' (or, well, anything starting with a 'b')
// then flip the child list around so that the last child will be
// the first in the linked list.
children.reverse();
}
// Build the linked list. Iterate through the children in reverse order
// so that `_next` points to the first linked list node to be resolved.
for (let i = children.length; i--; ) {
// Create a new linked list node as an array of form:
// [suspended_count, resolved_count, next_node]
// where suspended_count and resolved_count are numeric counters for
// keeping track how many times a node has been suspended and resolved.
//
// Note that suspended_count starts from 1 instead of 0, so we can block
// processing callbacks until componentDidMount has been called. In a sense
// node is suspended at least until componentDidMount gets called!
//
// Pending callbacks are added to the end of the node:
// [suspended_count, resolved_count, next_node, callback_0, callback_1, ...]
this._map.set(children[i], (this._next = [1, 0, this._next]));
}
return props.children;
};
SuspenseList.prototype.componentDidUpdate = SuspenseList.prototype.componentDidMount = function() {
// Iterate through all children after mounting for two reasons:
// 1. As each node[SUSPENDED_COUNT] starts from 1, this iteration increases
// each node[RELEASED_COUNT] by 1, therefore balancing the counters.
// The nodes can now be completely consumed from the linked list.
// 2. Handle nodes that might have gotten resolved between render and
// componentDidMount.
this._map.forEach((node, child) => {
resolve(this, child, node);
});
};

View File

@@ -0,0 +1,23 @@
'use strict';
var callBind = require('call-bind');
var define = require('define-properties');
var RequireObjectCoercible = require('es-abstract/2022/RequireObjectCoercible');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var bound = callBind(getPolyfill());
var boundMethod = function trim(receiver) {
RequireObjectCoercible(receiver);
return bound(receiver);
};
define(boundMethod, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = boundMethod;

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"q r s t u f H","2":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p"},C:{"1":"bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB EC FC"},D:{"1":"q r s t u f H xB yB GC","2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p"},E:{"1":"9B OC","2":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B"},F:{"1":"a b c d e","2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z PC QC RC SC qB AC TC rB"},G:{"1":"9B","2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B"},H:{"2":"oC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"1":"g","2":"I wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"2":"1B"},R:{"2":"9C"},S:{"1":"BD","2":"AD"}},B:4,C:"Media Queries: Range Syntax"};

View File

@@ -0,0 +1 @@
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0.02167,"49":0,"50":0,"51":0,"52":0.05055,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0.00722,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0.00722,"67":0,"68":0.00722,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0.01444,"78":0.00722,"79":0.00722,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0.00722,"89":0,"90":0,"91":0.00722,"92":0,"93":0.00722,"94":0.00722,"95":0.00722,"96":0,"97":0,"98":0,"99":0,"100":0.00722,"101":0,"102":0.065,"103":0.00722,"104":0,"105":0.00722,"106":0.02167,"107":0.01444,"108":0.05055,"109":1.27829,"110":0.83775,"111":0,"112":0.00722,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0.00722,"42":0,"43":0,"44":0.00722,"45":0.00722,"46":0,"47":0,"48":0,"49":0.02167,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0.00722,"64":0.00722,"65":0.03611,"66":0.00722,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0.00722,"74":0.00722,"75":0,"76":0,"77":0,"78":0,"79":0.03611,"80":0.00722,"81":0.00722,"83":0.01444,"84":0.01444,"85":0.02889,"86":0.02167,"87":0.065,"88":0.02167,"89":0.00722,"90":0.00722,"91":0.01444,"92":0.07222,"93":0.02167,"94":0.00722,"95":0.02167,"96":0.02167,"97":0.03611,"98":0.01444,"99":0.00722,"100":0.01444,"101":0.02167,"102":0.02889,"103":0.12277,"104":0.02167,"105":0.13,"106":0.09389,"107":0.2311,"108":1.19163,"109":22.71319,"110":13.77958,"111":0.00722,"112":0,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.00722,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.01444,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0.00722,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.00722,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0.00722,"86":0,"87":0.00722,"88":0,"89":0,"90":0,"91":0.00722,"92":0,"93":0.12277,"94":1.3144,"95":0.67887,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0.00722,"86":0,"87":0,"88":0.00722,"89":0,"90":0,"91":0,"92":0.03611,"93":0,"94":0,"95":0,"96":0,"97":0.00722,"98":0,"99":0.00722,"100":0.00722,"101":0,"102":0.00722,"103":0,"104":0.00722,"105":0.10833,"106":0.02167,"107":0.10111,"108":0.28166,"109":2.9538,"110":3.07657},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.03611,"12":0,"13":0.01444,"14":0.05055,"15":0.00722,_:"0","3.1":0,"3.2":0,"5.1":0.00722,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0.00722,"13.1":0.04333,"14.1":0.065,"15.1":0.02167,"15.2-15.3":0.01444,"15.4":0.02167,"15.5":0.03611,"15.6":0.18777,"16.0":0.03611,"16.1":0.13722,"16.2":0.20944,"16.3":0.15888,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.01344,"5.0-5.1":0,"6.0-6.1":0.00269,"7.0-7.1":0.00403,"8.1-8.4":0.00537,"9.0-9.2":0.04031,"9.3":0.02687,"10.0-10.2":0.00134,"10.3":0.09003,"11.0-11.2":0.00403,"11.3-11.4":0.00806,"12.0-12.1":0.00672,"12.2-12.5":0.11019,"13.0-13.1":0.00537,"13.2":0.00941,"13.3":0.01478,"13.4-13.7":0.04972,"14.0-14.4":0.17469,"14.5-14.8":0.301,"15.0-15.1":0.07794,"15.2-15.3":0.15319,"15.4":0.16528,"15.5":0.41118,"15.6":1.01587,"16.0":1.93364,"16.1":3.27469,"16.2":3.07716,"16.3":1.84495,"16.4":0.01344},P:{"4":0.05084,"20":0.66095,"5.0-5.4":0.01017,"6.2-6.4":0,"7.2-7.4":0,"8.2":0,"9.2":0.01017,"10.1":0,"11.1-11.2":0.01017,"12.0":0,"13.0":0.03051,"14.0":0.01017,"15.0":0.01017,"16.0":0.03051,"17.0":0.04067,"18.0":0.10169,"19.0":1.18972},I:{"0":0,"3":0.00957,"4":0,"2.1":0.01435,"2.2":0.01435,"2.3":0,"4.1":0.01435,"4.2-4.3":0.02391,"4.4":0,"4.4.3-4.4.4":0.08848},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0.00812,"9":0,"10":0,"11":0.05687,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.0889},H:{"0":0.25774},L:{"0":30.42548},R:{_:"0"},M:{"0":0.1889},Q:{"13.1":0.06667}};

View File

@@ -0,0 +1 @@
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0.00336,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0.00673,"92":0.00673,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0.00336,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0.00336,"109":0.53824,"110":0.34313,"111":0.00336,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0.00673,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0.00673,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0.00673,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0.00336,"78":0,"79":0.01009,"80":0,"81":0.00673,"83":0.00673,"84":0,"85":0.00336,"86":0.00336,"87":0.00336,"88":0,"89":0.00336,"90":0.00336,"91":0.00336,"92":0,"93":0.00336,"94":0,"95":0.00673,"96":0.01346,"97":0.01009,"98":0.04037,"99":0.00336,"100":0.00336,"101":0.00336,"102":0.02355,"103":0.08746,"104":0.00336,"105":0.00673,"106":0.00336,"107":0.02691,"108":0.21193,"109":3.84842,"110":2.45908,"111":0.00336,"112":0,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.00336,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.01346,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0.01009,"94":0.0841,"95":0.08074,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0.00336,"17":0,"18":0.00673,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00336,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0.00673,"107":0.01346,"108":0.01682,"109":0.6728,"110":0.69635},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0.00336,"14":0.0841,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0.00336,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0.00336,"13.1":0.00673,"14.1":0.0471,"15.1":0,"15.2-15.3":0.00336,"15.4":0.01009,"15.5":0.21866,"15.6":0.0841,"16.0":0.01009,"16.1":0.02355,"16.2":0.13792,"16.3":0.0841,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.00225,"6.0-6.1":0.00225,"7.0-7.1":0.04727,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.02026,"10.0-10.2":0,"10.3":0.08779,"11.0-11.2":0,"11.3-11.4":0.02926,"12.0-12.1":0.01125,"12.2-12.5":0.76531,"13.0-13.1":0.0045,"13.2":0,"13.3":0.45468,"13.4-13.7":0.21158,"14.0-14.4":0.39616,"14.5-14.8":1.69268,"15.0-15.1":0.39166,"15.2-15.3":0.18457,"15.4":0.33088,"15.5":0.28586,"15.6":1.29877,"16.0":1.8885,"16.1":3.2458,"16.2":3.99534,"16.3":2.20813,"16.4":0.02251},P:{"4":0.69846,"20":2.58842,"5.0-5.4":0.01027,"6.2-6.4":0.01027,"7.2-7.4":0.56493,"8.2":0,"9.2":0.10272,"10.1":0,"11.1-11.2":0.0719,"12.0":0.02054,"13.0":0.19516,"14.0":0.12326,"15.0":0.06163,"16.0":0.22597,"17.0":0.26706,"18.0":0.25679,"19.0":3.3896},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.02037,"4.4":0,"4.4.3-4.4.4":0.32594},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.02018,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.47779},H:{"0":0.16335},L:{"0":59.37362},R:{_:"0"},M:{"0":0.15926},Q:{"13.1":0.00664}};

View File

@@ -0,0 +1,16 @@
'use strict'
const u = require('universalify').fromCallback
const jsonFile = require('./jsonfile')
jsonFile.outputJson = u(require('./output-json'))
jsonFile.outputJsonSync = require('./output-json-sync')
// aliases
jsonFile.outputJSON = jsonFile.outputJson
jsonFile.outputJSONSync = jsonFile.outputJsonSync
jsonFile.writeJSON = jsonFile.writeJson
jsonFile.writeJSONSync = jsonFile.writeJsonSync
jsonFile.readJSON = jsonFile.readJson
jsonFile.readJSONSync = jsonFile.readJsonSync
module.exports = jsonFile

View File

@@ -0,0 +1,63 @@
var apply = require('./_apply'),
arrayPush = require('./_arrayPush'),
baseRest = require('./_baseRest'),
castSlice = require('./_castSlice'),
toInteger = require('./toInteger');
/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* Creates a function that invokes `func` with the `this` binding of the
* create function and an array of arguments much like
* [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
*
* **Note:** This method is based on the
* [spread operator](https://mdn.io/spread_operator).
*
* @static
* @memberOf _
* @since 3.2.0
* @category Function
* @param {Function} func The function to spread arguments over.
* @param {number} [start=0] The start position of the spread.
* @returns {Function} Returns the new function.
* @example
*
* var say = _.spread(function(who, what) {
* return who + ' says ' + what;
* });
*
* say(['fred', 'hello']);
* // => 'fred says hello'
*
* var numbers = Promise.all([
* Promise.resolve(40),
* Promise.resolve(36)
* ]);
*
* numbers.then(_.spread(function(x, y) {
* return x + y;
* }));
* // => a Promise of 76
*/
function spread(func, start) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
start = start == null ? 0 : nativeMax(toInteger(start), 0);
return baseRest(function(args) {
var array = args[start],
otherArgs = castSlice(args, 0, start);
if (array) {
arrayPush(otherArgs, array);
}
return apply(func, this, otherArgs);
});
}
module.exports = spread;

View File

@@ -0,0 +1,11 @@
import { promise as queueAsPromised } from './queue.js'
/* eslint-disable */
const queue = queueAsPromised(worker, 1)
console.log('the result is', await queue.push(42))
async function worker (arg) {
return 42 * 2
}

View File

@@ -0,0 +1,258 @@
# localForage
[![Build Status](https://travis-ci.org/localForage/localForage.svg?branch=master)](http://travis-ci.org/localForage/localForage)
[![NPM version](https://badge.fury.io/js/localforage.svg)](http://badge.fury.io/js/localforage)
[![Dependency Status](https://img.shields.io/david/localForage/localForage.svg)](https://david-dm.org/localForage/localForage)
[![npm](https://img.shields.io/npm/dm/localforage.svg?maxAge=2592000)](https://npmcharts.com/compare/localforage?minimal=true)
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/localforage/badge?style=rounded)](https://www.jsdelivr.com/package/npm/localforage)
[![minzipped size](https://badgen.net/bundlephobia/minzip/localforage)](https://bundlephobia.com/result?p=localforage@1.10.0)
localForage is a fast and simple storage library for JavaScript. localForage
improves the offline experience of your web app by using asynchronous storage
(IndexedDB or WebSQL) with a simple, `localStorage`-like API.
localForage uses localStorage in browsers with no IndexedDB or
WebSQL support. See [the wiki for detailed compatibility info][supported browsers].
To use localForage, just drop a single JavaScript file into your page:
```html
<script src="localforage/dist/localforage.js"></script>
<script>localforage.getItem('something', myCallback);</script>
```
Try the [live example](http://codepen.io/thgreasi/pen/ojYKeE).
Download the [latest localForage from GitHub](https://github.com/localForage/localForage/releases/latest), or install with
[npm](https://www.npmjs.com/):
```bash
npm install localforage
```
[supported browsers]: https://github.com/localForage/localForage/wiki/Supported-Browsers-Platforms
## Support
Lost? Need help? Try the
[localForage API documentation](https://localforage.github.io/localForage). [localForage API文档也有中文版。](https://localforage.docschina.org)
If you're having trouble using the library, running the tests, or want to contribute to localForage, please look through the [existing issues](https://github.com/localForage/localForage/issues) for your problem first before creating a new one. If you still need help, [feel free to file an issue](https://github.com/localForage/localForage/issues/new).
# How to use localForage
## Callbacks vs Promises
Because localForage uses async storage, it has an async API.
It's otherwise exactly the same as the
[localStorage API](https://hacks.mozilla.org/2009/06/localstorage/).
localForage has a dual API that allows you to either use Node-style callbacks
or [Promises](https://www.promisejs.org/). If you are unsure which one is right for you, it's recommended to use Promises.
Here's an example of the Node-style callback form:
```js
localforage.setItem('key', 'value', function (err) {
// if err is non-null, we got an error
localforage.getItem('key', function (err, value) {
// if err is non-null, we got an error. otherwise, value is the value
});
});
```
And the Promise form:
```js
localforage.setItem('key', 'value').then(function () {
return localforage.getItem('key');
}).then(function (value) {
// we got our value
}).catch(function (err) {
// we got an error
});
```
Or, use `async`/`await`:
```js
try {
const value = await localforage.getItem('somekey');
// This code runs once the value has been loaded
// from the offline store.
console.log(value);
} catch (err) {
// This code runs if there were any errors.
console.log(err);
}
```
For more examples, please visit [the API docs](https://localforage.github.io/localForage).
## Storing Blobs, TypedArrays, and other JS objects
You can store any type in localForage; you aren't limited to strings like in
localStorage. Even if localStorage is your storage backend, localForage
automatically does `JSON.parse()` and `JSON.stringify()` when getting/setting
values.
localForage supports storing all native JS objects that can be serialized to
JSON, as well as ArrayBuffers, Blobs, and TypedArrays. Check the
[API docs][api] for a full list of types supported by localForage.
All types are supported in every storage backend, though storage limits in
localStorage make storing many large Blobs impossible.
[api]: https://localforage.github.io/localForage/#data-api-setitem
## Configuration
You can set database information with the `config()` method.
Available options are `driver`, `name`, `storeName`, `version`, `size`, and
`description`.
Example:
```javascript
localforage.config({
driver : localforage.WEBSQL, // Force WebSQL; same as using setDriver()
name : 'myApp',
version : 1.0,
size : 4980736, // Size of database, in bytes. WebSQL-only for now.
storeName : 'keyvaluepairs', // Should be alphanumeric, with underscores.
description : 'some description'
});
```
**Note:** you must call `config()` _before_ you interact with your data. This
means calling `config()` before using `getItem()`, `setItem()`, `removeItem()`,
`clear()`, `key()`, `keys()` or `length()`.
## Multiple instances
You can create multiple instances of localForage that point to different stores
using `createInstance`. All the configuration options used by
[`config`](#configuration) are supported.
``` javascript
var store = localforage.createInstance({
name: "nameHere"
});
var otherStore = localforage.createInstance({
name: "otherName"
});
// Setting the key on one of these doesn't affect the other.
store.setItem("key", "value");
otherStore.setItem("key", "value2");
```
## RequireJS
You can use localForage with [RequireJS](http://requirejs.org/):
```javascript
define(['localforage'], function(localforage) {
// As a callback:
localforage.setItem('mykey', 'myvalue', console.log);
// With a Promise:
localforage.setItem('mykey', 'myvalue').then(console.log);
});
```
## TypeScript
If you have the [`allowSyntheticDefaultImports` compiler option](https://www.typescriptlang.org/docs/handbook/compiler-options.html) set to `true` in your [tsconfig.json](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) (supported in TypeScript v1.8+), you should use:
```javascript
import localForage from "localforage";
```
Otherwise you should use one of the following:
```javascript
import * as localForage from "localforage";
// or, in case that the typescript version that you are using
// doesn't support ES6 style imports for UMD modules like localForage
import localForage = require("localforage");
```
## Framework Support
If you use a framework listed, there's a localForage storage driver for the
models in your framework so you can store data offline with localForage. We
have drivers for the following frameworks:
* [AngularJS](https://github.com/ocombe/angular-localForage)
* [Angular 4 and up](https://github.com/Alorel/ngforage/)
* [Backbone](https://github.com/localForage/localForage-backbone)
* [Ember](https://github.com/genkgo/ember-localforage-adapter)
* [Vue](https://github.com/dmlzj/vlf)
* [NuxtJS](https://github.com/nuxt-community/localforage-module)
If you have a driver you'd like listed, please
[open an issue](https://github.com/localForage/localForage/issues/new) to have it
added to this list.
## Custom Drivers
You can create your own driver if you want; see the
[`defineDriver`](https://localforage.github.io/localForage/#driver-api-definedriver) API docs.
There is a [list of custom drivers on the wiki][custom drivers].
[custom drivers]: https://github.com/localForage/localForage/wiki/Custom-Drivers
# Working on localForage
You'll need [node/npm](http://nodejs.org/) and
[bower](http://bower.io/#installing-bower).
To work on localForage, you should start by
[forking it](https://github.com/localForage/localForage/fork) and installing its
dependencies. Replace `USERNAME` with your GitHub username and run the
following:
```bash
# Install bower globally if you don't have it:
npm install -g bower
# Replace USERNAME with your GitHub username:
git clone git@github.com:USERNAME/localForage.git
cd localForage
npm install
bower install
```
Omitting the bower dependencies will cause the tests to fail!
## Running Tests
You need PhantomJS installed to run local tests. Run `npm test` (or,
directly: `grunt test`). Your code must also pass the
[linter](http://jshint.com/).
localForage is designed to run in the browser, so the tests explicitly require
a browser environment. Local tests are run on a headless WebKit (using
[PhantomJS](http://phantomjs.org)).
When you submit a pull request, tests will be run against all browsers that
localForage supports on Travis CI using [Sauce Labs](https://saucelabs.com/).
## Library Size
As of version 1.7.3 the payload added to your app is rather small. Served using gzip compression, localForage will add less than 10k to your total bundle size:
<dl>
<dt>minified</dt><dd>`~29kB`</dd>
<dt>gzipped</dt><dd>`~8.8kB`</dd>
<dt>brotli'd</dt><dd>`~7.8kB`</dd>
</dl>
# License
This program is free software; it is distributed under an
[Apache License](https://github.com/localForage/localForage/blob/master/LICENSE).
---
Copyright (c) 2013-2016 [Mozilla](https://mozilla.org)
([Contributors](https://github.com/localForage/localForage/graphs/contributors)).

View File

@@ -0,0 +1,201 @@
var common = require('./common');
var fs = require('fs');
common.register('rm', _rm, {
cmdOptions: {
'f': 'force',
'r': 'recursive',
'R': 'recursive',
},
});
// Recursively removes 'dir'
// Adapted from https://github.com/ryanmcgrath/wrench-js
//
// Copyright (c) 2010 Ryan McGrath
// Copyright (c) 2012 Artur Adib
//
// Licensed under the MIT License
// http://www.opensource.org/licenses/mit-license.php
function rmdirSyncRecursive(dir, force, fromSymlink) {
var files;
files = fs.readdirSync(dir);
// Loop through and delete everything in the sub-tree after checking it
for (var i = 0; i < files.length; i++) {
var file = dir + '/' + files[i];
var currFile = common.statNoFollowLinks(file);
if (currFile.isDirectory()) { // Recursive function back to the beginning
rmdirSyncRecursive(file, force);
} else { // Assume it's a file - perhaps a try/catch belongs here?
if (force || isWriteable(file)) {
try {
common.unlinkSync(file);
} catch (e) {
/* istanbul ignore next */
common.error('could not remove file (code ' + e.code + '): ' + file, {
continue: true,
});
}
}
}
}
// if was directory was referenced through a symbolic link,
// the contents should be removed, but not the directory itself
if (fromSymlink) return;
// Now that we know everything in the sub-tree has been deleted, we can delete the main directory.
// Huzzah for the shopkeep.
var result;
try {
// Retry on windows, sometimes it takes a little time before all the files in the directory are gone
var start = Date.now();
// TODO: replace this with a finite loop
for (;;) {
try {
result = fs.rmdirSync(dir);
if (fs.existsSync(dir)) throw { code: 'EAGAIN' };
break;
} catch (er) {
/* istanbul ignore next */
// In addition to error codes, also check if the directory still exists and loop again if true
if (process.platform === 'win32' && (er.code === 'ENOTEMPTY' || er.code === 'EBUSY' || er.code === 'EPERM' || er.code === 'EAGAIN')) {
if (Date.now() - start > 1000) throw er;
} else if (er.code === 'ENOENT') {
// Directory did not exist, deletion was successful
break;
} else {
throw er;
}
}
}
} catch (e) {
common.error('could not remove directory (code ' + e.code + '): ' + dir, { continue: true });
}
return result;
} // rmdirSyncRecursive
// Hack to determine if file has write permissions for current user
// Avoids having to check user, group, etc, but it's probably slow
function isWriteable(file) {
var writePermission = true;
try {
var __fd = fs.openSync(file, 'a');
fs.closeSync(__fd);
} catch (e) {
writePermission = false;
}
return writePermission;
}
function handleFile(file, options) {
if (options.force || isWriteable(file)) {
// -f was passed, or file is writable, so it can be removed
common.unlinkSync(file);
} else {
common.error('permission denied: ' + file, { continue: true });
}
}
function handleDirectory(file, options) {
if (options.recursive) {
// -r was passed, so directory can be removed
rmdirSyncRecursive(file, options.force);
} else {
common.error('path is a directory', { continue: true });
}
}
function handleSymbolicLink(file, options) {
var stats;
try {
stats = common.statFollowLinks(file);
} catch (e) {
// symlink is broken, so remove the symlink itself
common.unlinkSync(file);
return;
}
if (stats.isFile()) {
common.unlinkSync(file);
} else if (stats.isDirectory()) {
if (file[file.length - 1] === '/') {
// trailing separator, so remove the contents, not the link
if (options.recursive) {
// -r was passed, so directory can be removed
var fromSymlink = true;
rmdirSyncRecursive(file, options.force, fromSymlink);
} else {
common.error('path is a directory', { continue: true });
}
} else {
// no trailing separator, so remove the link
common.unlinkSync(file);
}
}
}
function handleFIFO(file) {
common.unlinkSync(file);
}
//@
//@ ### rm([options,] file [, file ...])
//@ ### rm([options,] file_array)
//@
//@ Available options:
//@
//@ + `-f`: force
//@ + `-r, -R`: recursive
//@
//@ Examples:
//@
//@ ```javascript
//@ rm('-rf', '/tmp/*');
//@ rm('some_file.txt', 'another_file.txt');
//@ rm(['some_file.txt', 'another_file.txt']); // same as above
//@ ```
//@
//@ Removes files.
function _rm(options, files) {
if (!files) common.error('no paths given');
// Convert to array
files = [].slice.call(arguments, 1);
files.forEach(function (file) {
var lstats;
try {
var filepath = (file[file.length - 1] === '/')
? file.slice(0, -1) // remove the '/' so lstatSync can detect symlinks
: file;
lstats = common.statNoFollowLinks(filepath); // test for existence
} catch (e) {
// Path does not exist, no force flag given
if (!options.force) {
common.error('no such file or directory: ' + file, { continue: true });
}
return; // skip file
}
// If here, path exists
if (lstats.isFile()) {
handleFile(file, options);
} else if (lstats.isDirectory()) {
handleDirectory(file, options);
} else if (lstats.isSymbolicLink()) {
handleSymbolicLink(file, options);
} else if (lstats.isFIFO()) {
handleFIFO(file);
}
}); // forEach(file)
return '';
} // rm
module.exports = _rm;

View File

@@ -0,0 +1,236 @@
#!/usr/bin/env node
/*
Copyright JS Foundation and other contributors, https://js.foundation/
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*jslint sloppy:true plusplus:true node:true rhino:true */
/*global phantom:true */
var fs, system, esprima, options, fnames, forceFile, count;
if (typeof esprima === 'undefined') {
// PhantomJS can only require() relative files
if (typeof phantom === 'object') {
fs = require('fs');
system = require('system');
esprima = require('./esprima');
} else if (typeof require === 'function') {
fs = require('fs');
try {
esprima = require('esprima');
} catch (e) {
esprima = require('../');
}
} else if (typeof load === 'function') {
try {
load('esprima.js');
} catch (e) {
load('../esprima.js');
}
}
}
// Shims to Node.js objects when running under PhantomJS 1.7+.
if (typeof phantom === 'object') {
fs.readFileSync = fs.read;
process = {
argv: [].slice.call(system.args),
exit: phantom.exit,
on: function (evt, callback) {
callback();
}
};
process.argv.unshift('phantomjs');
}
// Shims to Node.js objects when running under Rhino.
if (typeof console === 'undefined' && typeof process === 'undefined') {
console = { log: print };
fs = { readFileSync: readFile };
process = {
argv: arguments,
exit: quit,
on: function (evt, callback) {
callback();
}
};
process.argv.unshift('esvalidate.js');
process.argv.unshift('rhino');
}
function showUsage() {
console.log('Usage:');
console.log(' esvalidate [options] [file.js...]');
console.log();
console.log('Available options:');
console.log();
console.log(' --format=type Set the report format, plain (default) or junit');
console.log(' -v, --version Print program version');
console.log();
process.exit(1);
}
options = {
format: 'plain'
};
fnames = [];
process.argv.splice(2).forEach(function (entry) {
if (forceFile || entry === '-' || entry.slice(0, 1) !== '-') {
fnames.push(entry);
} else if (entry === '-h' || entry === '--help') {
showUsage();
} else if (entry === '-v' || entry === '--version') {
console.log('ECMAScript Validator (using Esprima version', esprima.version, ')');
console.log();
process.exit(0);
} else if (entry.slice(0, 9) === '--format=') {
options.format = entry.slice(9);
if (options.format !== 'plain' && options.format !== 'junit') {
console.log('Error: unknown report format ' + options.format + '.');
process.exit(1);
}
} else if (entry === '--') {
forceFile = true;
} else {
console.log('Error: unknown option ' + entry + '.');
process.exit(1);
}
});
if (fnames.length === 0) {
fnames.push('');
}
if (options.format === 'junit') {
console.log('<?xml version="1.0" encoding="UTF-8"?>');
console.log('<testsuites>');
}
count = 0;
function run(fname, content) {
var timestamp, syntax, name;
try {
if (typeof content !== 'string') {
throw content;
}
if (content[0] === '#' && content[1] === '!') {
content = '//' + content.substr(2, content.length);
}
timestamp = Date.now();
syntax = esprima.parse(content, { tolerant: true });
if (options.format === 'junit') {
name = fname;
if (name.lastIndexOf('/') >= 0) {
name = name.slice(name.lastIndexOf('/') + 1);
}
console.log('<testsuite name="' + fname + '" errors="0" ' +
' failures="' + syntax.errors.length + '" ' +
' tests="' + syntax.errors.length + '" ' +
' time="' + Math.round((Date.now() - timestamp) / 1000) +
'">');
syntax.errors.forEach(function (error) {
var msg = error.message;
msg = msg.replace(/^Line\ [0-9]*\:\ /, '');
console.log(' <testcase name="Line ' + error.lineNumber + ': ' + msg + '" ' +
' time="0">');
console.log(' <error type="SyntaxError" message="' + error.message + '">' +
error.message + '(' + name + ':' + error.lineNumber + ')' +
'</error>');
console.log(' </testcase>');
});
console.log('</testsuite>');
} else if (options.format === 'plain') {
syntax.errors.forEach(function (error) {
var msg = error.message;
msg = msg.replace(/^Line\ [0-9]*\:\ /, '');
msg = fname + ':' + error.lineNumber + ': ' + msg;
console.log(msg);
++count;
});
}
} catch (e) {
++count;
if (options.format === 'junit') {
console.log('<testsuite name="' + fname + '" errors="1" failures="0" tests="1" ' +
' time="' + Math.round((Date.now() - timestamp) / 1000) + '">');
console.log(' <testcase name="' + e.message + '" ' + ' time="0">');
console.log(' <error type="ParseError" message="' + e.message + '">' +
e.message + '(' + fname + ((e.lineNumber) ? ':' + e.lineNumber : '') +
')</error>');
console.log(' </testcase>');
console.log('</testsuite>');
} else {
console.log(fname + ':' + e.lineNumber + ': ' + e.message.replace(/^Line\ [0-9]*\:\ /, ''));
}
}
}
fnames.forEach(function (fname) {
var content = '';
try {
if (fname && (fname !== '-' || forceFile)) {
content = fs.readFileSync(fname, 'utf-8');
} else {
fname = '';
process.stdin.resume();
process.stdin.on('data', function(chunk) {
content += chunk;
});
process.stdin.on('end', function() {
run(fname, content);
});
return;
}
} catch (e) {
content = e;
}
run(fname, content);
});
process.on('exit', function () {
if (options.format === 'junit') {
console.log('</testsuites>');
}
if (count > 0) {
process.exit(1);
}
if (count === 0 && typeof phantom === 'object') {
process.exit(0);
}
});

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L G M"},C:{"1":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB EC FC"},D:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB"},E:{"1":"B C K L G qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v J D E F A HC zB IC JC KC LC 0B"},F:{"1":"8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"0 1 2 3 4 5 6 7 F B C G M N O w g x y z PC QC RC SC qB AC TC rB"},G:{"1":"eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"E zB UC BC VC WC XC YC ZC aC bC cC","194":"dC"},H:{"2":"oC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"1":"vC"},P:{"1":"g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C","2":"I"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:2,C:"Subresource Integrity"};

View File

@@ -0,0 +1,33 @@
const { MAX_LENGTH } = require('../internal/constants')
const { re, t } = require('../internal/re')
const SemVer = require('../classes/semver')
const parseOptions = require('../internal/parse-options')
const parse = (version, options) => {
options = parseOptions(options)
if (version instanceof SemVer) {
return version
}
if (typeof version !== 'string') {
return null
}
if (version.length > MAX_LENGTH) {
return null
}
const r = options.loose ? re[t.LOOSE] : re[t.FULL]
if (!r.test(version)) {
return null
}
try {
return new SemVer(version, options)
} catch (er) {
return null
}
}
module.exports = parse

View File

@@ -0,0 +1,4 @@
export type UserNotFoundError = {
name: string;
message: string;
};

View File

@@ -0,0 +1,182 @@
# word-wrap [![NPM version](https://img.shields.io/npm/v/word-wrap.svg?style=flat)](https://www.npmjs.com/package/word-wrap) [![NPM monthly downloads](https://img.shields.io/npm/dm/word-wrap.svg?style=flat)](https://npmjs.org/package/word-wrap) [![NPM total downloads](https://img.shields.io/npm/dt/word-wrap.svg?style=flat)](https://npmjs.org/package/word-wrap) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/word-wrap.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/word-wrap)
> Wrap words to a specified length.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save word-wrap
```
## Usage
```js
var wrap = require('word-wrap');
wrap('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.');
```
Results in:
```
Lorem ipsum dolor sit amet, consectetur adipiscing
elit, sed do eiusmod tempor incididunt ut labore
et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat.
```
## Options
![image](https://cloud.githubusercontent.com/assets/383994/6543728/7a381c08-c4f6-11e4-8b7d-b6ba197569c9.png)
### options.width
Type: `Number`
Default: `50`
The width of the text before wrapping to a new line.
**Example:**
```js
wrap(str, {width: 60});
```
### options.indent
Type: `String`
Default: `` (two spaces)
The string to use at the beginning of each line.
**Example:**
```js
wrap(str, {indent: ' '});
```
### options.newline
Type: `String`
Default: `\n`
The string to use at the end of each line.
**Example:**
```js
wrap(str, {newline: '\n\n'});
```
### options.escape
Type: `function`
Default: `function(str){return str;}`
An escape function to run on each line after splitting them.
**Example:**
```js
var xmlescape = require('xml-escape');
wrap(str, {
escape: function(string){
return xmlescape(string);
}
});
```
### options.trim
Type: `Boolean`
Default: `false`
Trim trailing whitespace from the returned string. This option is included since `.trim()` would also strip the leading indentation from the first line.
**Example:**
```js
wrap(str, {trim: true});
```
### options.cut
Type: `Boolean`
Default: `false`
Break a word between any two letters when the word is longer than the specified width.
**Example:**
```js
wrap(str, {cut: true});
```
## About
### Related projects
* [common-words](https://www.npmjs.com/package/common-words): Updated list (JSON) of the 100 most common words in the English language. Useful for… [more](https://github.com/jonschlinkert/common-words) | [homepage](https://github.com/jonschlinkert/common-words "Updated list (JSON) of the 100 most common words in the English language. Useful for excluding these words from arrays.")
* [shuffle-words](https://www.npmjs.com/package/shuffle-words): Shuffle the words in a string and optionally the letters in each word using the… [more](https://github.com/jonschlinkert/shuffle-words) | [homepage](https://github.com/jonschlinkert/shuffle-words "Shuffle the words in a string and optionally the letters in each word using the Fisher-Yates algorithm. Useful for creating test fixtures, benchmarking samples, etc.")
* [unique-words](https://www.npmjs.com/package/unique-words): Return the unique words in a string or array. | [homepage](https://github.com/jonschlinkert/unique-words "Return the unique words in a string or array.")
* [wordcount](https://www.npmjs.com/package/wordcount): Count the words in a string. Support for english, CJK and Cyrillic. | [homepage](https://github.com/jonschlinkert/wordcount "Count the words in a string. Support for english, CJK and Cyrillic.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 43 | [jonschlinkert](https://github.com/jonschlinkert) |
| 2 | [lordvlad](https://github.com/lordvlad) |
| 2 | [hildjj](https://github.com/hildjj) |
| 1 | [danilosampaio](https://github.com/danilosampaio) |
| 1 | [2fd](https://github.com/2fd) |
| 1 | [toddself](https://github.com/toddself) |
| 1 | [wolfgang42](https://github.com/wolfgang42) |
| 1 | [zachhale](https://github.com/zachhale) |
### Building docs
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
### Running tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
### License
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 02, 2017._

View File

@@ -0,0 +1,37 @@
{
"name": "@nodelib/fs.stat",
"version": "2.0.5",
"description": "Get the status of a file with some features",
"license": "MIT",
"repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat",
"keywords": [
"NodeLib",
"fs",
"FileSystem",
"file system",
"stat"
],
"engines": {
"node": ">= 8"
},
"files": [
"out/**",
"!out/**/*.map",
"!out/**/*.spec.*"
],
"main": "out/index.js",
"typings": "out/index.d.ts",
"scripts": {
"clean": "rimraf {tsconfig.tsbuildinfo,out}",
"lint": "eslint \"src/**/*.ts\" --cache",
"compile": "tsc -b .",
"compile:watch": "tsc -p . --watch --sourceMap",
"test": "mocha \"out/**/*.spec.js\" -s 0",
"build": "npm run clean && npm run compile && npm run lint && npm test",
"watch": "npm run clean && npm run compile:watch"
},
"devDependencies": {
"@nodelib/fs.macchiato": "1.0.4"
},
"gitHead": "d6a7960d5281d3dd5f8e2efba49bb552d090f562"
}

View File

@@ -0,0 +1,7 @@
'use strict';
const path = require('path');
const binaryExtensions = require('binary-extensions');
const extensions = new Set(binaryExtensions);
module.exports = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase());

View File

@@ -0,0 +1,5 @@
'use strict'
module.exports.isClean = Symbol('isClean')
module.exports.my = Symbol('my')

View File

@@ -0,0 +1,9 @@
module.exports = {
y: 1 << 0,
n: 1 << 1,
a: 1 << 2,
p: 1 << 3,
u: 1 << 4,
x: 1 << 5,
d: 1 << 6
}

View File

@@ -0,0 +1,5 @@
import isFloat from './isFloat';
export default function toFloat(str) {
if (!isFloat(str)) return NaN;
return parseFloat(str);
}

View File

@@ -0,0 +1,17 @@
"use strict"
module.exports = function (parentMedia, childMedia) {
if (!parentMedia.length && childMedia.length) return childMedia
if (parentMedia.length && !childMedia.length) return parentMedia
if (!parentMedia.length && !childMedia.length) return []
const media = []
parentMedia.forEach(parentItem => {
childMedia.forEach(childItem => {
if (parentItem !== childItem) media.push(`${parentItem} and ${childItem}`)
})
})
return media
}

View File

@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/which-boxed-primitive
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

View File

@@ -0,0 +1 @@
{"name":"require-relative","version":"0.8.7","files":{"package.json":{"checkedAt":1678883669496,"integrity":"sha512-Dn097yYeqwwq8CPLzXKokCO1kBQZpo9gZt/Cidm3L6edkki21+dbk1lsAP57W9uIQOg17vfKnp++rbq/RtzAHg==","mode":420,"size":572},"README.md":{"checkedAt":1678883669496,"integrity":"sha512-DaSAOSZ7h5BcVdH8HgNrEOLlw6y3JoDZnPYAdQ+XeLZtaVeyzOFTwlejxWnNPs/3I0yFu+mEvW/EqXeM5YqWTw==","mode":420,"size":902},"index.js":{"checkedAt":1678883669496,"integrity":"sha512-vL1/qMrv+f/gkjNgN2P0ZKVX7cjzInJoCslC9Rcv2AoWhN6eTyKZjHX4eh6AzZe8ILBsnEuBqTiaYliboB/hhA==","mode":420,"size":784}}}

View File

@@ -0,0 +1,83 @@
'use strict';
// Benchmark comparing performance of event emit for many listeners
// To run it, do following in memoizee package path:
//
// $ npm install eventemitter2 signals
// $ node benchmark/many-on.js
var forEach = require('es5-ext/object/for-each')
, pad = require('es5-ext/string/#/pad')
, now = Date.now
, time, count = 1000000, i, data = {}
, ee, native, ee2, signals, a = {}, b = {};
ee = (function () {
var ee = require('../')();
ee.on('test', function () { return arguments; });
ee.on('test', function () { return arguments; });
return ee.on('test', function () { return arguments; });
}());
native = (function () {
var ee = require('events');
ee = new ee.EventEmitter();
ee.on('test', function () { return arguments; });
ee.on('test', function () { return arguments; });
return ee.on('test', function () { return arguments; });
}());
ee2 = (function () {
var ee = require('eventemitter2');
ee = new ee.EventEmitter2();
ee.on('test', function () { return arguments; });
ee.on('test', function () { return arguments; });
return ee.on('test', function () { return arguments; });
}());
signals = (function () {
var Signal = require('signals')
, ee = { test: new Signal() };
ee.test.add(function () { return arguments; });
ee.test.add(function () { return arguments; });
ee.test.add(function () { return arguments; });
return ee;
}());
console.log("Emit for 3 listeners", "x" + count + ":\n");
i = count;
time = now();
while (i--) {
ee.emit('test', a, b);
}
data["event-emitter (this implementation)"] = now() - time;
i = count;
time = now();
while (i--) {
native.emit('test', a, b);
}
data["EventEmitter (Node.js native)"] = now() - time;
i = count;
time = now();
while (i--) {
ee2.emit('test', a, b);
}
data.EventEmitter2 = now() - time;
i = count;
time = now();
while (i--) {
signals.test.dispatch(a, b);
}
data.Signals = now() - time;
forEach(data, function (value, name, obj, index) {
console.log(index + 1 + ":", pad.call(value, " ", 5), name);
}, null, function (a, b) {
return this[a] - this[b];
});

View File

@@ -0,0 +1 @@
{"name":"base64-js","version":"1.5.1","files":{"LICENSE":{"checkedAt":1678883671212,"integrity":"sha512-arS2Pilqch2xz5c3GYBa15akt3T0Lenikn5xIPUzT936ymD0CJkdIFHLRdVSJWzkgWETFdnzpboKECPN9yhSWw==","mode":420,"size":1081},"package.json":{"checkedAt":1678883671212,"integrity":"sha512-bgiB92sryXzalNTEQBo7KDCeooWewwLVHSAhbxQaM0pS1LeU8MKSpHnnpUNVfEgbE38vuvfClXEGA3d5/WPCiw==","mode":420,"size":1115},"index.js":{"checkedAt":1678883671212,"integrity":"sha512-ctVBvIN2C6LMnjVDZYisyi3ozSTdXz+ElSBZVTiG9HxWnMIBjkwdhzN+iVpv7i280HtxlpQarG2YnJOUbbqyPQ==","mode":420,"size":3932},"base64js.min.js":{"checkedAt":1678883671213,"integrity":"sha512-lLcC9HW1OX4nBfl9z37kP5wliBgGQUWqE9Vu20ceI8/SZodj5O8s4QI81UkPxqOAsGHlUT6sxYZbQsNJMgiY/Q==","mode":420,"size":2192},"index.d.ts":{"checkedAt":1678883671213,"integrity":"sha512-+SNpuNuS/szaUzwsef9DCvIgZ/oqDKTJTmJEwLCgcacLJfk53ww1UKLRfondTTL8EhUxtmwAUSxgyXBZb93pHA==","mode":420,"size":161},"README.md":{"checkedAt":1678883671212,"integrity":"sha512-qBXzUl7ymDXg/jfl8cMwrkX+R2J+Oa9RK4Ky0hvNmH1jqM0b4Tj/aRXhqm5oBrQb7bmbmOD3qbqMuYQzhATdVA==","mode":420,"size":1143}}}

View File

@@ -0,0 +1 @@
{"version":3,"file":"refCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/refCount.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4DhE,MAAM,UAAU,QAAQ;IACtB,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,UAAU,GAAwB,IAAI,CAAC;QAE1C,MAAc,CAAC,SAAS,EAAE,CAAC;QAE5B,IAAM,UAAU,GAAG,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE;YACvF,IAAI,CAAC,MAAM,IAAK,MAAc,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAG,MAAc,CAAC,SAAS,EAAE;gBAChF,UAAU,GAAG,IAAI,CAAC;gBAClB,OAAO;aACR;YA2BD,IAAM,gBAAgB,GAAI,MAAc,CAAC,WAAW,CAAC;YACrD,IAAM,IAAI,GAAG,UAAU,CAAC;YACxB,UAAU,GAAG,IAAI,CAAC;YAElB,IAAI,gBAAgB,IAAI,CAAC,CAAC,IAAI,IAAI,gBAAgB,KAAK,IAAI,CAAC,EAAE;gBAC5D,gBAAgB,CAAC,WAAW,EAAE,CAAC;aAChC;YAED,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAE7B,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACtB,UAAU,GAAI,MAAmC,CAAC,OAAO,EAAE,CAAC;SAC7D;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}

View File

@@ -0,0 +1 @@
module.exports={C:{"33":0.0019,"39":0.00571,"52":0.00761,"66":0.0019,"68":0.00381,"72":0.00381,"78":0.00571,"79":0.0019,"88":0.00381,"89":0.0019,"91":0.03616,"95":0.0019,"99":0.0019,"100":0.0019,"101":0.0019,"102":0.03045,"103":0.00571,"104":0.00571,"105":0.00381,"106":0.00381,"107":0.01142,"108":0.02284,"109":0.81829,"110":0.55948,"111":0.05328,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 34 35 36 37 38 40 41 42 43 44 45 46 47 48 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 67 69 70 71 73 74 75 76 77 80 81 82 83 84 85 86 87 90 92 93 94 96 97 98 112 3.5 3.6"},D:{"11":0.00381,"33":0.00381,"38":0.00381,"49":0.00761,"55":0.00381,"58":0.02664,"59":0.00381,"62":0.0019,"63":0.00381,"64":0.0019,"65":0.00381,"67":0.00381,"68":0.00381,"69":0.00381,"70":0.00381,"72":0.00571,"73":0.00571,"74":0.02093,"76":0.0019,"77":0.00952,"78":0.00381,"79":0.05138,"80":0.02093,"81":0.00571,"83":0.00952,"84":0.00952,"85":0.00571,"86":0.00571,"87":0.00952,"88":0.01903,"89":0.01332,"90":0.00761,"91":0.00952,"92":0.01142,"93":0.00952,"94":0.70221,"95":0.02664,"96":0.01332,"97":0.00952,"98":0.01332,"99":0.45482,"100":0.02474,"101":0.01332,"102":0.08754,"103":0.0609,"104":0.01903,"105":0.03425,"106":0.03045,"107":0.0609,"108":0.18079,"109":5.36836,"110":3.09428,"111":0.00571,_:"4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 34 35 36 37 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 56 57 60 61 66 71 75 112 113"},F:{"46":0.0019,"56":0.0019,"73":0.01142,"79":0.00761,"85":0.00381,"92":0.01332,"93":0.01332,"94":0.24739,"95":0.46243,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 57 58 60 62 63 64 65 66 67 68 69 70 71 72 74 75 76 77 78 80 81 82 83 84 86 87 88 89 90 91 9.5-9.6 10.5 10.6 11.1 11.5 11.6 12.1","10.0-10.1":0},B:{"12":0.01142,"13":0.00571,"15":0.00381,"16":0.01142,"17":0.00381,"18":0.0647,"84":0.00571,"89":0.00571,"90":0.00761,"92":0.02093,"99":0.00381,"100":0.0019,"103":0.00381,"104":0.0019,"105":0.00571,"106":0.00381,"107":0.01522,"108":0.03616,"109":0.60325,"110":0.80116,_:"14 79 80 81 83 85 86 87 88 91 93 94 95 96 97 98 101 102"},E:{"4":0,"13":0.00571,"14":0.01522,"15":0.00381,_:"0 5 6 7 8 9 10 11 12 3.1 3.2 5.1 6.1 7.1 9.1 10.1 16.4","11.1":0.00381,"12.1":0.01522,"13.1":0.02093,"14.1":0.04758,"15.1":0.00761,"15.2-15.3":0.00381,"15.4":0.04948,"15.5":0.02664,"15.6":0.07231,"16.0":0.01332,"16.1":0.03806,"16.2":0.07422,"16.3":0.05519},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.00662,"6.0-6.1":0,"7.0-7.1":0.08605,"8.1-8.4":0.0006,"9.0-9.2":0.0006,"9.3":0.02587,"10.0-10.2":0.00301,"10.3":0.14201,"11.0-11.2":0.0012,"11.3-11.4":0.00181,"12.0-12.1":0.02166,"12.2-12.5":0.78225,"13.0-13.1":0.00842,"13.2":0.01023,"13.3":0.04032,"13.4-13.7":0.08906,"14.0-14.4":0.2425,"14.5-14.8":0.278,"15.0-15.1":0.1372,"15.2-15.3":0.19496,"15.4":0.19556,"15.5":0.23768,"15.6":0.3833,"16.0":0.49222,"16.1":0.71185,"16.2":0.80151,"16.3":0.64265,"16.4":0.0012},P:{"4":0.15458,"20":0.22672,"5.0-5.4":0.02061,"6.2-6.4":0.09028,"7.2-7.4":0.23702,"8.2":0.02006,"9.2":0.05153,"10.1":0.02006,"11.1-11.2":0.04122,"12.0":0.03092,"13.0":0.03092,"14.0":0.05153,"15.0":0.02061,"16.0":0.11336,"17.0":0.09275,"18.0":0.06183,"19.0":0.56679},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.00132,"4.2-4.3":0.00617,"4.4":0,"4.4.3-4.4.4":0.05728},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"11":0.03616,_:"6 7 8 9 10 5.5"},N:{"10":0,"11":0},S:{"2.5":1.19026,_:"3.0-3.1"},J:{"7":0,"10":0.02429},O:{"0":0.92306},H:{"0":14.18158},L:{"0":59.99825},R:{_:"0"},M:{"0":0.11336},Q:{"13.1":0}};

View File

@@ -0,0 +1,32 @@
"use strict";
var forEach = require("es5-ext/object/for-each")
, normalizeOpts = require("es5-ext/object/normalize-options")
, callable = require("es5-ext/object/valid-callable")
, lazy = require("d/lazy")
, resolveLength = require("./resolve-length")
, extensions = require("./registered-extensions");
module.exports = function (memoize) {
return function (props) {
forEach(props, function (desc) {
var fn = callable(desc.value), length;
desc.value = function (options) {
if (options.getNormalizer) {
options = normalizeOpts(options);
if (length === undefined) {
length = resolveLength(
options.length,
fn.length,
options.async && extensions.async
);
}
options.normalizer = options.getNormalizer(length);
delete options.getNormalizer;
}
return memoize(fn.bind(this), options);
};
});
return lazy(props);
};
};

View File

@@ -0,0 +1,3 @@
import type { Transformer, Options } from '../types';
declare const transformer: Transformer<Options.GlobalStyle>;
export { transformer };

View File

@@ -0,0 +1,30 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $RangeError = GetIntrinsic('%RangeError%');
var $TypeError = GetIntrinsic('%TypeError%');
var Type = require('../Type');
var zero = $BigInt && $BigInt(0);
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-remainder
module.exports = function BigIntRemainder(n, d) {
if (Type(n) !== 'BigInt' || Type(d) !== 'BigInt') {
throw new $TypeError('Assertion failed: `n` and `d` arguments must be BigInts');
}
if (d === zero) {
throw new $RangeError('Division by zero');
}
if (n === zero) {
return zero;
}
// shortcut for the actual spec mechanics
return n % d;
};

View File

@@ -0,0 +1,15 @@
import { h } from 'preact';
import Tabular from '../../tabular';
import { BaseComponent, BaseProps } from '../base';
import { Status } from '../../types';
import Header from '../../header';
interface TBodyProps extends BaseProps {
data: Tabular;
status: Status;
header?: Header;
}
export declare class TBody extends BaseComponent<TBodyProps> {
private headerLength;
render(): h.JSX.Element;
}
export {};

View File

@@ -0,0 +1,14 @@
import { AsyncAction } from './AsyncAction';
import { Subscription } from '../Subscription';
import { QueueScheduler } from './QueueScheduler';
import { SchedulerAction } from '../types';
import { TimerHandle } from './timerHandle';
export declare class QueueAction<T> extends AsyncAction<T> {
protected scheduler: QueueScheduler;
protected work: (this: SchedulerAction<T>, state?: T) => void;
constructor(scheduler: QueueScheduler, work: (this: SchedulerAction<T>, state?: T) => void);
schedule(state?: T, delay?: number): Subscription;
execute(state: T, delay: number): any;
protected requestAsyncId(scheduler: QueueScheduler, id?: TimerHandle, delay?: number): TimerHandle;
}
//# sourceMappingURL=QueueAction.d.ts.map

View File

@@ -0,0 +1,30 @@
import type {DelimiterCasedProperties} from './delimiter-cased-properties';
/**
Convert object properties to snake case but not recursively.
This can be useful when, for example, converting some API types from a different style.
@see SnakeCase
@see SnakeCasedPropertiesDeep
@example
```
import type {SnakeCasedProperties} from 'type-fest';
interface User {
userId: number;
userName: string;
}
const result: SnakeCasedProperties<User> = {
user_id: 1,
user_name: 'Tom',
};
```
@category Change case
@category Template literal
@category Object
*/
export type SnakeCasedProperties<Value> = DelimiterCasedProperties<Value, '_'>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"innerFrom.js","sourceRoot":"","sources":["../../../../src/internal/observable/innerFrom.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AAExG,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGvE,MAAM,UAAU,SAAS,CAAI,KAAyB;IACpD,IAAI,KAAK,YAAY,UAAU,EAAE;QAC/B,OAAO,KAAK,CAAC;KACd;IACD,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;YAC9B,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;SACrC;QACD,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;YACtB,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;SAC7B;QACD,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;YACpB,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;SAC3B;QACD,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,OAAO,iBAAiB,CAAC,KAAK,CAAC,CAAC;SACjC;QACD,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE;YACrB,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;SAC5B;QACD,IAAI,oBAAoB,CAAC,KAAK,CAAC,EAAE;YAC/B,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;SACtC;KACF;IAED,MAAM,gCAAgC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAMD,MAAM,UAAU,qBAAqB,CAAI,GAAQ;IAC/C,OAAO,IAAI,UAAU,CAAC,UAAC,UAAyB;QAC9C,IAAM,GAAG,GAAG,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACrC,IAAI,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YAC7B,OAAO,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SAClC;QAED,MAAM,IAAI,SAAS,CAAC,gEAAgE,CAAC,CAAC;IACxF,CAAC,CAAC,CAAC;AACL,CAAC;AASD,MAAM,UAAU,aAAa,CAAI,KAAmB;IAClD,OAAO,IAAI,UAAU,CAAC,UAAC,UAAyB;QAU9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC3D,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SAC3B;QACD,UAAU,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,WAAW,CAAI,OAAuB;IACpD,OAAO,IAAI,UAAU,CAAC,UAAC,UAAyB;QAC9C,OAAO;aACJ,IAAI,CACH,UAAC,KAAK;YACJ,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACtB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD,UAAC,GAAQ,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAArB,CAAqB,CACpC;aACA,IAAI,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,YAAY,CAAI,QAAqB;IACnD,OAAO,IAAI,UAAU,CAAC,UAAC,UAAyB;;;YAC9C,KAAoB,IAAA,aAAA,SAAA,QAAQ,CAAA,kCAAA,wDAAE;gBAAzB,IAAM,KAAK,qBAAA;gBACd,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,IAAI,UAAU,CAAC,MAAM,EAAE;oBACrB,OAAO;iBACR;aACF;;;;;;;;;QACD,UAAU,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAI,aAA+B;IAClE,OAAO,IAAI,UAAU,CAAC,UAAC,UAAyB;QAC9C,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,KAAK,CAAC,UAAC,GAAG,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAArB,CAAqB,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAI,cAAqC;IAC7E,OAAO,iBAAiB,CAAC,kCAAkC,CAAC,cAAc,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,SAAe,OAAO,CAAI,aAA+B,EAAE,UAAyB;;;;;;;;;oBACxD,kBAAA,cAAA,aAAa,CAAA;;;;;oBAAtB,KAAK,0BAAA,CAAA;oBACpB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAGvB,IAAI,UAAU,CAAC,MAAM,EAAE;wBACrB,WAAO;qBACR;;;;;;;;;;;;;;;;;;;;;oBAEH,UAAU,CAAC,QAAQ,EAAE,CAAC;;;;;CACvB"}

View File

@@ -0,0 +1,90 @@
import { Observable } from '../Observable';
import { EmptyError } from '../util/EmptyError';
import { OperatorFunction, TruthyTypesOf } from '../types';
import { filter } from './filter';
import { takeLast } from './takeLast';
import { throwIfEmpty } from './throwIfEmpty';
import { defaultIfEmpty } from './defaultIfEmpty';
import { identity } from '../util/identity';
export function last<T>(predicate: BooleanConstructor): OperatorFunction<T, TruthyTypesOf<T>>;
export function last<T, D>(predicate: BooleanConstructor, defaultValue: D): OperatorFunction<T, TruthyTypesOf<T> | D>;
export function last<T, D = T>(predicate?: null, defaultValue?: D): OperatorFunction<T, T | D>;
export function last<T, S extends T>(
predicate: (value: T, index: number, source: Observable<T>) => value is S,
defaultValue?: S
): OperatorFunction<T, S>;
export function last<T, D = T>(
predicate: (value: T, index: number, source: Observable<T>) => boolean,
defaultValue?: D
): OperatorFunction<T, T | D>;
/**
* Returns an Observable that emits only the last item emitted by the source Observable.
* It optionally takes a predicate function as a parameter, in which case, rather than emitting
* the last item from the source Observable, the resulting Observable will emit the last item
* from the source Observable that satisfies the predicate.
*
* ![](last.png)
*
* It will throw an error if the source completes without notification or one that matches the predicate. It
* returns the last value or if a predicate is provided last value that matches the predicate. It returns the
* given default value if no notification is emitted or matches the predicate.
*
* ## Examples
*
* Last alphabet from the sequence
*
* ```ts
* import { from, last } from 'rxjs';
*
* const source = from(['x', 'y', 'z']);
* const result = source.pipe(last());
*
* result.subscribe(value => console.log(`Last alphabet: ${ value }`));
*
* // Outputs
* // Last alphabet: z
* ```
*
* Default value when the value in the predicate is not matched
*
* ```ts
* import { from, last } from 'rxjs';
*
* const source = from(['x', 'y', 'z']);
* const result = source.pipe(last(char => char === 'a', 'not found'));
*
* result.subscribe(value => console.log(`'a' is ${ value }.`));
*
* // Outputs
* // 'a' is not found.
* ```
*
* @see {@link skip}
* @see {@link skipUntil}
* @see {@link skipLast}
* @see {@link skipWhile}
*
* @throws {EmptyError} Delivers an EmptyError to the Observer's `error`
* callback if the Observable completes before any `next` notification was sent.
* @param {function} [predicate] - The condition any source emitted item has to satisfy.
* @param {any} [defaultValue] - An optional default value to provide if last
* predicate isn't met or no values were emitted.
* @return A function that returns an Observable that emits only the last item
* satisfying the given condition from the source, or a NoSuchElementException
* if no such items are emitted.
* @throws - Throws if no items that match the predicate are emitted by the source Observable.
*/
export function last<T, D>(
predicate?: ((value: T, index: number, source: Observable<T>) => boolean) | null,
defaultValue?: D
): OperatorFunction<T, T | D> {
const hasDefaultValue = arguments.length >= 2;
return (source: Observable<T>) =>
source.pipe(
predicate ? filter((v, i) => predicate(v, i, source)) : identity,
takeLast(1),
hasDefaultValue ? defaultIfEmpty(defaultValue!) : throwIfEmpty(() => new EmptyError())
);
}

View File

@@ -0,0 +1,89 @@
# has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag)
> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag
Correctly stops looking after an `--` argument terminator.
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-has-flag?utm_source=npm-has-flag&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
---
## Install
```
$ npm install has-flag
```
## Usage
```js
// foo.js
const hasFlag = require('has-flag');
hasFlag('unicorn');
//=> true
hasFlag('--unicorn');
//=> true
hasFlag('f');
//=> true
hasFlag('-f');
//=> true
hasFlag('foo=bar');
//=> true
hasFlag('foo');
//=> false
hasFlag('rainbow');
//=> false
```
```
$ node foo.js -f --unicorn --foo=bar -- --rainbow
```
## API
### hasFlag(flag, [argv])
Returns a boolean for whether the flag exists.
#### flag
Type: `string`
CLI flag to look for. The `--` prefix is optional.
#### argv
Type: `string[]`<br>
Default: `process.argv`
CLI arguments.
## Security
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

View File

@@ -0,0 +1,71 @@
{
"name": "get-symbol-description",
"version": "1.0.0",
"description": "Gets the description of a Symbol. Handles `Symbol()` vs `Symbol('')` properly when possible.",
"main": "index.js",
"exports": {
".": "./index.js",
"./getInferredName": "./getInferredName.js",
"./package.json": "./package.json"
},
"scripts": {
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"lint": "eslint --ext=.js,.mjs .",
"postlint": "evalmd README.md",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "aud --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/inspect-js/get-symbol-description.git"
},
"keywords": [
"symbol",
"ecmascript",
"javascript",
"description"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/inspect-js/get-symbol-description/issues"
},
"homepage": "https://github.com/inspect-js/get-symbol-description#readme",
"dependencies": {
"call-bind": "^1.0.2",
"get-intrinsic": "^1.1.1"
},
"devDependencies": {
"@ljharb/eslint-config": "^17.6.0",
"aud": "^1.1.5",
"auto-changelog": "^2.3.0",
"es-value-fixtures": "^1.2.1",
"eslint": "^7.32.0",
"evalmd": "^0.0.19",
"foreach": "^2.0.5",
"has": "^1.0.3",
"nyc": "^10.3.2",
"object-inspect": "^1.11.0",
"safe-publish-latest": "^1.1.4",
"tape": "^5.3.1"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
}
}

View File

@@ -0,0 +1 @@
{"name":"glob-parent","version":"5.1.2","files":{"LICENSE":{"checkedAt":1678883670836,"integrity":"sha512-Ca6s7X2ZfTI6fGB3faWEyIGYcJajB9jLXcw0mcKJ0htY9zs6HW2o8jDnuqZOv4yfJt5kw4rAh0tRhzlxKM6raQ==","mode":420,"size":753},"index.js":{"checkedAt":1678883670836,"integrity":"sha512-d7dN81urIl+AgVs+2rwo/aIBVYRzVrIutDMsHVgiDEojj7sprmx818+3e8IPt8QT8WZfiDHqPJvK0Yc/zsZ1LQ==","mode":420,"size":1120},"package.json":{"checkedAt":1678883670836,"integrity":"sha512-1clKscMLzwwOqg6cKj8agX7y5kyTU2w6v4vDWsQHz6sx9174OZCudhecNKUYrsSES3vaigPFd36vERycoWZjPQ==","mode":420,"size":1105},"CHANGELOG.md":{"checkedAt":1678883670836,"integrity":"sha512-dHv9RnK7Jt8LHdXB7DJnpHZdTYF8/CqeW6Q9n201h0zoVwQha4+b/1sKvlNNMjcSC3b3D/P7CQfqcgGoPrZKZg==","mode":420,"size":4510},"README.md":{"checkedAt":1678883670836,"integrity":"sha512-mj6hcRQBOumgjqcf8pAQpY3tuJKKiqPLOH3xMiRRzjRKuQ5zgmzUTV/KtbFs3+8EI9a1tasZTG/QbJPAVDWeyw==","mode":420,"size":4646}}}

View File

@@ -0,0 +1,37 @@
import Result, { Message, ResultOptions } from './result.js'
import { SourceMap } from './postcss.js'
import Processor from './processor.js'
import Warning from './warning.js'
import Root from './root.js'
import LazyResult from './lazy-result.js'
/**
* A Promise proxy for the result of PostCSS transformations.
* This lazy result instance doesn't parse css unless `NoWorkResult#root` or `Result#root`
* are accessed. See the example below for details.
* A `NoWork` instance is returned by `Processor#process` ONLY when no plugins defined.
*
* ```js
* const noWorkResult = postcss().process(css) // No plugins are defined.
* // CSS is not parsed
* let root = noWorkResult.root // now css is parsed because we accessed the root
* ```
*/
export default class NoWorkResult implements LazyResult {
then: Promise<Result>['then']
catch: Promise<Result>['catch']
finally: Promise<Result>['finally']
constructor(processor: Processor, css: string, opts: ResultOptions)
get [Symbol.toStringTag](): string
get processor(): Processor
get opts(): ResultOptions
get css(): string
get content(): string
get map(): SourceMap
get root(): Root
get messages(): Message[]
warnings(): Warning[]
toString(): string
sync(): Result
async(): Promise<Result>
}

View File

@@ -0,0 +1,8 @@
"use strict";
var value = require("./valid-value");
module.exports = function (code) {
// eslint-disable-next-line no-new-func
return new Function("return " + value(code))();
};

View File

@@ -0,0 +1,15 @@
import { Component } from 'preact';
import { shallowDiffers } from './util';
/**
* Component class with a predefined `shouldComponentUpdate` implementation
*/
export function PureComponent(p) {
this.props = p;
}
PureComponent.prototype = new Component();
// Some third-party libraries check if this property is present
PureComponent.prototype.isPureReactComponent = true;
PureComponent.prototype.shouldComponentUpdate = function(props, state) {
return shallowDiffers(this.props, props) || shallowDiffers(this.state, state);
};

View File

@@ -0,0 +1,53 @@
import { AsyncScheduler } from './AsyncScheduler';
/**
*
* Async Scheduler
*
* <span class="informal">Schedule task as if you used setTimeout(task, duration)</span>
*
* `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript
* event loop queue. It is best used to delay tasks in time or to schedule tasks repeating
* in intervals.
*
* If you just want to "defer" task, that is to perform it right after currently
* executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`),
* better choice will be the {@link asapScheduler} scheduler.
*
* ## Examples
* Use async scheduler to delay task
* ```ts
* import { asyncScheduler } from 'rxjs';
*
* const task = () => console.log('it works!');
*
* asyncScheduler.schedule(task, 2000);
*
* // After 2 seconds logs:
* // "it works!"
* ```
*
* Use async scheduler to repeat task in intervals
* ```ts
* import { asyncScheduler } from 'rxjs';
*
* function task(state) {
* console.log(state);
* this.schedule(state + 1, 1000); // `this` references currently executing Action,
* // which we reschedule with new state and delay
* }
*
* asyncScheduler.schedule(task, 3000, 0);
*
* // Logs:
* // 0 after 3s
* // 1 after 4s
* // 2 after 5s
* // 3 after 6s
* ```
*/
export declare const asyncScheduler: AsyncScheduler;
/**
* @deprecated Renamed to {@link asyncScheduler}. Will be removed in v8.
*/
export declare const async: AsyncScheduler;
//# sourceMappingURL=async.d.ts.map

View File

@@ -0,0 +1,72 @@
{
"name": "is-core-module",
"version": "2.11.0",
"description": "Is this specifier a node.js core module?",
"main": "index.js",
"sideEffects": false,
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"lint": "eslint .",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "aud --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/inspect-js/is-core-module.git"
},
"keywords": [
"core",
"modules",
"module",
"npm",
"node",
"dependencies"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/inspect-js/is-core-module/issues"
},
"homepage": "https://github.com/inspect-js/is-core-module",
"dependencies": {
"has": "^1.0.3"
},
"devDependencies": {
"@ljharb/eslint-config": "^21.0.0",
"aud": "^2.0.1",
"auto-changelog": "^2.4.0",
"eslint": "=8.8.0",
"mock-property": "^1.0.0",
"npmignore": "^0.3.0",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"semver": "^6.3.0",
"tape": "^5.6.1"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github"
]
}
}

View File

@@ -0,0 +1,10 @@
import {FetchBaseError} from './base.js';
/**
* AbortError interface for cancelled requests
*/
export class AbortError extends FetchBaseError {
constructor(message, type = 'aborted') {
super(message, type);
}
}

View File

@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.subscribeOn = void 0;
var lift_1 = require("../util/lift");
function subscribeOn(scheduler, delay) {
if (delay === void 0) { delay = 0; }
return lift_1.operate(function (source, subscriber) {
subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay));
});
}
exports.subscribeOn = subscribeOn;
//# sourceMappingURL=subscribeOn.js.map

View File

@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright 2022 Andrey Sitnik <andrey@sitnik.ru> and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,40 @@
import { FileLike } from "./FileLike.js";
/**
* A `string` or `File` that represents a single value from a set of `FormData` key-value pairs.
*/
export type FormDataEntryValue = string | FileLike;
/**
* This interface reflects minimal shape of the FormData
*/
export interface FormDataLike {
/**
* Appends a new value onto an existing key inside a FormData object,
* or adds the key if it does not already exist.
*
* The difference between `set()` and `append()` is that if the specified key already exists, `set()` will overwrite all existing values with the new one, whereas `append()` will append the new value onto the end of the existing set of values.
*
* @param name The name of the field whose data is contained in `value`.
* @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string.
* @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename.
*/
append(name: string, value: unknown, fileName?: string): void;
/**
* Returns all the values associated with a given key from within a `FormData` object.
*
* @param {string} name A name of the value you want to retrieve.
*
* @returns An array of `FormDataEntryValue` whose key matches the value passed in the `name` parameter. If the key doesn't exist, the method returns an empty list.
*/
getAll(name: string): FormDataEntryValue[];
/**
* Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through the `FormData` key/value pairs.
* The key of each pair is a string; the value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue).
*/
entries(): Generator<[string, FormDataEntryValue]>;
/**
* An alias for FormDataLike#entries()
*/
[Symbol.iterator](): Generator<[string, FormDataEntryValue]>;
readonly [Symbol.toStringTag]: string;
}

View File

@@ -0,0 +1,53 @@
{
"name": "object-hash",
"version": "3.0.0",
"description": "Generate hashes from javascript objects in node and the browser.",
"homepage": "https://github.com/puleos/object-hash",
"repository": {
"type": "git",
"url": "https://github.com/puleos/object-hash"
},
"keywords": [
"object",
"hash",
"sha1",
"md5"
],
"bugs": {
"url": "https://github.com/puleos/object-hash/issues"
},
"scripts": {
"test": "node ./node_modules/.bin/mocha test",
"prepublish": "gulp dist"
},
"author": "Scott Puleo <puleos@gmail.com>",
"files": [
"index.js",
"dist/object_hash.js"
],
"license": "MIT",
"devDependencies": {
"browserify": "^16.2.3",
"gulp": "^4.0.0",
"gulp-browserify": "^0.5.1",
"gulp-coveralls": "^0.1.4",
"gulp-exec": "^3.0.1",
"gulp-istanbul": "^1.1.3",
"gulp-jshint": "^2.0.0",
"gulp-mocha": "^5.0.0",
"gulp-rename": "^1.2.0",
"gulp-replace": "^1.0.0",
"gulp-uglify": "^3.0.0",
"jshint": "^2.8.0",
"jshint-stylish": "^2.1.0",
"karma": "^4.2.0",
"karma-chrome-launcher": "^2.2.0",
"karma-mocha": "^1.3.0",
"mocha": "^6.2.0"
},
"engines": {
"node": ">= 6"
},
"main": "./index.js",
"browser": "./dist/object_hash.js"
}

View File

@@ -0,0 +1,8 @@
import { Observable } from '../Observable';
import { innerFrom } from './innerFrom';
export function defer(observableFactory) {
return new Observable((subscriber) => {
innerFrom(observableFactory()).subscribe(subscriber);
});
}
//# sourceMappingURL=defer.js.map

View File

@@ -0,0 +1,17 @@
export function addQueryParameters(url, parameters) {
const separator = /\?/.test(url) ? "&" : "?";
const names = Object.keys(parameters);
if (names.length === 0) {
return url;
}
return (url +
separator +
names
.map((name) => {
if (name === "q") {
return ("q=" + parameters.q.split("+").map(encodeURIComponent).join("+"));
}
return `${name}=${encodeURIComponent(parameters[name])}`;
})
.join("&"));
}

View File

@@ -0,0 +1,209 @@
import assertString from './util/assertString';
/* eslint-disable max-len */
var phones = {
'am-AM': /^(\+?374|0)((10|[9|7][0-9])\d{6}$|[2-4]\d{7}$)/,
'ar-AE': /^((\+?971)|0)?5[024568]\d{7}$/,
'ar-BH': /^(\+?973)?(3|6)\d{7}$/,
'ar-DZ': /^(\+?213|0)(5|6|7)\d{8}$/,
'ar-LB': /^(\+?961)?((3|81)\d{6}|7\d{7})$/,
'ar-EG': /^((\+?20)|0)?1[0125]\d{8}$/,
'ar-IQ': /^(\+?964|0)?7[0-9]\d{8}$/,
'ar-JO': /^(\+?962|0)?7[789]\d{7}$/,
'ar-KW': /^(\+?965)([569]\d{7}|41\d{6})$/,
'ar-LY': /^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,
'ar-MA': /^(?:(?:\+|00)212|0)[5-7]\d{8}$/,
'ar-OM': /^((\+|00)968)?(9[1-9])\d{6}$/,
'ar-PS': /^(\+?970|0)5[6|9](\d{7})$/,
'ar-SA': /^(!?(\+?966)|0)?5\d{8}$/,
'ar-SY': /^(!?(\+?963)|0)?9\d{8}$/,
'ar-TN': /^(\+?216)?[2459]\d{7}$/,
'az-AZ': /^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/,
'bs-BA': /^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,
'be-BY': /^(\+?375)?(24|25|29|33|44)\d{7}$/,
'bg-BG': /^(\+?359|0)?8[789]\d{7}$/,
'bn-BD': /^(\+?880|0)1[13456789][0-9]{8}$/,
'ca-AD': /^(\+376)?[346]\d{5}$/,
'cs-CZ': /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,
'da-DK': /^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,
'de-DE': /^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,
'de-AT': /^(\+43|0)\d{1,4}\d{3,12}$/,
'de-CH': /^(\+41|0)([1-9])\d{1,9}$/,
'de-LU': /^(\+352)?((6\d1)\d{6})$/,
'dv-MV': /^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,
'el-GR': /^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,
'el-CY': /^(\+?357?)?(9(9|6)\d{6})$/,
'en-AI': /^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,
'en-AU': /^(\+?61|0)4\d{8}$/,
'en-AG': /^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,
'en-BM': /^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,
'en-BS': /^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,
'en-GB': /^(\+?44|0)7\d{9}$/,
'en-GG': /^(\+?44|0)1481\d{6}$/,
'en-GH': /^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/,
'en-GY': /^(\+592|0)6\d{6}$/,
'en-HK': /^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,
'en-MO': /^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,
'en-IE': /^(\+?353|0)8[356789]\d{7}$/,
'en-IN': /^(\+?91|0)?[6789]\d{9}$/,
'en-JM': /^(\+?876)?\d{7}$/,
'en-KE': /^(\+?254|0)(7|1)\d{8}$/,
'en-SS': /^(\+?211|0)(9[1257])\d{7}$/,
'en-KI': /^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,
'en-KN': /^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/,
'en-LS': /^(\+?266)(22|28|57|58|59|27|52)\d{6}$/,
'en-MT': /^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,
'en-MU': /^(\+?230|0)?\d{8}$/,
'en-NA': /^(\+?264|0)(6|8)\d{7}$/,
'en-NG': /^(\+?234|0)?[789]\d{9}$/,
'en-NZ': /^(\+?64|0)[28]\d{7,9}$/,
'en-PG': /^(\+?675|0)?(7\d|8[18])\d{6}$/,
'en-PK': /^((00|\+)?92|0)3[0-6]\d{8}$/,
'en-PH': /^(09|\+639)\d{9}$/,
'en-RW': /^(\+?250|0)?[7]\d{8}$/,
'en-SG': /^(\+65)?[3689]\d{7}$/,
'en-SL': /^(\+?232|0)\d{8}$/,
'en-TZ': /^(\+?255|0)?[67]\d{8}$/,
'en-UG': /^(\+?256|0)?[7]\d{8}$/,
'en-US': /^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,
'en-ZA': /^(\+?27|0)\d{9}$/,
'en-ZM': /^(\+?26)?09[567]\d{7}$/,
'en-ZW': /^(\+263)[0-9]{9}$/,
'en-BW': /^(\+?267)?(7[1-8]{1})\d{6}$/,
'es-AR': /^\+?549(11|[2368]\d)\d{8}$/,
'es-BO': /^(\+?591)?(6|7)\d{7}$/,
'es-CO': /^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,
'es-CL': /^(\+?56|0)[2-9]\d{1}\d{7}$/,
'es-CR': /^(\+506)?[2-8]\d{7}$/,
'es-CU': /^(\+53|0053)?5\d{7}/,
'es-DO': /^(\+?1)?8[024]9\d{7}$/,
'es-HN': /^(\+?504)?[9|8|3|2]\d{7}$/,
'es-EC': /^(\+?593|0)([2-7]|9[2-9])\d{7}$/,
'es-ES': /^(\+?34)?[6|7]\d{8}$/,
'es-PE': /^(\+?51)?9\d{8}$/,
'es-MX': /^(\+?52)?(1|01)?\d{10,11}$/,
'es-NI': /^(\+?505)\d{7,8}$/,
'es-PA': /^(\+?507)\d{7,8}$/,
'es-PY': /^(\+?595|0)9[9876]\d{7}$/,
'es-SV': /^(\+?503)?[67]\d{7}$/,
'es-UY': /^(\+598|0)9[1-9][\d]{6}$/,
'es-VE': /^(\+?58)?(2|4)\d{9}$/,
'et-EE': /^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,
'fa-IR': /^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,
'fi-FI': /^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,
'fj-FJ': /^(\+?679)?\s?\d{3}\s?\d{4}$/,
'fo-FO': /^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,
'fr-BF': /^(\+226|0)[67]\d{7}$/,
'fr-BJ': /^(\+229)\d{8}$/,
'fr-CD': /^(\+?243|0)?(8|9)\d{8}$/,
'fr-CM': /^(\+?237)6[0-9]{8}$/,
'fr-FR': /^(\+?33|0)[67]\d{8}$/,
'fr-GF': /^(\+?594|0|00594)[67]\d{8}$/,
'fr-GP': /^(\+?590|0|00590)[67]\d{8}$/,
'fr-MQ': /^(\+?596|0|00596)[67]\d{8}$/,
'fr-PF': /^(\+?689)?8[789]\d{6}$/,
'fr-RE': /^(\+?262|0|00262)[67]\d{8}$/,
'he-IL': /^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,
'hu-HU': /^(\+?36|06)(20|30|31|50|70)\d{7}$/,
'id-ID': /^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,
'ir-IR': /^(\+98|0)?9\d{9}$/,
'it-IT': /^(\+?39)?\s?3\d{2} ?\d{6,7}$/,
'it-SM': /^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,
'ja-JP': /^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,
'ka-GE': /^(\+?995)?(79\d{7}|5\d{8})$/,
'kk-KZ': /^(\+?7|8)?7\d{9}$/,
'kl-GL': /^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,
'ko-KR': /^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,
'ky-KG': /^(\+?7\s?\+?7|0)\s?\d{2}\s?\d{3}\s?\d{4}$/,
'lt-LT': /^(\+370|8)\d{8}$/,
'lv-LV': /^(\+?371)2\d{7}$/,
'mg-MG': /^((\+?261|0)(2|3)\d)?\d{7}$/,
'mn-MN': /^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/,
'my-MM': /^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,
'ms-MY': /^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/,
'mz-MZ': /^(\+?258)?8[234567]\d{7}$/,
'nb-NO': /^(\+?47)?[49]\d{7}$/,
'ne-NP': /^(\+?977)?9[78]\d{8}$/,
'nl-BE': /^(\+?32|0)4\d{8}$/,
'nl-NL': /^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,
'nl-AW': /^(\+)?297(56|59|64|73|74|99)\d{5}$/,
'nn-NO': /^(\+?47)?[49]\d{7}$/,
'pl-PL': /^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/,
'pt-BR': /^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,
'pt-PT': /^(\+?351)?9[1236]\d{7}$/,
'pt-AO': /^(\+244)\d{9}$/,
'ro-MD': /^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/,
'ro-RO': /^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/,
'ru-RU': /^(\+?7|8)?9\d{9}$/,
'si-LK': /^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,
'sl-SI': /^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,
'sk-SK': /^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,
'sq-AL': /^(\+355|0)6[789]\d{6}$/,
'sr-RS': /^(\+3816|06)[- \d]{5,9}$/,
'sv-SE': /^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,
'tg-TJ': /^(\+?992)?[5][5]\d{7}$/,
'th-TH': /^(\+66|66|0)\d{9}$/,
'tr-TR': /^(\+?90|0)?5\d{9}$/,
'tk-TM': /^(\+993|993|8)\d{8}$/,
'uk-UA': /^(\+?38|8)?0\d{9}$/,
'uz-UZ': /^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,
'vi-VN': /^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,
'zh-CN': /^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,
'zh-TW': /^(\+?886\-?|0)?9\d{8}$/,
'dz-BT': /^(\+?975|0)?(17|16|77|02)\d{6}$/,
'ar-YE': /^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/,
'ar-EH': /^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/,
'fa-AF': /^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/
};
/* eslint-enable max-len */
// aliases
phones['en-CA'] = phones['en-US'];
phones['fr-CA'] = phones['en-CA'];
phones['fr-BE'] = phones['nl-BE'];
phones['zh-HK'] = phones['en-HK'];
phones['zh-MO'] = phones['en-MO'];
phones['ga-IE'] = phones['en-IE'];
phones['fr-CH'] = phones['de-CH'];
phones['it-CH'] = phones['fr-CH'];
export default function isMobilePhone(str, locale, options) {
assertString(str);
if (options && options.strictMode && !str.startsWith('+')) {
return false;
}
if (Array.isArray(locale)) {
return locale.some(function (key) {
// https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes
// istanbul ignore else
if (phones.hasOwnProperty(key)) {
var phone = phones[key];
if (phone.test(str)) {
return true;
}
}
return false;
});
} else if (locale in phones) {
return phones[locale].test(str); // alias falsey locale as 'any'
} else if (!locale || locale === 'any') {
for (var key in phones) {
// istanbul ignore else
if (phones.hasOwnProperty(key)) {
var phone = phones[key];
if (phone.test(str)) {
return true;
}
}
}
return false;
}
throw new Error("Invalid locale '".concat(locale, "'"));
}
export var locales = Object.keys(phones);

View File

@@ -0,0 +1,7 @@
var path = require('path');
function rebaseToFrom(option) {
return option ? path.resolve(option) : process.cwd();
}
module.exports = rebaseToFrom;

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('isSymbol', require('../isSymbol'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,6 @@
export interface LookupMatcherResult {
locale: string;
extension?: string;
nu?: string;
}
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,287 @@
const debug = require('../internal/debug')
const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')
const { re, t } = require('../internal/re')
const parseOptions = require('../internal/parse-options')
const { compareIdentifiers } = require('../internal/identifiers')
class SemVer {
constructor (version, options) {
options = parseOptions(options)
if (version instanceof SemVer) {
if (version.loose === !!options.loose &&
version.includePrerelease === !!options.includePrerelease) {
return version
} else {
version = version.version
}
} else if (typeof version !== 'string') {
throw new TypeError(`Invalid Version: ${version}`)
}
if (version.length > MAX_LENGTH) {
throw new TypeError(
`version is longer than ${MAX_LENGTH} characters`
)
}
debug('SemVer', version, options)
this.options = options
this.loose = !!options.loose
// this isn't actually relevant for versions, but keep it so that we
// don't run into trouble passing this.options around.
this.includePrerelease = !!options.includePrerelease
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
if (!m) {
throw new TypeError(`Invalid Version: ${version}`)
}
this.raw = version
// these are actually numbers
this.major = +m[1]
this.minor = +m[2]
this.patch = +m[3]
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
throw new TypeError('Invalid major version')
}
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
throw new TypeError('Invalid minor version')
}
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
throw new TypeError('Invalid patch version')
}
// numberify any prerelease numeric ids
if (!m[4]) {
this.prerelease = []
} else {
this.prerelease = m[4].split('.').map((id) => {
if (/^[0-9]+$/.test(id)) {
const num = +id
if (num >= 0 && num < MAX_SAFE_INTEGER) {
return num
}
}
return id
})
}
this.build = m[5] ? m[5].split('.') : []
this.format()
}
format () {
this.version = `${this.major}.${this.minor}.${this.patch}`
if (this.prerelease.length) {
this.version += `-${this.prerelease.join('.')}`
}
return this.version
}
toString () {
return this.version
}
compare (other) {
debug('SemVer.compare', this.version, this.options, other)
if (!(other instanceof SemVer)) {
if (typeof other === 'string' && other === this.version) {
return 0
}
other = new SemVer(other, this.options)
}
if (other.version === this.version) {
return 0
}
return this.compareMain(other) || this.comparePre(other)
}
compareMain (other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options)
}
return (
compareIdentifiers(this.major, other.major) ||
compareIdentifiers(this.minor, other.minor) ||
compareIdentifiers(this.patch, other.patch)
)
}
comparePre (other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options)
}
// NOT having a prerelease is > having one
if (this.prerelease.length && !other.prerelease.length) {
return -1
} else if (!this.prerelease.length && other.prerelease.length) {
return 1
} else if (!this.prerelease.length && !other.prerelease.length) {
return 0
}
let i = 0
do {
const a = this.prerelease[i]
const b = other.prerelease[i]
debug('prerelease compare', i, a, b)
if (a === undefined && b === undefined) {
return 0
} else if (b === undefined) {
return 1
} else if (a === undefined) {
return -1
} else if (a === b) {
continue
} else {
return compareIdentifiers(a, b)
}
} while (++i)
}
compareBuild (other) {
if (!(other instanceof SemVer)) {
other = new SemVer(other, this.options)
}
let i = 0
do {
const a = this.build[i]
const b = other.build[i]
debug('prerelease compare', i, a, b)
if (a === undefined && b === undefined) {
return 0
} else if (b === undefined) {
return 1
} else if (a === undefined) {
return -1
} else if (a === b) {
continue
} else {
return compareIdentifiers(a, b)
}
} while (++i)
}
// preminor will bump the version up to the next minor release, and immediately
// down to pre-release. premajor and prepatch work the same way.
inc (release, identifier) {
switch (release) {
case 'premajor':
this.prerelease.length = 0
this.patch = 0
this.minor = 0
this.major++
this.inc('pre', identifier)
break
case 'preminor':
this.prerelease.length = 0
this.patch = 0
this.minor++
this.inc('pre', identifier)
break
case 'prepatch':
// If this is already a prerelease, it will bump to the next version
// drop any prereleases that might already exist, since they are not
// relevant at this point.
this.prerelease.length = 0
this.inc('patch', identifier)
this.inc('pre', identifier)
break
// If the input is a non-prerelease version, this acts the same as
// prepatch.
case 'prerelease':
if (this.prerelease.length === 0) {
this.inc('patch', identifier)
}
this.inc('pre', identifier)
break
case 'major':
// If this is a pre-major version, bump up to the same major version.
// Otherwise increment major.
// 1.0.0-5 bumps to 1.0.0
// 1.1.0 bumps to 2.0.0
if (
this.minor !== 0 ||
this.patch !== 0 ||
this.prerelease.length === 0
) {
this.major++
}
this.minor = 0
this.patch = 0
this.prerelease = []
break
case 'minor':
// If this is a pre-minor version, bump up to the same minor version.
// Otherwise increment minor.
// 1.2.0-5 bumps to 1.2.0
// 1.2.1 bumps to 1.3.0
if (this.patch !== 0 || this.prerelease.length === 0) {
this.minor++
}
this.patch = 0
this.prerelease = []
break
case 'patch':
// If this is not a pre-release version, it will increment the patch.
// If it is a pre-release it will bump up to the same patch version.
// 1.2.0-5 patches to 1.2.0
// 1.2.0 patches to 1.2.1
if (this.prerelease.length === 0) {
this.patch++
}
this.prerelease = []
break
// This probably shouldn't be used publicly.
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
case 'pre':
if (this.prerelease.length === 0) {
this.prerelease = [0]
} else {
let i = this.prerelease.length
while (--i >= 0) {
if (typeof this.prerelease[i] === 'number') {
this.prerelease[i]++
i = -2
}
}
if (i === -1) {
// didn't increment anything
this.prerelease.push(0)
}
}
if (identifier) {
// 1.2.0-beta.1 bumps to 1.2.0-beta.2,
// 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
if (isNaN(this.prerelease[1])) {
this.prerelease = [identifier, 0]
}
} else {
this.prerelease = [identifier, 0]
}
}
break
default:
throw new Error(`invalid increment argument: ${release}`)
}
this.format()
this.raw = this.version
return this
}
}
module.exports = SemVer

View File

@@ -0,0 +1,33 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v2.0.1](https://github.com/es-shims/es-set-tostringtag/compare/v2.0.0...v2.0.1) - 2023-01-05
### Fixed
- [Fix] move `has` to prod deps [`#2`](https://github.com/es-shims/es-set-tostringtag/issues/2)
### Commits
- [Dev Deps] update `@ljharb/eslint-config` [`b9eecd2`](https://github.com/es-shims/es-set-tostringtag/commit/b9eecd23c10b7b43ba75089ac8ff8cc6b295798b)
## [v2.0.0](https://github.com/es-shims/es-set-tostringtag/compare/v1.0.0...v2.0.0) - 2022-12-21
### Commits
- [Tests] refactor tests [`168dcfb`](https://github.com/es-shims/es-set-tostringtag/commit/168dcfbb535c279dc48ccdc89419155125aaec18)
- [Breaking] do not set toStringTag if it is already set [`226ab87`](https://github.com/es-shims/es-set-tostringtag/commit/226ab874192c625d9e5f0e599d3f60d2b2aa83b5)
- [New] add `force` option to set even if already set [`1abd4ec`](https://github.com/es-shims/es-set-tostringtag/commit/1abd4ecb282f19718c4518284b0293a343564505)
## v1.0.0 - 2022-12-21
### Commits
- Initial implementation, tests, readme [`a0e1147`](https://github.com/es-shims/es-set-tostringtag/commit/a0e11473f79a233b46374525c962ea1b4d42418a)
- Initial commit [`ffd4aff`](https://github.com/es-shims/es-set-tostringtag/commit/ffd4afffbeebf29aff0d87a7cfc3f7844e09fe68)
- npm init [`fffe5bd`](https://github.com/es-shims/es-set-tostringtag/commit/fffe5bd1d1146d084730a387a9c672371f4a8fff)
- Only apps should have lockfiles [`d363871`](https://github.com/es-shims/es-set-tostringtag/commit/d36387139465623e161a15dbd39120537f150c62)

View File

@@ -0,0 +1,49 @@
const aliases = ['stdin', 'stdout', 'stderr'];
const hasAlias = options => aliases.some(alias => options[alias] !== undefined);
export const normalizeStdio = options => {
if (!options) {
return;
}
const {stdio} = options;
if (stdio === undefined) {
return aliases.map(alias => options[alias]);
}
if (hasAlias(options)) {
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map(alias => `\`${alias}\``).join(', ')}`);
}
if (typeof stdio === 'string') {
return stdio;
}
if (!Array.isArray(stdio)) {
throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
}
const length = Math.max(stdio.length, aliases.length);
return Array.from({length}, (value, index) => stdio[index]);
};
// `ipc` is pushed unless it is already present
export const normalizeStdioNode = options => {
const stdio = normalizeStdio(options);
if (stdio === 'ipc') {
return 'ipc';
}
if (stdio === undefined || typeof stdio === 'string') {
return [stdio, stdio, stdio, 'ipc'];
}
if (stdio.includes('ipc')) {
return stdio;
}
return [...stdio, 'ipc'];
};

View File

@@ -0,0 +1,24 @@
# Plugins
Plugins extend the functionality of Mousetrap. To use a plugin just include the plugin after mousetrap.
```html
<script src="mousetrap.js"></script>
<script src="mousetrap-record.js"></script>
```
## Bind dictionary
Allows you to make multiple bindings in a single ``Mousetrap.bind`` call.
## Global bind
Allows you to set global bindings that work even inside of input fields.
## Pause/unpause
Allows you to temporarily prevent Mousetrap events from firing.
## Record
Allows you to capture a keyboard shortcut or sequence defined by a user.

View File

@@ -0,0 +1,12 @@
import Node from './shared/Node';
import Expression from './shared/Expression';
import Component from '../Component';
import TemplateScope from './shared/TemplateScope';
import { TemplateNode } from '../../interfaces';
import Element from './Element';
export default class Animation extends Node {
type: 'Animation';
name: string;
expression: Expression;
constructor(component: Component, parent: Element, scope: TemplateScope, info: TemplateNode);
}

View File

@@ -0,0 +1,56 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: ()=>expandApplyAtRules
});
function partitionRules(root) {
if (!root.walkAtRules) return;
let applyParents = new Set();
root.walkAtRules("apply", (rule)=>{
applyParents.add(rule.parent);
});
if (applyParents.size === 0) {
return;
}
for (let rule of applyParents){
let nodeGroups = [];
let lastGroup = [];
for (let node of rule.nodes){
if (node.type === "atrule" && node.name === "apply") {
if (lastGroup.length > 0) {
nodeGroups.push(lastGroup);
lastGroup = [];
}
nodeGroups.push([
node
]);
} else {
lastGroup.push(node);
}
}
if (lastGroup.length > 0) {
nodeGroups.push(lastGroup);
}
if (nodeGroups.length === 1) {
continue;
}
for (let group of [
...nodeGroups
].reverse()){
let clone = rule.clone({
nodes: []
});
clone.append(group);
rule.after(clone);
}
rule.remove();
}
}
function expandApplyAtRules() {
return (root)=>{
partitionRules(root);
};
}

View File

@@ -0,0 +1 @@
{"name":"path-is-absolute","version":"1.0.1","files":{"license":{"checkedAt":1678883668052,"integrity":"sha512-rnnnpCCaRRrva3j3sLiBcOeiIzUSasNFUiv06v4IGNpYZarhUHxdwCJO+FRUjHId+ahDcYIvNtUMvNl/qUbu6Q==","mode":420,"size":1119},"package.json":{"checkedAt":1678883672418,"integrity":"sha512-IhelNAiFepmsncBcCbBVWAif1Lx0UBSERSv1E+8QCCWdnpWI7oJGVATNE+CTEFppMsG3erLUQwLA5Kq+AkXS5A==","mode":420,"size":733},"index.js":{"checkedAt":1678883672418,"integrity":"sha512-qBuLyosHHR1rhtuGeoMlKMX7ZVB6Gi5vw5MGrb09eV2pMqxzvie799SW9wJC8H3FhlcDPSyp2FtSDCfAHpMiwg==","mode":420,"size":611},"readme.md":{"checkedAt":1678883672418,"integrity":"sha512-65TCpQkvWIw4kunpD3lsF3BE+63v1D5pUd3H7bDqAtygIuAdV6Fuf+Q+h3gF2T1hDk/C5+GBaM8n00+BiNv9EA==","mode":420,"size":1153}}}

View File

@@ -0,0 +1,40 @@
interface WildcardMatchOptions {
/** Separator to be used to split patterns and samples into segments */
separator?: string | boolean;
/** Flags to pass to the RegExp */
flags?: string;
}
interface isMatch {
/**
* Tests if a sample string matches the pattern(s)
*
* ```js
* isMatch('foo') //=> true
* ```
*/
(sample: string): boolean;
/** Compiled regular expression */
regexp: RegExp;
/** Original pattern or array of patterns that was used to compile the RegExp */
pattern: string | string[];
/** Options that were used to compile the RegExp */
options: WildcardMatchOptions;
}
declare function isMatch(regexp: RegExp, sample: string): boolean;
/**
* Compiles one or more glob patterns into a RegExp and returns an isMatch function.
* The isMatch function takes a sample string as its only argument and returns `true`
* if the string matches the pattern(s).
*
* ```js
* wildcardMatch('src/*.js')('src/index.js') //=> true
* ```
*
* ```js
* const isMatch = wildcardMatch('*.example.com', '.')
* isMatch('foo.example.com') //=> true
* isMatch('foo.bar.com') //=> false
* ```
*/
declare function wildcardMatch(pattern: string | string[], options?: string | boolean | WildcardMatchOptions): isMatch;
export { wildcardMatch as default };

View File

@@ -0,0 +1 @@
{"version":3,"file":"bufferToggle.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferToggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AA6C9C,MAAM,UAAU,YAAY,CAC1B,QAA4B,EAC5B,eAAmD;IAEnD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,OAAO,GAAU,EAAE,CAAC;QAG1B,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAC3B,wBAAwB,CACtB,UAAU,EACV,CAAC,SAAS,EAAE,EAAE;YACZ,MAAM,MAAM,GAAQ,EAAE,CAAC;YACvB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAGrB,MAAM,mBAAmB,GAAG,IAAI,YAAY,EAAE,CAAC;YAE/C,MAAM,UAAU,GAAG,GAAG,EAAE;gBACtB,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBAC3B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACxB,mBAAmB,CAAC,WAAW,EAAE,CAAC;YACpC,CAAC,CAAC;YAGF,mBAAmB,CAAC,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QACnI,CAAC,EACD,IAAI,CACL,CACF,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YAER,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAC5B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACpB;QACH,CAAC,EACD,GAAG,EAAE;YAEH,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAG,CAAC,CAAC;aACnC;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}

View File

@@ -0,0 +1,32 @@
{
"name": "lru-cache",
"description": "A cache object that deletes the least-recently-used items.",
"version": "5.1.1",
"author": "Isaac Z. Schlueter <i@izs.me>",
"keywords": [
"mru",
"lru",
"cache"
],
"scripts": {
"test": "tap test/*.js --100 -J",
"snap": "TAP_SNAPSHOT=1 tap test/*.js -J",
"coveragerport": "tap --coverage-report=html",
"preversion": "npm test",
"postversion": "npm publish",
"postpublish": "git push origin --all; git push origin --tags"
},
"main": "index.js",
"repository": "git://github.com/isaacs/node-lru-cache.git",
"devDependencies": {
"benchmark": "^2.1.4",
"tap": "^12.1.0"
},
"license": "ISC",
"dependencies": {
"yallist": "^3.0.2"
},
"files": [
"index.js"
]
}

View File

@@ -0,0 +1,72 @@
import { SourceMapConsumer } from 'source-map-js'
import { ProcessOptions } from './postcss.js'
/**
* Source map information from input CSS.
* For example, source map after Sass compiler.
*
* This class will automatically find source map in input CSS or in file system
* near input file (according `from` option).
*
* ```js
* const root = parse(css, { from: 'a.sass.css' })
* root.input.map //=> PreviousMap
* ```
*/
export default class PreviousMap {
/**
* Was source map inlined by data-uri to input CSS.
*/
inline: boolean
/**
* `sourceMappingURL` content.
*/
annotation?: string
/**
* Source map file content.
*/
text?: string
/**
* The directory with source map file, if source map is in separated file.
*/
root?: string
/**
* The CSS source identifier. Contains `Input#file` if the user
* set the `from` option, or `Input#id` if they did not.
*/
file?: string
/**
* Path to source map file.
*/
mapFile?: string
/**
* @param css Input CSS source.
* @param opts Process options.
*/
constructor(css: string, opts?: ProcessOptions)
/**
* Create a instance of `SourceMapGenerator` class
* from the `source-map` library to work with source map information.
*
* It is lazy method, so it will create object only on first call
* and then it will use cache.
*
* @return Object with source map information.
*/
consumer(): SourceMapConsumer
/**
* Does source map contains `sourcesContent` with input source text.
*
* @return Is `sourcesContent` present.
*/
withContent(): boolean
}

View File

@@ -0,0 +1,129 @@
# brace-expansion
[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
as known from sh/bash, in JavaScript.
[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)
[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/)
[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)
## Example
```js
var expand = require('brace-expansion');
expand('file-{a,b,c}.jpg')
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
expand('-v{,,}')
// => ['-v', '-v', '-v']
expand('file{0..2}.jpg')
// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
expand('file-{a..c}.jpg')
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
expand('file{2..0}.jpg')
// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
expand('file{0..4..2}.jpg')
// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
expand('file-{a..e..2}.jpg')
// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
expand('file{00..10..5}.jpg')
// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
expand('{{A..C},{a..c}}')
// => ['A', 'B', 'C', 'a', 'b', 'c']
expand('ppp{,config,oe{,conf}}')
// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
```
## API
```js
var expand = require('brace-expansion');
```
### var expanded = expand(str)
Return an array of all possible and valid expansions of `str`. If none are
found, `[str]` is returned.
Valid expansions are:
```js
/^(.*,)+(.+)?$/
// {a,b,...}
```
A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
```js
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
// {x..y[..incr]}
```
A numeric sequence from `x` to `y` inclusive, with optional increment.
If `x` or `y` start with a leading `0`, all the numbers will be padded
to have equal length. Negative numbers and backwards iteration work too.
```js
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
// {x..y[..incr]}
```
An alphabetic sequence from `x` to `y` inclusive, with optional increment.
`x` and `y` must be exactly one character, and if given, `incr` must be a
number.
For compatibility reasons, the string `${` is not eligible for brace expansion.
## Installation
With [npm](https://npmjs.org) do:
```bash
npm install brace-expansion
```
## Contributors
- [Julian Gruber](https://github.com/juliangruber)
- [Isaac Z. Schlueter](https://github.com/isaacs)
## Sponsors
This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
## License
(MIT)
Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,23 @@
const numeric = /^[0-9]+$/
const compareIdentifiers = (a, b) => {
const anum = numeric.test(a)
const bnum = numeric.test(b)
if (anum && bnum) {
a = +a
b = +b
}
return a === b ? 0
: (anum && !bnum) ? -1
: (bnum && !anum) ? 1
: a < b ? -1
: 1
}
const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)
module.exports = {
compareIdentifiers,
rcompareIdentifiers,
}

View File

@@ -0,0 +1,484 @@
var hasInherit = require('./has-inherit');
var everyValuesPair = require('./every-values-pair');
var findComponentIn = require('./find-component-in');
var isComponentOf = require('./is-component-of');
var isMergeableShorthand = require('./is-mergeable-shorthand');
var overridesNonComponentShorthand = require('./overrides-non-component-shorthand');
var sameVendorPrefixesIn = require('./vendor-prefixes').same;
var compactable = require('../compactable');
var deepClone = require('../clone').deep;
var restoreWithComponents = require('../restore-with-components');
var shallowClone = require('../clone').shallow;
var restoreFromOptimizing = require('../../restore-from-optimizing');
var Token = require('../../../tokenizer/token');
var Marker = require('../../../tokenizer/marker');
var serializeProperty = require('../../../writer/one-time').property;
function wouldBreakCompatibility(property, validator) {
for (var i = 0; i < property.components.length; i++) {
var component = property.components[i];
var descriptor = compactable[component.name];
var canOverride = descriptor && descriptor.canOverride || canOverride.sameValue;
var _component = shallowClone(component);
_component.value = [[Token.PROPERTY_VALUE, descriptor.defaultValue]];
if (!everyValuesPair(canOverride.bind(null, validator), _component, component)) {
return true;
}
}
return false;
}
function overrideIntoMultiplex(property, by) {
by.unused = true;
turnIntoMultiplex(by, multiplexSize(property));
property.value = by.value;
}
function overrideByMultiplex(property, by) {
by.unused = true;
property.multiplex = true;
property.value = by.value;
}
function overrideSimple(property, by) {
by.unused = true;
property.value = by.value;
}
function override(property, by) {
if (by.multiplex)
overrideByMultiplex(property, by);
else if (property.multiplex)
overrideIntoMultiplex(property, by);
else
overrideSimple(property, by);
}
function overrideShorthand(property, by) {
by.unused = true;
for (var i = 0, l = property.components.length; i < l; i++) {
override(property.components[i], by.components[i], property.multiplex);
}
}
function turnIntoMultiplex(property, size) {
property.multiplex = true;
if (compactable[property.name].shorthand) {
turnShorthandValueIntoMultiplex(property, size);
} else {
turnLonghandValueIntoMultiplex(property, size);
}
}
function turnShorthandValueIntoMultiplex(property, size) {
var component;
var i, l;
for (i = 0, l = property.components.length; i < l; i++) {
component = property.components[i];
if (!component.multiplex) {
turnLonghandValueIntoMultiplex(component, size);
}
}
}
function turnLonghandValueIntoMultiplex(property, size) {
var descriptor = compactable[property.name];
var withRealValue = descriptor.intoMultiplexMode == 'real';
var withValue = descriptor.intoMultiplexMode == 'real' ?
property.value.slice(0) :
(descriptor.intoMultiplexMode == 'placeholder' ? descriptor.placeholderValue : descriptor.defaultValue);
var i = multiplexSize(property);
var j;
var m = withValue.length;
for (; i < size; i++) {
property.value.push([Token.PROPERTY_VALUE, Marker.COMMA]);
if (Array.isArray(withValue)) {
for (j = 0; j < m; j++) {
property.value.push(withRealValue ? withValue[j] : [Token.PROPERTY_VALUE, withValue[j]]);
}
} else {
property.value.push(withRealValue ? withValue : [Token.PROPERTY_VALUE, withValue]);
}
}
}
function multiplexSize(component) {
var size = 0;
for (var i = 0, l = component.value.length; i < l; i++) {
if (component.value[i][1] == Marker.COMMA)
size++;
}
return size + 1;
}
function lengthOf(property) {
var fakeAsArray = [
Token.PROPERTY,
[Token.PROPERTY_NAME, property.name]
].concat(property.value);
return serializeProperty([fakeAsArray], 0).length;
}
function moreSameShorthands(properties, startAt, name) {
// Since we run the main loop in `compactOverrides` backwards, at this point some
// properties may not be marked as unused.
// We should consider reverting the order if possible
var count = 0;
for (var i = startAt; i >= 0; i--) {
if (properties[i].name == name && !properties[i].unused)
count++;
if (count > 1)
break;
}
return count > 1;
}
function overridingFunction(shorthand, validator) {
for (var i = 0, l = shorthand.components.length; i < l; i++) {
if (!anyValue(validator.isUrl, shorthand.components[i]) && anyValue(validator.isFunction, shorthand.components[i])) {
return true;
}
}
return false;
}
function anyValue(fn, property) {
for (var i = 0, l = property.value.length; i < l; i++) {
if (property.value[i][1] == Marker.COMMA)
continue;
if (fn(property.value[i][1]))
return true;
}
return false;
}
function wouldResultInLongerValue(left, right) {
if (!left.multiplex && !right.multiplex || left.multiplex && right.multiplex)
return false;
var multiplex = left.multiplex ? left : right;
var simple = left.multiplex ? right : left;
var component;
var multiplexClone = deepClone(multiplex);
restoreFromOptimizing([multiplexClone], restoreWithComponents);
var simpleClone = deepClone(simple);
restoreFromOptimizing([simpleClone], restoreWithComponents);
var lengthBefore = lengthOf(multiplexClone) + 1 + lengthOf(simpleClone);
if (left.multiplex) {
component = findComponentIn(multiplexClone, simpleClone);
overrideIntoMultiplex(component, simpleClone);
} else {
component = findComponentIn(simpleClone, multiplexClone);
turnIntoMultiplex(simpleClone, multiplexSize(multiplexClone));
overrideByMultiplex(component, multiplexClone);
}
restoreFromOptimizing([simpleClone], restoreWithComponents);
var lengthAfter = lengthOf(simpleClone);
return lengthBefore <= lengthAfter;
}
function isCompactable(property) {
return property.name in compactable;
}
function noneOverrideHack(left, right) {
return !left.multiplex &&
(left.name == 'background' || left.name == 'background-image') &&
right.multiplex &&
(right.name == 'background' || right.name == 'background-image') &&
anyLayerIsNone(right.value);
}
function anyLayerIsNone(values) {
var layers = intoLayers(values);
for (var i = 0, l = layers.length; i < l; i++) {
if (layers[i].length == 1 && layers[i][0][1] == 'none')
return true;
}
return false;
}
function intoLayers(values) {
var layers = [];
for (var i = 0, layer = [], l = values.length; i < l; i++) {
var value = values[i];
if (value[1] == Marker.COMMA) {
layers.push(layer);
layer = [];
} else {
layer.push(value);
}
}
layers.push(layer);
return layers;
}
function overrideProperties(properties, withMerging, compatibility, validator) {
var mayOverride, right, left, component;
var overriddenComponents;
var overriddenComponent;
var overridingComponent;
var overridable;
var i, j, k;
propertyLoop:
for (i = properties.length - 1; i >= 0; i--) {
right = properties[i];
if (!isCompactable(right))
continue;
if (right.block)
continue;
mayOverride = compactable[right.name].canOverride;
traverseLoop:
for (j = i - 1; j >= 0; j--) {
left = properties[j];
if (!isCompactable(left))
continue;
if (left.block)
continue;
if (left.unused || right.unused)
continue;
if (left.hack && !right.hack && !right.important || !left.hack && !left.important && right.hack)
continue;
if (left.important == right.important && left.hack[0] != right.hack[0])
continue;
if (left.important == right.important && (left.hack[0] != right.hack[0] || (left.hack[1] && left.hack[1] != right.hack[1])))
continue;
if (hasInherit(right))
continue;
if (noneOverrideHack(left, right))
continue;
if (right.shorthand && isComponentOf(right, left)) {
// maybe `left` can be overridden by `right` which is a shorthand?
if (!right.important && left.important)
continue;
if (!sameVendorPrefixesIn([left], right.components))
continue;
if (!anyValue(validator.isFunction, left) && overridingFunction(right, validator))
continue;
if (!isMergeableShorthand(right)) {
left.unused = true;
continue;
}
component = findComponentIn(right, left);
mayOverride = compactable[left.name].canOverride;
if (everyValuesPair(mayOverride.bind(null, validator), left, component)) {
left.unused = true;
}
} else if (right.shorthand && overridesNonComponentShorthand(right, left)) {
// `right` is a shorthand while `left` can be overriden by it, think `border` and `border-top`
if (!right.important && left.important) {
continue;
}
if (!sameVendorPrefixesIn([left], right.components)) {
continue;
}
if (!anyValue(validator.isFunction, left) && overridingFunction(right, validator)) {
continue;
}
overriddenComponents = left.shorthand ?
left.components:
[left];
for (k = overriddenComponents.length - 1; k >= 0; k--) {
overriddenComponent = overriddenComponents[k];
overridingComponent = findComponentIn(right, overriddenComponent);
mayOverride = compactable[overriddenComponent.name].canOverride;
if (!everyValuesPair(mayOverride.bind(null, validator), left, overridingComponent)) {
continue traverseLoop;
}
}
left.unused = true;
} else if (withMerging && left.shorthand && !right.shorthand && isComponentOf(left, right, true)) {
// maybe `right` can be pulled into `left` which is a shorthand?
if (right.important && !left.important)
continue;
if (!right.important && left.important) {
right.unused = true;
continue;
}
// Pending more clever algorithm in #527
if (moreSameShorthands(properties, i - 1, left.name))
continue;
if (overridingFunction(left, validator))
continue;
if (!isMergeableShorthand(left))
continue;
component = findComponentIn(left, right);
if (everyValuesPair(mayOverride.bind(null, validator), component, right)) {
var disabledBackgroundMerging =
!compatibility.properties.backgroundClipMerging && component.name.indexOf('background-clip') > -1 ||
!compatibility.properties.backgroundOriginMerging && component.name.indexOf('background-origin') > -1 ||
!compatibility.properties.backgroundSizeMerging && component.name.indexOf('background-size') > -1;
var nonMergeableValue = compactable[right.name].nonMergeableValue === right.value[0][1];
if (disabledBackgroundMerging || nonMergeableValue)
continue;
if (!compatibility.properties.merging && wouldBreakCompatibility(left, validator))
continue;
if (component.value[0][1] != right.value[0][1] && (hasInherit(left) || hasInherit(right)))
continue;
if (wouldResultInLongerValue(left, right))
continue;
if (!left.multiplex && right.multiplex)
turnIntoMultiplex(left, multiplexSize(right));
override(component, right);
left.dirty = true;
}
} else if (withMerging && left.shorthand && right.shorthand && left.name == right.name) {
// merge if all components can be merged
if (!left.multiplex && right.multiplex)
continue;
if (!right.important && left.important) {
right.unused = true;
continue propertyLoop;
}
if (right.important && !left.important) {
left.unused = true;
continue;
}
if (!isMergeableShorthand(right)) {
left.unused = true;
continue;
}
for (k = left.components.length - 1; k >= 0; k--) {
var leftComponent = left.components[k];
var rightComponent = right.components[k];
mayOverride = compactable[leftComponent.name].canOverride;
if (!everyValuesPair(mayOverride.bind(null, validator), leftComponent, rightComponent))
continue propertyLoop;
}
overrideShorthand(left, right);
left.dirty = true;
} else if (withMerging && left.shorthand && right.shorthand && isComponentOf(left, right)) {
// border is a shorthand but any of its components is a shorthand too
if (!left.important && right.important)
continue;
component = findComponentIn(left, right);
mayOverride = compactable[right.name].canOverride;
if (!everyValuesPair(mayOverride.bind(null, validator), component, right))
continue;
if (left.important && !right.important) {
right.unused = true;
continue;
}
var rightRestored = compactable[right.name].restore(right, compactable);
if (rightRestored.length > 1)
continue;
component = findComponentIn(left, right);
override(component, right);
right.dirty = true;
} else if (left.name == right.name) {
// two non-shorthands should be merged based on understandability
overridable = true;
if (right.shorthand) {
for (k = right.components.length - 1; k >= 0 && overridable; k--) {
overriddenComponent = left.components[k];
overridingComponent = right.components[k];
mayOverride = compactable[overridingComponent.name].canOverride;
overridable = overridable && everyValuesPair(mayOverride.bind(null, validator), overriddenComponent, overridingComponent);
}
} else {
mayOverride = compactable[right.name].canOverride;
overridable = everyValuesPair(mayOverride.bind(null, validator), left, right);
}
if (left.important && !right.important && overridable) {
right.unused = true;
continue;
}
if (!left.important && right.important && overridable) {
left.unused = true;
continue;
}
if (!overridable) {
continue;
}
left.unused = true;
}
}
}
}
module.exports = overrideProperties;

View File

@@ -0,0 +1,28 @@
import { ASTNode, Type, AnyType, Field } from "./lib/types";
import { NodePath } from "./lib/node-path";
import { namedTypes } from "./gen/namedTypes";
import { builders } from "./gen/builders";
import { Visitor } from "./gen/visitor";
declare const astNodesAreEquivalent: {
(a: any, b: any, problemPath?: any): boolean;
assert(a: any, b: any): void;
}, builders: builders, builtInTypes: {
string: Type<string>;
function: Type<Function>;
array: Type<any[]>;
object: Type<{
[key: string]: any;
}>;
RegExp: Type<RegExp>;
Date: Type<Date>;
number: Type<number>;
boolean: Type<boolean>;
null: Type<null>;
undefined: Type<undefined>;
}, defineMethod: (name: any, func?: Function | undefined) => Function, eachField: (object: any, callback: (name: any, value: any) => any, context?: any) => void, finalize: () => void, getBuilderName: (typeName: any) => any, getFieldNames: (object: any) => string[], getFieldValue: (object: any, fieldName: any) => any, getSupertypeNames: (typeName: string) => string[], NodePath: import("./lib/node-path").NodePathConstructor, Path: import("./lib/path").PathConstructor, PathVisitor: import("./lib/path-visitor").PathVisitorConstructor, someField: (object: any, callback: (name: any, value: any) => any, context?: any) => boolean, Type: {
or(...types: any[]): Type<any>;
from<T>(value: any, name?: string | undefined): Type<T>;
def(typeName: string): import("./lib/types").Def<any>;
hasDef(typeName: string): boolean;
}, use: <T>(plugin: import("./types").Plugin<T>) => T, visit: <M = {}>(node: ASTNode, methods?: Visitor<M> | undefined) => any;
export { AnyType, ASTNode, astNodesAreEquivalent, builders, builtInTypes, defineMethod, eachField, Field, finalize, getBuilderName, getFieldNames, getFieldValue, getSupertypeNames, namedTypes, NodePath, Path, PathVisitor, someField, Type, use, visit, Visitor, };

View File

@@ -0,0 +1,2 @@
if(typeof cptable === 'undefined') cptable = {};
cptable[21025] = (function(){ var d = "ŸŸ\u0002\u0003œ\t†—Ž\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013…\b‡\u0018\u0019’\u001c\u001d\u001e\u001f€‚ƒ„\n\u0017\u001bˆ‰Š‹Œ\u0005\u0006\u0007‘\u0016“”•–\u0004˜™š›\u0014\u0015ž\u001a  ђѓёєѕіїј[.<(+!&љњћќўџЪ№Ђ]$*);^-/ЃЁЄЅІЇЈЉ|,%_>?ЊЋЌ­ЎЏюаб`:#@'=\"цabcdefghiдефгхийjklmnopqrклмнопя~stuvwxyzрстужвьызшэщчъЮАБЦДЕФГ{ABCDEFGHIХИЙКЛМ}JKLMNOPQRНОПЯРС\\§STUVWXYZТУЖВЬЫ0123456789ЗШЭЩЧŸ", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {"enc": e, "dec": D }; })();

View File

@@ -0,0 +1,2 @@
declare function isThenable(value: any): boolean;
export default isThenable;

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"P Q R S T U V W","2":"C K L G M N O","1025":"X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h EC FC","260":"lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB"},D:{"1":"lB mB nB oB pB P Q R S T U V W","2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB","132":"ZB vB aB bB cB dB eB fB gB hB iB jB kB h","1025":"X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"2":"I v J D E F A B HC zB IC JC KC LC 0B","772":"C K L G qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"1":"aB bB cB dB eB fB gB hB iB jB kB h lB","2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB PC QC RC SC qB AC TC rB","132":"NB OB PB QB RB SB TB UB VB WB XB YB ZB","1025":"mB nB oB pB P Q R wB S T U V W X Y Z a b c d e"},G:{"2":"E zB UC BC VC WC XC YC ZC aC bC cC dC","772":"eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"2":"A B C qB AC rB","1025":"h"},L:{"1025":"H"},M:{"260":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"1":"g 1C 2C 3C 4C 5C sB 6C 7C 8C","2":"I wC xC yC","132":"zC 0C 0B"},Q:{"132":"1B"},R:{"1025":"9C"},S:{"2":"AD","260":"BD"}},B:7,C:"Feature Policy"};

View File

@@ -0,0 +1 @@
{"version":3,"file":"Action.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/Action.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAiB/C;IAA+B,0BAAY;IACzC,gBAAY,SAAoB,EAAE,IAAmD;eACnF,iBAAO;IACT,CAAC;IAWM,yBAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IACH,aAAC;AAAD,CAAC,AAjBD,CAA+B,YAAY,GAiB1C"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"auditTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/auditTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAkD5C,MAAM,UAAU,SAAS,CAAI,QAAgB,EAAE,SAAyC;IAAzC,0BAAA,EAAA,0BAAyC;IACtF,OAAO,KAAK,CAAC,cAAM,OAAA,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,EAA1B,CAA0B,CAAC,CAAC;AACjD,CAAC"}

View File

@@ -0,0 +1,37 @@
{
"name": "ms",
"version": "2.1.2",
"description": "Tiny millisecond conversion utility",
"repository": "zeit/ms",
"main": "./index",
"files": [
"index.js"
],
"scripts": {
"precommit": "lint-staged",
"lint": "eslint lib/* bin/*",
"test": "mocha tests.js"
},
"eslintConfig": {
"extends": "eslint:recommended",
"env": {
"node": true,
"es6": true
}
},
"lint-staged": {
"*.js": [
"npm run lint",
"prettier --single-quote --write",
"git add"
]
},
"license": "MIT",
"devDependencies": {
"eslint": "4.12.1",
"expect.js": "0.3.1",
"husky": "0.14.3",
"lint-staged": "5.0.0",
"mocha": "4.0.1"
}
}

View File

@@ -0,0 +1,83 @@
import { timeData } from './time-data.generated';
/**
* Returns the best matching date time pattern if a date time skeleton
* pattern is provided with a locale. Follows the Unicode specification:
* https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns
* @param skeleton date time skeleton pattern that possibly includes j, J or C
* @param locale
*/
export function getBestPattern(skeleton, locale) {
var skeletonCopy = '';
for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {
var patternChar = skeleton.charAt(patternPos);
if (patternChar === 'j') {
var extraLength = 0;
while (patternPos + 1 < skeleton.length &&
skeleton.charAt(patternPos + 1) === patternChar) {
extraLength++;
patternPos++;
}
var hourLen = 1 + (extraLength & 1);
var dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);
var dayPeriodChar = 'a';
var hourChar = getDefaultHourSymbolFromLocale(locale);
if (hourChar == 'H' || hourChar == 'k') {
dayPeriodLen = 0;
}
while (dayPeriodLen-- > 0) {
skeletonCopy += dayPeriodChar;
}
while (hourLen-- > 0) {
skeletonCopy = hourChar + skeletonCopy;
}
}
else if (patternChar === 'J') {
skeletonCopy += 'H';
}
else {
skeletonCopy += patternChar;
}
}
return skeletonCopy;
}
/**
* Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)
* of the given `locale` to the corresponding time pattern.
* @param locale
*/
function getDefaultHourSymbolFromLocale(locale) {
var hourCycle = locale.hourCycle;
if (hourCycle === undefined &&
// @ts-ignore hourCycle(s) is not identified yet
locale.hourCycles &&
// @ts-ignore
locale.hourCycles.length) {
// @ts-ignore
hourCycle = locale.hourCycles[0];
}
if (hourCycle) {
switch (hourCycle) {
case 'h24':
return 'k';
case 'h23':
return 'H';
case 'h12':
return 'h';
case 'h11':
return 'K';
default:
throw new Error('Invalid hourCycle');
}
}
// TODO: Once hourCycle is fully supported remove the following with data generation
var languageTag = locale.language;
var regionTag;
if (languageTag !== 'root') {
regionTag = locale.maximize().region;
}
var hourCycles = timeData[regionTag || ''] ||
timeData[languageTag || ''] ||
timeData["".concat(languageTag, "-001")] ||
timeData['001'];
return hourCycles[0];
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"regex.generated.d.ts","sourceRoot":"","sources":["../../../../../../packages/icu-messageformat-parser/regex.generated.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,qBAAqB,QAAiD,CAAA;AACnF,eAAO,MAAM,iBAAiB,QAAyC,CAAA"}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L","578":"G"},C:{"1":"TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB EC FC","194":"NB OB PB QB RB","1025":"SB"},D:{"1":"XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB","322":"RB SB TB UB VB WB"},E:{"1":"B C K L G qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v J D E F A HC zB IC JC KC LC 0B"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB PC QC RC SC qB AC TC rB","322":"EB FB GB HB IB JB"},G:{"1":"dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"E zB UC BC VC WC XC YC ZC aC bC cC"},H:{"2":"oC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"1":"vC"},P:{"1":"g yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C","2":"I wC xC"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"BD","194":"AD"}},B:6,C:"WebAssembly"};

View File

@@ -0,0 +1 @@
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../../../../../../packages/intl-messageformat/src/formatters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAWL,oBAAoB,EAGrB,MAAM,oCAAoC,CAAA;AAS3C,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAA;IAC3C,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAA;IAChD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAA;CACjD;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAA;IAC3C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,CAAC,CAAA;IAC7C,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,CAAA;CAC9C;AAED,MAAM,WAAW,UAAU;IACzB,eAAe,CACb,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,IAAI,CAAC,EAAE,mBAAmB,GACzB,IAAI,CAAC,YAAY,CAAA;IACpB,iBAAiB,CACf,GAAG,IAAI,EAAE,qBAAqB,CAAC,OAAO,IAAI,CAAC,cAAc,CAAC,GACzD,IAAI,CAAC,cAAc,CAAA;IACtB,cAAc,CACZ,GAAG,IAAI,EAAE,qBAAqB,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,GACtD,IAAI,CAAC,WAAW,CAAA;CACpB;AAED,oBAAY,SAAS;IACnB,OAAO,IAAA;IACP,MAAM,IAAA;CACP;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,SAAS,CAAC,OAAO,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,GAAG;IACjC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAA;IACtB,KAAK,EAAE,CAAC,CAAA;CACT;AAED,oBAAY,iBAAiB,CAAC,CAAC,IAAI,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,CAAA;AAE9D,oBAAY,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAA;AAuB/E,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,EAAE,EAAE,aAAa,GAAG,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,GAC5C,EAAE,IAAI,kBAAkB,CAAC,CAAC,CAAC,CAE7B;AAGD,wBAAgB,aAAa,CAAC,CAAC,EAC7B,GAAG,EAAE,oBAAoB,EAAE,EAC3B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAClE,kBAAkB,CAAC,EAAE,MAAM,EAE3B,eAAe,CAAC,EAAE,MAAM,GACvB,iBAAiB,CAAC,CAAC,CAAC,EAAE,CA6LxB;AAED,oBAAY,kBAAkB,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CACtE,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,KACrB,CAAC,CAAA"}

View File

@@ -0,0 +1,277 @@
import { parseColor } from './color'
import { parseBoxShadowValue } from './parseBoxShadowValue'
import { splitAtTopLevelOnly } from './splitAtTopLevelOnly'
let cssFunctions = ['min', 'max', 'clamp', 'calc']
// Ref: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Types
function isCSSFunction(value) {
return cssFunctions.some((fn) => new RegExp(`^${fn}\\(.*\\)`).test(value))
}
const placeholder = '--tw-placeholder'
const placeholderRe = new RegExp(placeholder, 'g')
// This is not a data type, but rather a function that can normalize the
// correct values.
export function normalize(value, isRoot = true) {
// Keep raw strings if it starts with `url(`
if (value.includes('url(')) {
return value
.split(/(url\(.*?\))/g)
.filter(Boolean)
.map((part) => {
if (/^url\(.*?\)$/.test(part)) {
return part
}
return normalize(part, false)
})
.join('')
}
// Convert `_` to ` `, except for escaped underscores `\_`
value = value
.replace(
/([^\\])_+/g,
(fullMatch, characterBefore) => characterBefore + ' '.repeat(fullMatch.length - 1)
)
.replace(/^_/g, ' ')
.replace(/\\_/g, '_')
// Remove leftover whitespace
if (isRoot) {
value = value.trim()
}
// Add spaces around operators inside math functions like calc() that do not follow an operator
// or '('.
value = value.replace(/(calc|min|max|clamp)\(.+\)/g, (match) => {
let vars = []
return match
.replace(/var\((--.+?)[,)]/g, (match, g1) => {
vars.push(g1)
return match.replace(g1, placeholder)
})
.replace(/(-?\d*\.?\d(?!\b-\d.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, '$1 $2 ')
.replace(placeholderRe, () => vars.shift())
})
return value
}
export function url(value) {
return value.startsWith('url(')
}
export function number(value) {
return !isNaN(Number(value)) || isCSSFunction(value)
}
export function percentage(value) {
return (value.endsWith('%') && number(value.slice(0, -1))) || isCSSFunction(value)
}
// Please refer to MDN when updating this list:
// https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units
// https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Container_Queries#container_query_length_units
let lengthUnits = [
'cm',
'mm',
'Q',
'in',
'pc',
'pt',
'px',
'em',
'ex',
'ch',
'rem',
'lh',
'rlh',
'vw',
'vh',
'vmin',
'vmax',
'vb',
'vi',
'svw',
'svh',
'lvw',
'lvh',
'dvw',
'dvh',
'cqw',
'cqh',
'cqi',
'cqb',
'cqmin',
'cqmax',
]
let lengthUnitsPattern = `(?:${lengthUnits.join('|')})`
export function length(value) {
return (
value === '0' ||
new RegExp(`^[+-]?[0-9]*\.?[0-9]+(?:[eE][+-]?[0-9]+)?${lengthUnitsPattern}$`).test(value) ||
isCSSFunction(value)
)
}
let lineWidths = new Set(['thin', 'medium', 'thick'])
export function lineWidth(value) {
return lineWidths.has(value)
}
export function shadow(value) {
let parsedShadows = parseBoxShadowValue(normalize(value))
for (let parsedShadow of parsedShadows) {
if (!parsedShadow.valid) {
return false
}
}
return true
}
export function color(value) {
let colors = 0
let result = splitAtTopLevelOnly(value, '_').every((part) => {
part = normalize(part)
if (part.startsWith('var(')) return true
if (parseColor(part, { loose: true }) !== null) return colors++, true
return false
})
if (!result) return false
return colors > 0
}
export function image(value) {
let images = 0
let result = splitAtTopLevelOnly(value, ',').every((part) => {
part = normalize(part)
if (part.startsWith('var(')) return true
if (
url(part) ||
gradient(part) ||
['element(', 'image(', 'cross-fade(', 'image-set('].some((fn) => part.startsWith(fn))
) {
images++
return true
}
return false
})
if (!result) return false
return images > 0
}
let gradientTypes = new Set([
'linear-gradient',
'radial-gradient',
'repeating-linear-gradient',
'repeating-radial-gradient',
'conic-gradient',
])
export function gradient(value) {
value = normalize(value)
for (let type of gradientTypes) {
if (value.startsWith(`${type}(`)) {
return true
}
}
return false
}
let validPositions = new Set(['center', 'top', 'right', 'bottom', 'left'])
export function position(value) {
let positions = 0
let result = splitAtTopLevelOnly(value, '_').every((part) => {
part = normalize(part)
if (part.startsWith('var(')) return true
if (validPositions.has(part) || length(part) || percentage(part)) {
positions++
return true
}
return false
})
if (!result) return false
return positions > 0
}
export function familyName(value) {
let fonts = 0
let result = splitAtTopLevelOnly(value, ',').every((part) => {
part = normalize(part)
if (part.startsWith('var(')) return true
// If it contains spaces, then it should be quoted
if (part.includes(' ')) {
if (!/(['"])([^"']+)\1/g.test(part)) {
return false
}
}
// If it starts with a number, it's invalid
if (/^\d/g.test(part)) {
return false
}
fonts++
return true
})
if (!result) return false
return fonts > 0
}
let genericNames = new Set([
'serif',
'sans-serif',
'monospace',
'cursive',
'fantasy',
'system-ui',
'ui-serif',
'ui-sans-serif',
'ui-monospace',
'ui-rounded',
'math',
'emoji',
'fangsong',
])
export function genericName(value) {
return genericNames.has(value)
}
let absoluteSizes = new Set([
'xx-small',
'x-small',
'small',
'medium',
'large',
'x-large',
'x-large',
'xxx-large',
])
export function absoluteSize(value) {
return absoluteSizes.has(value)
}
let relativeSizes = new Set(['larger', 'smaller'])
export function relativeSize(value) {
return relativeSizes.has(value)
}

View File

@@ -0,0 +1,5 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

View File

@@ -0,0 +1,12 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
// http://262.ecma-international.org/5.1/#sec-9.8
module.exports = function ToString(value) {
return $String(value);
};

View File

@@ -0,0 +1,14 @@
import Renderer from '../Renderer';
import Block from '../Block';
import Text from '../../nodes/Text';
import Wrapper from './shared/Wrapper';
import { Identifier } from 'estree';
export default class TextWrapper extends Wrapper {
node: Text;
data: string;
skip: boolean;
var: Identifier;
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: Text, data: string);
use_space(): boolean;
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
}

Some files were not shown because too many files have changed in this diff Show More