isomorfeus-preact 10.6.14 → 10.6.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isomorfeus-preact.rb +3 -3
  3. data/lib/isomorfeus_preact/lucid_component/api.rb +1 -1
  4. data/lib/isomorfeus_preact/lucid_component/initializer.rb +2 -2
  5. data/lib/isomorfeus_preact/lucid_func/initializer.rb +1 -1
  6. data/lib/isomorfeus_preact/preact/function_component/initializer.rb +1 -1
  7. data/lib/preact/component/api.rb +1 -1
  8. data/lib/preact/component/callbacks.rb +6 -6
  9. data/lib/preact/component/initializer.rb +2 -2
  10. data/lib/preact/component/native_component_constructor.rb +1 -1
  11. data/lib/preact/props.rb +51 -0
  12. data/lib/preact/state.rb +67 -0
  13. data/lib/preact/version.rb +1 -1
  14. data/lib/preact.rb +2 -2
  15. data/node_modules/.package-lock.json +3 -3
  16. data/node_modules/preact/LICENSE +21 -21
  17. data/node_modules/preact/README.md +187 -187
  18. data/node_modules/preact/compat/dist/compat.js +1 -1
  19. data/node_modules/preact/compat/dist/compat.js.map +1 -1
  20. data/node_modules/preact/compat/dist/compat.mjs +1 -1
  21. data/node_modules/preact/compat/dist/compat.module.js +1 -1
  22. data/node_modules/preact/compat/dist/compat.module.js.map +1 -1
  23. data/node_modules/preact/compat/dist/compat.umd.js +1 -1
  24. data/node_modules/preact/compat/dist/compat.umd.js.map +1 -1
  25. data/node_modules/preact/compat/jsx-dev-runtime.js +1 -1
  26. data/node_modules/preact/compat/jsx-dev-runtime.mjs +1 -1
  27. data/node_modules/preact/compat/jsx-runtime.js +1 -1
  28. data/node_modules/preact/compat/jsx-runtime.mjs +1 -1
  29. data/node_modules/preact/compat/package.json +19 -19
  30. data/node_modules/preact/compat/scheduler.js +15 -15
  31. data/node_modules/preact/compat/scheduler.mjs +23 -23
  32. data/node_modules/preact/compat/server.js +15 -15
  33. data/node_modules/preact/compat/server.mjs +4 -4
  34. data/node_modules/preact/compat/src/Children.js +21 -21
  35. data/node_modules/preact/compat/src/PureComponent.js +15 -15
  36. data/node_modules/preact/compat/src/forwardRef.js +51 -51
  37. data/node_modules/preact/compat/src/index.d.ts +141 -141
  38. data/node_modules/preact/compat/src/index.js +187 -187
  39. data/node_modules/preact/compat/src/internal.d.ts +47 -47
  40. data/node_modules/preact/compat/src/memo.js +34 -34
  41. data/node_modules/preact/compat/src/portals.js +80 -80
  42. data/node_modules/preact/compat/src/render.js +229 -230
  43. data/node_modules/preact/compat/src/suspense-list.d.ts +14 -14
  44. data/node_modules/preact/compat/src/suspense-list.js +126 -126
  45. data/node_modules/preact/compat/src/suspense.d.ts +15 -15
  46. data/node_modules/preact/compat/src/suspense.js +270 -270
  47. data/node_modules/preact/compat/src/util.js +28 -28
  48. data/node_modules/preact/compat/test-utils.js +1 -1
  49. data/node_modules/preact/debug/dist/debug.js.map +1 -1
  50. data/node_modules/preact/debug/dist/debug.module.js.map +1 -1
  51. data/node_modules/preact/debug/dist/debug.umd.js.map +1 -1
  52. data/node_modules/preact/debug/package.json +18 -18
  53. data/node_modules/preact/debug/src/check-props.js +54 -54
  54. data/node_modules/preact/debug/src/component-stack.js +146 -146
  55. data/node_modules/preact/debug/src/constants.js +3 -3
  56. data/node_modules/preact/debug/src/debug.js +442 -442
  57. data/node_modules/preact/debug/src/index.js +6 -6
  58. data/node_modules/preact/debug/src/internal.d.ts +82 -82
  59. data/node_modules/preact/debug/src/util.js +11 -11
  60. data/node_modules/preact/devtools/dist/devtools.js +1 -1
  61. data/node_modules/preact/devtools/dist/devtools.js.map +1 -1
  62. data/node_modules/preact/devtools/dist/devtools.mjs +1 -1
  63. data/node_modules/preact/devtools/dist/devtools.module.js +1 -1
  64. data/node_modules/preact/devtools/dist/devtools.module.js.map +1 -1
  65. data/node_modules/preact/devtools/dist/devtools.umd.js +1 -1
  66. data/node_modules/preact/devtools/dist/devtools.umd.js.map +1 -1
  67. data/node_modules/preact/devtools/package.json +16 -16
  68. data/node_modules/preact/devtools/src/devtools.js +10 -10
  69. data/node_modules/preact/devtools/src/index.d.ts +8 -8
  70. data/node_modules/preact/devtools/src/index.js +15 -15
  71. data/node_modules/preact/dist/preact.js.map +1 -1
  72. data/node_modules/preact/dist/preact.min.js.map +1 -1
  73. data/node_modules/preact/dist/preact.module.js.map +1 -1
  74. data/node_modules/preact/dist/preact.umd.js.map +1 -1
  75. data/node_modules/preact/hooks/dist/hooks.js +1 -1
  76. data/node_modules/preact/hooks/dist/hooks.js.map +1 -1
  77. data/node_modules/preact/hooks/dist/hooks.mjs +1 -1
  78. data/node_modules/preact/hooks/dist/hooks.module.js +1 -1
  79. data/node_modules/preact/hooks/dist/hooks.module.js.map +1 -1
  80. data/node_modules/preact/hooks/dist/hooks.umd.js +1 -1
  81. data/node_modules/preact/hooks/dist/hooks.umd.js.map +1 -1
  82. data/node_modules/preact/hooks/package.json +26 -26
  83. data/node_modules/preact/hooks/src/index.d.ts +139 -139
  84. data/node_modules/preact/hooks/src/index.js +386 -388
  85. data/node_modules/preact/hooks/src/internal.d.ts +75 -75
  86. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.js.map +1 -1
  87. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js.map +1 -1
  88. data/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js.map +1 -1
  89. data/node_modules/preact/jsx-runtime/package.json +19 -19
  90. data/node_modules/preact/jsx-runtime/src/index.d.ts +50 -50
  91. data/node_modules/preact/jsx-runtime/src/index.js +77 -77
  92. data/node_modules/preact/package.json +291 -287
  93. data/node_modules/preact/src/cjs.js +3 -3
  94. data/node_modules/preact/src/clone-element.js +34 -34
  95. data/node_modules/preact/src/component.js +225 -225
  96. data/node_modules/preact/src/constants.js +3 -3
  97. data/node_modules/preact/src/create-context.js +68 -68
  98. data/node_modules/preact/src/create-element.js +98 -98
  99. data/node_modules/preact/src/diff/catch-error.js +38 -38
  100. data/node_modules/preact/src/diff/children.js +335 -335
  101. data/node_modules/preact/src/diff/index.js +516 -516
  102. data/node_modules/preact/src/diff/props.js +158 -158
  103. data/node_modules/preact/src/index.d.ts +310 -310
  104. data/node_modules/preact/src/index.js +13 -13
  105. data/node_modules/preact/src/internal.d.ts +146 -146
  106. data/node_modules/preact/src/jsx.d.ts +1005 -1005
  107. data/node_modules/preact/src/options.js +16 -16
  108. data/node_modules/preact/src/render.js +75 -75
  109. data/node_modules/preact/src/util.js +27 -27
  110. data/node_modules/preact/test-utils/dist/testUtils.js.map +1 -1
  111. data/node_modules/preact/test-utils/dist/testUtils.module.js.map +1 -1
  112. data/node_modules/preact/test-utils/dist/testUtils.umd.js.map +1 -1
  113. data/node_modules/preact/test-utils/package.json +19 -19
  114. data/node_modules/preact/test-utils/src/index.d.ts +3 -3
  115. data/node_modules/preact/test-utils/src/index.js +117 -117
  116. data/package.json +1 -1
  117. metadata +4 -4
  118. data/lib/preact/component/props.rb +0 -55
  119. data/lib/preact/component/state.rb +0 -58
@@ -1,187 +1,187 @@
1
- <p align="center">
2
- <a href="https://preactjs.com" target="_blank">
3
-
4
- ![Preact](https://raw.githubusercontent.com/preactjs/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true "Preact")
5
-
6
- </a>
7
- </p>
8
- <p align="center">Fast <b>3kB</b> alternative to React with the same modern API.</p>
9
-
10
- **All the power of Virtual DOM components, without the overhead:**
11
-
12
- - Familiar React API & patterns: ES6 Class, hooks, and Functional Components
13
- - Extensive React compatibility via a simple [preact/compat] alias
14
- - Everything you need: JSX, <abbr title="Virtual DOM">VDOM</abbr>, [DevTools], <abbr title="Hot Module Replacement">HMR</abbr>, <abbr title="Server-Side Rendering">SSR</abbr>.
15
- - Highly optimized diff algorithm and seamless hydration from Server Side Rendering
16
- - Supports all modern browsers and IE11
17
- - Transparent asynchronous rendering with a pluggable scheduler
18
- - **Instant production-grade app setup with [Preact CLI](https://github.com/preactjs/preact-cli)**
19
-
20
- ### 💁 More information at the [Preact Website ➞](https://preactjs.com)
21
-
22
-
23
- <table border="0">
24
- <tbody>
25
- <tr>
26
- <td>
27
-
28
- [![npm](https://img.shields.io/npm/v/preact.svg)](http://npm.im/preact)
29
- [![Preact Slack Community](https://preact-slack.now.sh/badge.svg)](https://chat.preactjs.com)
30
- [![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)
31
- [![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)
32
-
33
- [![coveralls](https://img.shields.io/coveralls/preactjs/preact/master.svg)](https://coveralls.io/github/preactjs/preact)
34
- [![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip&label=gzip)](https://unpkg.com/preact/dist/preact.min.js)
35
- [![brotli size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=brotli&label=brotli)](https://unpkg.com/preact/dist/preact.min.js)
36
- </td>
37
- <td>
38
-
39
- <img src="https://saucelabs.com/browser-matrix/preact.svg" title="Browser support matrix">
40
-
41
- </td>
42
- </tr>
43
- </tbody>
44
- </table>
45
-
46
-
47
- You can find some awesome libraries in the [awesome-preact list](https://github.com/preactjs/awesome-preact) :sunglasses:
48
-
49
- ---
50
-
51
- ## Getting Started
52
-
53
- > 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_
54
-
55
- The easiest way to get started with Preact is to use [Preact CLI](https://github.com/preactjs/preact-cli). This simple command-line tool wraps up the best possible tooling for you, and even keeps things like Webpack and Babel up-to-date as they change. Best of all, it's easy to understand! Start a project or compile for production in a single command (`preact build`), with no configuration needed and best practices baked in! 🙌
56
-
57
- #### Tutorial: Building UI with Preact
58
-
59
- With Preact, you create user interfaces by assembling trees of components and elements. Components are functions or classes that return a description of what their tree should output. These descriptions are typically written in [JSX](https://facebook.github.io/jsx/) (shown underneath), or [HTM](https://github.com/developit/htm) which leverages standard JavaScript Tagged Templates. Both syntaxes can express trees of elements with "props" (similar to HTML attributes) and children.
60
-
61
- To get started using Preact, first look at the render() function. This function accepts a tree description and creates the structure described. Next, it appends this structure to a parent DOM element provided as the second argument. Future calls to render() will reuse the existing tree and update it in-place in the DOM. Internally, render() will calculate the difference from previous outputted structures in an attempt to perform as few DOM operations as possible.
62
-
63
- ```js
64
- import { h, render } from 'preact';
65
- // Tells babel to use h for JSX. It's better to configure this globally.
66
- // See https://babeljs.io/docs/en/babel-plugin-transform-react-jsx#usage
67
- // In tsconfig you can specify this with the jsxFactory
68
- /** @jsx h */
69
-
70
- // create our tree and append it to document.body:
71
- render(<main><h1>Hello</h1></main>, document.body);
72
-
73
- // update the tree in-place:
74
- render(<main><h1>Hello World!</h1></main>, document.body);
75
- // ^ this second invocation of render(...) will use a single DOM call to update the text of the <h1>
76
- ```
77
-
78
- Hooray! render() has taken our structure and output a User Interface! This approach demonstrates a simple case, but would be difficult to use as an application grows in complexity. Each change would be forced to calculate the difference between the current and updated structure for the entire application. Components can help here – by dividing the User Interface into nested Components each can calculate their difference from their mounted point. Here's an example:
79
-
80
- ```js
81
- import { render, h } from 'preact';
82
- import { useState } from 'preact/hooks';
83
-
84
- /** @jsx h */
85
-
86
- const App = () => {
87
- const [input, setInput] = useState('');
88
-
89
- return (
90
- <div>
91
- <p>Do you agree to the statement: "Preact is awesome"?</p>
92
- <input value={input} onChange={e => setInput(e.target.value)} />
93
- </div>
94
- )
95
- }
96
-
97
- render(<App />, document.body);
98
- ```
99
-
100
- ---
101
-
102
- ## Backers
103
-
104
- Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]
105
-
106
- <a href="https://opencollective.com/preact/backer/0/website" target="_blank"><img src="https://opencollective.com/preact/backer/0/avatar.svg"></a>
107
- <a href="https://opencollective.com/preact/backer/1/website" target="_blank"><img src="https://opencollective.com/preact/backer/1/avatar.svg"></a>
108
- <a href="https://opencollective.com/preact/backer/2/website" target="_blank"><img src="https://opencollective.com/preact/backer/2/avatar.svg"></a>
109
- <a href="https://opencollective.com/preact/backer/3/website" target="_blank"><img src="https://opencollective.com/preact/backer/3/avatar.svg"></a>
110
- <a href="https://opencollective.com/preact/backer/4/website" target="_blank"><img src="https://opencollective.com/preact/backer/4/avatar.svg"></a>
111
- <a href="https://opencollective.com/preact/backer/5/website" target="_blank"><img src="https://opencollective.com/preact/backer/5/avatar.svg"></a>
112
- <a href="https://opencollective.com/preact/backer/6/website" target="_blank"><img src="https://opencollective.com/preact/backer/6/avatar.svg"></a>
113
- <a href="https://opencollective.com/preact/backer/7/website" target="_blank"><img src="https://opencollective.com/preact/backer/7/avatar.svg"></a>
114
- <a href="https://opencollective.com/preact/backer/8/website" target="_blank"><img src="https://opencollective.com/preact/backer/8/avatar.svg"></a>
115
- <a href="https://opencollective.com/preact/backer/9/website" target="_blank"><img src="https://opencollective.com/preact/backer/9/avatar.svg"></a>
116
- <a href="https://opencollective.com/preact/backer/10/website" target="_blank"><img src="https://opencollective.com/preact/backer/10/avatar.svg"></a>
117
- <a href="https://opencollective.com/preact/backer/11/website" target="_blank"><img src="https://opencollective.com/preact/backer/11/avatar.svg"></a>
118
- <a href="https://opencollective.com/preact/backer/12/website" target="_blank"><img src="https://opencollective.com/preact/backer/12/avatar.svg"></a>
119
- <a href="https://opencollective.com/preact/backer/13/website" target="_blank"><img src="https://opencollective.com/preact/backer/13/avatar.svg"></a>
120
- <a href="https://opencollective.com/preact/backer/14/website" target="_blank"><img src="https://opencollective.com/preact/backer/14/avatar.svg"></a>
121
- <a href="https://opencollective.com/preact/backer/15/website" target="_blank"><img src="https://opencollective.com/preact/backer/15/avatar.svg"></a>
122
- <a href="https://opencollective.com/preact/backer/16/website" target="_blank"><img src="https://opencollective.com/preact/backer/16/avatar.svg"></a>
123
- <a href="https://opencollective.com/preact/backer/17/website" target="_blank"><img src="https://opencollective.com/preact/backer/17/avatar.svg"></a>
124
- <a href="https://opencollective.com/preact/backer/18/website" target="_blank"><img src="https://opencollective.com/preact/backer/18/avatar.svg"></a>
125
- <a href="https://opencollective.com/preact/backer/19/website" target="_blank"><img src="https://opencollective.com/preact/backer/19/avatar.svg"></a>
126
- <a href="https://opencollective.com/preact/backer/20/website" target="_blank"><img src="https://opencollective.com/preact/backer/20/avatar.svg"></a>
127
- <a href="https://opencollective.com/preact/backer/21/website" target="_blank"><img src="https://opencollective.com/preact/backer/21/avatar.svg"></a>
128
- <a href="https://opencollective.com/preact/backer/22/website" target="_blank"><img src="https://opencollective.com/preact/backer/22/avatar.svg"></a>
129
- <a href="https://opencollective.com/preact/backer/23/website" target="_blank"><img src="https://opencollective.com/preact/backer/23/avatar.svg"></a>
130
- <a href="https://opencollective.com/preact/backer/24/website" target="_blank"><img src="https://opencollective.com/preact/backer/24/avatar.svg"></a>
131
- <a href="https://opencollective.com/preact/backer/25/website" target="_blank"><img src="https://opencollective.com/preact/backer/25/avatar.svg"></a>
132
- <a href="https://opencollective.com/preact/backer/26/website" target="_blank"><img src="https://opencollective.com/preact/backer/26/avatar.svg"></a>
133
- <a href="https://opencollective.com/preact/backer/27/website" target="_blank"><img src="https://opencollective.com/preact/backer/27/avatar.svg"></a>
134
- <a href="https://opencollective.com/preact/backer/28/website" target="_blank"><img src="https://opencollective.com/preact/backer/28/avatar.svg"></a>
135
- <a href="https://opencollective.com/preact/backer/29/website" target="_blank"><img src="https://opencollective.com/preact/backer/29/avatar.svg"></a>
136
- <a href="https://github.com/guardian" target="_blank"><img src="https://github.com/guardian.png?size=64"></a>
137
-
138
-
139
-
140
- ## Sponsors
141
- Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]
142
-
143
- <a href="https://opencollective.com/preact/sponsor/0/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/0/avatar.svg"></a>
144
- <a href="https://opencollective.com/preact/sponsor/1/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/1/avatar.svg"></a>
145
- <a href="https://opencollective.com/preact/sponsor/2/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/2/avatar.svg"></a>
146
- <a href="https://opencollective.com/preact/sponsor/3/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/3/avatar.svg"></a>
147
- <a href="https://opencollective.com/preact/sponsor/4/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/4/avatar.svg"></a>
148
- <a href="https://opencollective.com/preact/sponsor/5/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/5/avatar.svg"></a>
149
- <a href="https://opencollective.com/preact/sponsor/6/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/6/avatar.svg"></a>
150
- <a href="https://opencollective.com/preact/sponsor/7/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/7/avatar.svg"></a>
151
- <a href="https://opencollective.com/preact/sponsor/8/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/8/avatar.svg"></a>
152
- <a href="https://opencollective.com/preact/sponsor/9/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/9/avatar.svg"></a>
153
- <a href="https://opencollective.com/preact/sponsor/10/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/10/avatar.svg"></a>
154
- <a href="https://opencollective.com/preact/sponsor/11/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/11/avatar.svg"></a>
155
- <a href="https://opencollective.com/preact/sponsor/12/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/12/avatar.svg"></a>
156
- <a href="https://opencollective.com/preact/sponsor/13/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/13/avatar.svg"></a>
157
- <a href="https://opencollective.com/preact/sponsor/14/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/14/avatar.svg"></a>
158
- <a href="https://opencollective.com/preact/sponsor/15/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/15/avatar.svg"></a>
159
- <a href="https://opencollective.com/preact/sponsor/16/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/16/avatar.svg"></a>
160
- <a href="https://opencollective.com/preact/sponsor/17/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/17/avatar.svg"></a>
161
- <a href="https://opencollective.com/preact/sponsor/18/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/18/avatar.svg"></a>
162
- <a href="https://opencollective.com/preact/sponsor/19/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/19/avatar.svg"></a>
163
- <a href="https://opencollective.com/preact/sponsor/20/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/20/avatar.svg"></a>
164
- <a href="https://opencollective.com/preact/sponsor/21/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/21/avatar.svg"></a>
165
- <a href="https://opencollective.com/preact/sponsor/22/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/22/avatar.svg"></a>
166
- <a href="https://opencollective.com/preact/sponsor/23/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/23/avatar.svg"></a>
167
- <a href="https://opencollective.com/preact/sponsor/24/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/24/avatar.svg"></a>
168
- <a href="https://opencollective.com/preact/sponsor/25/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/25/avatar.svg"></a>
169
- <a href="https://opencollective.com/preact/sponsor/26/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/26/avatar.svg"></a>
170
- <a href="https://opencollective.com/preact/sponsor/27/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/27/avatar.svg"></a>
171
- <a href="https://opencollective.com/preact/sponsor/28/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/28/avatar.svg"></a>
172
- <a href="https://opencollective.com/preact/sponsor/29/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/29/avatar.svg"></a>
173
-
174
- ---
175
-
176
- ## License
177
-
178
- MIT
179
-
180
-
181
-
182
- [![Preact](https://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)
183
-
184
-
185
- [preact/compat]: https://github.com/preactjs/preact/tree/master/compat
186
- [hyperscript]: https://github.com/dominictarr/hyperscript
187
- [DevTools]: https://github.com/preactjs/preact-devtools
1
+ <p align="center">
2
+ <a href="https://preactjs.com" target="_blank">
3
+
4
+ ![Preact](https://raw.githubusercontent.com/preactjs/preact/8b0bcc927995c188eca83cba30fbc83491cc0b2f/logo.svg?sanitize=true "Preact")
5
+
6
+ </a>
7
+ </p>
8
+ <p align="center">Fast <b>3kB</b> alternative to React with the same modern API.</p>
9
+
10
+ **All the power of Virtual DOM components, without the overhead:**
11
+
12
+ - Familiar React API & patterns: ES6 Class, hooks, and Functional Components
13
+ - Extensive React compatibility via a simple [preact/compat] alias
14
+ - Everything you need: JSX, <abbr title="Virtual DOM">VDOM</abbr>, [DevTools], <abbr title="Hot Module Replacement">HMR</abbr>, <abbr title="Server-Side Rendering">SSR</abbr>.
15
+ - Highly optimized diff algorithm and seamless hydration from Server Side Rendering
16
+ - Supports all modern browsers and IE11
17
+ - Transparent asynchronous rendering with a pluggable scheduler
18
+ - **Instant production-grade app setup with [Preact CLI](https://github.com/preactjs/preact-cli)**
19
+
20
+ ### 💁 More information at the [Preact Website ➞](https://preactjs.com)
21
+
22
+
23
+ <table border="0">
24
+ <tbody>
25
+ <tr>
26
+ <td>
27
+
28
+ [![npm](https://img.shields.io/npm/v/preact.svg)](http://npm.im/preact)
29
+ [![Preact Slack Community](https://preact-slack.now.sh/badge.svg)](https://chat.preactjs.com)
30
+ [![OpenCollective Backers](https://opencollective.com/preact/backers/badge.svg)](#backers)
31
+ [![OpenCollective Sponsors](https://opencollective.com/preact/sponsors/badge.svg)](#sponsors)
32
+
33
+ [![coveralls](https://img.shields.io/coveralls/preactjs/preact/master.svg)](https://coveralls.io/github/preactjs/preact)
34
+ [![gzip size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=gzip&label=gzip)](https://unpkg.com/preact/dist/preact.min.js)
35
+ [![brotli size](http://img.badgesize.io/https://unpkg.com/preact/dist/preact.min.js?compression=brotli&label=brotli)](https://unpkg.com/preact/dist/preact.min.js)
36
+ </td>
37
+ <td>
38
+
39
+ <img src="https://saucelabs.com/browser-matrix/preact.svg" title="Browser support matrix">
40
+
41
+ </td>
42
+ </tr>
43
+ </tbody>
44
+ </table>
45
+
46
+
47
+ You can find some awesome libraries in the [awesome-preact list](https://github.com/preactjs/awesome-preact) :sunglasses:
48
+
49
+ ---
50
+
51
+ ## Getting Started
52
+
53
+ > 💁 _**Note:** You [don't need ES2015 to use Preact](https://github.com/developit/preact-in-es3)... but give it a try!_
54
+
55
+ The easiest way to get started with Preact is to use [Preact CLI](https://github.com/preactjs/preact-cli). This simple command-line tool wraps up the best possible tooling for you, and even keeps things like Webpack and Babel up-to-date as they change. Best of all, it's easy to understand! Start a project or compile for production in a single command (`preact build`), with no configuration needed and best practices baked in! 🙌
56
+
57
+ #### Tutorial: Building UI with Preact
58
+
59
+ With Preact, you create user interfaces by assembling trees of components and elements. Components are functions or classes that return a description of what their tree should output. These descriptions are typically written in [JSX](https://facebook.github.io/jsx/) (shown underneath), or [HTM](https://github.com/developit/htm) which leverages standard JavaScript Tagged Templates. Both syntaxes can express trees of elements with "props" (similar to HTML attributes) and children.
60
+
61
+ To get started using Preact, first look at the render() function. This function accepts a tree description and creates the structure described. Next, it appends this structure to a parent DOM element provided as the second argument. Future calls to render() will reuse the existing tree and update it in-place in the DOM. Internally, render() will calculate the difference from previous outputted structures in an attempt to perform as few DOM operations as possible.
62
+
63
+ ```js
64
+ import { h, render } from 'preact';
65
+ // Tells babel to use h for JSX. It's better to configure this globally.
66
+ // See https://babeljs.io/docs/en/babel-plugin-transform-react-jsx#usage
67
+ // In tsconfig you can specify this with the jsxFactory
68
+ /** @jsx h */
69
+
70
+ // create our tree and append it to document.body:
71
+ render(<main><h1>Hello</h1></main>, document.body);
72
+
73
+ // update the tree in-place:
74
+ render(<main><h1>Hello World!</h1></main>, document.body);
75
+ // ^ this second invocation of render(...) will use a single DOM call to update the text of the <h1>
76
+ ```
77
+
78
+ Hooray! render() has taken our structure and output a User Interface! This approach demonstrates a simple case, but would be difficult to use as an application grows in complexity. Each change would be forced to calculate the difference between the current and updated structure for the entire application. Components can help here – by dividing the User Interface into nested Components each can calculate their difference from their mounted point. Here's an example:
79
+
80
+ ```js
81
+ import { render, h } from 'preact';
82
+ import { useState } from 'preact/hooks';
83
+
84
+ /** @jsx h */
85
+
86
+ const App = () => {
87
+ const [input, setInput] = useState('');
88
+
89
+ return (
90
+ <div>
91
+ <p>Do you agree to the statement: "Preact is awesome"?</p>
92
+ <input value={input} onInput={e => setInput(e.target.value)} />
93
+ </div>
94
+ )
95
+ }
96
+
97
+ render(<App />, document.body);
98
+ ```
99
+
100
+ ---
101
+
102
+ ## Backers
103
+
104
+ Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/preact#backer)]
105
+
106
+ <a href="https://opencollective.com/preact/backer/0/website" target="_blank"><img src="https://opencollective.com/preact/backer/0/avatar.svg"></a>
107
+ <a href="https://opencollective.com/preact/backer/1/website" target="_blank"><img src="https://opencollective.com/preact/backer/1/avatar.svg"></a>
108
+ <a href="https://opencollective.com/preact/backer/2/website" target="_blank"><img src="https://opencollective.com/preact/backer/2/avatar.svg"></a>
109
+ <a href="https://opencollective.com/preact/backer/3/website" target="_blank"><img src="https://opencollective.com/preact/backer/3/avatar.svg"></a>
110
+ <a href="https://opencollective.com/preact/backer/4/website" target="_blank"><img src="https://opencollective.com/preact/backer/4/avatar.svg"></a>
111
+ <a href="https://opencollective.com/preact/backer/5/website" target="_blank"><img src="https://opencollective.com/preact/backer/5/avatar.svg"></a>
112
+ <a href="https://opencollective.com/preact/backer/6/website" target="_blank"><img src="https://opencollective.com/preact/backer/6/avatar.svg"></a>
113
+ <a href="https://opencollective.com/preact/backer/7/website" target="_blank"><img src="https://opencollective.com/preact/backer/7/avatar.svg"></a>
114
+ <a href="https://opencollective.com/preact/backer/8/website" target="_blank"><img src="https://opencollective.com/preact/backer/8/avatar.svg"></a>
115
+ <a href="https://opencollective.com/preact/backer/9/website" target="_blank"><img src="https://opencollective.com/preact/backer/9/avatar.svg"></a>
116
+ <a href="https://opencollective.com/preact/backer/10/website" target="_blank"><img src="https://opencollective.com/preact/backer/10/avatar.svg"></a>
117
+ <a href="https://opencollective.com/preact/backer/11/website" target="_blank"><img src="https://opencollective.com/preact/backer/11/avatar.svg"></a>
118
+ <a href="https://opencollective.com/preact/backer/12/website" target="_blank"><img src="https://opencollective.com/preact/backer/12/avatar.svg"></a>
119
+ <a href="https://opencollective.com/preact/backer/13/website" target="_blank"><img src="https://opencollective.com/preact/backer/13/avatar.svg"></a>
120
+ <a href="https://opencollective.com/preact/backer/14/website" target="_blank"><img src="https://opencollective.com/preact/backer/14/avatar.svg"></a>
121
+ <a href="https://opencollective.com/preact/backer/15/website" target="_blank"><img src="https://opencollective.com/preact/backer/15/avatar.svg"></a>
122
+ <a href="https://opencollective.com/preact/backer/16/website" target="_blank"><img src="https://opencollective.com/preact/backer/16/avatar.svg"></a>
123
+ <a href="https://opencollective.com/preact/backer/17/website" target="_blank"><img src="https://opencollective.com/preact/backer/17/avatar.svg"></a>
124
+ <a href="https://opencollective.com/preact/backer/18/website" target="_blank"><img src="https://opencollective.com/preact/backer/18/avatar.svg"></a>
125
+ <a href="https://opencollective.com/preact/backer/19/website" target="_blank"><img src="https://opencollective.com/preact/backer/19/avatar.svg"></a>
126
+ <a href="https://opencollective.com/preact/backer/20/website" target="_blank"><img src="https://opencollective.com/preact/backer/20/avatar.svg"></a>
127
+ <a href="https://opencollective.com/preact/backer/21/website" target="_blank"><img src="https://opencollective.com/preact/backer/21/avatar.svg"></a>
128
+ <a href="https://opencollective.com/preact/backer/22/website" target="_blank"><img src="https://opencollective.com/preact/backer/22/avatar.svg"></a>
129
+ <a href="https://opencollective.com/preact/backer/23/website" target="_blank"><img src="https://opencollective.com/preact/backer/23/avatar.svg"></a>
130
+ <a href="https://opencollective.com/preact/backer/24/website" target="_blank"><img src="https://opencollective.com/preact/backer/24/avatar.svg"></a>
131
+ <a href="https://opencollective.com/preact/backer/25/website" target="_blank"><img src="https://opencollective.com/preact/backer/25/avatar.svg"></a>
132
+ <a href="https://opencollective.com/preact/backer/26/website" target="_blank"><img src="https://opencollective.com/preact/backer/26/avatar.svg"></a>
133
+ <a href="https://opencollective.com/preact/backer/27/website" target="_blank"><img src="https://opencollective.com/preact/backer/27/avatar.svg"></a>
134
+ <a href="https://opencollective.com/preact/backer/28/website" target="_blank"><img src="https://opencollective.com/preact/backer/28/avatar.svg"></a>
135
+ <a href="https://opencollective.com/preact/backer/29/website" target="_blank"><img src="https://opencollective.com/preact/backer/29/avatar.svg"></a>
136
+ <a href="https://github.com/guardian" target="_blank"><img src="https://github.com/guardian.png?size=64"></a>
137
+
138
+
139
+
140
+ ## Sponsors
141
+ Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/preact#sponsor)]
142
+
143
+ <a href="https://opencollective.com/preact/sponsor/0/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/0/avatar.svg"></a>
144
+ <a href="https://opencollective.com/preact/sponsor/1/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/1/avatar.svg"></a>
145
+ <a href="https://opencollective.com/preact/sponsor/2/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/2/avatar.svg"></a>
146
+ <a href="https://opencollective.com/preact/sponsor/3/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/3/avatar.svg"></a>
147
+ <a href="https://opencollective.com/preact/sponsor/4/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/4/avatar.svg"></a>
148
+ <a href="https://opencollective.com/preact/sponsor/5/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/5/avatar.svg"></a>
149
+ <a href="https://opencollective.com/preact/sponsor/6/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/6/avatar.svg"></a>
150
+ <a href="https://opencollective.com/preact/sponsor/7/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/7/avatar.svg"></a>
151
+ <a href="https://opencollective.com/preact/sponsor/8/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/8/avatar.svg"></a>
152
+ <a href="https://opencollective.com/preact/sponsor/9/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/9/avatar.svg"></a>
153
+ <a href="https://opencollective.com/preact/sponsor/10/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/10/avatar.svg"></a>
154
+ <a href="https://opencollective.com/preact/sponsor/11/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/11/avatar.svg"></a>
155
+ <a href="https://opencollective.com/preact/sponsor/12/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/12/avatar.svg"></a>
156
+ <a href="https://opencollective.com/preact/sponsor/13/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/13/avatar.svg"></a>
157
+ <a href="https://opencollective.com/preact/sponsor/14/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/14/avatar.svg"></a>
158
+ <a href="https://opencollective.com/preact/sponsor/15/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/15/avatar.svg"></a>
159
+ <a href="https://opencollective.com/preact/sponsor/16/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/16/avatar.svg"></a>
160
+ <a href="https://opencollective.com/preact/sponsor/17/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/17/avatar.svg"></a>
161
+ <a href="https://opencollective.com/preact/sponsor/18/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/18/avatar.svg"></a>
162
+ <a href="https://opencollective.com/preact/sponsor/19/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/19/avatar.svg"></a>
163
+ <a href="https://opencollective.com/preact/sponsor/20/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/20/avatar.svg"></a>
164
+ <a href="https://opencollective.com/preact/sponsor/21/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/21/avatar.svg"></a>
165
+ <a href="https://opencollective.com/preact/sponsor/22/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/22/avatar.svg"></a>
166
+ <a href="https://opencollective.com/preact/sponsor/23/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/23/avatar.svg"></a>
167
+ <a href="https://opencollective.com/preact/sponsor/24/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/24/avatar.svg"></a>
168
+ <a href="https://opencollective.com/preact/sponsor/25/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/25/avatar.svg"></a>
169
+ <a href="https://opencollective.com/preact/sponsor/26/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/26/avatar.svg"></a>
170
+ <a href="https://opencollective.com/preact/sponsor/27/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/27/avatar.svg"></a>
171
+ <a href="https://opencollective.com/preact/sponsor/28/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/28/avatar.svg"></a>
172
+ <a href="https://opencollective.com/preact/sponsor/29/website" target="_blank"><img src="https://opencollective.com/preact/sponsor/29/avatar.svg"></a>
173
+
174
+ ---
175
+
176
+ ## License
177
+
178
+ MIT
179
+
180
+
181
+
182
+ [![Preact](https://i.imgur.com/YqCHvEW.gif)](https://preactjs.com)
183
+
184
+
185
+ [preact/compat]: https://github.com/preactjs/preact/tree/master/compat
186
+ [hyperscript]: https://github.com/dominictarr/hyperscript
187
+ [DevTools]: https://github.com/preactjs/preact-devtools
@@ -1,2 +1,2 @@
1
- var n=require("preact/hooks"),t=require("preact");function e(n,t){for(var e in t)n[e]=t[e];return n}function r(n,t){for(var e in n)if("__source"!==e&&!(e in t))return!0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return!0;return!1}function o(n){this.props=n}function u(n,e){function o(n){var t=this.props.ref,o=t==n.ref;return!o&&t&&(t.call?t(null):t.current=null),e?!e(this.props,n)||!o:r(this.props,n)}function u(e){return this.shouldComponentUpdate=o,t.createElement(n,e)}return u.displayName="Memo("+(n.displayName||n.name)+")",u.prototype.isReactComponent=!0,u.__f=!0,u}(o.prototype=new t.Component).isPureReactComponent=!0,o.prototype.shouldComponentUpdate=function(n,t){return r(this.props,n)||r(this.state,t)};var i=t.options.__b;t.options.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),i&&i(n)};var l="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function c(n){function t(t,r){var o=e({},t);return delete o.ref,n(o,(r=t.ref||r)&&("object"!=typeof r||"current"in r)?r:null)}return t.$$typeof=l,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var f=function(n,e){return null==n?null:t.toChildArray(t.toChildArray(n).map(e))},a={map:f,forEach:f,count:function(n){return n?t.toChildArray(n).length:0},only:function(n){var e=t.toChildArray(n);if(1!==e.length)throw"Children.only";return e[0]},toArray:t.toChildArray},s=t.options.__e;t.options.__e=function(n,t,e){if(n.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),r.__c(n,t);s(n,t,e)};var p=t.options.unmount;function h(){this.__u=0,this.t=null,this.__b=null}function v(n){var t=n.__.__c;return t&&t.__e&&t.__e(n)}function d(n){var e,r,o;function u(u){if(e||(e=n()).then(function(n){r=n.default||n},function(n){o=n}),o)throw o;if(!r)throw e;return t.createElement(r,u)}return u.displayName="Lazy",u.__f=!0,u}function m(){this.o=null,this.u=null}t.options.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),p&&p(n)},(h.prototype=new t.Component).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var o=v(r.__v),u=!1,i=function(){u||(u=!0,e.__R=null,o?o(l):l())};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__e){var n=r.state.__e;r.__v.__k[0]=function n(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return n(t,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__e:r.__b=r.__v.__k[0]}),n.then(i,i)},h.prototype.componentWillUnmount=function(){this.t=[]},h.prototype.render=function(n,r){if(this.__b){if(this.__v.__k){var o=document.createElement("div"),u=this.__v.__k[0].__c;this.__v.__k[0]=function n(t,r,o){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c()}),t.__c.__H=null),null!=(t=e({},t)).__c&&(t.__c.__P===o&&(t.__c.__P=r),t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return n(t,r,o)})),t}(this.__b,o,u.__O=u.__P)}this.__b=null}var i=r.__e&&t.createElement(t.Fragment,null,n.fallback);return i&&(i.__h=null),[t.createElement(t.Fragment,null,r.__e?null:n.children),i]};var x=function(n,t,e){if(++e[1]===e[0]&&n.u.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.u.size))for(e=n.o;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.o=e=e[2]}};function y(n){return this.getChildContext=function(){return n.context},n.children}function b(n){var e=this,r=n.i;e.componentWillUnmount=function(){t.render(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),n.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n)},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n)}}),t.render(t.createElement(y,{context:e.context},n.__v),e.l)):e.l&&e.componentWillUnmount()}function _(n,e){return t.createElement(b,{__v:n,i:e})}(m.prototype=new t.Component).__e=function(n){var t=this,e=v(t.__v),r=t.u.get(n);return r[0]++,function(o){var u=function(){t.props.revealOrder?(r.push(o),x(t,n,r)):o()};e?e(u):u()}},m.prototype.render=function(n){this.o=null,this.u=new Map;var e=t.toChildArray(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&e.reverse();for(var r=e.length;r--;)this.u.set(e[r],this.o=[1,0,this.o]);return n.children},m.prototype.componentDidUpdate=m.prototype.componentDidMount=function(){var n=this;this.u.forEach(function(t,e){x(n,e,t)})};var S="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,w=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,C="undefined"!=typeof document,g=function(n){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(n)};function E(n,e,r){return null==e.__k&&(e.textContent=""),t.render(n,e),"function"==typeof r&&r(),n?n.__c:null}function R(n,e,r){return t.hydrate(n,e),"function"==typeof r&&r(),n?n.__c:null}t.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(n){Object.defineProperty(t.Component.prototype,n,{configurable:!0,get:function(){return this["UNSAFE_"+n]},set:function(t){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:t})}})});var N=t.options.event;function O(){}function k(){return this.cancelBubble}function A(){return this.defaultPrevented}t.options.event=function(n){return N&&(n=N(n)),n.persist=O,n.isPropagationStopped=k,n.isDefaultPrevented=A,n.nativeEvent=n};var L,U={configurable:!0,get:function(){return this.class}},M=t.options.vnode;t.options.vnode=function(n){var e=n.type,r=n.props,o=r;if("string"==typeof e){var u=-1===e.indexOf("-");for(var i in o={},r){var l=r[i];C&&"children"===i&&"noscript"===e||"value"===i&&"defaultValue"in r&&null==l||("defaultValue"===i&&"value"in r&&null==r.value?i="value":"download"===i&&!0===l?l="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+e)&&!g(r.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():u&&w.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===l&&(l=void 0),o[i]=l)}"select"==e&&o.multiple&&Array.isArray(o.value)&&(o.value=t.toChildArray(r.children).forEach(function(n){n.props.selected=-1!=o.value.indexOf(n.props.value)})),"select"==e&&null!=o.defaultValue&&(o.value=t.toChildArray(r.children).forEach(function(n){n.props.selected=o.multiple?-1!=o.defaultValue.indexOf(n.props.value):o.defaultValue==n.props.value})),n.props=o,r.class!=r.className&&(U.enumerable="className"in r,null!=r.className&&(o.class=r.className),Object.defineProperty(o,"className",U))}n.$$typeof=S,M&&M(n)};var T=t.options.__r;t.options.__r=function(n){T&&T(n),L=n.__c};var j={ReactCurrentDispatcher:{current:{readContext:function(n){return L.__n[n.__c].props.value}}}};function D(n){return t.createElement.bind(null,n)}function F(n){return!!n&&n.$$typeof===S}function I(n){return F(n)?t.cloneElement.apply(null,arguments):n}function W(n){return!!n.__k&&(t.render(null,n),!0)}function P(n){return n&&(n.base||1===n.nodeType&&n)||null}var V=function(n,t){return n(t)},z=function(n,t){return n(t)},B=t.Fragment,$={useState:n.useState,useReducer:n.useReducer,useEffect:n.useEffect,useLayoutEffect:n.useLayoutEffect,useRef:n.useRef,useImperativeHandle:n.useImperativeHandle,useMemo:n.useMemo,useCallback:n.useCallback,useContext:n.useContext,useDebugValue:n.useDebugValue,version:"17.0.2",Children:a,render:E,hydrate:R,unmountComponentAtNode:W,createPortal:_,createElement:t.createElement,createContext:t.createContext,createFactory:D,cloneElement:I,createRef:t.createRef,Fragment:t.Fragment,isValidElement:F,findDOMNode:P,Component:t.Component,PureComponent:o,memo:u,forwardRef:c,flushSync:z,unstable_batchedUpdates:V,StrictMode:B,Suspense:h,SuspenseList:m,lazy:d,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:j};Object.keys(n).forEach(function(t){exports[t]=n[t]}),exports.createElement=t.createElement,exports.createContext=t.createContext,exports.createRef=t.createRef,exports.Fragment=t.Fragment,exports.Component=t.Component,exports.version="17.0.2",exports.Children=a,exports.render=E,exports.hydrate=R,exports.unmountComponentAtNode=W,exports.createPortal=_,exports.createFactory=D,exports.cloneElement=I,exports.isValidElement=F,exports.findDOMNode=P,exports.PureComponent=o,exports.memo=u,exports.forwardRef=c,exports.flushSync=z,exports.unstable_batchedUpdates=V,exports.StrictMode=B,exports.Suspense=h,exports.SuspenseList=m,exports.lazy=d,exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j,exports.default=$;
1
+ var n=require("preact/hooks"),t=require("preact");function e(n,t){for(var e in t)n[e]=t[e];return n}function r(n,t){for(var e in n)if("__source"!==e&&!(e in t))return!0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return!0;return!1}function o(n){this.props=n}function u(n,e){function o(n){var t=this.props.ref,o=t==n.ref;return!o&&t&&(t.call?t(null):t.current=null),e?!e(this.props,n)||!o:r(this.props,n)}function u(e){return this.shouldComponentUpdate=o,t.createElement(n,e)}return u.displayName="Memo("+(n.displayName||n.name)+")",u.prototype.isReactComponent=!0,u.__f=!0,u}(o.prototype=new t.Component).isPureReactComponent=!0,o.prototype.shouldComponentUpdate=function(n,t){return r(this.props,n)||r(this.state,t)};var i=t.options.__b;t.options.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),i&&i(n)};var l="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function c(n){function t(t,r){var o=e({},t);return delete o.ref,n(o,(r=t.ref||r)&&("object"!=typeof r||"current"in r)?r:null)}return t.$$typeof=l,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t}var f=function(n,e){return null==n?null:t.toChildArray(t.toChildArray(n).map(e))},a={map:f,forEach:f,count:function(n){return n?t.toChildArray(n).length:0},only:function(n){var e=t.toChildArray(n);if(1!==e.length)throw"Children.only";return e[0]},toArray:t.toChildArray},s=t.options.__e;t.options.__e=function(n,t,e){if(n.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),r.__c(n,t);s(n,t,e)};var p=t.options.unmount;function h(){this.__u=0,this.t=null,this.__b=null}function v(n){var t=n.__.__c;return t&&t.__e&&t.__e(n)}function d(n){var e,r,o;function u(u){if(e||(e=n()).then(function(n){r=n.default||n},function(n){o=n}),o)throw o;if(!r)throw e;return t.createElement(r,u)}return u.displayName="Lazy",u.__f=!0,u}function m(){this.o=null,this.u=null}t.options.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&!0===n.__h&&(n.type=null),p&&p(n)},(h.prototype=new t.Component).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var o=v(r.__v),u=!1,i=function(){u||(u=!0,e.__R=null,o?o(l):l())};e.__R=i;var l=function(){if(!--r.__u){if(r.state.__e){var n=r.state.__e;r.__v.__k[0]=function n(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return n(t,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__e:r.__b=r.__v.__k[0]}),n.then(i,i)},h.prototype.componentWillUnmount=function(){this.t=[]},h.prototype.render=function(n,r){if(this.__b){if(this.__v.__k){var o=document.createElement("div"),u=this.__v.__k[0].__c;this.__v.__k[0]=function n(t,r,o){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c()}),t.__c.__H=null),null!=(t=e({},t)).__c&&(t.__c.__P===o&&(t.__c.__P=r),t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return n(t,r,o)})),t}(this.__b,o,u.__O=u.__P)}this.__b=null}var i=r.__e&&t.createElement(t.Fragment,null,n.fallback);return i&&(i.__h=null),[t.createElement(t.Fragment,null,r.__e?null:n.children),i]};var x=function(n,t,e){if(++e[1]===e[0]&&n.u.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.u.size))for(e=n.o;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.o=e=e[2]}};function y(n){return this.getChildContext=function(){return n.context},n.children}function b(n){var e=this,r=n.i;e.componentWillUnmount=function(){t.render(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),n.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n)},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n)}}),t.render(t.createElement(y,{context:e.context},n.__v),e.l)):e.l&&e.componentWillUnmount()}function _(n,e){return t.createElement(b,{__v:n,i:e})}(m.prototype=new t.Component).__e=function(n){var t=this,e=v(t.__v),r=t.u.get(n);return r[0]++,function(o){var u=function(){t.props.revealOrder?(r.push(o),x(t,n,r)):o()};e?e(u):u()}},m.prototype.render=function(n){this.o=null,this.u=new Map;var e=t.toChildArray(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&e.reverse();for(var r=e.length;r--;)this.u.set(e[r],this.o=[1,0,this.o]);return n.children},m.prototype.componentDidUpdate=m.prototype.componentDidMount=function(){var n=this;this.u.forEach(function(t,e){x(n,e,t)})};var S="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,C=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,w="undefined"!=typeof document,g=function(n){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(n)};function E(n,e,r){return null==e.__k&&(e.textContent=""),t.render(n,e),"function"==typeof r&&r(),n?n.__c:null}function R(n,e,r){return t.hydrate(n,e),"function"==typeof r&&r(),n?n.__c:null}t.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(n){Object.defineProperty(t.Component.prototype,n,{configurable:!0,get:function(){return this["UNSAFE_"+n]},set:function(t){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:t})}})});var N=t.options.event;function O(){}function k(){return this.cancelBubble}function A(){return this.defaultPrevented}t.options.event=function(n){return N&&(n=N(n)),n.persist=O,n.isPropagationStopped=k,n.isDefaultPrevented=A,n.nativeEvent=n};var L,U={configurable:!0,get:function(){return this.class}},M=t.options.vnode;t.options.vnode=function(n){var e=n.type,r=n.props,o=r;if("string"==typeof e){var u=-1===e.indexOf("-");for(var i in o={},r){var l=r[i];w&&"children"===i&&"noscript"===e||"value"===i&&"defaultValue"in r&&null==l||("defaultValue"===i&&"value"in r&&null==r.value?i="value":"download"===i&&!0===l?l="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+e)&&!g(r.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():u&&C.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===l&&(l=void 0),o[i]=l)}"select"==e&&o.multiple&&Array.isArray(o.value)&&(o.value=t.toChildArray(r.children).forEach(function(n){n.props.selected=-1!=o.value.indexOf(n.props.value)})),"select"==e&&null!=o.defaultValue&&(o.value=t.toChildArray(r.children).forEach(function(n){n.props.selected=o.multiple?-1!=o.defaultValue.indexOf(n.props.value):o.defaultValue==n.props.value})),n.props=o,r.class!=r.className&&(U.enumerable="className"in r,null!=r.className&&(o.class=r.className),Object.defineProperty(o,"className",U))}n.$$typeof=S,M&&M(n)};var T=t.options.__r;t.options.__r=function(n){T&&T(n),L=n.__c};var j={ReactCurrentDispatcher:{current:{readContext:function(n){return L.__n[n.__c].props.value}}}};function D(n){return t.createElement.bind(null,n)}function F(n){return!!n&&n.$$typeof===S}function I(n){return F(n)?t.cloneElement.apply(null,arguments):n}function W(n){return!!n.__k&&(t.render(null,n),!0)}function P(n){return n&&(n.base||1===n.nodeType&&n)||null}var V=function(n,t){return n(t)},z=function(n,t){return n(t)},B=t.Fragment,$={useState:n.useState,useReducer:n.useReducer,useEffect:n.useEffect,useLayoutEffect:n.useLayoutEffect,useRef:n.useRef,useImperativeHandle:n.useImperativeHandle,useMemo:n.useMemo,useCallback:n.useCallback,useContext:n.useContext,useDebugValue:n.useDebugValue,version:"17.0.2",Children:a,render:E,hydrate:R,unmountComponentAtNode:W,createPortal:_,createElement:t.createElement,createContext:t.createContext,createFactory:D,cloneElement:I,createRef:t.createRef,Fragment:t.Fragment,isValidElement:F,findDOMNode:P,Component:t.Component,PureComponent:o,memo:u,forwardRef:c,flushSync:z,unstable_batchedUpdates:V,StrictMode:B,Suspense:h,SuspenseList:m,lazy:d,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:j};Object.keys(n).forEach(function(t){exports[t]=n[t]}),exports.createElement=t.createElement,exports.createContext=t.createContext,exports.createRef=t.createRef,exports.Fragment=t.Fragment,exports.Component=t.Component,exports.version="17.0.2",exports.Children=a,exports.render=E,exports.hydrate=R,exports.unmountComponentAtNode=W,exports.createPortal=_,exports.createFactory=D,exports.cloneElement=I,exports.isValidElement=F,exports.findDOMNode=P,exports.PureComponent=o,exports.memo=u,exports.forwardRef=c,exports.flushSync=z,exports.unstable_batchedUpdates=V,exports.StrictMode=B,exports.Suspense=h,exports.SuspenseList=m,exports.lazy=d,exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j,exports.default=$;
2
2
  //# sourceMappingURL=compat.js.map