├── .gitignore
├── LICENSE
├── README.md
├── build
├── asset-manifest.json
├── favicon.ico
├── index.html
├── manifest.json
├── service-worker.js
└── static
│ ├── css
│ ├── main.659d07b9.css
│ └── main.659d07b9.css.map
│ └── js
│ ├── main.3d5871bc.js
│ └── main.3d5871bc.js.map
├── package.json
├── public
├── favicon.ico
├── index.html
└── manifest.json
├── src
├── App.css
├── App.jsx
├── App.test.js
├── ExampleStuckContent.jsx
├── PlaceholderP.jsx
├── Sticky.jsx
├── index.css
├── index.js
├── logo.svg
└── registerServiceWorker.js
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
8 | # Runtime data
9 | pids
10 | *.pid
11 | *.seed
12 | *.pid.lock
13 |
14 | # Directory for instrumented libs generated by jscoverage/JSCover
15 | lib-cov
16 |
17 | # Coverage directory used by tools like istanbul
18 | coverage
19 |
20 | # nyc test coverage
21 | .nyc_output
22 |
23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24 | .grunt
25 |
26 | # Bower dependency directory (https://bower.io/)
27 | bower_components
28 |
29 | # node-waf configuration
30 | .lock-wscript
31 |
32 | # Compiled binary addons (https://nodejs.org/api/addons.html)
33 | build/Release
34 |
35 | # Dependency directories
36 | node_modules/
37 | jspm_packages/
38 |
39 | # TypeScript v1 declaration files
40 | typings/
41 |
42 | # Optional npm cache directory
43 | .npm
44 |
45 | # Optional eslint cache
46 | .eslintcache
47 |
48 | # Optional REPL history
49 | .node_repl_history
50 |
51 | # Output of 'npm pack'
52 | *.tgz
53 |
54 | # Yarn Integrity file
55 | .yarn-integrity
56 |
57 | # dotenv environment variables file
58 | .env
59 |
60 | # next.js build output
61 | .next
62 |
63 | # testing
64 | /coverage
65 |
66 | # production
67 | # /build
68 |
69 | # misc
70 | .DS_Store
71 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Chris Garcia
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/build/asset-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "main.css": "static/css/main.659d07b9.css",
3 | "main.css.map": "static/css/main.659d07b9.css.map",
4 | "main.js": "static/js/main.3d5871bc.js",
5 | "main.js.map": "static/js/main.3d5871bc.js.map"
6 | }
--------------------------------------------------------------------------------
/build/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixelbandito/react-sticky/fdaa1d4e675a94b6d8f97689ddfff00e25aed290/build/favicon.ico
--------------------------------------------------------------------------------
/build/index.html:
--------------------------------------------------------------------------------
1 |
React Sticky You need to enable JavaScript to run this app.
--------------------------------------------------------------------------------
/build/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": "./index.html",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/build/service-worker.js:
--------------------------------------------------------------------------------
1 | "use strict";var precacheConfig=[["/react-sticky/build/index.html","476bbf40e4377082e318451b5b6752e9"],["/react-sticky/build/static/css/main.659d07b9.css","6d5e08f083f3aa54c5c651366a784e70"],["/react-sticky/build/static/js/main.3d5871bc.js","dcd5436f60d10e57a443766121ad682f"]],cacheName="sw-precache-v3-sw-precache-webpack-plugin-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var n=new URL(e);return"/"===n.pathname.slice(-1)&&(n.pathname+=t),n.toString()},cleanResponse=function(t){return t.redirected?("body"in t?Promise.resolve(t.body):t.blob()).then(function(e){return new Response(e,{headers:t.headers,status:t.status,statusText:t.statusText})}):Promise.resolve(t)},createCacheKey=function(e,t,n,r){var a=new URL(e);return r&&a.pathname.match(r)||(a.search+=(a.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(n)),a.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var n=new URL(t).pathname;return e.some(function(e){return n.match(e)})},stripIgnoredUrlParameters=function(e,n){var t=new URL(e);return t.hash="",t.search=t.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(t){return n.every(function(e){return!e.test(t[0])})}).map(function(e){return e.join("=")}).join("&"),t.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],n=e[1],r=new URL(t,self.location),a=createCacheKey(r,hashParamName,n,/\.\w{8}\./);return[r.toString(),a]}));function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(r){return setOfCachedUrls(r).then(function(n){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(t){if(!n.has(t)){var e=new Request(t,{credentials:"same-origin"});return fetch(e).then(function(e){if(!e.ok)throw new Error("Request for "+t+" returned a response with status "+e.status);return cleanResponse(e).then(function(e){return r.put(t,e)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var n=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(t){return t.keys().then(function(e){return Promise.all(e.map(function(e){if(!n.has(e.url))return t.delete(e)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(t){if("GET"===t.request.method){var e,n=stripIgnoredUrlParameters(t.request.url,ignoreUrlParametersMatching),r="index.html";(e=urlsToCacheKeys.has(n))||(n=addDirectoryIndex(n,r),e=urlsToCacheKeys.has(n));var a="/react-sticky/build/index.html";!e&&"navigate"===t.request.mode&&isPathWhitelisted(["^(?!\\/__).*"],t.request.url)&&(n=new URL(a,self.location).toString(),e=urlsToCacheKeys.has(n)),e&&t.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(n)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(e){return console.warn('Couldn\'t serve response for "%s" from cache: %O',t.request.url,e),fetch(t.request)}))}});
--------------------------------------------------------------------------------
/build/static/css/main.659d07b9.css:
--------------------------------------------------------------------------------
1 | body{margin:0;padding:0;font-family:sans-serif}.App{text-align:center}.App__title{font-size:1.5em;padding:20px}.ExampleStuckContent{position:relative;padding:10px}.ExampleStuckContent__label{position:absolute;border-radius:2px;bottom:5px;right:5px;background:#000;color:#fff;padding:5px}.ExampleStuckContent--stuck-top{position:fixed;top:0;left:0;right:0;background-color:orange;z-index:1}.ExampleStuckContent--stuck-bottom{position:fixed;bottom:0;left:0;right:0;background-color:#ff0;z-index:1}.ExampleStuckContent--stuck-left{outline:5px solid cyan}.ExampleStuckContent--stuck-right{outline:5px solid salmon}
2 | /*# sourceMappingURL=main.659d07b9.css.map*/
--------------------------------------------------------------------------------
/build/static/css/main.659d07b9.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["index.css","App.css"],"names":[],"mappings":"AAAA,KACE,SACA,UACA,sBAAwB,CCH1B,KACE,iBAAmB,CAMrB,YACE,gBACA,YAAc,CAGhB,qBACE,kBACA,YAAc,CAGhB,4BACE,kBACA,kBACA,WACA,UACA,gBACA,WACA,WAAa,CAGf,gCACE,eACA,MACA,OACA,QACA,wBACA,SAAW,CAEb,mCACE,eACA,SACA,OACA,QACA,sBACA,SAAW,CAEb,iCACE,sBAAwB,CAE1B,kCACE,wBAA0B","file":"static/css/main.659d07b9.css","sourcesContent":["body {\n margin: 0;\n padding: 0;\n font-family: sans-serif;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.css",".App {\n text-align: center;\n}\n\n.App__head {\n}\n\n.App__title {\n font-size: 1.5em;\n padding: 20px;\n}\n\n.ExampleStuckContent {\n position: relative;\n padding: 10px;\n}\n\n.ExampleStuckContent__label {\n position: absolute;\n border-radius: 2px;\n bottom: 5px;\n right: 5px;\n background: black;\n color: white;\n padding: 5px;\n}\n\n.ExampleStuckContent--stuck-top {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n background-color: orange;\n z-index: 1;\n}\n.ExampleStuckContent--stuck-bottom {\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: yellow;\n z-index: 1;\n}\n.ExampleStuckContent--stuck-left {\n outline: 5px solid cyan;\n}\n.ExampleStuckContent--stuck-right {\n outline: 5px solid salmon;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/App.css"],"sourceRoot":""}
--------------------------------------------------------------------------------
/build/static/js/main.3d5871bc.js:
--------------------------------------------------------------------------------
1 | !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/react-sticky/build/",t(t.s=6)}([function(e,t,n){"use strict";e.exports=n(14)},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,u=r(e),c=1;cc){for(var t=0,n=a.length-u;t-1?t:e}function p(e,t){t=t||{};var n=t.body;if(e instanceof p){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=d(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function m(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}function y(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var v={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(v.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=function(e){return e&&DataView.prototype.isPrototypeOf(e)},w=ArrayBuffer.isView||function(e){return e&&g.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];this.map[e]=o?o+","+r:r},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=n(r)},o.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},v.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var k=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];p.prototype.clone=function(){return new p(this,{body:this._bodyInit})},f.call(p.prototype),f.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var _=[301,302,303,307,308];y.redirect=function(e,t){if(-1===_.indexOf(t))throw new RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=p,e.Response=y,e.fetch=function(e,t){return new Promise(function(n,r){var o=new p(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:m(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;n(new y(t,e))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&v.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"===typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n.n(r),i=n(15),a=n.n(i),l=n(23),u=(n.n(l),n(24)),c=n(32);a.a.render(o.a.createElement(u.a,null),document.getElementById("root")),Object(c.a)()},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;rj.length&&j.push(e)}function d(e,t,n,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case _:case E:a=!0}}if(a)return n(o,e,""===t?"."+p(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;lthis.eventPool.length&&this.eventPool.push(e)}function L(e){e.eventPool=[],e.getPooled=M,e.release=j}function z(e,t){switch(e){case"keyup":return-1!==Eo.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function B(e){return e=e.detail,"object"===typeof e&&"data"in e?e.data:null}function W(e,t){switch(e){case"compositionend":return B(t);case"keypress":return 32!==t.which?null:(Oo=!0,Po);case"textInput":return e=t.data,e===Po&&Oo?null:e;default:return null}}function V(e,t){if(Ro)return"compositionend"===e||!xo&&z(e,t)?(e=F(),go._root=null,go._startText=null,go._fallbackText=null,Ro=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}function fe(e,t,n,r,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t}function de(e){return e[1].toUpperCase()}function pe(e,t,n,r){var o=ni.hasOwnProperty(t)?ni[t]:null;(null!==o?0===o.type:!r&&(2Oi.length&&Oi.push(e)}}}function qe(e){return Object.prototype.hasOwnProperty.call(e,Di)||(e[Di]=Fi++,Ii[e[Di]]={}),Ii[e[Di]]}function Ke(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Qe(e,t){var n=Ke(e);e=0;for(var r;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ke(n)}}function Ge(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Ye(e,t){if(Bi||null==ji||ji!==Lr())return null;var n=ji;return"selectionStart"in n&&Ge(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,zi&&zr(zi,n)?null:(zi=n,e=A.getPooled(Mi.select,Li,e,t),e.type="select",e.target=ji,N(e),e)}function Xe(e){var t="";return Dr.Children.forEach(e,function(e){null==e||"string"!==typeof e&&"number"!==typeof e||(t+=e)}),t}function Ze(e,t){return e=Mr({children:void 0},t),(t=Xe(t.children))&&(e.children=t),e}function Je(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function rt(e,t){var n=t.value;null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function ot(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function it(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function at(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?it(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function lt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function ut(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,i=t[n];o=null==i||"boolean"===typeof i||""===i?"":r||"number"!==typeof i||0===i||ha.hasOwnProperty(o)&&ha[o]?(""+i).trim():i+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}function ct(e,t,n){t&&(ya[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"===typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!==typeof t.style&&r("62",n()))}function st(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function ft(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var n=qe(e);t=Gr[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"===typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function pt(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function ht(e,t,n,r){var o=st(t,n);switch(t){case"iframe":case"object":We("load",e);var i=n;break;case"video":case"audio":for(i=0;iTa||(e.current=xa[Ta],xa[Ta]=null,Ta--)}function Tt(e,t){Ta++,xa[Ta]=e.current,e.current=t}function Ct(e){return Pt(e)?Pa:Ca.current}function St(e,t){var n=e.type.contextTypes;if(!n)return Wr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Pt(e){return 2===e.tag&&null!=e.type.childContextTypes}function Nt(e){Pt(e)&&(xt(Sa,e),xt(Ca,e))}function Ot(e){xt(Sa,e),xt(Ca,e)}function Rt(e,t,n){Ca.current!==Wr&&r("168"),Tt(Ca,t,e),Tt(Sa,n,e)}function Ut(e,t){var n=e.stateNode,o=e.type.childContextTypes;if("function"!==typeof n.getChildContext)return t;n=n.getChildContext();for(var i in n)i in o||r("108",ae(e)||"Unknown",i);return Mr({},t,n)}function It(e){if(!Pt(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Wr,Pa=Ca.current,Tt(Ca,t,e),Tt(Sa,Sa.current,e),!0}function Ft(e,t){var n=e.stateNode;if(n||r("169"),t){var o=Ut(e,Pa);n.__reactInternalMemoizedMergedChildContext=o,xt(Sa,e),xt(Ca,e),Tt(Ca,o,e)}else xt(Sa,e);Tt(Sa,t,e)}function Dt(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function At(e,t,n){var r=e.alternate;return null===r?(r=new Dt(e.tag,t,e.key,e.mode),r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Mt(e,t,n){var o=e.type,i=e.key;if(e=e.props,"function"===typeof o)var a=o.prototype&&o.prototype.isReactComponent?2:0;else if("string"===typeof o)a=5;else switch(o){case Ho:return jt(e.children,t,n,i);case Go:a=11,t|=3;break;case $o:a=11,t|=2;break;case qo:return o=new Dt(15,e,i,4|t),o.type=qo,o.expirationTime=n,o;case Xo:a=16,t|=2;break;default:e:{switch("object"===typeof o&&null!==o?o.$$typeof:null){case Ko:a=13;break e;case Qo:a=12;break e;case Yo:a=14;break e;default:r("130",null==o?o:typeof o,"")}a=void 0}}return t=new Dt(a,e,i,t),t.type=o,t.expirationTime=n,t}function jt(e,t,n,r){return e=new Dt(10,e,r,t),e.expirationTime=n,e}function Lt(e,t,n){return e=new Dt(6,e,null,t),e.expirationTime=n,e}function zt(e,t,n){return t=new Dt(4,null!==e.children?e.children:[],e.key,t),t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bt(e,t,n){return t=new Dt(3,null,null,t?3:0),e={current:t,containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e}function Wt(e){return function(t){try{return e(t)}catch(e){}}}function Vt(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);Na=Wt(function(e){return t.onCommitFiberRoot(n,e)}),Oa=Wt(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function Ht(e){"function"===typeof Na&&Na(e)}function $t(e){"function"===typeof Oa&&Oa(e)}function qt(e){return{expirationTime:0,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Kt(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Qt(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Gt(e,t,n){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n)}function Yt(e,t,n){var r=e.alternate;if(null===r){var o=e.updateQueue,i=null;null===o&&(o=e.updateQueue=qt(e.memoizedState))}else o=e.updateQueue,i=r.updateQueue,null===o?null===i?(o=e.updateQueue=qt(e.memoizedState),i=r.updateQueue=qt(r.memoizedState)):o=e.updateQueue=Kt(i):null===i&&(i=r.updateQueue=Kt(o));null===i||o===i?Gt(o,t,n):null===o.lastUpdate||null===i.lastUpdate?(Gt(o,t,n),Gt(i,t,n)):(Gt(o,t,n),i.lastUpdate=t)}function Xt(e,t,n){var r=e.updateQueue;r=null===r?e.updateQueue=qt(e.memoizedState):Zt(e,r),null===r.lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=t:(r.lastCapturedUpdate.next=t,r.lastCapturedUpdate=t),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function Zt(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Kt(t)),t}function Jt(e,t,n,r,o,i){switch(n.tag){case 1:return e=n.payload,"function"===typeof e?e.call(i,r,o):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(e=n.payload,null===(o="function"===typeof e?e.call(i,r,o):e)||void 0===o)break;return Mr({},r,o);case 2:Ra=!0}return r}function en(e,t,n,r,o){if(Ra=!1,!(0===t.expirationTime||t.expirationTime>o)){t=Zt(e,t);for(var i=t.baseState,a=null,l=0,u=t.firstUpdate,c=i;null!==u;){var s=u.expirationTime;s>o?(null===a&&(a=u,i=c),(0===l||l>s)&&(l=s)):(c=Jt(e,t,u,c,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=u:(t.lastEffect.nextEffect=u,t.lastEffect=u))),u=u.next}for(s=null,u=t.firstCapturedUpdate;null!==u;){var f=u.expirationTime;f>o?(null===s&&(s=u,null===a&&(i=c)),(0===l||l>f)&&(l=f)):(c=Jt(e,t,u,c,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=u:(t.lastCapturedEffect.nextEffect=u,t.lastCapturedEffect=u))),u=u.next}null===a&&(t.lastUpdate=null),null===s?t.lastCapturedUpdate=null:e.effectTag|=32,null===a&&null===s&&(i=c),t.baseState=i,t.firstUpdate=a,t.firstCapturedUpdate=s,t.expirationTime=l,e.memoizedState=c}}function tn(e,t){"function"!==typeof e&&r("191",e),e.call(t)}function nn(e,t,n){for(null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),e=t.firstEffect,t.firstEffect=t.lastEffect=null;null!==e;){var r=e.callback;null!==r&&(e.callback=null,tn(r,n)),e=e.nextEffect}for(e=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==e;)t=e.callback,null!==t&&(e.callback=null,tn(t,n)),e=e.nextEffect}function rn(e,t){return{value:e,source:t,stack:le(t)}}function on(e){var t=e.type._context;Tt(Fa,t._changedBits,e),Tt(Ia,t._currentValue,e),Tt(Ua,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode}function an(e){var t=Fa.current,n=Ia.current;xt(Ua,e),xt(Ia,e),xt(Fa,e),e=e.type._context,e._currentValue=n,e._changedBits=t}function ln(e){return e===Da&&r("174"),e}function un(e,t){Tt(ja,t,e),Tt(Ma,e,e),Tt(Aa,Da,e);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:at(null,"");break;default:n=8===n?t.parentNode:t,t=n.namespaceURI||null,n=n.tagName,t=at(t,n)}xt(Aa,e),Tt(Aa,t,e)}function cn(e){xt(Aa,e),xt(Ma,e),xt(ja,e)}function sn(e){Ma.current===e&&(xt(Aa,e),xt(Ma,e))}function fn(e,t,n){var r=e.memoizedState;t=t(n,r),r=null===t||void 0===t?r:Mr({},r,t),e.memoizedState=r,null!==(e=e.updateQueue)&&0===e.expirationTime&&(e.baseState=r)}function dn(e,t,n,r,o,i){var a=e.stateNode;return e=e.type,"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(n,o,i):!e.prototype||!e.prototype.isPureReactComponent||(!zr(t,n)||!zr(r,o))}function pn(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&La.enqueueReplaceState(t,t.state,null)}function hn(e,t){var n=e.type,r=e.stateNode,o=e.pendingProps,i=Ct(e);r.props=o,r.state=e.memoizedState,r.refs=Wr,r.context=St(e,i),i=e.updateQueue,null!==i&&(en(e,i,o,r,t),r.state=e.memoizedState),i=e.type.getDerivedStateFromProps,"function"===typeof i&&(fn(e,i,o),r.state=e.memoizedState),"function"===typeof n.getDerivedStateFromProps||"function"===typeof r.getSnapshotBeforeUpdate||"function"!==typeof r.UNSAFE_componentWillMount&&"function"!==typeof r.componentWillMount||(n=r.state,"function"===typeof r.componentWillMount&&r.componentWillMount(),"function"===typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&La.enqueueReplaceState(r,r.state,null),null!==(i=e.updateQueue)&&(en(e,i,o,r,t),r.state=e.memoizedState)),"function"===typeof r.componentDidMount&&(e.effectTag|=4)}function mn(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){n=n._owner;var o=void 0;n&&(2!==n.tag&&r("110"),o=n.stateNode),o||r("147",e);var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=o.refs===Wr?o.refs={}:o.refs;null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}"string"!==typeof e&&r("148"),n._owner||r("254",e)}return e}function yn(e,t){"textarea"!==e.type&&r("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function vn(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t,n){return e=At(e,t,n),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index,rm?(y=f,f=null):y=f.sibling;var v=p(r,f,l[m],u);if(null===v){null===f&&(f=y);break}e&&f&&null===v.alternate&&t(r,f),i=a(v,i,m),null===s?c=v:s.sibling=v,s=v,f=y}if(m===l.length)return n(r,f),c;if(null===f){for(;my?(v=m,m=null):v=m.sibling;var b=p(i,m,g.value,c);if(null===b){m||(m=v);break}e&&m&&null===b.alternate&&t(i,m),l=a(b,l,y),null===f?s=b:f.sibling=b,f=b,m=v}if(g.done)return n(i,m),s;if(null===m){for(;!g.done;y++,g=u.next())null!==(g=d(i,g.value,c))&&(l=a(g,l,y),null===f?s=g:f.sibling=g,f=g);return s}for(m=o(i,m);!g.done;y++,g=u.next())null!==(g=h(m,i,y,g.value,c))&&(e&&null!==g.alternate&&m.delete(null===g.key?y:g.key),l=a(g,l,y),null===f?s=g:f.sibling=g,f=g);return e&&m.forEach(function(e){return t(i,e)}),s}return function(e,o,a,u){var c="object"===typeof a&&null!==a&&a.type===Ho&&null===a.key;c&&(a=a.props.children);var s="object"===typeof a&&null!==a;if(s)switch(a.$$typeof){case Wo:e:{for(s=a.key,c=o;null!==c;){if(c.key===s){if(10===c.tag?a.type===Ho:c.type===a.type){n(e,c.sibling),o=i(c,a.type===Ho?a.props.children:a.props,u),o.ref=mn(e,c,a),o.return=e,e=o;break e}n(e,c);break}t(e,c),c=c.sibling}a.type===Ho?(o=jt(a.props.children,e.mode,u,a.key),o.return=e,e=o):(u=Mt(a,e.mode,u),u.ref=mn(e,o,a),u.return=e,e=u)}return l(e);case Vo:e:{for(c=a.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(e,o.sibling),o=i(o,a.children||[],u),o.return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}o=zt(a,e.mode,u),o.return=e,e=o}return l(e)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==o&&6===o.tag?(n(e,o.sibling),o=i(o,a,u),o.return=e,e=o):(n(e,o),o=Lt(a,e.mode,u),o.return=e,e=o),l(e);if(za(a))return m(e,o,a,u);if(ie(a))return y(e,o,a,u);if(s&&yn(e,a),"undefined"===typeof a&&!c)switch(e.tag){case 2:case 1:u=e.type,r("152",u.displayName||u.name||"Component")}return n(e,o)}}function gn(e,t){var n=new Dt(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function bn(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function wn(e){if($a){var t=Ha;if(t){var n=t;if(!bn(e,t)){if(!(t=kt(n))||!bn(e,t))return e.effectTag|=2,$a=!1,void(Va=e);gn(Va,n)}Va=e,Ha=_t(t)}else e.effectTag|=2,$a=!1,Va=e}}function kn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;Va=e}function _n(e){if(e!==Va)return!1;if(!$a)return kn(e),$a=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!wt(t,e.memoizedProps))for(t=Ha;t;)gn(e,t),t=kt(t);return kn(e),Ha=Va?kt(e.stateNode):null,!0}function En(){Ha=Va=null,$a=!1}function xn(e,t,n){Tn(e,t,n,t.expirationTime)}function Tn(e,t,n,r){t.child=null===e?Wa(t,null,n,r):Ba(t,e.child,n,r)}function Cn(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Sn(e,t,n,r,o){Cn(e,t);var i=0!==(64&t.effectTag);if(!n&&!i)return r&&Ft(t,!1),Rn(e,t);n=t.stateNode,zo.current=t;var a=i?null:n.render();return t.effectTag|=1,i&&(Tn(e,t,null,o),t.child=null),Tn(e,t,a,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&Ft(t,!0),t.child}function Pn(e){var t=e.stateNode;t.pendingContext?Rt(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Rt(e,t.context,!1),un(e,t.containerInfo)}function Nn(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){switch(o.tag){case 12:var i=0|o.stateNode;if(o.type===t&&0!==(i&n)){for(i=o;null!==i;){var a=i.alternate;if(0===i.expirationTime||i.expirationTime>r)i.expirationTime=r,null!==a&&(0===a.expirationTime||a.expirationTime>r)&&(a.expirationTime=r);else{if(null===a||!(0===a.expirationTime||a.expirationTime>r))break;a.expirationTime=r}i=i.return}i=null}else i=o.child;break;case 13:i=o.type===e.type?null:o.child;break;default:i=o.child}if(null!==i)i.return=o;else for(i=o;null!==i;){if(i===e){i=null;break}if(null!==(o=i.sibling)){o.return=i.return,i=o;break}i=i.return}o=i}}function On(e,t,n){var r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=!0;if(Sa.current)a=!1;else if(i===o)return t.stateNode=0,on(t),Rn(e,t);var l=o.value;if(t.memoizedProps=o,null===i)l=1073741823;else if(i.value===o.value){if(i.children===o.children&&a)return t.stateNode=0,on(t),Rn(e,t);l=0}else{var u=i.value;if(u===l&&(0!==u||1/u===1/l)||u!==u&&l!==l){if(i.children===o.children&&a)return t.stateNode=0,on(t),Rn(e,t);l=0}else if(l="function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,l):1073741823,0===(l|=0)){if(i.children===o.children&&a)return t.stateNode=0,on(t),Rn(e,t)}else Nn(t,r,l,n)}return t.stateNode=l,on(t),xn(e,t,o.children),t.child}function Rn(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=At(e,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=At(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}function Un(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:Pn(t);break;case 2:It(t);break;case 4:un(t,t.stateNode.containerInfo);break;case 13:on(t)}return null}switch(t.tag){case 0:null!==e&&r("155");var o=t.type,i=t.pendingProps,a=Ct(t);return a=St(t,a),o=o(i,a),t.effectTag|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,a=a.getDerivedStateFromProps,"function"===typeof a&&fn(t,a,i),i=It(t),o.updater=La,t.stateNode=o,o._reactInternalFiber=t,hn(t,n),e=Sn(e,t,!0,i,n)):(t.tag=1,xn(e,t,o),t.memoizedProps=i,e=t.child),e;case 1:return i=t.type,n=t.pendingProps,Sa.current||t.memoizedProps!==n?(o=Ct(t),o=St(t,o),i=i(n,o),t.effectTag|=1,xn(e,t,i),t.memoizedProps=n,e=t.child):e=Rn(e,t),e;case 2:if(i=It(t),null===e)if(null===t.stateNode){var l=t.pendingProps,u=t.type;o=Ct(t);var c=2===t.tag&&null!=t.type.contextTypes;a=c?St(t,o):Wr,l=new u(l,a),t.memoizedState=null!==l.state&&void 0!==l.state?l.state:null,l.updater=La,t.stateNode=l,l._reactInternalFiber=t,c&&(c=t.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=o,c.__reactInternalMemoizedMaskedChildContext=a),hn(t,n),o=!0}else{u=t.type,o=t.stateNode,c=t.memoizedProps,a=t.pendingProps,o.props=c;var s=o.context;l=Ct(t),l=St(t,l);var f=u.getDerivedStateFromProps;(u="function"===typeof f||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(c!==a||s!==l)&&pn(t,o,a,l),Ra=!1;var d=t.memoizedState;s=o.state=d;var p=t.updateQueue;null!==p&&(en(t,p,a,o,n),s=t.memoizedState),c!==a||d!==s||Sa.current||Ra?("function"===typeof f&&(fn(t,f,a),s=t.memoizedState),(c=Ra||dn(t,c,a,d,s,l))?(u||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.effectTag|=4)):("function"===typeof o.componentDidMount&&(t.effectTag|=4),t.memoizedProps=a,t.memoizedState=s),o.props=a,o.state=s,o.context=l,o=c):("function"===typeof o.componentDidMount&&(t.effectTag|=4),o=!1)}else u=t.type,o=t.stateNode,a=t.memoizedProps,c=t.pendingProps,o.props=a,s=o.context,l=Ct(t),l=St(t,l),f=u.getDerivedStateFromProps,(u="function"===typeof f||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(a!==c||s!==l)&&pn(t,o,c,l),Ra=!1,s=t.memoizedState,d=o.state=s,p=t.updateQueue,null!==p&&(en(t,p,c,o,n),d=t.memoizedState),a!==c||s!==d||Sa.current||Ra?("function"===typeof f&&(fn(t,f,c),d=t.memoizedState),(f=Ra||dn(t,a,c,s,d,l))?(u||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(c,d,l),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(c,d,l)),"function"===typeof o.componentDidUpdate&&(t.effectTag|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!==typeof o.componentDidUpdate||a===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=4),"function"!==typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=256),t.memoizedProps=c,t.memoizedState=d),o.props=c,o.state=d,o.context=l,o=f):("function"!==typeof o.componentDidUpdate||a===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=4),"function"!==typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=256),o=!1);return Sn(e,t,o,i,n);case 3:return Pn(t),i=t.updateQueue,null!==i?(o=t.memoizedState,o=null!==o?o.element:null,en(t,i,t.pendingProps,null,n),(i=t.memoizedState.element)===o?(En(),e=Rn(e,t)):(o=t.stateNode,(o=(null===e||null===e.child)&&o.hydrate)&&(Ha=_t(t.stateNode.containerInfo),Va=t,o=$a=!0),o?(t.effectTag|=2,t.child=Wa(t,null,i,n)):(En(),xn(e,t,i)),e=t.child)):(En(),e=Rn(e,t)),e;case 5:return ln(ja.current),i=ln(Aa.current),o=at(i,t.type),i!==o&&(Tt(Ma,t,t),Tt(Aa,o,t)),null===e&&wn(t),i=t.type,c=t.memoizedProps,o=t.pendingProps,a=null!==e?e.memoizedProps:null,Sa.current||c!==o||((c=1&t.mode&&!!o.hidden)&&(t.expirationTime=1073741823),c&&1073741823===n)?(c=o.children,wt(i,o)?c=null:a&&wt(i,a)&&(t.effectTag|=16),Cn(e,t),1073741823!==n&&1&t.mode&&o.hidden?(t.expirationTime=1073741823,t.memoizedProps=o,e=null):(xn(e,t,c),t.memoizedProps=o,e=t.child)):e=Rn(e,t),e;case 6:return null===e&&wn(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 4:return un(t,t.stateNode.containerInfo),i=t.pendingProps,Sa.current||t.memoizedProps!==i?(null===e?t.child=Ba(t,null,i,n):xn(e,t,i),t.memoizedProps=i,e=t.child):e=Rn(e,t),e;case 14:return i=t.type.render,n=t.pendingProps,o=t.ref,Sa.current||t.memoizedProps!==n||o!==(null!==e?e.ref:null)?(i=i(n,o),xn(e,t,i),t.memoizedProps=n,e=t.child):e=Rn(e,t),e;case 10:return n=t.pendingProps,Sa.current||t.memoizedProps!==n?(xn(e,t,n),t.memoizedProps=n,e=t.child):e=Rn(e,t),e;case 11:return n=t.pendingProps.children,Sa.current||null!==n&&t.memoizedProps!==n?(xn(e,t,n),t.memoizedProps=n,e=t.child):e=Rn(e,t),e;case 15:return n=t.pendingProps,t.memoizedProps===n?e=Rn(e,t):(xn(e,t,n.children),t.memoizedProps=n,e=t.child),e;case 13:return On(e,t,n);case 12:e:if(o=t.type,a=t.pendingProps,c=t.memoizedProps,i=o._currentValue,l=o._changedBits,Sa.current||0!==l||c!==a){if(t.memoizedProps=a,u=a.unstable_observedBits,void 0!==u&&null!==u||(u=1073741823),t.stateNode=u,0!==(l&u))Nn(t,o,l,n);else if(c===a){e=Rn(e,t);break e}n=a.children,n=n(i),t.effectTag|=1,xn(e,t,n),e=t.child}else e=Rn(e,t);return e;default:r("156")}}function In(e){e.effectTag|=4}function Fn(e,t){var n=t.pendingProps;switch(t.tag){case 1:return null;case 2:return Nt(t),null;case 3:cn(t),Ot(t);var o=t.stateNode;return o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),null!==e&&null!==e.child||(_n(t),t.effectTag&=-3),qa(t),null;case 5:sn(t),o=ln(ja.current);var i=t.type;if(null!==e&&null!=t.stateNode){var a=e.memoizedProps,l=t.stateNode,u=ln(Aa.current);l=mt(l,i,a,n,o),Ka(e,t,l,i,a,n,o,u),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!n)return null===t.stateNode&&r("166"),null;if(e=ln(Aa.current),_n(t))n=t.stateNode,i=t.type,a=t.memoizedProps,n[oo]=t,n[io]=a,o=vt(n,i,a,e,o),t.updateQueue=o,null!==o&&In(t);else{e=dt(i,n,o,e),e[oo]=t,e[io]=n;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)e.appendChild(a.stateNode);else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}ht(e,i,n,o),bt(i,n)&&In(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Qa(e,t,e.memoizedProps,n);else{if("string"!==typeof n)return null===t.stateNode&&r("166"),null;o=ln(ja.current),ln(Aa.current),_n(t)?(o=t.stateNode,n=t.memoizedProps,o[oo]=t,gt(o,n)&&In(t)):(o=pt(n,o),o[oo]=t,t.stateNode=o)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return cn(t),qa(t),null;case 13:return an(t),null;case 12:return null;case 0:r("167");default:r("156")}}function Dn(e,t){var n=t.source;null===t.stack&&null!==n&&le(n),null!==n&&ae(n),t=t.value,null!==e&&2===e.tag&&ae(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function An(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(t){Yn(e,t)}else t.current=null}function Mn(e){switch("function"===typeof $t&&$t(e),e.tag){case 2:An(e);var t=e.stateNode;if("function"===typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Yn(e,t)}break;case 5:An(e);break;case 4:zn(e)}}function jn(e){return 5===e.tag||3===e.tag||4===e.tag}function Ln(e){e:{for(var t=e.return;null!==t;){if(jn(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var o=t=void 0;switch(n.tag){case 5:t=n.stateNode,o=!1;break;case 3:case 4:t=n.stateNode.containerInfo,o=!0;break;default:r("161")}16&n.effectTag&&(lt(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||jn(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){if(5===i.tag||6===i.tag)if(n)if(o){var a=t,l=i.stateNode,u=n;8===a.nodeType?a.parentNode.insertBefore(l,u):a.insertBefore(l,u)}else t.insertBefore(i.stateNode,n);else o?(a=t,l=i.stateNode,8===a.nodeType?a.parentNode.insertBefore(l,a):a.appendChild(l)):t.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function zn(e){for(var t=e,n=!1,o=void 0,i=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:o=n.stateNode,i=!1;break e;case 3:case 4:o=n.stateNode.containerInfo,i=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var a=t,l=a;;)if(Mn(l),null!==l.child&&4!==l.tag)l.child.return=l,l=l.child;else{if(l===a)break;for(;null===l.sibling;){if(null===l.return||l.return===a)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}i?(a=o,l=t.stateNode,8===a.nodeType?a.parentNode.removeChild(l):a.removeChild(l)):o.removeChild(t.stateNode)}else if(4===t.tag?o=t.stateNode.containerInfo:Mn(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,4===t.tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function Bn(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var o=t.memoizedProps;e=null!==e?e.memoizedProps:o;var i=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&(n[io]=o,yt(n,a,i,e,o))}break;case 6:null===t.stateNode&&r("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 15:case 16:break;default:r("163")}}function Wn(e,t,n){n=Qt(n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){hr(r),Dn(e,t)},n}function Vn(e,t,n){n=Qt(n),n.tag=3;var r=e.stateNode;return null!==r&&"function"===typeof r.componentDidCatch&&(n.callback=function(){null===cl?cl=new Set([this]):cl.add(this);var n=t.value,r=t.stack;Dn(e,t),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function Hn(e,t,n,r,o,i){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=rn(r,n),e=t;do{switch(e.tag){case 3:return e.effectTag|=1024,r=Wn(e,r,i),void Xt(e,r,i);case 2:if(t=r,n=e.stateNode,0===(64&e.effectTag)&&null!==n&&"function"===typeof n.componentDidCatch&&(null===cl||!cl.has(n)))return e.effectTag|=1024,r=Vn(e,t,i),void Xt(e,r,i)}e=e.return}while(null!==e)}function $n(e){switch(e.tag){case 2:Nt(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return cn(e),Ot(e),t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 5:return sn(e),null;case 16:return t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 4:return cn(e),null;case 13:return an(e),null;default:return null}}function qn(){if(null!==tl)for(var e=tl.return;null!==e;){var t=e;switch(t.tag){case 2:Nt(t);break;case 3:cn(t),Ot(t);break;case 5:sn(t);break;case 4:cn(t);break;case 13:an(t)}e=e.return}nl=null,rl=0,ol=-1,il=!1,tl=null,ul=!1}function Kn(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0===(512&e.effectTag)){t=Fn(t,e,rl);var o=e;if(1073741823===rl||1073741823!==o.expirationTime){var i=0;switch(o.tag){case 3:case 2:var a=o.updateQueue;null!==a&&(i=a.expirationTime)}for(a=o.child;null!==a;)0!==a.expirationTime&&(0===i||i>a.expirationTime)&&(i=a.expirationTime),a=a.sibling;o.expirationTime=i}if(null!==t)return t;if(null!==n&&0===(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1vl)&&(vl=e),e}function Jn(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!el&&0!==rl&&tCl&&r("185")}e=e.return}}function er(){return Xa=ka()-Ga,Ya=2+(Xa/10|0)}function tr(e){var t=Ja;Ja=2+25*(1+((er()-2+500)/25|0));try{return e()}finally{Ja=t}}function nr(e,t,n,r,o){var i=Ja;Ja=1;try{return e(t,n,r,o)}finally{Ja=i}}function rr(e){if(0!==dl){if(e>dl)return;null!==pl&&Ea(pl)}var t=ka()-Ga;dl=e,pl=_a(ar,{timeout:10*(e-2)-t})}function or(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===fl?(sl=fl=e,e.nextScheduledRoot=e):(fl=fl.nextScheduledRoot=e,fl.nextScheduledRoot=sl);else{var n=e.remainingExpirationTime;(0===n||t=yl)&&(!gl||er()>=yl);)er(),fr(ml,yl,!gl),ir();else for(;null!==ml&&0!==yl&&(0===e||e>=yl);)fr(ml,yl,!1),ir();null!==kl&&(dl=0,pl=null),0!==yl&&rr(yl),kl=null,gl=!1,sr()}function cr(e,t){hl&&r("253"),ml=e,yl=t,fr(e,t,!1),lr(),sr()}function sr(){if(Sl=0,null!==Tl){var e=Tl;Tl=null;for(var t=0;tb&&(w=b,b=C,C=w),w=Qe(x,C),k=Qe(x,b),w&&k&&(1!==T.rangeCount||T.anchorNode!==w.node||T.anchorOffset!==w.offset||T.focusNode!==k.node||T.focusOffset!==k.offset)&&(_=document.createRange(),_.setStart(w.node,w.offset),T.removeAllRanges(),C>b?(T.addRange(_),T.extend(k.node,k.offset)):(_.setEnd(k.node,k.offset),T.addRange(_))))),T=[];for(C=x;C=C.parentNode;)1===C.nodeType&&T.push({element:C,left:C.scrollLeft,top:C.scrollTop});for("function"===typeof x.focus&&x.focus(),x=0;xPl)&&(gl=!0)}function hr(e){null===ml&&r("246"),ml.remainingExpirationTime=0,bl||(bl=!0,wl=e)}function mr(e){null===ml&&r("246"),ml.remainingExpirationTime=e}function yr(e,t){var n=_l;_l=!0;try{return e(t)}finally{(_l=n)||hl||lr()}}function vr(e,t){if(_l&&!El){El=!0;try{return e(t)}finally{El=!1}}return e(t)}function gr(e,t){hl&&r("187");var n=_l;_l=!0;try{return nr(e,t)}finally{_l=n,lr()}}function br(e,t,n){if(xl)return e(t,n);_l||hl||0===vl||(ur(vl,!1,null),vl=0);var r=xl,o=_l;_l=xl=!0;try{return e(t,n)}finally{xl=r,(_l=o)||hl||lr()}}function wr(e){var t=_l;_l=!0;try{nr(e)}finally{(_l=t)||hl||ur(1,!1,null)}}function kr(e,t,n,o,i){var a=t.current;if(n){n=n._reactInternalFiber;var l;e:{for(2===Ie(n)&&2===n.tag||r("170"),l=n;3!==l.tag;){if(Pt(l)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}(l=l.return)||r("171")}l=l.stateNode.context}n=Pt(n)?Ut(n,l):l}else n=Wr;return null===t.context?t.context=n:t.pendingContext=n,t=i,i=Qt(o),i.payload={element:e},t=void 0===t?null:t,null!==t&&(i.callback=t),Yt(a,i,o),Jn(a,o),o}function _r(e){var t=e._reactInternalFiber;return void 0===t&&("function"===typeof e.render?r("188"):r("268",Object.keys(e))),e=Ae(t),null===e?null:e.stateNode}function Er(e,t,n,r){var o=t.current;return o=Zn(er(),o),kr(e,t,n,o,r)}function xr(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Tr(e){var t=e.findFiberByHostInstance;return Vt(Mr({},e,{findHostInstanceByFiber:function(e){return e=Ae(e),null===e?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}function Cr(e,t,n){var r=3=To),Po=String.fromCharCode(32),No={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Oo=!1,Ro=!1,Uo={eventTypes:No,extractEvents:function(e,t,n,r){var o=void 0,i=void 0;if(xo)e:{switch(e){case"compositionstart":o=No.compositionStart;break e;case"compositionend":o=No.compositionEnd;break e;case"compositionupdate":o=No.compositionUpdate;break e}o=void 0}else Ro?z(e,n)&&(o=No.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=No.compositionStart);return o?(So&&(Ro||o!==No.compositionStart?o===No.compositionEnd&&Ro&&(i=F()):(go._root=r,go._startText=D(),Ro=!0)),o=ko.getPooled(o,t,n,r),i?o.data=i:null!==(i=B(n))&&(o.data=i),N(o),i=o):i=null,(e=Co?W(e,n):V(e,n))?(t=_o.getPooled(No.beforeInput,t,n,r),t.data=e,N(t)):t=null,null===i?t:null===t?i:[i,t]}},Io=null,Fo={injectFiberControlledHostComponent:function(e){Io=e}},Do=null,Ao=null,Mo={injection:Fo,enqueueStateRestore:$,needsStateRestore:q,restoreStateIfNeeded:K},jo=!1,Lo={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},zo=Dr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Bo="function"===typeof Symbol&&Symbol.for,Wo=Bo?Symbol.for("react.element"):60103,Vo=Bo?Symbol.for("react.portal"):60106,Ho=Bo?Symbol.for("react.fragment"):60107,$o=Bo?Symbol.for("react.strict_mode"):60108,qo=Bo?Symbol.for("react.profiler"):60114,Ko=Bo?Symbol.for("react.provider"):60109,Qo=Bo?Symbol.for("react.context"):60110,Go=Bo?Symbol.for("react.async_mode"):60111,Yo=Bo?Symbol.for("react.forward_ref"):60112,Xo=Bo?Symbol.for("react.timeout"):60113,Zo="function"===typeof Symbol&&Symbol.iterator,Jo=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ei={},ti={},ni={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ni[e]=new fe(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ni[t]=new fe(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ni[e]=new fe(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){ni[e]=new fe(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ni[e]=new fe(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){ni[e]=new fe(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){ni[e]=new fe(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){ni[e]=new fe(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){ni[e]=new fe(e,5,!1,e.toLowerCase(),null)});var ri=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ri,de);ni[t]=new fe(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ri,de);ni[t]=new fe(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ri,de);ni[t]=new fe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),ni.tabIndex=new fe("tabIndex",1,!1,"tabindex",null);var oi={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},ii=null,ai=null,li=!1;Ar.canUseDOM&&(li=ee("input")&&(!document.documentMode||9=document.documentMode,Mi={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},ji=null,Li=null,zi=null,Bi=!1,Wi={eventTypes:Mi,extractEvents:function(e,t,n,r){var o,i=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!i)){e:{i=qe(i),o=Gr.onSelect;for(var a=0;at)){e=-1;for(var n=[],r=Zi;null!==r;){var o=r.timeoutTime;-1!==o&&o<=t?n.push(r):-1!==o&&(-1===e||ot&&(t=8),ia=t"+t+"",t=da.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),ha={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ma=["Webkit","ms","Moz","O"];Object.keys(ha).forEach(function(e){ma.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ha[t]=ha[e]})});var ya=Mr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),va=jr.thatReturns(""),ga={createElement:dt,createTextNode:pt,setInitialProperties:ht,diffProperties:mt,updateProperties:yt,diffHydratedProperties:vt,diffHydratedText:gt,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(ve(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;to.height+o.top-e.bottom?r.setState({stuckBottom:!0}):r.setState({stuckBottom:!1})),"number"===typeof e.top&&(i.yo.width+o.left-e.right?r.setState({stuckRight:!0}):r.setState({stuckRight:!1}))}},r.debouncedScroll=function(){if(!r.frameId){var e=requestAnimationFrame(r.handleScroll);r.frameId=e}},a=n,i(r,a)}return a(t,e),f(t,[{key:"componentDidMount",value:function(){this.addEvents(),this.handleScroll()}},{key:"componentDidUpdate",value:function(e){e.scrollTarget!==this.props.scrollTarget&&(this.removeEvents(),this.addEvents())}},{key:"componentWillUnmount",value:function(){this.removeEvents()}},{key:"addEvents",value:function(){var e=this.props.scrollTarget||window;e&&this.stickyDiv.current&&e.addEventListener("scroll",this.debouncedScroll)}},{key:"removeEvents",value:function(){var e=this.props.scrollTarget||window;e&&e.removeEventListener("scroll",this.debouncedScroll),this.frameId&&cancelAnimationFrame(this.frameId)}},{key:"render",value:function(){var e=this.props.children,n=this.state,o=n.stuckBottom,i=n.stuckLeft,a=n.stuckRight,l=n.stuckTop,c=[];o&&c.push("stuck-bottom"),i&&c.push("stuck-left"),a&&c.push("stuck-right"),l&&c.push("stuck-top");var s=u.a.Children.map(e,function(e){var t=e.props&&e.props.modifiers||[];return u.a.cloneElement(e,{modifiers:[].concat(r(t),c)})});return u.a.createElement("div",{className:t.baseClass,ref:this.stickyDiv},s)}}]),t}(l.Component);d.baseClass="tk-sticky",d.propTypes={children:s.a.node.isRequired,scrollTarget:s.a.object,sides:s.a.shape({bottom:s.a.number,left:s.a.number,right:s.a.number,top:s.a.number})},d.defaultProps={scrollTarget:null,sides:{top:0}},t.a=d},function(e,t,n){e.exports=n(28)()},function(e,t,n){"use strict";function r(){}var o=n(29);e.exports=function(){function e(e,t,n,r,i,a){if(a!==o){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),l=n.n(a),u=function(){function e(e,t){for(var n=0;n
2 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
22 | React Sticky
23 |
24 |
25 |
26 | You need to enable JavaScript to run this app.
27 |
28 |
29 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": "./index.html",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App__head {
6 | }
7 |
8 | .App__title {
9 | font-size: 1.5em;
10 | padding: 20px;
11 | }
12 |
13 | .ExampleStuckContent {
14 | position: relative;
15 | padding: 10px;
16 | }
17 |
18 | .ExampleStuckContent__label {
19 | position: absolute;
20 | border-radius: 2px;
21 | bottom: 5px;
22 | right: 5px;
23 | background: black;
24 | color: white;
25 | padding: 5px;
26 | }
27 |
28 | .ExampleStuckContent--stuck-top {
29 | position: fixed;
30 | top: 0;
31 | left: 0;
32 | right: 0;
33 | background-color: orange;
34 | z-index: 1;
35 | }
36 | .ExampleStuckContent--stuck-bottom {
37 | position: fixed;
38 | bottom: 0;
39 | left: 0;
40 | right: 0;
41 | background-color: yellow;
42 | z-index: 1;
43 | }
44 | .ExampleStuckContent--stuck-left {
45 | outline: 5px solid cyan;
46 | }
47 | .ExampleStuckContent--stuck-right {
48 | outline: 5px solid salmon;
49 | }
50 |
--------------------------------------------------------------------------------
/src/App.jsx:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import './App.css';
3 | import Sticky from './Sticky.jsx';
4 | import ExampleStuckContent from './ExampleStuckContent.jsx';
5 | import PlaceholderP from './PlaceholderP.jsx';
6 |
7 | class App extends Component {
8 | render
9 | render() {
10 | return (
11 |
12 |
13 | React sticky header
14 |
15 |
16 | This content should scroll normally
17 |
18 |
19 |
20 |
21 | This is a stickable component.
22 | It will get a prop called "modifiers" containing an array of strings like "stuck-top" when it's been scrolled out of view.
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | This component sticks to the bottom.
31 | It will get a prop called "modifiers" containing an array of strings like "stuck-top" when it's been scrolled out of view.
32 |
33 |
34 |
35 |
36 |
37 | );
38 | }
39 | }
40 |
41 | export default App;
42 |
--------------------------------------------------------------------------------
/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | it('renders without crashing', () => {
6 | const div = document.createElement('div');
7 | ReactDOM.render( , div);
8 | ReactDOM.unmountComponentAtNode(div);
9 | });
10 |
--------------------------------------------------------------------------------
/src/ExampleStuckContent.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | class ExampleStuckContent extends React.Component {
4 | render() {
5 | const { children, modifiers } = this.props;
6 |
7 | const modifierClasses = modifiers.length ? modifiers.reduce((result, modifier) => {
8 | result = `${result} ${ExampleStuckContent.baseClass}--${modifier}`;
9 | return result;
10 | }, '') : '';
11 |
12 | return (
13 |
14 | {children}
15 | {!!modifiers.length &&
16 |
17 | {modifiers.map(modifier => ({modifier} ))}
18 |
19 | }
20 |
21 | );
22 | }
23 | }
24 |
25 | ExampleStuckContent.baseClass = 'ExampleStuckContent';
26 |
27 | export default ExampleStuckContent;
28 |
--------------------------------------------------------------------------------
/src/PlaceholderP.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | const PlaceholderP = (props) => (
4 |
14 | );
15 |
16 | export default PlaceholderP;
17 |
--------------------------------------------------------------------------------
/src/Sticky.jsx:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | class Sticky extends Component {
5 | static baseClass = 'tk-sticky'
6 |
7 | state = {
8 | height: 0,
9 | width: 0,
10 | stuckBottom: false,
11 | stuckLeft: false,
12 | stuckRight: false,
13 | stuckTop: false,
14 | }
15 |
16 | componentDidMount() {
17 | this.addEvents();
18 | this.handleScroll();
19 | }
20 |
21 | componentDidUpdate(prevProps) {
22 | if (prevProps.scrollTarget !== this.props.scrollTarget) {
23 | this.removeEvents();
24 | this.addEvents();
25 | }
26 | }
27 |
28 | componentWillUnmount() {
29 | this.removeEvents();
30 | }
31 |
32 | frameId = 0
33 |
34 | stickyDiv = React.createRef();
35 |
36 | handleScroll = () => {
37 | const { sides } = this.props;
38 | const stickyDiv = this.stickyDiv.current || null;
39 | const scrollTarget = this.props.scrollTarget || window;
40 |
41 | this.frameId = 0;
42 |
43 | if (!stickyDiv) {
44 | return;
45 | }
46 |
47 | let scrollRect = { // scrollTarget is the window
48 | height: scrollTarget.innerHeight,
49 | width: scrollTarget.innerWidth,
50 | top: 0,
51 | bottom: 0,
52 | left: 0,
53 | right: 0,
54 | x: scrollTarget.scrollX,
55 | y: scrollTarget.scrollY,
56 | };
57 |
58 | if (scrollTarget.getBoundingClientRect) { // scrollTarget is not the window
59 | scrollRect = scrollTarget.getBoundingClientRect();
60 | }
61 |
62 | let stickyRect = stickyDiv.getBoundingClientRect();
63 |
64 | if (!this.state.height || !this.state.width) {
65 | this.setState({
66 | height: stickyRect.height,
67 | width: stickyRect.height,
68 | });
69 | }
70 |
71 | stickyRect = { // Apparently you can't spread the results of a bounding client rectangle
72 | height: this.state.height || stickyRect.height,
73 | width: this.state.width || stickyRect.width,
74 | x: stickyRect.x,
75 | y: stickyRect.y,
76 | };
77 |
78 | if (typeof sides.bottom === 'number') {
79 | if (stickyRect.y + stickyRect.height > (scrollRect.height + scrollRect.top) - sides.bottom) {
80 | this.setState({ stuckBottom: true });
81 | } else {
82 | this.setState({ stuckBottom: false });
83 | }
84 | }
85 |
86 | if (typeof sides.top === 'number') {
87 | if (stickyRect.y < scrollRect.top + sides.top) {
88 | this.setState({ stuckTop: true });
89 | } else {
90 | this.setState({ stuckTop: false });
91 | }
92 | }
93 |
94 | if (typeof sides.left === 'number') {
95 | if (stickyRect.x < scrollRect.left + sides.left) {
96 | this.setState({ stuckLeft: true });
97 | } else {
98 | this.setState({ stuckLeft: false });
99 | }
100 | }
101 |
102 | if (typeof sides.right === 'number') {
103 | if (stickyRect.x + stickyRect.width > (scrollRect.width + scrollRect.left) - sides.right) {
104 | this.setState({ stuckRight: true });
105 | } else {
106 | this.setState({ stuckRight: false });
107 | }
108 | }
109 | }
110 |
111 | debouncedScroll = () => {
112 | if (!this.frameId) {
113 | const frameId = requestAnimationFrame(this.handleScroll);
114 | this.frameId = frameId;
115 | }
116 | }
117 |
118 | addEvents() {
119 | const scrollTarget = this.props.scrollTarget || window;
120 |
121 | if (scrollTarget && this.stickyDiv.current) {
122 | scrollTarget.addEventListener('scroll', this.debouncedScroll);
123 | }
124 | }
125 |
126 | removeEvents() {
127 | const scrollTarget = this.props.scrollTarget || window;
128 |
129 | if (scrollTarget) {
130 | scrollTarget.removeEventListener('scroll', this.debouncedScroll);
131 | }
132 |
133 | if (this.frameId) {
134 | cancelAnimationFrame(this.frameId);
135 | }
136 | }
137 |
138 | render() {
139 | const { children } = this.props;
140 | const { stuckBottom, stuckLeft, stuckRight, stuckTop } = this.state;
141 |
142 | const stickyModifiers = [];
143 |
144 | if (stuckBottom) {
145 | stickyModifiers.push('stuck-bottom');
146 | }
147 |
148 | if (stuckLeft) {
149 | stickyModifiers.push('stuck-left');
150 | }
151 |
152 | if (stuckRight) {
153 | stickyModifiers.push('stuck-right');
154 | }
155 |
156 | if (stuckTop) {
157 | stickyModifiers.push('stuck-top');
158 | }
159 |
160 | const childrenWithStuckProps = React.Children.map(children, (child) => {
161 | const childModifiers = (child.props && child.props.modifiers) || [];
162 | return React.cloneElement(child, { modifiers: [...childModifiers, ...stickyModifiers] });
163 | });
164 |
165 | return (
166 |
170 | {childrenWithStuckProps}
171 |
172 | );
173 | }
174 | }
175 |
176 | Sticky.propTypes = {
177 | /** Pass in a React component, and it will receive `stuckBottom`, `stuckLeft`, `stuckRight`, and/or `stuckTop` modifiers */
178 | children: PropTypes.node.isRequired,
179 | /** If you have an internally scrolling component, pass its ref callback to watch for scroll events */
180 | scrollTarget: PropTypes.object,
181 | /** These offsets determine how far from the edge of the page an element must be to count as 'stuck' */
182 | sides: PropTypes.shape({
183 | bottom: PropTypes.number,
184 | left: PropTypes.number,
185 | right: PropTypes.number,
186 | top: PropTypes.number,
187 | }),
188 | };
189 |
190 | Sticky.defaultProps = {
191 | scrollTarget: null,
192 | sides: {
193 | top: 0,
194 | },
195 | };
196 |
197 | export default Sticky;
198 |
--------------------------------------------------------------------------------
/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | padding: 0;
4 | font-family: sans-serif;
5 | }
6 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App.jsx';
5 | import registerServiceWorker from './registerServiceWorker';
6 |
7 | ReactDOM.render( , document.getElementById('root'));
8 | registerServiceWorker();
9 |
--------------------------------------------------------------------------------
/src/logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/registerServiceWorker.js:
--------------------------------------------------------------------------------
1 | // In production, we register a service worker to serve assets from local cache.
2 |
3 | // This lets the app load faster on subsequent visits in production, and gives
4 | // it offline capabilities. However, it also means that developers (and users)
5 | // will only see deployed updates on the "N+1" visit to a page, since previously
6 | // cached resources are updated in the background.
7 |
8 | // To learn more about the benefits of this model, read https://goo.gl/KwvDNy.
9 | // This link also includes instructions on opting out of this behavior.
10 |
11 | const isLocalhost = Boolean(
12 | window.location.hostname === 'localhost' ||
13 | // [::1] is the IPv6 localhost address.
14 | window.location.hostname === '[::1]' ||
15 | // 127.0.0.1/8 is considered localhost for IPv4.
16 | window.location.hostname.match(
17 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
18 | )
19 | );
20 |
21 | export default function register() {
22 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
23 | // The URL constructor is available in all browsers that support SW.
24 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location);
25 | if (publicUrl.origin !== window.location.origin) {
26 | // Our service worker won't work if PUBLIC_URL is on a different origin
27 | // from what our page is served on. This might happen if a CDN is used to
28 | // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374
29 | return;
30 | }
31 |
32 | window.addEventListener('load', () => {
33 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
34 |
35 | if (isLocalhost) {
36 | // This is running on localhost. Lets check if a service worker still exists or not.
37 | checkValidServiceWorker(swUrl);
38 |
39 | // Add some additional logging to localhost, pointing developers to the
40 | // service worker/PWA documentation.
41 | navigator.serviceWorker.ready.then(() => {
42 | console.log(
43 | 'This web app is being served cache-first by a service ' +
44 | 'worker. To learn more, visit https://goo.gl/SC7cgQ'
45 | );
46 | });
47 | } else {
48 | // Is not local host. Just register service worker
49 | registerValidSW(swUrl);
50 | }
51 | });
52 | }
53 | }
54 |
55 | function registerValidSW(swUrl) {
56 | navigator.serviceWorker
57 | .register(swUrl)
58 | .then(registration => {
59 | registration.onupdatefound = () => {
60 | const installingWorker = registration.installing;
61 | installingWorker.onstatechange = () => {
62 | if (installingWorker.state === 'installed') {
63 | if (navigator.serviceWorker.controller) {
64 | // At this point, the old content will have been purged and
65 | // the fresh content will have been added to the cache.
66 | // It's the perfect time to display a "New content is
67 | // available; please refresh." message in your web app.
68 | console.log('New content is available; please refresh.');
69 | } else {
70 | // At this point, everything has been precached.
71 | // It's the perfect time to display a
72 | // "Content is cached for offline use." message.
73 | console.log('Content is cached for offline use.');
74 | }
75 | }
76 | };
77 | };
78 | })
79 | .catch(error => {
80 | console.error('Error during service worker registration:', error);
81 | });
82 | }
83 |
84 | function checkValidServiceWorker(swUrl) {
85 | // Check if the service worker can be found. If it can't reload the page.
86 | fetch(swUrl)
87 | .then(response => {
88 | // Ensure service worker exists, and that we really are getting a JS file.
89 | if (
90 | response.status === 404 ||
91 | response.headers.get('content-type').indexOf('javascript') === -1
92 | ) {
93 | // No service worker found. Probably a different app. Reload the page.
94 | navigator.serviceWorker.ready.then(registration => {
95 | registration.unregister().then(() => {
96 | window.location.reload();
97 | });
98 | });
99 | } else {
100 | // Service worker found. Proceed as normal.
101 | registerValidSW(swUrl);
102 | }
103 | })
104 | .catch(() => {
105 | console.log(
106 | 'No internet connection found. App is running in offline mode.'
107 | );
108 | });
109 | }
110 |
111 | export function unregister() {
112 | if ('serviceWorker' in navigator) {
113 | navigator.serviceWorker.ready.then(registration => {
114 | registration.unregister();
115 | });
116 | }
117 | }
118 |
--------------------------------------------------------------------------------