diff --git a/404.html b/404.html index 17fcafe..7a2aae3 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ - cache4k
\ No newline at end of file + cache4k
\ No newline at end of file diff --git a/api/cache4k/io.github.reactivecircus.cache4k/-cache-event-listener/index.html b/api/cache4k/io.github.reactivecircus.cache4k/-cache-event-listener/index.html index 6041274..a334477 100644 --- a/api/cache4k/io.github.reactivecircus.cache4k/-cache-event-listener/index.html +++ b/api/cache4k/io.github.reactivecircus.cache4k/-cache-event-listener/index.html @@ -56,7 +56,7 @@

CacheEventList
fun interface CacheEventListener<Key : Any, Value : Any>

Definition of the contract for implementing listeners to receive CacheEvents from a Cache.

-
+

Functions

diff --git a/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-created/index.html b/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-created/index.html index 73a2148..b39ed64 100644 --- a/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-created/index.html +++ b/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-created/index.html @@ -56,7 +56,7 @@

Created

class Created<Key : Any, Value : Any>(val key: Key, val value: Value) : CacheEvent<Key, Value>
-
+

Constructors

@@ -77,83 +77,83 @@

Constructors

-
-

Functions

-
+
+

Properties

+
- - + +
Link copied to clipboard
-
open operator override fun equals(other: Any?): Boolean
+
open override val key: Key
- +
- - + +
Link copied to clipboard
-
open override fun hashCode(): Int
+
- +
+
+
+

Functions

+
- - + +
Link copied to clipboard
-
open override fun toString(): String
+
open operator override fun equals(other: Any?): Boolean
-
-
-
-

Properties

-
+
- - + +
Link copied to clipboard
-
open override val key: Key
+
open override fun hashCode(): Int
- +
- - + +
Link copied to clipboard
- +
open override fun toString(): String
diff --git a/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-evicted/index.html b/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-evicted/index.html index a41edff..6888051 100644 --- a/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-evicted/index.html +++ b/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-evicted/index.html @@ -56,7 +56,7 @@

Evicted

class Evicted<Key : Any, Value : Any>(val key: Key, val value: Value) : CacheEvent<Key, Value>
-
+

Constructors

@@ -77,83 +77,83 @@

Constructors

-
-

Functions

-
+
+

Properties

+
- - + +
Link copied to clipboard
-
open operator override fun equals(other: Any?): Boolean
+
open override val key: Key
- +
- - + +
Link copied to clipboard
-
open override fun hashCode(): Int
+
- +
+
+
+

Functions

+
- - + +
Link copied to clipboard
-
open override fun toString(): String
+
open operator override fun equals(other: Any?): Boolean
-
-
-
-

Properties

-
+
- - + +
Link copied to clipboard
-
open override val key: Key
+
open override fun hashCode(): Int
- +
- - + +
Link copied to clipboard
- +
open override fun toString(): String
diff --git a/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-expired/index.html b/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-expired/index.html index 2ed356f..f9e3fec 100644 --- a/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-expired/index.html +++ b/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-expired/index.html @@ -56,7 +56,7 @@

Expired

class Expired<Key : Any, Value : Any>(val key: Key, val value: Value) : CacheEvent<Key, Value>
-
+

Constructors

@@ -77,83 +77,83 @@

Constructors

-
-

Functions

-
+
+

Properties

+
- - + +
Link copied to clipboard
-
open operator override fun equals(other: Any?): Boolean
+
open override val key: Key
- +
- - + +
Link copied to clipboard
-
open override fun hashCode(): Int
+
- +
+
+
+

Functions

+
- - + +
Link copied to clipboard
-
open override fun toString(): String
+
open operator override fun equals(other: Any?): Boolean
-
-
-
-

Properties

-
+
- - + +
Link copied to clipboard
-
open override val key: Key
+
open override fun hashCode(): Int
- +
- - + +
Link copied to clipboard
- +
open override fun toString(): String
diff --git a/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-removed/index.html b/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-removed/index.html index a727467..4b64729 100644 --- a/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-removed/index.html +++ b/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-removed/index.html @@ -56,7 +56,7 @@

Removed

class Removed<Key : Any, Value : Any>(val key: Key, val value: Value) : CacheEvent<Key, Value>
-
+

Constructors

@@ -77,83 +77,83 @@

Constructors

-
-

Functions

-
+
+

Properties

+
- - + +
Link copied to clipboard
-
open operator override fun equals(other: Any?): Boolean
+
open override val key: Key
- +
- - + +
Link copied to clipboard
-
open override fun hashCode(): Int
+
- +
+
+
+

Functions

+
- - + +
Link copied to clipboard
-
open override fun toString(): String
+
open operator override fun equals(other: Any?): Boolean
-
-
-
-

Properties

-
+
- - + +
Link copied to clipboard
-
open override val key: Key
+
open override fun hashCode(): Int
- +
- - + +
Link copied to clipboard
- +
open override fun toString(): String
diff --git a/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-updated/index.html b/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-updated/index.html index 9b20892..e8eb763 100644 --- a/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-updated/index.html +++ b/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/-updated/index.html @@ -56,7 +56,7 @@

Updated

class Updated<Key : Any, Value : Any>(val key: Key, val oldValue: Value, val newValue: Value) : CacheEvent<Key, Value>
-
+

Constructors

@@ -77,98 +77,98 @@

Constructors

-
-

Functions

-
+
+

Properties

+
- - + +
Link copied to clipboard
-
open operator override fun equals(other: Any?): Boolean
+
open override val key: Key
- +
- - + +
Link copied to clipboard
-
open override fun hashCode(): Int
+
- +
- - + +
Link copied to clipboard
-
open override fun toString(): String
+
-
-

Properties

-
+
+

Functions

+
- - + +
Link copied to clipboard
-
open override val key: Key
+
open operator override fun equals(other: Any?): Boolean
- +
- - + +
Link copied to clipboard
- +
open override fun hashCode(): Int
- +
- - + +
Link copied to clipboard
- +
open override fun toString(): String
diff --git a/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/index.html b/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/index.html index 366e2fe..4aabe21 100644 --- a/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/index.html +++ b/api/cache4k/io.github.reactivecircus.cache4k/-cache-event/index.html @@ -56,7 +56,7 @@

CacheEvent

interface CacheEvent<Key : Any, Value : Any>

An event resulting from a mutative Cache operation.

Inheritors

-
+

Types

diff --git a/api/cache4k/io.github.reactivecircus.cache4k/-cache/-builder/-companion/index.html b/api/cache4k/io.github.reactivecircus.cache4k/-cache/-builder/-companion/index.html index 60c644c..9221a51 100644 --- a/api/cache4k/io.github.reactivecircus.cache4k/-cache/-builder/-companion/index.html +++ b/api/cache4k/io.github.reactivecircus.cache4k/-cache/-builder/-companion/index.html @@ -56,7 +56,7 @@

Companion

object Companion
-
+

Functions

diff --git a/api/cache4k/io.github.reactivecircus.cache4k/-cache/-builder/index.html b/api/cache4k/io.github.reactivecircus.cache4k/-cache/-builder/index.html index da2a82b..6411621 100644 --- a/api/cache4k/io.github.reactivecircus.cache4k/-cache/-builder/index.html +++ b/api/cache4k/io.github.reactivecircus.cache4k/-cache/-builder/index.html @@ -56,7 +56,7 @@

Builder

interface Builder<K : Any, V : Any>

Main entry point for creating a Cache.

-
+

Types

diff --git a/api/cache4k/io.github.reactivecircus.cache4k/-cache/index.html b/api/cache4k/io.github.reactivecircus.cache4k/-cache/index.html index 9739240..7de554b 100644 --- a/api/cache4k/io.github.reactivecircus.cache4k/-cache/index.html +++ b/api/cache4k/io.github.reactivecircus.cache4k/-cache/index.html @@ -56,7 +56,7 @@

Cache

interface Cache<in Key : Any, Value : Any>

An in-memory key-value cache with support for time-based (expiration) and size-based evictions.

-
+

Types

diff --git a/api/cache4k/io.github.reactivecircus.cache4k/-fake-time-source/index.html b/api/cache4k/io.github.reactivecircus.cache4k/-fake-time-source/index.html index 36a7663..1b430b4 100644 --- a/api/cache4k/io.github.reactivecircus.cache4k/-fake-time-source/index.html +++ b/api/cache4k/io.github.reactivecircus.cache4k/-fake-time-source/index.html @@ -56,7 +56,7 @@

FakeTimeSource

A time source that has programmatically updatable readings with support for multi-threaded access in Kotlin/Native.

Implementation is identical to kotlin.time.TestTimeSource except the internal reading is an AtomicLong.

-
+

Constructors

diff --git a/api/scripts/main.js b/api/scripts/main.js index ca7ae01..e5b54a3 100644 --- a/api/scripts/main.js +++ b/api/scripts/main.js @@ -40,5 +40,5 @@ object-assign * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var t,r,o,i;if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;n.unstable_now=function(){return a.now()}}else{var l=Date,c=l.now();n.unstable_now=function(){return l.now()-c}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,s=null,f=function(){if(null!==u)try{var e=n.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(f,0),e}};t=function(e){null!==u?setTimeout(t,0,e):(u=e,setTimeout(f,0))},r=function(e,n){s=setTimeout(e,n)},o=function(){clearTimeout(s)},n.unstable_shouldYield=function(){return!1},i=n.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,d=window.clearTimeout;if("undefined"!=typeof console){var h=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,v=null,A=-1,b=5,m=0;n.unstable_shouldYield=function(){return n.unstable_now()>=m},i=function(){},n.unstable_forceFrameRate=function(e){0>e||125>>1,o=e[r];if(!(void 0!==o&&0x(a,t))void 0!==c&&0>x(c,a)?(e[r]=c,e[l]=t,r=l):(e[r]=a,e[i]=t,r=i);else{if(!(void 0!==c&&0>x(c,t)))break e;e[r]=c,e[l]=t,r=l}}}return n}return null}function x(e,n){var t=e.sortIndex-n.sortIndex;return 0!==t?t:e.id-n.id}var k=[],S=[],O=1,B=null,I=3,T=!1,P=!1,j=!1;function z(e){for(var n=C(S);null!==n;){if(null===n.callback)w(S);else{if(!(n.startTime<=e))break;w(S),n.sortIndex=n.expirationTime,_(k,n)}n=C(S)}}function R(e){if(j=!1,z(e),!P)if(null!==C(k))P=!0,t(M);else{var n=C(S);null!==n&&r(R,n.startTime-e)}}function M(e,t){P=!1,j&&(j=!1,o()),T=!0;var i=I;try{for(z(t),B=C(k);null!==B&&(!(B.expirationTime>t)||e&&!n.unstable_shouldYield());){var a=B.callback;if("function"==typeof a){B.callback=null,I=B.priorityLevel;var l=a(B.expirationTime<=t);t=n.unstable_now(),"function"==typeof l?B.callback=l:B===C(k)&&w(k),z(t)}else w(k);B=C(k)}if(null!==B)var c=!0;else{var u=C(S);null!==u&&r(R,u.startTime-t),c=!1}return c}finally{B=null,I=i,T=!1}}var D=i;n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(e){e.callback=null},n.unstable_continueExecution=function(){P||T||(P=!0,t(M))},n.unstable_getCurrentPriorityLevel=function(){return I},n.unstable_getFirstCallbackNode=function(){return C(k)},n.unstable_next=function(e){switch(I){case 1:case 2:case 3:var n=3;break;default:n=I}var t=I;I=n;try{return e()}finally{I=t}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=D,n.unstable_runWithPriority=function(e,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var t=I;I=e;try{return n()}finally{I=t}},n.unstable_scheduleCallback=function(e,i,a){var l=n.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0l?(e.sortIndex=a,_(S,e),null===C(k)&&e===C(S)&&(j?o():j=!0,r(R,a-l))):(e.sortIndex=c,_(k,e),P||T||(P=!0,t(M))),e},n.unstable_wrapCallback=function(e){var n=I;return function(){var t=I;I=n;try{return e.apply(this,arguments)}finally{I=t}}}},3840:(e,n,t)=>{"use strict";e.exports=t(53)},7478:(e,n,t)=>{"use strict";var r=t(210),o=t(1924),i=t(631),a=r("%TypeError%"),l=r("%WeakMap%",!0),c=r("%Map%",!0),u=o("WeakMap.prototype.get",!0),s=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),d=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(e,n){for(var t,r=e;null!==(t=r.next);r=t)if(t.key===n)return r.next=t.next,t.next=e.next,e.next=t,t};e.exports=function(){var e,n,t,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+i(e))},get:function(r){if(l&&r&&("object"==typeof r||"function"==typeof r)){if(e)return u(e,r)}else if(c){if(n)return p(n,r)}else if(t)return function(e,n){var t=g(e,n);return t&&t.value}(t,r)},has:function(r){if(l&&r&&("object"==typeof r||"function"==typeof r)){if(e)return f(e,r)}else if(c){if(n)return h(n,r)}else if(t)return function(e,n){return!!g(e,n)}(t,r);return!1},set:function(r,o){l&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new l),s(e,r,o)):c?(n||(n=new c),d(n,r,o)):(t||(t={key:{},next:null}),function(e,n,t){var r=g(e,n);r?r.value=t:e.next={key:n,next:e.next,value:t}}(t,r,o))}};return r}},3854:function(e){!function(n){var t={browser:[[/msie ([\.\_\d]+)/,"ie"],[/trident\/.*?rv:([\.\_\d]+)/,"ie"],[/firefox\/([\.\_\d]+)/,"firefox"],[/chrome\/([\.\_\d]+)/,"chrome"],[/version\/([\.\_\d]+).*?safari/,"safari"],[/mobile safari ([\.\_\d]+)/,"safari"],[/android.*?version\/([\.\_\d]+).*?safari/,"com.android.browser"],[/crios\/([\.\_\d]+).*?safari/,"chrome"],[/opera/,"opera"],[/opera\/([\.\_\d]+)/,"opera"],[/opera ([\.\_\d]+)/,"opera"],[/opera mini.*?version\/([\.\_\d]+)/,"opera.mini"],[/opios\/([a-z\.\_\d]+)/,"opera"],[/blackberry/,"blackberry"],[/blackberry.*?version\/([\.\_\d]+)/,"blackberry"],[/bb\d+.*?version\/([\.\_\d]+)/,"blackberry"],[/rim.*?version\/([\.\_\d]+)/,"blackberry"],[/iceweasel\/([\.\_\d]+)/,"iceweasel"],[/edge\/([\.\d]+)/,"edge"]],os:[[/linux ()([a-z\.\_\d]+)/,"linux"],[/mac os x/,"macos"],[/mac os x.*?([\.\_\d]+)/,"macos"],[/os ([\.\_\d]+) like mac os/,"ios"],[/openbsd ()([a-z\.\_\d]+)/,"openbsd"],[/android/,"android"],[/android ([a-z\.\_\d]+);/,"android"],[/mozilla\/[a-z\.\_\d]+ \((?:mobile)|(?:tablet)/,"firefoxos"],[/windows\s*(?:nt)?\s*([\.\_\d]+)/,"windows"],[/windows phone.*?([\.\_\d]+)/,"windows.phone"],[/windows mobile/,"windows.mobile"],[/blackberry/,"blackberryos"],[/bb\d+/,"blackberryos"],[/rim.*?os\s*([\.\_\d]+)/,"blackberryos"]],device:[[/ipad/,"ipad"],[/iphone/,"iphone"],[/lumia/,"lumia"],[/htc/,"htc"],[/nexus/,"nexus"],[/galaxy nexus/,"galaxy.nexus"],[/nokia/,"nokia"],[/ gt\-/,"galaxy"],[/ sm\-/,"galaxy"],[/xbox/,"xbox"],[/(?:bb\d+)|(?:blackberry)|(?: rim )/,"blackberry"]]},r="Unknown",o=Object.keys(t);function i(){var e=this;o.forEach((function(n){e[n]={name:r,version:[],versionString:r}}))}function a(e,n,o){t[n].forEach((function(t){var i=t[0],a=t[1],l=o.match(i);l&&(e[n].name=a,l[2]?(e[n].versionString=l[2],e[n].version=[]):l[1]?(e[n].versionString=l[1].replace(/_/g,"."),e[n].version=l[1].split(/[\._]/).map((function(e){return parseInt(e)}))):(e[n].versionString=r,e[n].version=[]))}))}i.prototype.sniff=function(e){var n=this,t="undefined"!=typeof window?navigator.userAgent:"",r=(e||t).toLowerCase();return o.forEach((function(e){a(n,e,r)})),this},e.exports?e.exports=i:(n.Sniffr=new i,n.Sniffr.sniff(navigator.userAgent))}(this)},8442:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(8759);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},5526:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(8199);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},4369:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(3109);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},2242:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(2890);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},3138:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(8004);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},2224:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(9791);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},108:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(4434);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},3068:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(5968);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},1050:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(9506);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},7869:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(5578);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},8095:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(8546);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},125:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(2616);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},6017:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(6751);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},1442:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(2260);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},335:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(5339);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},2593:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(4502);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},3833:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(5729);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},2481:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(3099);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},3379:e=>{"use strict";var n=[];function t(e){for(var t=-1,r=0;r{"use strict";var n={};e.exports=function(e,t){var r=function(e){if(void 0===n[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}n[e]=t}return n[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(t)}},9216:e=>{"use strict";e.exports=function(e){var n=document.createElement("style");return e.setAttributes(n,e.attributes),e.insert(n,e.options),n}},3565:(e,n,t)=>{"use strict";e.exports=function(e){var n=t.nc;n&&e.setAttribute("nonce",n)}},7795:e=>{"use strict";e.exports=function(e){var n=e.insertStyleElement(e);return{update:function(t){!function(e,n,t){var r="";t.supports&&(r+="@supports (".concat(t.supports,") {")),t.media&&(r+="@media ".concat(t.media," {"));var o=void 0!==t.layer;o&&(r+="@layer".concat(t.layer.length>0?" ".concat(t.layer):""," {")),r+=t.css,o&&(r+="}"),t.media&&(r+="}"),t.supports&&(r+="}");var i=t.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),n.styleTagTransform(r,e,n.options)}(n,e,t)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)}}}},4589:e=>{"use strict";e.exports=function(e,n){if(n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}},4927:(e,n,t)=>{function r(e){try{if(!t.g.localStorage)return!1}catch(e){return!1}var n=t.g.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,n){if(r("noDeprecation"))return e;var t=!1;return function(){if(!t){if(r("throwDeprecation"))throw new Error(n);r("traceDeprecation")?console.trace(n):console.warn(n),t=!0}return e.apply(this,arguments)}}},3679:(e,n,t)=>{"use strict";var r=t(9981),o=t(4578),i=t(6814),a=t(2636),l=t(3376);e.exports=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e?null:r(e)?"String":o(e)?"Number":i(e)?"Boolean":a(e)?"Symbol":l(e)?"BigInt":void 0}},6430:(e,n,t)=>{"use strict";var r=t(9804),o=t(3083),i=t(1924),a=i("Object.prototype.toString"),l=t(6410)(),c="undefined"==typeof globalThis?t.g:globalThis,u=o(),s=i("String.prototype.slice"),f={},p=t(882),d=Object.getPrototypeOf;l&&p&&d&&r(u,(function(e){if("function"==typeof c[e]){var n=new c[e];if(Symbol.toStringTag in n){var t=d(n),r=p(t,Symbol.toStringTag);if(!r){var o=d(t);r=p(o,Symbol.toStringTag)}f[e]=r.get}}}));var h=t(5692);e.exports=function(e){return!!h(e)&&(l&&Symbol.toStringTag in e?function(e){var n=!1;return r(f,(function(t,r){if(!n)try{var o=t.call(e);o===r&&(n=o)}catch(e){}})),n}(e):s(a(e),8,-1))}},4654:()=>{},3083:(e,n,t)=>{"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],o="undefined"==typeof globalThis?t.g:globalThis;e.exports=function(){for(var e=[],n=0;n{"use strict";var r=t(210)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},3216:(e,n,t)=>{"use strict";var r=t(2584);if(t(1405)()||t(5419)()){var o=Symbol.iterator;e.exports=function(e){return null!=e&&void 0!==e[o]?e[o]():r(e)?Array.prototype[o].call(e):void 0}}else{var i=t(5826),a=t(9981),l=t(210),c=l("%Map%",!0),u=l("%Set%",!0),s=t(1924),f=s("Array.prototype.push"),p=s("String.prototype.charCodeAt"),d=s("String.prototype.slice"),h=function(e){var n=0;return{next:function(){var t,r=n>=e.length;return r||(t=e[n],n+=1),{done:r,value:t}}}},g=function(e,n){if(i(e)||r(e))return h(e);if(a(e)){var t=0;return{next:function(){var n=function(e,n){if(n+1>=e.length)return n+1;var t=p(e,n);if(t<55296||t>56319)return n+1;var r=p(e,n+1);return r<56320||r>57343?n+1:n+2}(e,t),r=d(e,t,n);return t=n,{done:n>e.length,value:r}}}}return n&&void 0!==e["_es6-shim iterator_"]?e["_es6-shim iterator_"]():void 0};if(c||u){var v=t(8379),A=t(9572),b=s("Map.prototype.forEach",!0),m=s("Set.prototype.forEach",!0);if("undefined"==typeof process||!process.versions||!process.versions.node)var y=s("Map.prototype.iterator",!0),E=s("Set.prototype.iterator",!0),_=function(e){var n=!1;return{next:function(){try{return{done:n,value:n?void 0:e.next()}}catch(e){return n=!0,{done:!0,value:void 0}}}}};var C=s("Map.prototype.@@iterator",!0)||s("Map.prototype._es6-shim iterator_",!0),w=s("Set.prototype.@@iterator",!0)||s("Set.prototype._es6-shim iterator_",!0);e.exports=function(e){return function(e){if(v(e)){if(y)return _(y(e));if(C)return C(e);if(b){var n=[];return b(e,(function(e,t){f(n,[t,e])})),h(n)}}if(A(e)){if(E)return _(E(e));if(w)return w(e);if(m){var t=[];return m(e,(function(e){f(t,e)})),h(t)}}}(e)||g(e)}}else e.exports=function(e){if(null!=e)return g(e,!0)}}},3483:(e,n,t)=>{"use strict";var r=t(8379),o=t(9572),i=t(1718),a=t(5899);e.exports=function(e){if(e&&"object"==typeof e){if(r(e))return"Map";if(o(e))return"Set";if(i(e))return"WeakMap";if(a(e))return"WeakSet"}return!1}}},n={};function t(r){var o=n[r];if(void 0!==o)return o.exports;var i=n[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e=t(7294),n=t(3935),r=(t(9070),t(8304),t(489),t(2419),t(8011),t(2772),t(7327),t(5003),t(9554),t(4747),t(9337),t(3321),t(2165),t(6992),t(8783),t(3948),t(6699),t(2023),t(2222),t(2526),t(1817),t(5212),t(1539),t(9601),t(7941),t(9826),t(4553),t(5697)),o=t.n(r),i=t(4184),a=t.n(i);function l(){return l=Object.assign||function(e){for(var n=1;n=0&&c===l&&u())}function E(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var _=function(){function e(n){var t=n.cellCount,r=n.cellSizeGetter,o=n.estimatedCellSize;c(this,e),A(this,"_cellSizeAndPositionData",{}),A(this,"_lastMeasuredIndex",-1),A(this,"_lastBatchedIndex",-1),A(this,"_cellCount",void 0),A(this,"_cellSizeGetter",void 0),A(this,"_estimatedCellSize",void 0),this._cellSizeGetter=r,this._cellCount=t,this._estimatedCellSize=o}return s(e,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(e){var n=e.cellCount,t=e.estimatedCellSize,r=e.cellSizeGetter;this._cellCount=n,this._estimatedCellSize=t,this._cellSizeGetter=r}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(e){if(e<0||e>=this._cellCount)throw Error("Requested index ".concat(e," is outside of range 0..").concat(this._cellCount));if(e>this._lastMeasuredIndex)for(var n=this.getSizeAndPositionOfLastMeasuredCell(),t=n.offset+n.size,r=this._lastMeasuredIndex+1;r<=e;r++){var o=this._cellSizeGetter({index:r});if(void 0===o||isNaN(o))throw Error("Invalid size returned for cell ".concat(r," of value ").concat(o));null===o?(this._cellSizeAndPositionData[r]={offset:t,size:0},this._lastBatchedIndex=e):(this._cellSizeAndPositionData[r]={offset:t,size:o},t+=o,this._lastMeasuredIndex=e)}return this._cellSizeAndPositionData[e]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(e){var n=e.align,t=void 0===n?"auto":n,r=e.containerSize,o=e.currentOffset,i=e.targetIndex;if(r<=0)return 0;var a,l=this.getSizeAndPositionOfCell(i),c=l.offset,u=c-r+l.size;switch(t){case"start":a=c;break;case"end":a=u;break;case"center":a=c-(r-l.size)/2;break;default:a=Math.max(u,Math.min(c,o))}var s=this.getTotalSize();return Math.max(0,Math.min(s-r,a))}},{key:"getVisibleCellRange",value:function(e){var n=e.containerSize,t=e.offset;if(0===this.getTotalSize())return{};var r=t+n,o=this._findNearestCell(t),i=this.getSizeAndPositionOfCell(o);t=i.offset+i.size;for(var a=o;tt&&(e=r-1)}return n>0?n-1:0}},{key:"_exponentialSearch",value:function(e,n){for(var t=1;e=e?this._binarySearch(t,0,e):this._exponentialSearch(t,e)}}]),e}(),C=function(){return"undefined"!=typeof window&&window.chrome?16777100:15e5},w=function(){function e(n){var t=n.maxScrollSize,r=void 0===t?C():t,o=E(n,["maxScrollSize"]);c(this,e),A(this,"_cellSizeAndPositionManager",void 0),A(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new _(o),this._maxScrollSize=r}return s(e,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(e){var n=e.containerSize,t=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize(),i=this._getOffsetPercentage({containerSize:n,offset:t,totalSize:o});return Math.round(i*(o-r))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var n=e.align,t=void 0===n?"auto":n,r=e.containerSize,o=e.currentOffset,i=e.targetIndex;o=this._safeOffsetToOffset({containerSize:r,offset:o});var a=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:t,containerSize:r,currentOffset:o,targetIndex:i});return this._offsetToSafeOffset({containerSize:r,offset:a})}},{key:"getVisibleCellRange",value:function(e){var n=e.containerSize,t=e.offset;return t=this._safeOffsetToOffset({containerSize:n,offset:t}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:n,offset:t})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var n=e.containerSize,t=e.offset,r=e.totalSize;return r<=n?0:t/(r-n)}},{key:"_offsetToSafeOffset",value:function(e){var n=e.containerSize,t=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize();if(r===o)return t;var i=this._getOffsetPercentage({containerSize:n,offset:t,totalSize:r});return Math.round(i*(o-n))}},{key:"_safeOffsetToOffset",value:function(e){var n=e.containerSize,t=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize();if(r===o)return t;var i=this._getOffsetPercentage({containerSize:n,offset:t,totalSize:o});return Math.round(i*(r-n))}}]),e}();function x(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n={};return function(t){var r=t.callback,o=t.indices,i=Object.keys(o),a=!e||i.every((function(e){var n=o[e];return Array.isArray(n)?n.length>0:n>=0})),l=i.length!==Object.keys(n).length||i.some((function(e){var t=n[e],r=o[e];return Array.isArray(r)?t.join(",")!==r.join(","):t!==r}));n=o,a&&l&&r(o)}}function k(e){var n=e.cellSize,t=e.cellSizeAndPositionManager,r=e.previousCellsCount,o=e.previousCellSize,i=e.previousScrollToAlignment,a=e.previousScrollToIndex,l=e.previousSize,c=e.scrollOffset,u=e.scrollToAlignment,s=e.scrollToIndex,f=e.size,p=e.sizeJustIncreasedFromZero,d=e.updateScrollIndexCallback,h=t.getCellCount(),g=s>=0&&s0&&(ft.getTotalSize()-f&&d(h-1)}const S=!("undefined"==typeof window||!window.document||!window.document.createElement);var O,B;function I(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function T(e){this.setState(function(n){var t=this.constructor.getDerivedStateFromProps(e,n);return null!=t?t:null}.bind(this))}function P(e,n){try{var t=this.props,r=this.state;this.props=e,this.state=n,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(t,r)}finally{this.props=t,this.state=r}}I.__suppressDeprecationWarning=!0,T.__suppressDeprecationWarning=!0,P.__suppressDeprecationWarning=!0;var j,z,R=(B="undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).requestAnimationFrame||B.webkitRequestAnimationFrame||B.mozRequestAnimationFrame||B.oRequestAnimationFrame||B.msRequestAnimationFrame||function(e){return B.setTimeout(e,1e3/60)},M=B.cancelAnimationFrame||B.webkitCancelAnimationFrame||B.mozCancelAnimationFrame||B.oCancelAnimationFrame||B.msCancelAnimationFrame||function(e){B.clearTimeout(e)},D=R,N=M,L=function(e){return N(e.id)},F=function(e,n){var t;Promise.resolve().then((function(){t=Date.now()}));var r={id:D((function o(){Date.now()-t>=n?e.call():r.id=D(o)}))};return r};function U(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function W(e){for(var n=1;n0&&(n._initialScrollTop=n._getCalculatedScrollTop(e,n.state)),e.scrollToColumn>0&&(n._initialScrollLeft=n._getCalculatedScrollLeft(e,n.state)),n}return v(t,n),s(t,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.alignment,t=void 0===n?this.props.scrollToAlignment:n,r=e.columnIndex,o=void 0===r?this.props.scrollToColumn:r,i=e.rowIndex,a=void 0===i?this.props.scrollToRow:i,l=W({},this.props,{scrollToAlignment:t,scrollToColumn:o,scrollToRow:a});return{scrollLeft:this._getCalculatedScrollLeft(l),scrollTop:this._getCalculatedScrollTop(l)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var n=e.scrollLeft,t=void 0===n?0:n,r=e.scrollTop,o=void 0===r?0:r;if(!(o<0)){this._debounceScrollEnded();var i=this.props,a=i.autoHeight,l=i.autoWidth,c=i.height,u=i.width,s=this.state.instanceProps,f=s.scrollbarSize,p=s.rowSizeAndPositionManager.getTotalSize(),d=s.columnSizeAndPositionManager.getTotalSize(),h=Math.min(Math.max(0,d-u+f),t),g=Math.min(Math.max(0,p-c+f),o);if(this.state.scrollLeft!==h||this.state.scrollTop!==g){var v={isScrolling:!0,scrollDirectionHorizontal:h!==this.state.scrollLeft?h>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:g!==this.state.scrollTop?g>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:H};a||(v.scrollTop=g),l||(v.scrollLeft=h),v.needToResetStyleCache=!1,this.setState(v)}this._invokeOnScrollMemoizer({scrollLeft:h,scrollTop:g,totalColumnsWidth:d,totalRowsHeight:p})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var n=e.columnIndex,t=e.rowIndex;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,n):n,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,t):t}},{key:"measureAllCells",value:function(){var e=this.props,n=e.columnCount,t=e.rowCount,r=this.state.instanceProps;r.columnSizeAndPositionManager.getSizeAndPositionOfCell(n-1),r.rowSizeAndPositionManager.getSizeAndPositionOfCell(t-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.columnIndex,t=void 0===n?0:n,r=e.rowIndex,o=void 0===r?0:r,i=this.props,a=i.scrollToColumn,l=i.scrollToRow,c=this.state.instanceProps;c.columnSizeAndPositionManager.resetCell(t),c.rowSizeAndPositionManager.resetCell(o),this._recomputeScrollLeftFlag=a>=0&&(1===this.state.scrollDirectionHorizontal?t<=a:t>=a),this._recomputeScrollTopFlag=l>=0&&(1===this.state.scrollDirectionVertical?o<=l:o>=l),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var n=e.columnIndex,t=e.rowIndex,r=this.props.columnCount,o=this.props;r>1&&void 0!==n&&this._updateScrollLeftForScrollToColumn(W({},o,{scrollToColumn:n})),void 0!==t&&this._updateScrollTopForScrollToRow(W({},o,{scrollToRow:t}))}},{key:"componentDidMount",value:function(){var e=this.props,n=e.getScrollbarSize,r=e.height,o=e.scrollLeft,i=e.scrollToColumn,a=e.scrollTop,l=e.scrollToRow,c=e.width,u=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),u.scrollbarSizeMeasured||this.setState((function(e){var t=W({},e,{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=n(),t.instanceProps.scrollbarSizeMeasured=!0,t})),"number"==typeof o&&o>=0||"number"==typeof a&&a>=0){var s=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:o,scrollTop:a});s&&(s.needToResetStyleCache=!1,this.setState(s))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var f=r>0&&c>0;i>=0&&f&&this._updateScrollLeftForScrollToColumn(),l>=0&&f&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:o||0,scrollTop:a||0,totalColumnsWidth:u.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:u.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,n){var t=this,r=this.props,o=r.autoHeight,i=r.autoWidth,a=r.columnCount,l=r.height,c=r.rowCount,u=r.scrollToAlignment,s=r.scrollToColumn,f=r.scrollToRow,p=r.width,d=this.state,h=d.scrollLeft,g=d.scrollPositionChangeReason,v=d.scrollTop,A=d.instanceProps;this._handleInvalidatedGridSize();var b=a>0&&0===e.columnCount||c>0&&0===e.rowCount;g===G&&(!i&&h>=0&&(h!==this._scrollingContainer.scrollLeft||b)&&(this._scrollingContainer.scrollLeft=h),!o&&v>=0&&(v!==this._scrollingContainer.scrollTop||b)&&(this._scrollingContainer.scrollTop=v));var m=(0===e.width||0===e.height)&&l>0&&p>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):k({cellSizeAndPositionManager:A.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:h,scrollToAlignment:u,scrollToIndex:s,size:p,sizeJustIncreasedFromZero:m,updateScrollIndexCallback:function(){return t._updateScrollLeftForScrollToColumn(t.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):k({cellSizeAndPositionManager:A.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:v,scrollToAlignment:u,scrollToIndex:f,size:l,sizeJustIncreasedFromZero:m,updateScrollIndexCallback:function(){return t._updateScrollTopForScrollToRow(t.props)}}),this._invokeOnGridRenderedHelper(),h!==n.scrollLeft||v!==n.scrollTop){var y=A.rowSizeAndPositionManager.getTotalSize(),E=A.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:h,scrollTop:v,totalColumnsWidth:E,totalRowsHeight:y})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&L(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var n=this.props,t=n.autoContainerWidth,r=n.autoHeight,o=n.autoWidth,i=n.className,a=n.containerProps,c=n.containerRole,u=n.containerStyle,s=n.height,f=n.id,p=n.noContentRenderer,d=n.role,h=n.style,g=n.tabIndex,v=n.width,A=this.state,b=A.instanceProps,y=A.needToResetStyleCache,E=this._isScrolling(),_={boxSizing:"border-box",direction:"ltr",height:r?"auto":s,position:"relative",width:o?"auto":v,WebkitOverflowScrolling:"touch",willChange:"transform"};y&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var C=b.columnSizeAndPositionManager.getTotalSize(),w=b.rowSizeAndPositionManager.getTotalSize(),x=w>s?b.scrollbarSize:0,k=C>v?b.scrollbarSize:0;k===this._horizontalScrollBarSize&&x===this._verticalScrollBarSize||(this._horizontalScrollBarSize=k,this._verticalScrollBarSize=x,this._scrollbarPresenceChanged=!0),_.overflowX=C+x<=v?"hidden":"auto",_.overflowY=w+k<=s?"hidden":"auto";var S=this._childrenToDisplay,O=0===S.length&&s>0&&v>0;return e.createElement("div",l({ref:this._setScrollingContainerRef},a,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:m("ReactVirtualized__Grid",i),id:f,onScroll:this._onScroll,role:d,style:W({},_,{},h),tabIndex:g}),S.length>0&&e.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:c,style:W({width:t?"auto":C,height:w,maxWidth:C,maxHeight:w,overflow:"hidden",pointerEvents:E?"none":"",position:"relative"},u)},S),O&&p())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,t=e.cellRenderer,r=e.cellRangeRenderer,o=e.columnCount,i=e.deferredMeasurementCache,a=e.height,l=e.overscanColumnCount,c=e.overscanIndicesGetter,u=e.overscanRowCount,s=e.rowCount,f=e.width,p=e.isScrollingOptOut,d=n.scrollDirectionHorizontal,h=n.scrollDirectionVertical,g=n.instanceProps,v=this._initialScrollTop>0?this._initialScrollTop:n.scrollTop,A=this._initialScrollLeft>0?this._initialScrollLeft:n.scrollLeft,b=this._isScrolling(e,n);if(this._childrenToDisplay=[],a>0&&f>0){var m=g.columnSizeAndPositionManager.getVisibleCellRange({containerSize:f,offset:A}),y=g.rowSizeAndPositionManager.getVisibleCellRange({containerSize:a,offset:v}),E=g.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:f,offset:A}),_=g.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:a,offset:v});this._renderedColumnStartIndex=m.start,this._renderedColumnStopIndex=m.stop,this._renderedRowStartIndex=y.start,this._renderedRowStopIndex=y.stop;var C=c({direction:"horizontal",cellCount:o,overscanCellsCount:l,scrollDirection:d,startIndex:"number"==typeof m.start?m.start:0,stopIndex:"number"==typeof m.stop?m.stop:-1}),w=c({direction:"vertical",cellCount:s,overscanCellsCount:u,scrollDirection:h,startIndex:"number"==typeof y.start?y.start:0,stopIndex:"number"==typeof y.stop?y.stop:-1}),x=C.overscanStartIndex,k=C.overscanStopIndex,S=w.overscanStartIndex,O=w.overscanStopIndex;if(i){if(!i.hasFixedHeight())for(var B=S;B<=O;B++)if(!i.has(B,0)){x=0,k=o-1;break}if(!i.hasFixedWidth())for(var I=x;I<=k;I++)if(!i.has(0,I)){S=0,O=s-1;break}}this._childrenToDisplay=r({cellCache:this._cellCache,cellRenderer:t,columnSizeAndPositionManager:g.columnSizeAndPositionManager,columnStartIndex:x,columnStopIndex:k,deferredMeasurementCache:i,horizontalOffsetAdjustment:E,isScrolling:b,isScrollingOptOut:p,parent:this,rowSizeAndPositionManager:g.rowSizeAndPositionManager,rowStartIndex:S,rowStopIndex:O,scrollLeft:A,scrollTop:v,styleCache:this._styleCache,verticalOffsetAdjustment:_,visibleColumnIndices:m,visibleRowIndices:y}),this._columnStartIndex=x,this._columnStopIndex=k,this._rowStartIndex=S,this._rowStopIndex=O}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&L(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=F(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex&&"number"==typeof this._deferredInvalidateRowIndex){var e=this._deferredInvalidateColumnIndex,n=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:n})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var n=this,t=e.scrollLeft,r=e.scrollTop,o=e.totalColumnsWidth,i=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var t=e.scrollLeft,r=e.scrollTop,a=n.props,l=a.height;(0,a.onScroll)({clientHeight:l,clientWidth:a.width,scrollHeight:i,scrollLeft:t,scrollTop:r,scrollWidth:o})},indices:{scrollLeft:t,scrollTop:r}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?Boolean(e.isScrolling):Boolean(n.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var n=e.scrollLeft,r=e.scrollTop,o=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:n,scrollTop:r});o&&(o.needToResetStyleCache=!1,this.setState(o))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollLeft(e,n)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollLeftForScrollToColumnStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollTop(e,n)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,n=this._cellCache,t=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var r=this._rowStartIndex;r<=this._rowStopIndex;r++)for(var o=this._columnStartIndex;o<=this._columnStopIndex;o++){var i="".concat(r,"-").concat(o);this._styleCache[i]=e[i],t&&(this._cellCache[i]=n[i])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollTopForScrollToRowStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}}],[{key:"getDerivedStateFromProps",value:function(e,n){var r={};0===e.columnCount&&0!==n.scrollLeft||0===e.rowCount&&0!==n.scrollTop?(r.scrollLeft=0,r.scrollTop=0):(e.scrollLeft!==n.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==n.scrollTop&&e.scrollToRow<0)&&Object.assign(r,t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var o,i,a=n.instanceProps;return r.needToResetStyleCache=!1,e.columnWidth===a.prevColumnWidth&&e.rowHeight===a.prevRowHeight||(r.needToResetStyleCache=!0),a.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:t._getEstimatedColumnSize(e),cellSizeGetter:t._wrapSizeGetter(e.columnWidth)}),a.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:t._getEstimatedRowSize(e),cellSizeGetter:t._wrapSizeGetter(e.rowHeight)}),0!==a.prevColumnCount&&0!==a.prevRowCount||(a.prevColumnCount=0,a.prevRowCount=0),e.autoHeight&&!1===e.isScrolling&&!0===a.prevIsScrolling&&Object.assign(r,{isScrolling:!1}),y({cellCount:a.prevColumnCount,cellSize:"number"==typeof a.prevColumnWidth?a.prevColumnWidth:null,computeMetadataCallback:function(){return a.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"==typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:a.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){o=t._getScrollLeftForScrollToColumnStateUpdate(e,n)}}),y({cellCount:a.prevRowCount,cellSize:"number"==typeof a.prevRowHeight?a.prevRowHeight:null,computeMetadataCallback:function(){return a.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"==typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:a.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){i=t._getScrollTopForScrollToRowStateUpdate(e,n)}}),a.prevColumnCount=e.columnCount,a.prevColumnWidth=e.columnWidth,a.prevIsScrolling=!0===e.isScrolling,a.prevRowCount=e.rowCount,a.prevRowHeight=e.rowHeight,a.prevScrollToColumn=e.scrollToColumn,a.prevScrollToRow=e.scrollToRow,a.scrollbarSize=e.getScrollbarSize(),void 0===a.scrollbarSize?(a.scrollbarSizeMeasured=!1,a.scrollbarSize=0):a.scrollbarSizeMeasured=!0,r.instanceProps=a,W({},r,{},o,{},i)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"==typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"==typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var n=e.prevState,t=e.scrollLeft,r=e.scrollTop,o={scrollPositionChangeReason:G};return"number"==typeof t&&t>=0&&(o.scrollDirectionHorizontal=t>n.scrollLeft?1:-1,o.scrollLeft=t),"number"==typeof r&&r>=0&&(o.scrollDirectionVertical=r>n.scrollTop?1:-1,o.scrollTop=r),"number"==typeof t&&t>=0&&t!==n.scrollLeft||"number"==typeof r&&r>=0&&r!==n.scrollTop?o:{}}},{key:"_wrapSizeGetter",value:function(e){return"function"==typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,n){var t=e.columnCount,r=e.height,o=e.scrollToAlignment,i=e.scrollToColumn,a=e.width,l=n.scrollLeft,c=n.instanceProps;if(t>0){var u=t-1,s=i<0?u:Math.min(u,i),f=c.rowSizeAndPositionManager.getTotalSize(),p=c.scrollbarSizeMeasured&&f>r?c.scrollbarSize:0;return c.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:a-p,currentOffset:l,targetIndex:s})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,n){var r=n.scrollLeft,o=t._getCalculatedScrollLeft(e,n);return"number"==typeof o&&o>=0&&r!==o?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:o,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,n){var t=e.height,r=e.rowCount,o=e.scrollToAlignment,i=e.scrollToRow,a=e.width,l=n.scrollTop,c=n.instanceProps;if(r>0){var u=r-1,s=i<0?u:Math.min(u,i),f=c.columnSizeAndPositionManager.getTotalSize(),p=c.scrollbarSizeMeasured&&f>a?c.scrollbarSize:0;return c.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:t-p,currentOffset:l,targetIndex:s})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,n){var r=n.scrollTop,o=t._getCalculatedScrollTop(e,n);return"number"==typeof o&&o>=0&&r!==o?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:-1,scrollTop:o}):{}}}]),t}(e.PureComponent),A(j,"propTypes",null),z);A(q,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var n=e.cellCache,t=e.cellRenderer,r=e.columnSizeAndPositionManager,o=e.columnStartIndex,i=e.columnStopIndex,a=e.deferredMeasurementCache,l=e.horizontalOffsetAdjustment,c=e.isScrolling,u=e.isScrollingOptOut,s=e.parent,f=e.rowSizeAndPositionManager,p=e.rowStartIndex,d=e.rowStopIndex,h=e.styleCache,g=e.verticalOffsetAdjustment,v=e.visibleColumnIndices,A=e.visibleRowIndices,b=[],m=r.areOffsetsAdjusted()||f.areOffsetsAdjusted(),y=!c&&!m,E=p;E<=d;E++)for(var _=f.getSizeAndPositionOfCell(E),C=o;C<=i;C++){var w=r.getSizeAndPositionOfCell(C),x=C>=v.start&&C<=v.stop&&E>=A.start&&E<=A.stop,k="".concat(E,"-").concat(C),S=void 0;y&&h[k]?S=h[k]:a&&!a.has(E,C)?S={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(S={height:_.size,left:w.offset+l,position:"absolute",top:_.offset+g,width:w.size},h[k]=S);var O={columnIndex:C,isScrolling:c,isVisible:x,key:k,parent:s,rowIndex:E,style:S},B=void 0;!u&&!c||l||g?B=t(O):(n[k]||(n[k]=t(O)),B=n[k]),null!=B&&!1!==B&&b.push(B)}return b},containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:function(e){if((!O&&0!==O||e)&&S){var n=document.createElement("div");n.style.position="absolute",n.style.top="-9999px",n.style.width="50px",n.style.height="50px",n.style.overflow="scroll",document.body.appendChild(n),O=n.offsetWidth-n.clientWidth,document.body.removeChild(n)}return O},noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(e){var n=e.cellCount,t=e.overscanCellsCount,r=e.scrollDirection,o=e.startIndex,i=e.stopIndex;return 1===r?{overscanStartIndex:Math.max(0,o),overscanStopIndex:Math.min(n-1,i+t)}:{overscanStartIndex:Math.max(0,o-t),overscanStopIndex:Math.min(n-1,i)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),function(e){var n=e.prototype;if(!n||!n.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof n.getSnapshotBeforeUpdate)return e;var t=null,r=null,o=null;if("function"==typeof n.componentWillMount?t="componentWillMount":"function"==typeof n.UNSAFE_componentWillMount&&(t="UNSAFE_componentWillMount"),"function"==typeof n.componentWillReceiveProps?r="componentWillReceiveProps":"function"==typeof n.UNSAFE_componentWillReceiveProps&&(r="UNSAFE_componentWillReceiveProps"),"function"==typeof n.componentWillUpdate?o="componentWillUpdate":"function"==typeof n.UNSAFE_componentWillUpdate&&(o="UNSAFE_componentWillUpdate"),null!==t||null!==r||null!==o){var i=e.displayName||e.name,a="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+i+" uses "+a+" but also contains the following legacy lifecycles:"+(null!==t?"\n "+t:"")+(null!==r?"\n "+r:"")+(null!==o?"\n "+o:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(n.componentWillMount=I,n.componentWillReceiveProps=T),"function"==typeof n.getSnapshotBeforeUpdate){if("function"!=typeof n.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");n.componentWillUpdate=P;var l=n.componentDidUpdate;n.componentDidUpdate=function(e,n,t){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:t;l.call(this,e,n,r)}}}(q);const V=q;var $,K,Y,X,Z=(K=$=function(n){function t(){var e,n;c(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=e.columnIndex,t=void 0===n?0:n,r=e.rowIndex,o=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:o,columnIndex:t})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var n=this.props,t=n.className,r=n.noRowsRenderer,o=n.scrollToIndex,i=n.width,a=m("ReactVirtualized__List",t);return e.createElement(V,l({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:a,columnWidth:i,columnCount:1,noContentRenderer:r,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:o}))}}]),t}(e.PureComponent),A($,"propTypes",null),K);function Q(e,n){var r,o=void 0!==(r=void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:t.g).document&&r.document.attachEvent;if(!o){var i=function(){var e=r.requestAnimationFrame||r.mozRequestAnimationFrame||r.webkitRequestAnimationFrame||function(e){return r.setTimeout(e,20)};return function(n){return e(n)}}(),a=function(){var e=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||r.clearTimeout;return function(n){return e(n)}}(),l=function(e){var n=e.__resizeTriggers__,t=n.firstElementChild,r=n.lastElementChild,o=t.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,o.style.width=t.offsetWidth+1+"px",o.style.height=t.offsetHeight+1+"px",t.scrollLeft=t.scrollWidth,t.scrollTop=t.scrollHeight},c=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var n=this;l(this),this.__resizeRAF__&&a(this.__resizeRAF__),this.__resizeRAF__=i((function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(n)&&(n.__resizeLast__.width=n.offsetWidth,n.__resizeLast__.height=n.offsetHeight,n.__resizeListeners__.forEach((function(t){t.call(n,e)})))}))}},u=!1,s="",f="animationstart",p="Webkit Moz O ms".split(" "),d="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),h=r.document.createElement("fakeelement");if(void 0!==h.style.animationName&&(u=!0),!1===u)for(var g=0;g div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=n.head||n.getElementsByTagName("head")[0],o=n.createElement("style");o.id="detectElementResize",o.type="text/css",null!=e&&o.setAttribute("nonce",e),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(n.createTextNode(t)),r.appendChild(o)}}(i),n.__resizeLast__={},n.__resizeListeners__=[],(n.__resizeTriggers__=i.createElement("div")).className="resize-triggers";var u='
';if(window.trustedTypes){var s=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return u}});n.__resizeTriggers__.innerHTML=s.createHTML("")}else n.__resizeTriggers__.innerHTML=u;n.appendChild(n.__resizeTriggers__),l(n),n.addEventListener("scroll",c,!0),f&&(n.__resizeTriggers__.__animationListener__=function(e){e.animationName==v&&l(n)},n.__resizeTriggers__.addEventListener(f,n.__resizeTriggers__.__animationListener__))}n.__resizeListeners__.push(t)}},removeResizeListener:function(e,n){if(o)e.detachEvent("onresize",n);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(n),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",c,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(f,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}function J(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ee(e){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,t=this.props.onResize,r=this.state,o=r.height,i=r.width,a=this._child||n.findDOMNode(this);if(a instanceof Element&&e){var l=ge(a,e);this._positionFromTop=l.top,this._positionFromLeft=l.left}var c=he(e,this.props);o===c.height&&i===c.width||(this.setState({height:c.height,width:c.width}),t({height:c.height,width:c.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=Q(),this.updatePosition(e),e&&(ce(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,n){var t=this.props.scrollElement,r=e.scrollElement;r!==t&&null!=r&&null!=t&&(this.updatePosition(t),ue(this,r),ce(this,t),this._unregisterResizeListener(r),this._registerResizeListener(t))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(ue(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,n=this.state,t=n.isScrolling,r=n.scrollTop,o=n.scrollLeft,i=n.height,a=n.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:i,isScrolling:t,scrollLeft:o,scrollTop:r,width:a})}}]),t}(e.PureComponent),A(se,"propTypes",null),fe);A(ye,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:me(),serverHeight:0,serverWidth:0});const Ee=ye;var _e,Ce,we=(Ce=_e=function(e){function t(){var e,n;c(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:{};c(this,e),A(this,"_cellHeightCache",{}),A(this,"_cellWidthCache",{}),A(this,"_columnWidthCache",{}),A(this,"_rowHeightCache",{}),A(this,"_defaultHeight",void 0),A(this,"_defaultWidth",void 0),A(this,"_minHeight",void 0),A(this,"_minWidth",void 0),A(this,"_keyMapper",void 0),A(this,"_hasFixedHeight",void 0),A(this,"_hasFixedWidth",void 0),A(this,"_columnCount",0),A(this,"_rowCount",0),A(this,"columnWidth",(function(e){var t=e.index,r=n._keyMapper(0,t);return void 0!==n._columnWidthCache[r]?n._columnWidthCache[r]:n._defaultWidth})),A(this,"rowHeight",(function(e){var t=e.index,r=n._keyMapper(t,0);return void 0!==n._rowHeightCache[r]?n._rowHeightCache[r]:n._defaultHeight}));var r=t.defaultHeight,o=t.defaultWidth,i=t.fixedHeight,a=t.fixedWidth,l=t.keyMapper,u=t.minHeight,s=t.minWidth;this._hasFixedHeight=!0===i,this._hasFixedWidth=!0===a,this._minHeight=u||0,this._minWidth=s||0,this._keyMapper=l||ke,this._defaultHeight=Math.max(this._minHeight,"number"==typeof r?r:30),this._defaultWidth=Math.max(this._minWidth,"number"==typeof o?o:100)}return s(e,[{key:"clear",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=this._keyMapper(e,n);delete this._cellHeightCache[t],delete this._cellWidthCache[t],this._updateCachedColumnAndRowSizes(e,n)}},{key:"clearAll",value:function(){this._cellHeightCache={},this._cellWidthCache={},this._columnWidthCache={},this._rowHeightCache={},this._rowCount=0,this._columnCount=0}},{key:"hasFixedHeight",value:function(){return this._hasFixedHeight}},{key:"hasFixedWidth",value:function(){return this._hasFixedWidth}},{key:"getHeight",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._hasFixedHeight)return this._defaultHeight;var t=this._keyMapper(e,n);return void 0!==this._cellHeightCache[t]?Math.max(this._minHeight,this._cellHeightCache[t]):this._defaultHeight}},{key:"getWidth",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._hasFixedWidth)return this._defaultWidth;var t=this._keyMapper(e,n);return void 0!==this._cellWidthCache[t]?Math.max(this._minWidth,this._cellWidthCache[t]):this._defaultWidth}},{key:"has",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=this._keyMapper(e,n);return void 0!==this._cellHeightCache[t]}},{key:"set",value:function(e,n,t,r){var o=this._keyMapper(e,n);n>=this._columnCount&&(this._columnCount=n+1),e>=this._rowCount&&(this._rowCount=e+1),this._cellHeightCache[o]=r,this._cellWidthCache[o]=t,this._updateCachedColumnAndRowSizes(e,n)}},{key:"_updateCachedColumnAndRowSizes",value:function(e,n){if(!this._hasFixedWidth){for(var t=0,r=0;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:"__singleValue__",o=r instanceof Object?t:n;if(o.has(r))return o.get(r);var i=e(r);return o.set(r,i),i}}t(4812),t(3123),t(189);function He(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:"";t.split(/\s+/g).filter((function(e){return!!e})).forEach((function(t){return n[e](t)}))}};Xe("add"),Xe("remove");var Ze=function(){function e(){var n,t,r;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,t="_all",r=new Set,t in n?Object.defineProperty(n,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[t]=r}var n,t,r;return n=e,(t=[{key:"add",value:function(e,n,t,r){e.addEventListener(n,t,r);var o=function(){return e.removeEventListener(n,t,r)};return this._all.add(o),o}},{key:"remove",value:function(e){e(),this._all.delete(e)}},{key:"removeAll",value:function(){var e=this;this._all.forEach((function(n){return e.remove(n)}))}}])&&He(n.prototype,t),r&&He(n,r),e}();t(1249),t(561),t(4723);var Qe=t(8736),Je=t.n(Qe),en=t(3854),nn=new(t.n(en)());nn.sniff();const tn=nn;function rn(e){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(e)}function on(e,n){for(var t=0;t=0;o--){var i=n._scopeChain[o];if((r=n._scopes[i.scopeId])&&r[t]){var a=r[t](e,t,i.scopeId);if(!0!==a)return a}if(i.options.modal)return!0}})),an(this,"_defaultFilter",(function(e,t,r){return t!==document&&!t.matches(n.ALLOW_SHORTCUTS_SELECTOR)&&!(null!=t.dataset.enabledShortcuts?t.dataset.enabledShortcuts.split(",").includes(r):null!=t.closest(n.ALLOW_SHORTCUTS_SELECTOR))&&(t.matches("input,select,textarea")||t.contentEditable&&"true"===t.contentEditable)})),this.setFilter(),this.setScope()}var n,t,r;return n=e,t=[{key:"bind",value:function(e){if(!(e instanceof Object)||"function"!=typeof e.handler)throw new Error("Shortcut handler should exist");if(e.scope||(e.scope=this.ROOT_SCOPE.scopeId),Array.isArray(e.key))for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(e){var t=this.indexOfScope(e);-1!==t&&this._scopeChain.splice(t,1),this._scopeChain.push(this.wrapScope(e,n))}}},{key:"popScope",value:function(e){if(e){var n=this.indexOfScope(e);if(-1!==n)return this._scopeChain.splice(n,this._scopeChain.length-1)}}},{key:"spliceScope",value:function(e){if(e){var n=this.indexOfScope(e);-1!==n&&this._scopeChain.splice(n,1)}}},{key:"setScope",value:function(e){var n=this;if(e){var t;if(t="string"==typeof e||!Array.isArray(e)&&"object"===rn(e)&&null!==e?[e]:e,!Array.isArray(t))return;t=t.map((function(e){return"string"==typeof e?n.wrapScope(e):e})),this._scopeChain=[this.ROOT_SCOPE].concat(t)}else this._scopeChain=[this.ROOT_SCOPE]}},{key:"wrapScope",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{scopeId:e,options:n}}},{key:"hasKey",value:function(e,n){return!(!this._scopes[n]||!this._scopes[n][e])}},{key:"_getKeyboardEventType",value:function(e){return!e.type&&"windows"===tn.os.name&&e.key.match(/ctrl/i)&&e.key.match(/shift/i)&&e.key.match(/[0-9]/)?"keyup":e.type}},{key:"setFilter",value:function(e){this.combokeys.stopCallback="function"==typeof e?e:this._defaultFilter}},{key:"indexOfScope",value:function(e){return this._scopeChain.findIndex((function(n){return n.scopeId===e}))}},{key:"reset",value:function(){this._scopes={},this.setScope(),this.combokeys.reset()}}],t&&on(n.prototype,t),r&&on(n,r),e}();const cn=new ln;function un(e){return un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(e)}function sn(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function fn(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function wn(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function xn(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Fn(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Un(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function it(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function at(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=o})),f=s.length>0?Math.min.apply(Math,mt(s)):Math.max.apply(Math,mt(xt)),p=wt[f],d=i?"50%":p.radius,h=(0,e.useMemo)((function(){return Fe("gradient-")}),[]);return e.createElement("svg",{viewBox:"0 0 ".concat(f," ").concat(f),xmlns:"http://www.w3.org/2000/svg"},e.createElement("defs",null,e.createElement("linearGradient",{id:h,x1:"0",y1:"0",x2:"0",y2:"1"},e.createElement("stop",{stopColor:c,offset:"0"}),e.createElement("stop",{stopColor:u,offset:"1"}))),e.createElement("g",null,e.createElement("rect",{fill:"url(#".concat(h,")"),x:"0",y:"0",width:f,height:f,rx:d,ry:d}),e.createElement("text",{x:p.text.x,y:p.text.y,fontFamily:"Arial, Helvetica, sans-serif",fontSize:p.fontSize,letterSpacing:p.letterSpacing,fill:"#FFFFFF",textAnchor:p.textAnchor},e.createElement("tspan",null,(t=r.split(/[\s._]+/).filter(Boolean)).length>=2?t[0][0].toUpperCase()+t[1][0].toUpperCase():1===t.length?t[0].length>=2?t[0].slice(0,2).toUpperCase():"".concat(t[0][0].toUpperCase(),"X"):"XX"),p.underscore&&e.createElement("tspan",{x:p.underscore.x,y:p.underscore.y},"_"))))}function St(e){return St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},St(e)}kt.propTypes={username:o().string.isRequired,size:o().number.isRequired,round:o().bool};var Ot=["size","url","dpr","style","round","subavatar","subavatarSize","username","skipParams"];function Bt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,l=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(l)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return It(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return It(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function It(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Rt(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Mt(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var rr=We((function(e){var n=document.createElement("div");n.innerHTML=e;var t,r,o=n.firstElementChild;return o.remove?o.remove():n.removeChild(o),{props:(t=o,r=t.attributes,r.length>0?function(e){for(var n={},t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function sr(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function fr(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function xr(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function kr(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Lr(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Fr(e,n){for(var t=0;t=32||13===n?n:0}(e);return 32===t?"Enter":String.fromCharCode(t)}return"keydown"===e.type||"keyup"===e.type?Yr[e.keyCode]||"Unidentified":""}function Zr(e){return Zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zr(e)}var Qr=["scrolling","hover","className","disabled","template","rgItemType","tabIndex","onClick","onCheckboxChange","onMouseOver","onMouseUp","role","tagName"];function Jr(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function eo(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function no(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function $o(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ko(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:"",r=(0,e.createContext)(n),i=(0,e.createContext)((function(){}));function a(t){var o=t.children,a=bn((0,e.useState)(n),2),l=a[0],c=a[1];return e.createElement(r.Provider,{value:l},e.createElement(i.Provider,{value:c},o))}function l(n,t){var r=(0,e.useContext)(i);(0,e.useEffect)((function(){t||r(n)}),[r,n,t])}function c(e){return l(e.value,e.skipUpdate),null}return a.propTypes={children:o().node},a.displayName="".concat(t,"Provider"),c.displayName="".concat(t,"Updater"),{ValueContext:r,UpdateContext:i,Provider:a,useUpdate:l,Updater:(0,e.memo)(c)}}(void 0,"ActiveItem"),ci=function(n){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&Yo(e,n)}(l,n);var t,r,o,i=Xo(l);function l(){var n;$o(this,l);for(var t=arguments.length,r=new Array(t),o=0;o1&&void 0!==arguments[1]&&arguments[1],o=n.props.data[e];!n.props.useMouseUp&&o.onClick?o.onClick(o,t):n.props.useMouseUp&&o.onMouseUp&&o.onMouseUp(o,t),n.props.onSelect&&n.props.onSelect(o,t,{tryKeepOpen:r})}}))),ei(Qo(n),"checkboxHandler",We((function(e){return function(t){return n.selectHandler(e)(t,!0)}}))),ei(Qo(n),"upHandler",(function(e){var t,r=n.props,o=r.data,i=r.disableMoveOverflow,a=n.state.activeIndex;if(null===a||0===a){if(i)return;t=o.length-1}else t=a-1;n.moveHandler(t,n.upHandler,e)})),ei(Qo(n),"downHandler",(function(e){var t,r=n.props,o=r.data,i=r.disableMoveOverflow,a=r.disableMoveDownOverflow,l=n.state.activeIndex;if(null===l)t=0;else if(l+1===o.length){if(i||a)return;t=0}else t=l+1;n.moveHandler(t,n.downHandler,e)})),ei(Qo(n),"homeHandler",(function(e){n.moveHandler(0,n.downHandler,e)})),ei(Qo(n),"endHandler",(function(e){n.moveHandler(n.props.data.length-1,n.upHandler,e)})),ei(Qo(n),"onDocumentMouseMove",(function(){n.state.disabledHover&&n.setState({disabledHover:!1})})),ei(Qo(n),"onDocumentKeyDown",(function(e){n.state.disabledHover||[16,17,18,19,20,91].includes(e.keyCode)||n.setState({disabledHover:!0})})),ei(Qo(n),"mouseHandler",(function(){n.setState({scrolling:!1})})),ei(Qo(n),"scrollHandler",(function(){n.setState({scrolling:!0},n.scrollEndHandler)})),ei(Qo(n),"enterHandler",(function(e,t){if(null!==n.state.activeIndex){var r=n.props.data[n.state.activeIndex];return n.selectHandler(n.state.activeIndex)(e),r.href&&!e.defaultPrevented&&(["command+enter","ctrl+enter"].includes(t)?window.open(r.href,"_blank"):"shift+enter"===t?window.open(r.href):window.location.href=r.href),!1}return!0})),ei(Qo(n),"clearSelected",(function(){n.setState({activeIndex:null,needScrollToActive:!1})})),ei(Qo(n),"scrollEndHandler",(function(){return ni((function(){var e=n.inner;if(e){var t=e.scrollHeight,r=n.defaultItemHeight()/2,o=e.scrollTop+e.clientHeight+r,i=t>0&&o>=t;n.unmounted||n.setState({scrolledToBottom:i}),i&&n.props.onScrollToBottom()}}))})),ei(Qo(n),"checkOverflow",(function(){n.inner&&n.setState({hasOverflow:n.inner.scrollHeight-n.inner.clientHeight>1})})),ei(Qo(n),"renderItem",(function(t){var r,o,i=t.index,l=t.style,c=t.isScrolling,u=t.parent,s=t.key,f=i-1,p=n.props.data[f],d=n.getId(p);if(0===i||i===n.props.data.length+1||p.rgItemType===Lo.MARGIN)r=s||"".concat(Lo.MARGIN,"_").concat(i),o=e.createElement("div",{style:{height:Fo.MARGIN}});else{p.selectedLabel,p.originalModel;var h=Vo(p,Ho),g=Object.assign({rgItemType:Uo},h);g.url&&(g.href=g.url),g.href&&(g.rgItemType=Lo.LINK),r=s||d,g.hover=f===n.state.activeIndex,null!=g.hoverClassName&&g.hover&&(g.className=a()(g.className,g.hoverClassName)),g.onMouseOver=n.hoverHandler(f),g.tabIndex=-1,g.scrolling=c;var v,A=n.selectHandler(f);n.props.useMouseUp?g.onMouseUp=A:g.onClick=A,g.onCheckboxChange=n.checkboxHandler(f),null==g.compact&&(g.compact=n.props.compact);var b=1===i;switch(g.rgItemType){case Lo.SEPARATOR:v=So,g.isFirst=b;break;case Lo.LINK:v=pt,n.addItemDataTestToProp(g);break;case Lo.ITEM:v=$r,n.addItemDataTestToProp(g);break;case Lo.CUSTOM:v=co,n.addItemDataTestToProp(g);break;case Lo.TITLE:g.isFirst=b,v=bo;break;default:throw new Error("Unknown menu element type: ".concat(g.rgItemType))}o=e.createElement(v,g)}return u?e.createElement(we,{cache:n._cache,key:r,parent:u,rowIndex:i,columnIndex:0},(function(n){var t=n.registerChild;return e.createElement("div",{ref:t,style:l,role:"row",id:d},e.createElement("div",{role:"cell"},o))})):e.createElement("div",{role:"row",id:d,key:r},e.createElement("div",{role:"cell"},(0,e.cloneElement)(o)))})),ei(Qo(n),"addItemDataTestToProp",(function(e){return e["data-test"]=Ne("ring-list-item",e["data-test"]),e})),ei(Qo(n),"virtualizedListRef",(function(e){n.virtualizedList=e})),ei(Qo(n),"containerRef",(function(e){n.container=e})),ei(Qo(n),"id",Fe("list-")),ei(Qo(n),"shortcutsScope",n.id),ei(Qo(n),"shortcutsMap",{up:n.upHandler,down:n.downHandler,home:n.homeHandler,end:n.endHandler,enter:n.enterHandler,"meta+enter":n.enterHandler,"ctrl+enter":n.enterHandler,"command+enter":n.enterHandler,"shift+enter":n.enterHandler}),n}return t=l,r=[{key:"componentDidMount",value:function(){document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("keydown",this.onDocumentKeyDown,!0)}},{key:"shouldComponentUpdate",value:function(e,n){var t=this;return e!==this.props||Object.keys(n).some((function(e){return n[e]!==t.state[e]}))}},{key:"componentDidUpdate",value:function(e){this.virtualizedList&&e.data!==this.props.data&&this.virtualizedList.recomputeRowHeights(),this.checkOverflow()}},{key:"componentWillUnmount",value:function(){this.unmounted=!0,document.removeEventListener("mousemove",this.onDocumentMouseMove),document.removeEventListener("keydown",this.onDocumentKeyDown,!0)}},{key:"hasActivatableItems",value:function(){return this._hasActivatableItems(this.props.data)}},{key:"moveHandler",value:function(e,n,t){var r;if(0!==this.props.data.length&&this.hasActivatableItems()){r=this.props.data.length=0&&Object.assign(u,{activeIndex:s,activeItem:a[s]})}if(null==l&&null==n.activeIndex&&((t=e).activateFirstItem||t.activateSingleItem&&1===t.data.length)){var f=a.findIndex(ai);f>=0&&Object.assign(u,{activeIndex:f,activeItem:a[f],needScrollToActive:!0})}return u}}],r&&Ko(t.prototype,r),o&&Ko(t,o),l}(e.Component);ei(ci,"propTypes",{id:o().string,className:o().string,hint:o().node,hintOnSelection:o().string,data:o().array,maxHeight:o().oneOfType([o().string,o().number]),activeIndex:o().number,restoreActiveIndex:o().bool,activateSingleItem:o().bool,activateFirstItem:o().bool,shortcuts:o().bool,onMouseOut:o().func,onSelect:o().func,onScrollToBottom:o().func,onResize:o().func,useMouseUp:o().bool,visible:o().bool,renderOptimization:o().bool,disableMoveOverflow:o().bool,disableMoveDownOverflow:o().bool,compact:o().bool,disableScrollToActive:o().bool,hidden:o().bool,ariaLabel:o().string}),ei(ci,"defaultProps",{data:[],restoreActiveIndex:!1,activateSingleItem:!1,activateFirstItem:!1,onMouseOut:ri,onSelect:ri,onScrollToBottom:ri,onResize:ri,shortcuts:!1,renderOptimization:!0,disableMoveDownOverflow:!1,ariaLabel:"List"}),ei(ci,"isItemType",(function(e,n){var t=n.rgItemType;return null==t&&(t=Uo),t===e})),ei(ci,"ListHint",No),ei(ci,"ListProps",{Type:Lo,Dimension:Fo});t(3210),t(6541),t(2564),t(6833),t(6649),t(6078);var ui=t(5570),si=t.n(ui),fi=t(107),pi=t.n(fi),di=t(251),hi=t.n(di),gi=(t(5218),["theme"]);function vi(){return vi=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var bi={LIGHT:"light",DARK:"dark"},mi=(0,e.createContext)(null),yi=function(e){var n,t;return"string"==typeof e?e:null!==(n=null!==(t=e.name)&&void 0!==t?t:e.displayName)&&void 0!==n?n:"Component"},Ei=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bi.LIGHT;return function(t){var r=(0,e.memo)((0,e.forwardRef)((function(r,o){var i=r.theme,a=Ai(r,gi);return e.createElement(mi.Consumer,null,(function(r){var l=i||r||n;return e.createElement(mi.Provider,{value:l},e.createElement(t,vi({ref:o},a,{theme:l})))}))})));return Object.assign(r,t),r.propTypes=t.propTypes,r.displayName="withTheme(".concat(yi(t),")"),r}};const _i=bi;var Ci=t(5526),wi=t.n(Ci);function xi(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ki(e){return ki="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ki(e)}var Si=["theme","active","danger","delayed","loader","primary","short","text","inline","dropdown","icon","iconSize","iconClassName","iconSuppressSizeWarning","className","children"];function Oi(){return Oi=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Ii(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ti(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var qi=function(n){var t=n.children,r=n.className,o=Gi(n,Wi);return e.createElement(Li,Hi({text:!0,className:a()(Ui().anchor,r)},o),t,e.createElement(br,{glyph:si(),className:Ui().chevron}))};qi.propTypes={children:o().node,className:o().string};const Vi=(0,e.memo)(qi);t(3710),t(9714);var $i=t(335),Ki=t.n($i);function Yi(e){return Yi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yi(e)}var Xi=["children","trapDisabled","autoFocusFirst","focusBackOnClose","focusBackOnExit"];function Zi(){return Zi=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Ji(e){return function(e){if(Array.isArray(e))return ea(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return ea(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ea(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ea(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0])||arguments[0],t=aa(e),r=t.node;if(r){var o=Ji(r.querySelectorAll(ua)).filter((function(e){return e.tabIndex>=0})),i=n?o[0]:o[o.length-1];i&&i.focus()}})),ca(aa(e),"focusFirst",(function(){return e.focusElement(!0)})),ca(aa(e),"focusLast",(function(){return e.focusElement(!1)})),ca(aa(e),"focusLastIfEnabled",(function(n){if(!e.trapWithoutFocus)if(e.props.focusBackOnExit){var t=n.nativeEvent.relatedTarget;null!=t&&null!=e.node&&e.node.contains(t)&&e.restoreFocus()}else e.focusLast()})),ca(aa(e),"handleBlurIfWithoutFocus",(function(n){if(e.trapWithoutFocus){e.trapWithoutFocus=!1;var t=n.nativeEvent.relatedTarget;t&&(e.node.contains(t)||e.focusLast())}})),ca(aa(e),"trapButtonRef",(function(n){n&&(e.trapButtonNode=n)})),e}return t=a,(r=[{key:"componentDidMount",value:function(){this.previousFocusedNode=document.activeElement,this.props.autoFocusFirst?this.focusFirst():this.props.trapDisabled||this.node&&this.node.contains(this.previousFocusedNode)||(this.trapWithoutFocus=!0,this.trapButtonNode.focus())}},{key:"componentWillUnmount",value:function(){this.props.focusBackOnClose&&this.restoreFocus()}},{key:"render",value:function(){var n=this.props,t=n.children,r=n.trapDisabled,o=(n.autoFocusFirst,n.focusBackOnClose,n.focusBackOnExit),i=Qi(n,Xi);return r?e.createElement("div",Zi({ref:this.containerRef},i),t):e.createElement("div",Zi({ref:this.containerRef},i),e.createElement("div",{tabIndex:0,ref:this.trapButtonRef,className:Ki().trapButton,onFocus:this.focusLastIfEnabled,onBlur:this.handleBlurIfWithoutFocus,"data-trap-button":!0}),t,e.createElement("div",{tabIndex:0,onFocus:o?this.restoreFocus:this.focusFirst,"data-trap-button":!0}))}}])&&ta(t.prototype,r),o&&ta(t,o),a}(e.Component);ca(sa,"propTypes",{children:o().node.isRequired,trapDisabled:o().bool,autoFocusFirst:o().bool,focusBackOnClose:o().bool,focusBackOnExit:o().bool}),ca(sa,"defaultProps",{trapDisabled:!1,autoFocusFirst:!0,focusBackOnClose:!0,focusBackOnExit:!1});t(2707);var fa={BOTTOM_RIGHT:"BOTTOM_RIGHT",BOTTOM_LEFT:"BOTTOM_LEFT",BOTTOM_CENTER:"BOTTOM_CENTER",TOP_LEFT:"TOP_LEFT",TOP_RIGHT:"TOP_RIGHT",TOP_CENTER:"TOP_CENTER",RIGHT_TOP:"RIGHT_TOP",RIGHT_BOTTOM:"RIGHT_BOTTOM",RIGHT_CENTER:"RIGHT_CENTER",LEFT_TOP:"LEFT_TOP",LEFT_BOTTOM:"LEFT_BOTTOM",LEFT_CENTER:"LEFT_CENTER"},pa=[fa.BOTTOM_RIGHT,fa.BOTTOM_LEFT,fa.TOP_LEFT,fa.TOP_RIGHT,fa.RIGHT_TOP,fa.RIGHT_BOTTOM,fa.LEFT_TOP,fa.LEFT_BOTTOM],da={MARGIN:16,BORDER_WIDTH:1},ha={TARGET:-1},ga={SCREEN:-1},va=1,Aa=2;function ba(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ma(e,n,t){var r=null!==t.container?t.container.clientHeight:Ke(),o=n.top+t.sidePadding,i=n.top+r-t.sidePadding,a=Math.max(o-e.top,0),l=t.popup.clientHeight,c=e.top+l-i;return a+Math.max(c,0)}function ya(e,n,t){var r=null!==t.container?t.container.clientWidth:window.innerWidth,o=n.left+t.sidePadding,i=n.left+r-t.sidePadding,a=Math.max(o-e.left,0),l=t.popup.clientWidth,c=e.left+l-i;return a+Math.max(c,0)}var Ea=["directions","autoPositioning","autoCorrectTopOverflow","sidePadding","top","left","offset","maxHeight","minWidth"],_a={top:0,left:0};function Ca(e,n,t){var r=t||document.documentElement,o=n.getBoundingClientRect(),i=r.getBoundingClientRect(),a=Math.max(o.top-i.top,0),l=Math.max(i.height,r===document.documentElement?r.clientHeight:0),c=Math.max(l-(a+o.height),0);switch(e){case fa.TOP_LEFT:case fa.TOP_CENTER:case fa.TOP_RIGHT:return a;case fa.BOTTOM_LEFT:case fa.BOTTOM_CENTER:case fa.BOTTOM_RIGHT:return c;case fa.LEFT_BOTTOM:case fa.RIGHT_BOTTOM:return o.height+c;case fa.LEFT_TOP:case fa.RIGHT_TOP:return o.height+a;case fa.RIGHT_CENTER:case fa.LEFT_CENTER:return o.height/2+Math.min(c/2,a/2);default:return null}}function wa(e){var n=e.popup,t=e.anchor,r=e.container,o=e.directions,i=e.autoPositioning,a=e.sidePadding,l=e.top,c=e.left,u=e.offset,s=e.maxHeight,f=e.minWidth,p=e.autoCorrectTopOverflow,d=void 0===p||p,h={top:0,left:0},g=null,v=null!==r?$e(r):_a,A=null!==r?r:document.body,b=$e(qe(t)?t:A),m=function(e){return null!==e?{top:e.scrollTop,left:e.scrollLeft}:{top:document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop,left:document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft}}(r),y=b.left+m.left+c-v.left,E=b.top+m.top+l-v.top;if(n){var _=function(e,n,t,r,o){var i,a=e.clientWidth,l=e.clientHeight,c=r+n.height,u=t+n.width,s=t-a,f=r-l,p=u-a,d=t+n.width/2-a/2,h=r+n.height/2-l/2,g=c-l;return ba(i={},fa.BOTTOM_RIGHT,{left:t,top:c+o}),ba(i,fa.BOTTOM_LEFT,{left:p,top:c+o}),ba(i,fa.BOTTOM_CENTER,{left:d,top:c+o}),ba(i,fa.TOP_RIGHT,{left:t,top:f-o}),ba(i,fa.TOP_LEFT,{left:p,top:f-o}),ba(i,fa.TOP_CENTER,{left:d,top:f-o}),ba(i,fa.LEFT_BOTTOM,{left:s-o,top:r}),ba(i,fa.LEFT_TOP,{left:s-o,top:g}),ba(i,fa.LEFT_CENTER,{left:s-o,top:h}),ba(i,fa.RIGHT_BOTTOM,{left:u+o,top:r}),ba(i,fa.RIGHT_TOP,{left:u+o,top:g}),ba(i,fa.RIGHT_CENTER,{left:u+o,top:h}),i}(n,b,y,E,u);if(i&&1!==o.length){var C=o.concat(o[0]).filter((function(e){return _[e]})).map((function(e){return{styles:_[e],direction:e}})).sort((function(n,t){var r=n.styles,o=t.styles;return ma(r,m,e)+ya(r,m,e)-(ma(o,m,e)+ya(o,m,e))}));h=C[0].styles,g=C[0].direction}else h=_[o[0]],g=o[0];["left","top"].forEach((function(e){h[e]<0&&(h[e]=0)}))}return s===ga.SCREEN||"screen"===s?h.maxHeight=window.innerHeight+m.top-h.top-da.MARGIN:s&&(h.maxHeight=s),d&&(h=function(e){var n=e.sidePadding,t=e.styles,r=e.anchorRect,o=e.maxHeight,i=e.popupScrollHeight,a=e.direction,l=e.scroll,c=fa.TOP_LEFT,u=fa.TOP_RIGHT,s=fa.TOP_CENTER;if(![c,u,s,fa.RIGHT_TOP,fa.LEFT_TOP].includes(a))return t;var f=[c,s,u].includes(a)?r.top:r.bottom;return f-(o?Math.min(i,o):i)<=n&&(t.top=n+l.top,t.maxHeight=f-n+1),t}({sidePadding:a,styles:h,anchorRect:b,maxHeight:s,direction:g,popupScrollHeight:n.scrollHeight,scroll:m})),f===ha.TARGET||"target"===f?h.minWidth=b.width:f&&(h.minWidth=b.width=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var Ia=(0,e.createContext)(),Ta=(0,e.forwardRef)((function(n,t){var r=n.id,o=n.children,i=Ba(n,Sa),a="function"==typeof o,l=e.createElement("div",Oa({},i,{"data-portaltarget":r,ref:t}),!a&&o);return e.createElement(Ia.Provider,{value:r},a?o(l):l)}));function Pa(e){return Pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pa(e)}function ja(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function za(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Qa(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ja(e,n){for(var t=0;tthis.input.clientHeight&&this.stretch(this.input)}},{key:"stretch",value:function(e){e&&e.style&&(e.style.height="".concat(e.scrollHeight,"px"))}},{key:"adapt",value:function(){this.checkValue(),this.stretch(this.underlineNode)}},{key:"render",value:function(){var n,t=this.props,r=t.theme,o=t.size,i=t.active,l=t.multiline,c=t.borderless,u=t.compact,s=t.label,f=t.error,p=t.className,d=t.inputClassName,h=t.children,g=t.value,v=t.onClear,A=t.disabled,b=(t.inputRef,t.onChange,t.enableShortcuts),m=(t.id,t.placeholder),y=t.icon,E=t.renderUnderline,_=Za(t,Ya),C=u||c,w=this.state.empty,x=!!v,k=a()($a().container,p,$a()[r],[$a()["size".concat(o)]],(il(n={"ring-js-shortcuts":!0===b},$a().active,i),il(n,$a().error,null!=f),il(n,$a().empty,w),il(n,$a().noLabel,!this.props.label),il(n,$a().withIcon,null!=y),il(n,$a().clearable,x),il(n,$a().compact,C),n)),S=a()($a().input,d),O=l?"textarea":"input",B=null!=g?g:h;return e.createElement("div",{className:k,"data-test":"ring-input"},y&&e.createElement(br,{glyph:y,className:$a().icon}),e.createElement(O,Xa({ref:this.inputRef,onChange:this.handleChange,className:S,value:B,rows:l?1:null,disabled:A,id:this.getId(),placeholder:m,"aria-label":"string"==typeof s&&s?s:m,"data-enabled-shortcuts":Array.isArray(b)?b.join(","):null},_)),x&&!A&&e.createElement(Li,{title:"Clear input","data-test":"ring-input-clear",className:$a().clear,icon:pi(),onClick:this.clear}),!C&&e.createElement("label",{htmlFor:this.getId(),className:$a().label},s),!c&&e.createElement("div",{className:$a().underline}),!c&&e.createElement("div",{className:$a().focusUnderline}),!C&&e.createElement("div",{className:$a().errorUnderline}),!C&&E(this.underlineRef,f))}}],r&&Ja(t.prototype,r),o&&Ja(t,o),l}(e.PureComponent);il(cl,"propTypes",{value:o().string,theme:o().string,className:o().string,inputClassName:o().string,size:o().string,label:o().oneOfType([o().string,o().object]),active:o().bool,error:o().string,multiline:o().bool,borderless:o().bool,compact:o().bool,onChange:o().func,onClear:o().func,inputRef:o().oneOfType([o().func,o().shape({current:o().instanceOf(HTMLInputElement)})]),children:o().string,enableShortcuts:o().oneOfType([o().bool,o().arrayOf(o().string)]),disabled:o().bool,id:o().string,placeholder:o().string,icon:o().oneOfType([o().string,o().elementType]),renderUnderline:o().func}),il(cl,"defaultProps",{size:ll.M,onChange:al,inputRef:al,enableShortcuts:["esc"],renderUnderline:function(n,t){return e.createElement("div",{className:$a().errorText,ref:n},t)}});const ul=Ei()(cl);function sl(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sl(e)}function fl(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function pl(e,n){for(var t=0;t2&&void 0!==arguments[2]&&arguments[2],r=t?e:e.toLowerCase(),o=t?n:n.toLowerCase(),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;return{matched:e,highlight:t}},a=o.length,l=r.length;if(l>a)return i(!1);if(l===a){var c=r===o;return i(c,c?"".concat(El).concat(n).concat(El):n)}var u="",s=!1,f=0;e:for(var p=0;pe.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t\n \n \n ').concat(Object.entries(n).map((function(e){var n=Nl(e,2),t=n[0],r=n[1];return'\n \n ')})).join(""),'\n \n \n \n \n \n \n ')}}(kl().unit,{transparent:"".concat(71.875,"%"),white:"".concat(78.125,"%")});Dl(".".concat(kl().loader,"_").concat([_i.LIGHT],"::after, .ring-loader-inline::after"),zl(e,"#ff00eb,#bd3bff,#008eff, #58ba00,#f48700,#ff00eb",32)),Dl(".".concat(kl().loader,"_").concat([_i.DARK],"::after, .ring-loader-inline_dark::after"),zl(e,"#ff2eef,#d178ff,#289fff,#88d444,#ffe000,#ff2eef",32))}));function Hl(e){return Hl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hl(e)}var Gl=["className","theme","data-test","children"];function ql(){return ql=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function $l(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Kl(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function ic(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ac(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Bc(){return Bc=Object.assign||function(e){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{};if(this.isContentEditable()){e.avoidFocus||this.focus();var n=window.getSelection();if(!n.rangeCount)return 0;var t=n.getRangeAt(0),r=t.cloneRange();r.selectNodeContents(this.target),r.setEnd(t.endContainer,t.endOffset);var o=t.startContainer;if(this.target===o)return 0===t.startOffset?0:o.textContent.length;if(!this.target.contains(o))return-1;if(!o)return this.target.selectionStart;var i=this.getAbsolutePosition(o);if(t.startContainer===t.endContainer)return t.startOffset===t.endOffset?i+t.startOffset:{startOffset:i+t.startOffset,endOffset:i+t.endOffset,position:r.toString().length};var a=i+t.startOffset,l=this.getAbsolutePosition(t.endContainer),c=l+t.endOffset;return{startOffset:a,endOffset:c,position:r.toString().length}}return this.target.selectionStart}},{key:"getRelativePosition",value:function(e,n){var t=0,r=e;if(!r)return{_curNode:this.target,_correctedPosition:n};if(0===n){for(;3!==r.nodeType;)r=r.childNodes[0];return{_curNode:r,_correctedPosition:n}}var o=-1;if(r&&void 0!==r.nodeType)for(;t=n&&(t-=(r=r.childNodes[o]).textContent.length,o=-1);return{_curNode:r,_correctedPosition:n-t}}},{key:"setPosition",value:function(e){var n,t=this.isContentEditable(),r=this.target&&this.target.childNodes[0];if(void 0!==e)if(void 0!==e.startOffset){var o=new Range,i=this.getRelativePosition(r,e.startOffset);o.setStart(i._curNode,i._correctedPosition);var a=this.getRelativePosition(r,e.endOffset);o.setEnd(a._curNode,a._correctedPosition),n=o}else if(-1===e)n=(t?this.target.textContent:this.constructor.normalizeNewlines(this.target.value)).length;else{var l=this.getRelativePosition(r,e);r=l._curNode,n=l._correctedPosition}if(t){this.focus();try{n instanceof Range?(window.getSelection().removeAllRanges(),window.getSelection().addRange(n)):window.getSelection().collapse(r||this.target,n)}catch(e){}}else this.target.setSelectionRange(n,n);return n}},{key:"getOffset",value:function(){var e,n=0;try{(e=window.getSelection().getRangeAt(0).cloneRange()).setStart(e.startContainer,e.startOffset-1)}catch(e){return n}return e&&0!==e.endOffset&&""!==e.toString()&&(n=$e(e).right-$e(this.target).left-(e.startContainer.offsetLeft||0)),n}}],r=[{key:"normalizeNewlines",value:function(e){return"string"==typeof e?e.replace(this.returnRE,""):e}}],t&&Lc(n.prototype,t),r&&Lc(n,r),e}();!function(e,n,t){n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}(Fc,"returnRE",/\r/g);var Uc=t(3833),Wc=t.n(Uc);function Hc(e){return Hc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hc(e)}var Gc=["children","className","info"];function qc(){return qc=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function $c(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Kc(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function lu(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function cu(e,n){for(var t=0;t0)){var n=null;e?n=null===this.state.tagsActiveIndex?this.props.selected.length-1:this.state.tagsActiveIndex-1:null!==this.state.tagsActiveIndex&&(n=this.state.tagsActiveIndex+1),null!==n&&(n>=this.props.selected.length||n<0)&&(n=null,this.focusFilter()),this.setState({tagsActiveIndex:n})}}},{key:"removeTag",value:function(e,n){var t=e||this.props.selected.slice(0)[this.props.selected.length-1];t&&(this.onListSelect(t,n,{tryKeepOpen:!0}),this.setState({tagsActiveIndex:null}),this.focusFilter())}},{key:"removeSelectedTag",value:function(){return null==this.state.tagsActiveIndex||(this.removeTag(this.props.selected[this.state.tagsActiveIndex]),!1)}},{key:"handleBackspace",value:function(e){return!(this.props.tags&&(this.isEventTargetFilter(e)?!e.target.value&&(this.removeTag(),1):(this.removeSelectedTag(),1)))}},{key:"_togglePopupFilterShortcuts",value:function(e){this.setState({popupFilterShortcutsOptions:{modal:!0,disabled:e}})}},{key:"isVisible",value:function(){return this.popup&&this.popup.isVisible()}},{key:"getFilter",value:function(){return this.props.filter||this.props.tags?e.createElement("div",{className:tu().filterWrapper,"data-test":"ring-select-popup-filter"},e.createElement(br,{glyph:wl(),className:tu().filterIcon,"data-test-custom":"ring-select-popup-filter-icon"}),e.createElement(ku,{rgShortcutsOptions:this.state.popupFilterShortcutsOptions,rgShortcutsMap:this.popupFilterShortcuts.map,value:this.props.filterValue,inputRef:this.filterRef,onBlur:this.popupFilterOnBlur,onFocus:this.onFilterFocus,className:"ring-js-shortcuts",placeholder:this.props.filter.placeholder,onChange:this.props.onFilter,onClick:this.onClickHandler,onClear:this.props.onClear,"data-test-custom":"ring-select-popup-filter-input",listId:this.props.listId,enableShortcuts:Object.keys(this.popupFilterShortcuts.map)})):null}},{key:"getTags",value:function(){return e.createElement("div",null,e.createElement(Nc,{tags:this.props.selected,activeIndex:this.state.tagsActiveIndex,handleRemove:this.handleRemoveTag,handleClick:this.handleTagClick,disabled:this.props.disabled}))}},{key:"getFilterWithTags",value:function(){if(this.props.tags){var n=a()([tu().filterWithTags,wu({},tu().filterWithTagsFocused,!this.state.popupFilterShortcutsOptions.disabled)]);return e.createElement("div",{className:n},this.getTags(),this.getFilter())}return this.getFilter()}},{key:"getBottomLine",value:function(){var n=this.props,t=n.loading,r=n.message;return(t||r)&&e.createElement("div",{className:tu().bottomLine},t&&e.createElement(nc,null),r&&e.createElement("div",{className:tu().message},r))}},{key:"getList",value:function(n){if(this.props.data.length){var t=this.props.maxHeight;return this.props.anchorElement&&(t=this._adjustListMaxHeight(this.props.hidden,t,n)),this.props.filter&&(t-=35),this.props.toolbar&&(t-=49),e.createElement(ci,{id:this.props.listId,maxHeight:t,data:this.props.data,activeIndex:this.props.activeIndex,ref:this.listRef,restoreActiveIndex:!0,activateFirstItem:!0,onSelect:this.onListSelect,onResize:this.handleListResize,onScrollToBottom:this.props.onLoadMore,hidden:this.props.hidden,shortcuts:!this.props.hidden,disableMoveOverflow:this.props.disableMoveOverflow,disableMoveDownOverflow:this.props.loading,disableScrollToActive:this.props.disableScrollToActive,compact:this.props.compact,renderOptimization:this.props.renderOptimization})}return null}},{key:"render",value:function(){var n=this,t=this.props,r=t.toolbar,o=t.className,i=t.multiple,l=t.hidden,c=t.isInputMode,u=t.anchorElement,s=t.minWidth,f=t.onCloseAttempt,p=t.directions,d=t.top,h=t.left,g=t.style,v=t.dir,A=t.filter,b=a()(tu().popup,o);return e.createElement(Ia.Consumer,null,(function(t){var o=n.getFilterWithTags(),a=i&&!i.limit&&i.selectAll&&n.getSelectAll(),m=n.getList(n.props.ringPopupTarget||t),y=n.getBottomLine(),E=o||a||m||y||r;return e.createElement(qa,{trapFocus:!1,ref:n.popupRef,hidden:l||!E,attached:c,className:b,dontCloseOnAnchorClick:!0,anchorElement:u,minWidth:s,onCloseAttempt:f,directions:p,top:d||(c?-14:null),left:h,onMouseDown:n.mouseDownHandler,target:n.props.ringPopupTarget,autoCorrectTopOverflow:!1,style:g},e.createElement("div",{dir:v},!l&&A&&e.createElement(An,{map:n.shortcutsMap,scope:n.shortcutsScope}),l?e.createElement("div",null):o,a,m,y,r))}))}}],r&&bu(t.prototype,r),o&&bu(t,o),l}(e.PureComponent);wu(Su,"propTypes",{activeIndex:o().number,anchorElement:o().instanceOf(HTMLElement),className:o().string,compact:o().bool,data:o().array,dir:o().oneOf(["ltr","rtl"]),directions:o().array,disabled:o().bool,disableMoveOverflow:o().bool,disableScrollToActive:o().bool,filter:o().oneOfType([o().bool,o().shape({value:o().string,placeholder:o().string})]),filterValue:o().string,hidden:o().bool,isInputMode:o().bool,listId:o().string,maxHeight:o().number,message:o().string,minWidth:o().number,multiple:o().oneOfType([o().bool,o().shape({label:o().string,limit:o().number,selectAll:o().bool})]),left:o().bool,loading:o().bool,onClear:o().func,onCloseAttempt:o().func,onEmptyPopupEnter:o().func,onFilter:o().func,onLoadMore:o().func,onSelect:o().func,onSelectAll:o().func,renderOptimization:o().bool,ringPopupTarget:o().string,selected:o().oneOfType([o().object,o().array]),style:o().object,tags:o().object,toolbar:o().node,top:o().number}),wu(Su,"defaultProps",{data:[],activeIndex:null,toolbar:null,filter:!1,multiple:!1,message:null,anchorElement:null,maxHeight:600,minWidth:240,loading:!1,onSelect:xu,onCloseAttempt:xu,onFilter:xu,onClear:xu,onLoadMore:xu,selected:[],tags:null,ringPopupTarget:null,onSelectAll:xu,onEmptyPopupEnter:xu});var Ou=t(1442),Bu=t.n(Ou);function Iu(e){return Iu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Iu(e)}function Tu(){return Tu=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function ju(e){var n=function(e,n){if("object"!==Iu(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==Iu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===Iu(n)?n:String(n)}function zu(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ru(e,n){for(var t=0;t=0}))}}var Zu=function(e){return e.reduce((function(e,n){return e[n.key]=!0,e}),{})};function Qu(e,n,t){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.data,o=t.trim();$u(e.type)&&n.selected&&o===n.selected.label&&(o="");for(var i=o.toLowerCase(),a=[],l=!1,c=Xu(e.filter),u=function(t){var u=Wu({},r[t]);c(u,i,r)&&(l=u.label===o,e.multiple&&!e.multiple.removeSelectedItems&&(u.checkbox=!!n.multipleMap[u.key]),e.multiple&&e.multiple.limit&&(u.disabled=e.multiple.limit===n.selected.length&&!n.selected.find((function(e){return e.key===u.key}))),e.multiple&&e.multiple.removeSelectedItems&&n.multipleMap[u.key]||a.push(u))},s=0;s1&&void 0!==arguments[1]?arguments[1]:{};if((!e.isInputMode()||e.state.focused)&&n!==e.state.filterValue){var r=n.replace(/^\s+/g,"");if(e.props.onFilter(r),e.props.allowAny){var o={key:Math.random(),label:r};e.setState({selected:""===r?null:o,selectedIndex:null},(function(){e.props.onSelect(o,t),e.props.onChange(o,t)}))}!e._popup.isVisible()&&e.props.onBeforeOpen(),e.setState({filterValue:r},(function(){e._showPopup()}))}})),Hu(Lu(e),"_redrawPopup",(function(){e.props.multiple&&setTimeout((function(){e.isInputMode()&&e.clearFilter(),e._showPopup()}),0)})),Hu(Lu(e),"_listSelectHandler",(function(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=ci.isItemType.bind(null,ci.ListProps.Type.ITEM),i=ci.isItemType.bind(null,ci.ListProps.Type.CUSTOM),a=t&&("select"===t.type||"keydown"===t.type);if(a&&t.preventDefault(),(o(n)||i(n))&&!n.disabled&&!n.isResetItem)if(e.props.multiple){var l=r.tryKeepOpen;if(l||e._hidePopup(a),null==n.key)throw new Error('Multiple selection requires each item to have the "key" property');e.setState((function(r){var o,i=r.selected;r.multipleMap[n.key]?(o=i.filter((function(e){return e.key!==n.key})),e.props.onDeselect&&e.props.onDeselect(n)):(o=i.concat(n),e.props.onSelect&&e.props.onSelect(n,t)),e.props.onChange(o,t);var a={selected:o,selectedIndex:e._getSelectedIndex(n,e.props.data)};if(e.props.multiple.limit&&o.length===e.props.multiple.limit&&(a.shownData=r.shownData.map((function(e){return o.find((function(n){return n.key===e.key}))?e:Wu(Wu({},e),{},{disabled:!0})}))),r.multipleMap[n.key]){var l=r.multipleMap,c=n.key,u=(l[c],Pu(l,[c].map(ju)));a.multipleMap=u}else a.multipleMap=Wu(Wu({},r.multipleMap),{},Hu({},n.key,!0));return a}),(function(){l&&e._redrawPopup()}))}else e._hidePopup(a),e.setState({selected:n,selectedIndex:e._getSelectedIndex(n,e.props.data)},(function(){var r=e.isInputMode()&&!e.props.hideSelected?es(n):"";e.filterValue(r),e.props.onFilter(r),e.props.onSelect(n,t),e.props.onChange(n,t)}))})),Hu(Lu(e),"_listSelectAllHandler",(function(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=ci.isItemType.bind(null,ci.ListProps.Type.ITEM),r=ci.isItemType.bind(null,ci.ListProps.Type.CUSTOM);e.setState((function(o){var i,a=o.selected;return n?(i=e.props.data.filter((function(e){return(t(e)||r(e))&&!e.disabled}))).filter((function(n){return!e.props.selected.find((function(e){return n.key===e.key}))})).forEach((function(n){e.props.onSelect&&e.props.onSelect(n)})):(i=[],a.forEach((function(n){e.props.onDeselect&&e.props.onDeselect(n)}))),e.props.onChange(i,event),{filterValue:"",selected:i,selectedIndex:n?e._getSelectedIndex(i,e.props.data):null,shownData:o.shownData.map((function(e){return Wu(Wu({},e),{},{checkbox:n})})),multipleMap:n?Zu(e.props.data.filter((function(e){return!e.disabled}))):{}}}),e._redrawPopup)})),Hu(Lu(e),"_onCloseAttempt",(function(n,t){e.isInputMode()&&(e.props.allowAny||(e.props.hideSelected||!e.state.selected||e.props.multiple?e.clearFilter():e.state.selected&&e.filterValue(es(e.state.selected)))),e.props.tags&&n&&n.target&&n.target.matches('[data-test="ring-tag-remove"]')||e._hidePopup(t)})),Hu(Lu(e),"clearFilter",(function(n){e._setFilter("",n)})),Hu(Lu(e),"clear",(function(n){n&&n.stopPropagation();var t=l._getEmptyValue(e.props.multiple);return e.setState({selected:t,selectedIndex:null,filterValue:""},(function(){e.props.onChange&&e.props.onChange(t,n)})),!1})),Hu(Lu(e),"popupRef",(function(n){e._popup=n})),Hu(Lu(e),"buttonRef",(function(n){e.button=n})),Hu(Lu(e),"filterRef",(function(n){e.filter=n})),e}return t=l,o=[{key:"_getEmptyValue",value:function(e){return e?[]:null}},{key:"getDerivedStateFromProps",value:function(e,n){var t=e.multiple,r=e.data,o=e.type,i=n.prevSelected,a=n.prevData,c=n.prevMultiple,u=n.filterValue,s={prevData:r,prevSelected:e.selected,prevMultiple:t};if("data"in e&&r!==a){var f=Qu(e,n,u,r),p=f.filteredData,d=f.addButton;Object.assign(s,{shownData:p,addButton:d}),n.selected&&Object.assign(s,{selectedIndex:Ju(n.selected,r,t),prevFilterValue:ns(n.selected,o,u)})}if("selected"in e&&e.selected!==i){var h=e.selected||l._getEmptyValue(t),g=Ju(h,r||a,t);Object.assign(s,{selected:h,prevFilterValue:ns(h,o,u)}),t&&function(e,n){if(!e||!n||e.length!==n.length)return!1;var t=n.reduce((function(e,n){return e[n.key]=!0,e}),{});return e.every((function(e){return t[e.key]}))}(i,h)||Object.assign(s,{selectedIndex:g})}c===t||hi()(c,t)||(s.selected=l._getEmptyValue(t));var v=Wu(Wu({},n),s).selected;if(v&&t){s.multipleMap=Zu(v);var A=Qu(e,s,u,r),b=A.filteredData,m=A.addButton;Object.assign(s,{shownData:b,addButton:m})}return s}}],(r=[{key:"componentDidUpdate",value:function(e,n){var t=this.state,r=t.showPopup,o=t.selected,i=this.props,a=i.onClose,l=i.onOpen,c=i.onChange,u=i.multiple;n.showPopup&&!r?a(o):!n.showPopup&&r&&l(),u===e.multiple||hi()(u,e.multiple)||c(o)}},{key:"getValueForFilter",value:function(e){return ns(e,this.props.type,this.state.filterValue)}},{key:"_getSelectedIndex",value:function(e,n){return Ju(e,n,this.props.multiple)}},{key:"_getResetOption",value:function(){var n=this,t=this.state.selected&&this.state.selected.length,r=this.props.tags&&this.props.tags.reset;if(!t||!r)return null;var o=this.props.tags.reset;return{isResetItem:!0,separator:o.separator,key:o.label,rgItemType:ci.ListProps.Type.CUSTOM,template:e.createElement(Li,{text:!0,className:Bu().button,"data-test":"ring-select-reset-tags-button"},o.label),glyph:o.glyph,onClick:function(e,t){n.clear(t),n.clearFilter(),n.props.onFilter(""),n.setState((function(e){return{shownData:e.shownData.slice(o.separator?2:1),multipleMap:{}}})),n._redrawPopup()}}}},{key:"_prependResetOption",value:function(e){var n=this._getResetOption(),t={rgItemType:ci.ListProps.Type.MARGIN};if(n){var r=[t,n,t];return n.separator&&r.push({rgItemType:ci.ListProps.Type.SEPARATOR}),r.concat(e)}return e}},{key:"_renderPopup",value:function(){var n=this.props.targetElement||this.node,t=this.state,r=t.showPopup,o=t.shownData,i=this._prependResetOption(o),a=null;return this.props.loading?a=this.props.loadingMessage:o.length||(a=this.props.notFoundMessage),e.createElement(Su,{data:i,message:a,toolbar:r&&this.getToolbar(),loading:this.props.loading,activeIndex:this.state.selectedIndex,hidden:!r,ref:this.popupRef,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,directions:this.props.directions,className:this.props.popupClassName,style:this.props.popupStyle,top:this.props.top,left:this.props.left,filter:!this.isInputMode()&&this.props.filter,multiple:this.props.multiple,filterValue:this.state.filterValue,anchorElement:n,onCloseAttempt:this._onCloseAttempt,onSelect:this._listSelectHandler,onSelectAll:this._listSelectAllHandler,onFilter:this._filterChangeHandler,onClear:this.clearFilter,onLoadMore:this.props.onLoadMore,isInputMode:this.isInputMode(),selected:this.state.selected,tags:this.props.tags,compact:this.props.compact,renderOptimization:this.props.renderOptimization,ringPopupTarget:this.props.ringPopupTarget,disableMoveOverflow:this.props.disableMoveOverflow,disableScrollToActive:this.props.disableScrollToActive,dir:this.props.dir,onEmptyPopupEnter:this.onEmptyPopupEnter,listId:this.listId})}},{key:"_showPopup",value:function(){if(this.node){var e=this.getListItems(this.filterValue());this.setState({showPopup:!!e.length||!this.props.allowAny,shownData:e})}}},{key:"_hidePopup",value:function(e){if(this.node&&this.state.showPopup&&(this.setState({showPopup:!1,filterValue:""}),e)){var n=this.props.targetElement||this.node.querySelector("[data-test~=ring-select__focus]");n&&n.focus()}}},{key:"getToolbar",value:function(){var n=this.props.hint,t=this.state.addButton||{},r=t.prefix,o=t.label,i=t.delayed;return this.state.addButton||n?e.createElement("div",{className:a()(Hu({},Bu().toolbar,!!this.state.addButton)),"data-test":"ring-select-toolbar"},this.state.addButton&&e.createElement(Li,{text:!0,delayed:i,className:a()(Bu().button,Bu().buttonSpaced),onClick:this.addHandler,"data-test":"ring-select-toolbar-button"},r?"".concat(r," ").concat(o):o),n&&e.createElement(ci.ListHint,{label:n,"data-test":"ring-select-toolbar-hint"})):null}},{key:"getFilterFn",value:function(){return Xu(this.props.filter)}},{key:"getListItems",value:function(e,n){var t=Qu(this.props,this.state,e,n),r=t.filteredData,o=t.addButton;return this.setState({addButton:o}),r}},{key:"filterValue",value:function(e){if("string"!=typeof e&&"number"!=typeof e)return this.state.filterValue;this.setState({filterValue:e})}},{key:"isInputMode",value:function(){return $u(this.props.type)}},{key:"_rebuildMultipleMap",value:function(e,n){e&&n&&this.setState({multipleMap:Zu(e)})}},{key:"_selectionIsEmpty",value:function(){return this.props.multiple&&!this.state.selected.length||!this.state.selected}},{key:"_getLabel",value:function(){return this.props.label||this.props.selectedLabel||"Select an option"}},{key:"_getSelectedString",value:function(){if(this.props.multiple){for(var e=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:{captureNode:!1},t=n.captureNode;if(t)throw new Error('rerenderHOC: captureNode={true} is deprecated. Wrapped component must have "node" property captured itself')})(ts),t(108);var rs=t(2481),os=t.n(rs);function is(e){return is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},is(e)}var as=["children","data-test","title","delay","selfOverflowOnly","popupProps"];function ls(){return ls=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function us(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ss(e,n){for(var t=0;te.createElement("svg",ys({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},t),e.createElement("path",{d:"M19.64 18.36l-6.24-6.24a7.52 7.52 0 10-1.28 1.28l6.24 6.24zM7.5 13.4a5.9 5.9 0 115.9-5.9 5.91 5.91 0 01-5.9 5.9z"}));var _s;!function(e){e[e.WINDOWS=0]="WINDOWS",e[e.MACOS=1]="MACOS",e[e.LINUX=2]="LINUX",e[e.OTHER=3]="OTHER"}(_s||(_s={}));var Cs,ws=function(){function e(){}return e.metaKey={name:"Command",keyArg:"Meta"},e.ctrlKey={name:"Ctrl",keyArg:"Control"},e.altKey={name:"Alt",keyArg:"Alt"},e.shiftKey={name:"Shift",keyArg:"Shift"},e}(),xs=[ws.altKey,ws.shiftKey,ws.ctrlKey,ws.metaKey],ks=function(){function e(){var e,n=this;this.registerHotkeyWithAccel=function(e,t){var r=n.getOsAccelKey();document.onkeydown=function(n){var o=n.getModifierState(r.keyArg),i=xs.filter((function(e){return e!==r})).map((function(e){return n.getModifierState(e.keyArg)})).some((function(e){return e}));o&&!i&&n.key===t&&(n.preventDefault(),e())}},this.osKind=(e=navigator.userAgent).includes("Mac")?_s.MACOS:e.includes("Win")?_s.WINDOWS:e.includes("Linux")?_s.LINUX:_s.OTHER}return e.prototype.getOsAccelKeyName=function(){return this.getOsAccelKey().name},e.prototype.getOsAccelKey=function(){return this.osKind===_s.MACOS?ws.metaKey:ws.ctrlKey},e}(),Ss=function(){return Ss=Object.assign||function(e){for(var n,t=1,r=arguments.length;t=m},i=function(){},n.unstable_forceFrameRate=function(e){0>e||125>>1,o=e[r];if(!(void 0!==o&&0x(a,t))void 0!==c&&0>x(c,a)?(e[r]=c,e[l]=t,r=l):(e[r]=a,e[i]=t,r=i);else{if(!(void 0!==c&&0>x(c,t)))break e;e[r]=c,e[l]=t,r=l}}}return n}return null}function x(e,n){var t=e.sortIndex-n.sortIndex;return 0!==t?t:e.id-n.id}var k=[],S=[],O=1,B=null,I=3,T=!1,P=!1,j=!1;function z(e){for(var n=C(S);null!==n;){if(null===n.callback)w(S);else{if(!(n.startTime<=e))break;w(S),n.sortIndex=n.expirationTime,_(k,n)}n=C(S)}}function R(e){if(j=!1,z(e),!P)if(null!==C(k))P=!0,t(M);else{var n=C(S);null!==n&&r(R,n.startTime-e)}}function M(e,t){P=!1,j&&(j=!1,o()),T=!0;var i=I;try{for(z(t),B=C(k);null!==B&&(!(B.expirationTime>t)||e&&!n.unstable_shouldYield());){var a=B.callback;if("function"==typeof a){B.callback=null,I=B.priorityLevel;var l=a(B.expirationTime<=t);t=n.unstable_now(),"function"==typeof l?B.callback=l:B===C(k)&&w(k),z(t)}else w(k);B=C(k)}if(null!==B)var c=!0;else{var u=C(S);null!==u&&r(R,u.startTime-t),c=!1}return c}finally{B=null,I=i,T=!1}}var D=i;n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(e){e.callback=null},n.unstable_continueExecution=function(){P||T||(P=!0,t(M))},n.unstable_getCurrentPriorityLevel=function(){return I},n.unstable_getFirstCallbackNode=function(){return C(k)},n.unstable_next=function(e){switch(I){case 1:case 2:case 3:var n=3;break;default:n=I}var t=I;I=n;try{return e()}finally{I=t}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=D,n.unstable_runWithPriority=function(e,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var t=I;I=e;try{return n()}finally{I=t}},n.unstable_scheduleCallback=function(e,i,a){var l=n.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0l?(e.sortIndex=a,_(S,e),null===C(k)&&e===C(S)&&(j?o():j=!0,r(R,a-l))):(e.sortIndex=c,_(k,e),P||T||(P=!0,t(M))),e},n.unstable_wrapCallback=function(e){var n=I;return function(){var t=I;I=n;try{return e.apply(this,arguments)}finally{I=t}}}},3840:(e,n,t)=>{"use strict";e.exports=t(53)},7478:(e,n,t)=>{"use strict";var r=t(210),o=t(1924),i=t(631),a=r("%TypeError%"),l=r("%WeakMap%",!0),c=r("%Map%",!0),u=o("WeakMap.prototype.get",!0),s=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),d=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),g=function(e,n){for(var t,r=e;null!==(t=r.next);r=t)if(t.key===n)return r.next=t.next,t.next=e.next,e.next=t,t};e.exports=function(){var e,n,t,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+i(e))},get:function(r){if(l&&r&&("object"==typeof r||"function"==typeof r)){if(e)return u(e,r)}else if(c){if(n)return p(n,r)}else if(t)return function(e,n){var t=g(e,n);return t&&t.value}(t,r)},has:function(r){if(l&&r&&("object"==typeof r||"function"==typeof r)){if(e)return f(e,r)}else if(c){if(n)return h(n,r)}else if(t)return function(e,n){return!!g(e,n)}(t,r);return!1},set:function(r,o){l&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new l),s(e,r,o)):c?(n||(n=new c),d(n,r,o)):(t||(t={key:{},next:null}),function(e,n,t){var r=g(e,n);r?r.value=t:e.next={key:n,next:e.next,value:t}}(t,r,o))}};return r}},3854:function(e){!function(n){var t={browser:[[/msie ([\.\_\d]+)/,"ie"],[/trident\/.*?rv:([\.\_\d]+)/,"ie"],[/firefox\/([\.\_\d]+)/,"firefox"],[/chrome\/([\.\_\d]+)/,"chrome"],[/version\/([\.\_\d]+).*?safari/,"safari"],[/mobile safari ([\.\_\d]+)/,"safari"],[/android.*?version\/([\.\_\d]+).*?safari/,"com.android.browser"],[/crios\/([\.\_\d]+).*?safari/,"chrome"],[/opera/,"opera"],[/opera\/([\.\_\d]+)/,"opera"],[/opera ([\.\_\d]+)/,"opera"],[/opera mini.*?version\/([\.\_\d]+)/,"opera.mini"],[/opios\/([a-z\.\_\d]+)/,"opera"],[/blackberry/,"blackberry"],[/blackberry.*?version\/([\.\_\d]+)/,"blackberry"],[/bb\d+.*?version\/([\.\_\d]+)/,"blackberry"],[/rim.*?version\/([\.\_\d]+)/,"blackberry"],[/iceweasel\/([\.\_\d]+)/,"iceweasel"],[/edge\/([\.\d]+)/,"edge"]],os:[[/linux ()([a-z\.\_\d]+)/,"linux"],[/mac os x/,"macos"],[/mac os x.*?([\.\_\d]+)/,"macos"],[/os ([\.\_\d]+) like mac os/,"ios"],[/openbsd ()([a-z\.\_\d]+)/,"openbsd"],[/android/,"android"],[/android ([a-z\.\_\d]+);/,"android"],[/mozilla\/[a-z\.\_\d]+ \((?:mobile)|(?:tablet)/,"firefoxos"],[/windows\s*(?:nt)?\s*([\.\_\d]+)/,"windows"],[/windows phone.*?([\.\_\d]+)/,"windows.phone"],[/windows mobile/,"windows.mobile"],[/blackberry/,"blackberryos"],[/bb\d+/,"blackberryos"],[/rim.*?os\s*([\.\_\d]+)/,"blackberryos"]],device:[[/ipad/,"ipad"],[/iphone/,"iphone"],[/lumia/,"lumia"],[/htc/,"htc"],[/nexus/,"nexus"],[/galaxy nexus/,"galaxy.nexus"],[/nokia/,"nokia"],[/ gt\-/,"galaxy"],[/ sm\-/,"galaxy"],[/xbox/,"xbox"],[/(?:bb\d+)|(?:blackberry)|(?: rim )/,"blackberry"]]},r="Unknown",o=Object.keys(t);function i(){var e=this;o.forEach((function(n){e[n]={name:r,version:[],versionString:r}}))}function a(e,n,o){t[n].forEach((function(t){var i=t[0],a=t[1],l=o.match(i);l&&(e[n].name=a,l[2]?(e[n].versionString=l[2],e[n].version=[]):l[1]?(e[n].versionString=l[1].replace(/_/g,"."),e[n].version=l[1].split(/[\._]/).map((function(e){return parseInt(e)}))):(e[n].versionString=r,e[n].version=[]))}))}i.prototype.sniff=function(e){var n=this,t="undefined"!=typeof window?navigator.userAgent:"",r=(e||t).toLowerCase();return o.forEach((function(e){a(n,e,r)})),this},e.exports?e.exports=i:(n.Sniffr=new i,n.Sniffr.sniff(navigator.userAgent))}(this)},8442:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(8759);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},5526:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(8199);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},4369:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(3109);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},2242:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(2890);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},3138:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(8004);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},2224:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(9791);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},108:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(4434);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},3068:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(5968);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},1050:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(9506);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},7869:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(5578);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},8095:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(8546);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},125:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(2616);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},6017:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(6751);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},1442:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(2260);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},335:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(5339);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},2593:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(4502);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},3833:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(5729);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},2481:(e,n,t)=>{var r=t(3379),o=t(7795),i=t(569),a=t(3565),l=t(9216),c=t(4589),u=t(3099);u=u.__esModule?u.default:u;var s={};s.styleTagTransform=c,s.setAttributes=a,s.insert=i.bind(null,"head"),s.domAPI=o,s.insertStyleElement=l;r(u,s);e.exports=u&&u.locals||{}},3379:e=>{"use strict";var n=[];function t(e){for(var t=-1,r=0;r{"use strict";var n={};e.exports=function(e,t){var r=function(e){if(void 0===n[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}n[e]=t}return n[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(t)}},9216:e=>{"use strict";e.exports=function(e){var n=document.createElement("style");return e.setAttributes(n,e.attributes),e.insert(n,e.options),n}},3565:(e,n,t)=>{"use strict";e.exports=function(e){var n=t.nc;n&&e.setAttribute("nonce",n)}},7795:e=>{"use strict";e.exports=function(e){var n=e.insertStyleElement(e);return{update:function(t){!function(e,n,t){var r="";t.supports&&(r+="@supports (".concat(t.supports,") {")),t.media&&(r+="@media ".concat(t.media," {"));var o=void 0!==t.layer;o&&(r+="@layer".concat(t.layer.length>0?" ".concat(t.layer):""," {")),r+=t.css,o&&(r+="}"),t.media&&(r+="}"),t.supports&&(r+="}");var i=t.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),n.styleTagTransform(r,e,n.options)}(n,e,t)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)}}}},4589:e=>{"use strict";e.exports=function(e,n){if(n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}},4927:(e,n,t)=>{function r(e){try{if(!t.g.localStorage)return!1}catch(e){return!1}var n=t.g.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,n){if(r("noDeprecation"))return e;var t=!1;return function(){if(!t){if(r("throwDeprecation"))throw new Error(n);r("traceDeprecation")?console.trace(n):console.warn(n),t=!0}return e.apply(this,arguments)}}},3679:(e,n,t)=>{"use strict";var r=t(9981),o=t(4578),i=t(6814),a=t(2636),l=t(3376);e.exports=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e?null:r(e)?"String":o(e)?"Number":i(e)?"Boolean":a(e)?"Symbol":l(e)?"BigInt":void 0}},6430:(e,n,t)=>{"use strict";var r=t(9804),o=t(3083),i=t(1924),a=i("Object.prototype.toString"),l=t(6410)(),c="undefined"==typeof globalThis?t.g:globalThis,u=o(),s=i("String.prototype.slice"),f={},p=t(882),d=Object.getPrototypeOf;l&&p&&d&&r(u,(function(e){if("function"==typeof c[e]){var n=new c[e];if(Symbol.toStringTag in n){var t=d(n),r=p(t,Symbol.toStringTag);if(!r){var o=d(t);r=p(o,Symbol.toStringTag)}f[e]=r.get}}}));var h=t(5692);e.exports=function(e){return!!h(e)&&(l&&Symbol.toStringTag in e?function(e){var n=!1;return r(f,(function(t,r){if(!n)try{var o=t.call(e);o===r&&(n=o)}catch(e){}})),n}(e):s(a(e),8,-1))}},4654:()=>{},3083:(e,n,t)=>{"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],o="undefined"==typeof globalThis?t.g:globalThis;e.exports=function(){for(var e=[],n=0;n{"use strict";var r=t(210)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},3216:(e,n,t)=>{"use strict";var r=t(2584);if(t(1405)()||t(5419)()){var o=Symbol.iterator;e.exports=function(e){return null!=e&&void 0!==e[o]?e[o]():r(e)?Array.prototype[o].call(e):void 0}}else{var i=t(5826),a=t(9981),l=t(210),c=l("%Map%",!0),u=l("%Set%",!0),s=t(1924),f=s("Array.prototype.push"),p=s("String.prototype.charCodeAt"),d=s("String.prototype.slice"),h=function(e){var n=0;return{next:function(){var t,r=n>=e.length;return r||(t=e[n],n+=1),{done:r,value:t}}}},g=function(e,n){if(i(e)||r(e))return h(e);if(a(e)){var t=0;return{next:function(){var n=function(e,n){if(n+1>=e.length)return n+1;var t=p(e,n);if(t<55296||t>56319)return n+1;var r=p(e,n+1);return r<56320||r>57343?n+1:n+2}(e,t),r=d(e,t,n);return t=n,{done:n>e.length,value:r}}}}return n&&void 0!==e["_es6-shim iterator_"]?e["_es6-shim iterator_"]():void 0};if(c||u){var v=t(8379),A=t(9572),b=s("Map.prototype.forEach",!0),m=s("Set.prototype.forEach",!0);if("undefined"==typeof process||!process.versions||!process.versions.node)var y=s("Map.prototype.iterator",!0),E=s("Set.prototype.iterator",!0),_=function(e){var n=!1;return{next:function(){try{return{done:n,value:n?void 0:e.next()}}catch(e){return n=!0,{done:!0,value:void 0}}}}};var C=s("Map.prototype.@@iterator",!0)||s("Map.prototype._es6-shim iterator_",!0),w=s("Set.prototype.@@iterator",!0)||s("Set.prototype._es6-shim iterator_",!0);e.exports=function(e){return function(e){if(v(e)){if(y)return _(y(e));if(C)return C(e);if(b){var n=[];return b(e,(function(e,t){f(n,[t,e])})),h(n)}}if(A(e)){if(E)return _(E(e));if(w)return w(e);if(m){var t=[];return m(e,(function(e){f(t,e)})),h(t)}}}(e)||g(e)}}else e.exports=function(e){if(null!=e)return g(e,!0)}}},3483:(e,n,t)=>{"use strict";var r=t(8379),o=t(9572),i=t(1718),a=t(5899);e.exports=function(e){if(e&&"object"==typeof e){if(r(e))return"Map";if(o(e))return"Set";if(i(e))return"WeakMap";if(a(e))return"WeakSet"}return!1}}},n={};function t(r){var o=n[r];if(void 0!==o)return o.exports;var i=n[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),t.nc=void 0,(()=>{"use strict";var e=t(7294),n=t(3935),r=(t(9070),t(8304),t(489),t(2419),t(8011),t(2772),t(7327),t(5003),t(9554),t(4747),t(9337),t(3321),t(2165),t(6992),t(8783),t(3948),t(6699),t(2023),t(2222),t(2526),t(1817),t(5212),t(1539),t(9601),t(7941),t(9826),t(4553),t(5697)),o=t.n(r),i=t(4184),a=t.n(i);function l(){return l=Object.assign||function(e){for(var n=1;n=0&&c===l&&u())}function E(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var _=function(){function e(n){var t=n.cellCount,r=n.cellSizeGetter,o=n.estimatedCellSize;c(this,e),A(this,"_cellSizeAndPositionData",{}),A(this,"_lastMeasuredIndex",-1),A(this,"_lastBatchedIndex",-1),A(this,"_cellCount",void 0),A(this,"_cellSizeGetter",void 0),A(this,"_estimatedCellSize",void 0),this._cellSizeGetter=r,this._cellCount=t,this._estimatedCellSize=o}return s(e,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(e){var n=e.cellCount,t=e.estimatedCellSize,r=e.cellSizeGetter;this._cellCount=n,this._estimatedCellSize=t,this._cellSizeGetter=r}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(e){if(e<0||e>=this._cellCount)throw Error("Requested index ".concat(e," is outside of range 0..").concat(this._cellCount));if(e>this._lastMeasuredIndex)for(var n=this.getSizeAndPositionOfLastMeasuredCell(),t=n.offset+n.size,r=this._lastMeasuredIndex+1;r<=e;r++){var o=this._cellSizeGetter({index:r});if(void 0===o||isNaN(o))throw Error("Invalid size returned for cell ".concat(r," of value ").concat(o));null===o?(this._cellSizeAndPositionData[r]={offset:t,size:0},this._lastBatchedIndex=e):(this._cellSizeAndPositionData[r]={offset:t,size:o},t+=o,this._lastMeasuredIndex=e)}return this._cellSizeAndPositionData[e]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(e){var n=e.align,t=void 0===n?"auto":n,r=e.containerSize,o=e.currentOffset,i=e.targetIndex;if(r<=0)return 0;var a,l=this.getSizeAndPositionOfCell(i),c=l.offset,u=c-r+l.size;switch(t){case"start":a=c;break;case"end":a=u;break;case"center":a=c-(r-l.size)/2;break;default:a=Math.max(u,Math.min(c,o))}var s=this.getTotalSize();return Math.max(0,Math.min(s-r,a))}},{key:"getVisibleCellRange",value:function(e){var n=e.containerSize,t=e.offset;if(0===this.getTotalSize())return{};var r=t+n,o=this._findNearestCell(t),i=this.getSizeAndPositionOfCell(o);t=i.offset+i.size;for(var a=o;tt&&(e=r-1)}return n>0?n-1:0}},{key:"_exponentialSearch",value:function(e,n){for(var t=1;e=e?this._binarySearch(t,0,e):this._exponentialSearch(t,e)}}]),e}(),C=function(){return"undefined"!=typeof window&&window.chrome?16777100:15e5},w=function(){function e(n){var t=n.maxScrollSize,r=void 0===t?C():t,o=E(n,["maxScrollSize"]);c(this,e),A(this,"_cellSizeAndPositionManager",void 0),A(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new _(o),this._maxScrollSize=r}return s(e,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(e){var n=e.containerSize,t=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize(),i=this._getOffsetPercentage({containerSize:n,offset:t,totalSize:o});return Math.round(i*(o-r))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var n=e.align,t=void 0===n?"auto":n,r=e.containerSize,o=e.currentOffset,i=e.targetIndex;o=this._safeOffsetToOffset({containerSize:r,offset:o});var a=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:t,containerSize:r,currentOffset:o,targetIndex:i});return this._offsetToSafeOffset({containerSize:r,offset:a})}},{key:"getVisibleCellRange",value:function(e){var n=e.containerSize,t=e.offset;return t=this._safeOffsetToOffset({containerSize:n,offset:t}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:n,offset:t})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var n=e.containerSize,t=e.offset,r=e.totalSize;return r<=n?0:t/(r-n)}},{key:"_offsetToSafeOffset",value:function(e){var n=e.containerSize,t=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize();if(r===o)return t;var i=this._getOffsetPercentage({containerSize:n,offset:t,totalSize:r});return Math.round(i*(o-n))}},{key:"_safeOffsetToOffset",value:function(e){var n=e.containerSize,t=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize();if(r===o)return t;var i=this._getOffsetPercentage({containerSize:n,offset:t,totalSize:o});return Math.round(i*(r-n))}}]),e}();function x(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n={};return function(t){var r=t.callback,o=t.indices,i=Object.keys(o),a=!e||i.every((function(e){var n=o[e];return Array.isArray(n)?n.length>0:n>=0})),l=i.length!==Object.keys(n).length||i.some((function(e){var t=n[e],r=o[e];return Array.isArray(r)?t.join(",")!==r.join(","):t!==r}));n=o,a&&l&&r(o)}}function k(e){var n=e.cellSize,t=e.cellSizeAndPositionManager,r=e.previousCellsCount,o=e.previousCellSize,i=e.previousScrollToAlignment,a=e.previousScrollToIndex,l=e.previousSize,c=e.scrollOffset,u=e.scrollToAlignment,s=e.scrollToIndex,f=e.size,p=e.sizeJustIncreasedFromZero,d=e.updateScrollIndexCallback,h=t.getCellCount(),g=s>=0&&s0&&(ft.getTotalSize()-f&&d(h-1)}const S=!("undefined"==typeof window||!window.document||!window.document.createElement);var O,B;function I(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function T(e){this.setState(function(n){var t=this.constructor.getDerivedStateFromProps(e,n);return null!=t?t:null}.bind(this))}function P(e,n){try{var t=this.props,r=this.state;this.props=e,this.state=n,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(t,r)}finally{this.props=t,this.state=r}}I.__suppressDeprecationWarning=!0,T.__suppressDeprecationWarning=!0,P.__suppressDeprecationWarning=!0;var j,z,R=(B="undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).requestAnimationFrame||B.webkitRequestAnimationFrame||B.mozRequestAnimationFrame||B.oRequestAnimationFrame||B.msRequestAnimationFrame||function(e){return B.setTimeout(e,1e3/60)},M=B.cancelAnimationFrame||B.webkitCancelAnimationFrame||B.mozCancelAnimationFrame||B.oCancelAnimationFrame||B.msCancelAnimationFrame||function(e){B.clearTimeout(e)},D=R,N=M,L=function(e){return N(e.id)},F=function(e,n){var t;Promise.resolve().then((function(){t=Date.now()}));var r={id:D((function o(){Date.now()-t>=n?e.call():r.id=D(o)}))};return r};function U(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function W(e){for(var n=1;n0&&(n._initialScrollTop=n._getCalculatedScrollTop(e,n.state)),e.scrollToColumn>0&&(n._initialScrollLeft=n._getCalculatedScrollLeft(e,n.state)),n}return v(t,n),s(t,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.alignment,t=void 0===n?this.props.scrollToAlignment:n,r=e.columnIndex,o=void 0===r?this.props.scrollToColumn:r,i=e.rowIndex,a=void 0===i?this.props.scrollToRow:i,l=W({},this.props,{scrollToAlignment:t,scrollToColumn:o,scrollToRow:a});return{scrollLeft:this._getCalculatedScrollLeft(l),scrollTop:this._getCalculatedScrollTop(l)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var n=e.scrollLeft,t=void 0===n?0:n,r=e.scrollTop,o=void 0===r?0:r;if(!(o<0)){this._debounceScrollEnded();var i=this.props,a=i.autoHeight,l=i.autoWidth,c=i.height,u=i.width,s=this.state.instanceProps,f=s.scrollbarSize,p=s.rowSizeAndPositionManager.getTotalSize(),d=s.columnSizeAndPositionManager.getTotalSize(),h=Math.min(Math.max(0,d-u+f),t),g=Math.min(Math.max(0,p-c+f),o);if(this.state.scrollLeft!==h||this.state.scrollTop!==g){var v={isScrolling:!0,scrollDirectionHorizontal:h!==this.state.scrollLeft?h>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:g!==this.state.scrollTop?g>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:H};a||(v.scrollTop=g),l||(v.scrollLeft=h),v.needToResetStyleCache=!1,this.setState(v)}this._invokeOnScrollMemoizer({scrollLeft:h,scrollTop:g,totalColumnsWidth:d,totalRowsHeight:p})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var n=e.columnIndex,t=e.rowIndex;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,n):n,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,t):t}},{key:"measureAllCells",value:function(){var e=this.props,n=e.columnCount,t=e.rowCount,r=this.state.instanceProps;r.columnSizeAndPositionManager.getSizeAndPositionOfCell(n-1),r.rowSizeAndPositionManager.getSizeAndPositionOfCell(t-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.columnIndex,t=void 0===n?0:n,r=e.rowIndex,o=void 0===r?0:r,i=this.props,a=i.scrollToColumn,l=i.scrollToRow,c=this.state.instanceProps;c.columnSizeAndPositionManager.resetCell(t),c.rowSizeAndPositionManager.resetCell(o),this._recomputeScrollLeftFlag=a>=0&&(1===this.state.scrollDirectionHorizontal?t<=a:t>=a),this._recomputeScrollTopFlag=l>=0&&(1===this.state.scrollDirectionVertical?o<=l:o>=l),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var n=e.columnIndex,t=e.rowIndex,r=this.props.columnCount,o=this.props;r>1&&void 0!==n&&this._updateScrollLeftForScrollToColumn(W({},o,{scrollToColumn:n})),void 0!==t&&this._updateScrollTopForScrollToRow(W({},o,{scrollToRow:t}))}},{key:"componentDidMount",value:function(){var e=this.props,n=e.getScrollbarSize,r=e.height,o=e.scrollLeft,i=e.scrollToColumn,a=e.scrollTop,l=e.scrollToRow,c=e.width,u=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),u.scrollbarSizeMeasured||this.setState((function(e){var t=W({},e,{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=n(),t.instanceProps.scrollbarSizeMeasured=!0,t})),"number"==typeof o&&o>=0||"number"==typeof a&&a>=0){var s=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:o,scrollTop:a});s&&(s.needToResetStyleCache=!1,this.setState(s))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var f=r>0&&c>0;i>=0&&f&&this._updateScrollLeftForScrollToColumn(),l>=0&&f&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:o||0,scrollTop:a||0,totalColumnsWidth:u.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:u.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,n){var t=this,r=this.props,o=r.autoHeight,i=r.autoWidth,a=r.columnCount,l=r.height,c=r.rowCount,u=r.scrollToAlignment,s=r.scrollToColumn,f=r.scrollToRow,p=r.width,d=this.state,h=d.scrollLeft,g=d.scrollPositionChangeReason,v=d.scrollTop,A=d.instanceProps;this._handleInvalidatedGridSize();var b=a>0&&0===e.columnCount||c>0&&0===e.rowCount;g===G&&(!i&&h>=0&&(h!==this._scrollingContainer.scrollLeft||b)&&(this._scrollingContainer.scrollLeft=h),!o&&v>=0&&(v!==this._scrollingContainer.scrollTop||b)&&(this._scrollingContainer.scrollTop=v));var m=(0===e.width||0===e.height)&&l>0&&p>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):k({cellSizeAndPositionManager:A.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:h,scrollToAlignment:u,scrollToIndex:s,size:p,sizeJustIncreasedFromZero:m,updateScrollIndexCallback:function(){return t._updateScrollLeftForScrollToColumn(t.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):k({cellSizeAndPositionManager:A.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:v,scrollToAlignment:u,scrollToIndex:f,size:l,sizeJustIncreasedFromZero:m,updateScrollIndexCallback:function(){return t._updateScrollTopForScrollToRow(t.props)}}),this._invokeOnGridRenderedHelper(),h!==n.scrollLeft||v!==n.scrollTop){var y=A.rowSizeAndPositionManager.getTotalSize(),E=A.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:h,scrollTop:v,totalColumnsWidth:E,totalRowsHeight:y})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&L(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var n=this.props,t=n.autoContainerWidth,r=n.autoHeight,o=n.autoWidth,i=n.className,a=n.containerProps,c=n.containerRole,u=n.containerStyle,s=n.height,f=n.id,p=n.noContentRenderer,d=n.role,h=n.style,g=n.tabIndex,v=n.width,A=this.state,b=A.instanceProps,y=A.needToResetStyleCache,E=this._isScrolling(),_={boxSizing:"border-box",direction:"ltr",height:r?"auto":s,position:"relative",width:o?"auto":v,WebkitOverflowScrolling:"touch",willChange:"transform"};y&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var C=b.columnSizeAndPositionManager.getTotalSize(),w=b.rowSizeAndPositionManager.getTotalSize(),x=w>s?b.scrollbarSize:0,k=C>v?b.scrollbarSize:0;k===this._horizontalScrollBarSize&&x===this._verticalScrollBarSize||(this._horizontalScrollBarSize=k,this._verticalScrollBarSize=x,this._scrollbarPresenceChanged=!0),_.overflowX=C+x<=v?"hidden":"auto",_.overflowY=w+k<=s?"hidden":"auto";var S=this._childrenToDisplay,O=0===S.length&&s>0&&v>0;return e.createElement("div",l({ref:this._setScrollingContainerRef},a,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:m("ReactVirtualized__Grid",i),id:f,onScroll:this._onScroll,role:d,style:W({},_,{},h),tabIndex:g}),S.length>0&&e.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:c,style:W({width:t?"auto":C,height:w,maxWidth:C,maxHeight:w,overflow:"hidden",pointerEvents:E?"none":"",position:"relative"},u)},S),O&&p())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,t=e.cellRenderer,r=e.cellRangeRenderer,o=e.columnCount,i=e.deferredMeasurementCache,a=e.height,l=e.overscanColumnCount,c=e.overscanIndicesGetter,u=e.overscanRowCount,s=e.rowCount,f=e.width,p=e.isScrollingOptOut,d=n.scrollDirectionHorizontal,h=n.scrollDirectionVertical,g=n.instanceProps,v=this._initialScrollTop>0?this._initialScrollTop:n.scrollTop,A=this._initialScrollLeft>0?this._initialScrollLeft:n.scrollLeft,b=this._isScrolling(e,n);if(this._childrenToDisplay=[],a>0&&f>0){var m=g.columnSizeAndPositionManager.getVisibleCellRange({containerSize:f,offset:A}),y=g.rowSizeAndPositionManager.getVisibleCellRange({containerSize:a,offset:v}),E=g.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:f,offset:A}),_=g.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:a,offset:v});this._renderedColumnStartIndex=m.start,this._renderedColumnStopIndex=m.stop,this._renderedRowStartIndex=y.start,this._renderedRowStopIndex=y.stop;var C=c({direction:"horizontal",cellCount:o,overscanCellsCount:l,scrollDirection:d,startIndex:"number"==typeof m.start?m.start:0,stopIndex:"number"==typeof m.stop?m.stop:-1}),w=c({direction:"vertical",cellCount:s,overscanCellsCount:u,scrollDirection:h,startIndex:"number"==typeof y.start?y.start:0,stopIndex:"number"==typeof y.stop?y.stop:-1}),x=C.overscanStartIndex,k=C.overscanStopIndex,S=w.overscanStartIndex,O=w.overscanStopIndex;if(i){if(!i.hasFixedHeight())for(var B=S;B<=O;B++)if(!i.has(B,0)){x=0,k=o-1;break}if(!i.hasFixedWidth())for(var I=x;I<=k;I++)if(!i.has(0,I)){S=0,O=s-1;break}}this._childrenToDisplay=r({cellCache:this._cellCache,cellRenderer:t,columnSizeAndPositionManager:g.columnSizeAndPositionManager,columnStartIndex:x,columnStopIndex:k,deferredMeasurementCache:i,horizontalOffsetAdjustment:E,isScrolling:b,isScrollingOptOut:p,parent:this,rowSizeAndPositionManager:g.rowSizeAndPositionManager,rowStartIndex:S,rowStopIndex:O,scrollLeft:A,scrollTop:v,styleCache:this._styleCache,verticalOffsetAdjustment:_,visibleColumnIndices:m,visibleRowIndices:y}),this._columnStartIndex=x,this._columnStopIndex=k,this._rowStartIndex=S,this._rowStopIndex=O}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&L(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=F(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex&&"number"==typeof this._deferredInvalidateRowIndex){var e=this._deferredInvalidateColumnIndex,n=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:n})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var n=this,t=e.scrollLeft,r=e.scrollTop,o=e.totalColumnsWidth,i=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var t=e.scrollLeft,r=e.scrollTop,a=n.props,l=a.height;(0,a.onScroll)({clientHeight:l,clientWidth:a.width,scrollHeight:i,scrollLeft:t,scrollTop:r,scrollWidth:o})},indices:{scrollLeft:t,scrollTop:r}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?Boolean(e.isScrolling):Boolean(n.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var n=e.scrollLeft,r=e.scrollTop,o=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:n,scrollTop:r});o&&(o.needToResetStyleCache=!1,this.setState(o))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollLeft(e,n)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollLeftForScrollToColumnStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollTop(e,n)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,n=this._cellCache,t=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var r=this._rowStartIndex;r<=this._rowStopIndex;r++)for(var o=this._columnStartIndex;o<=this._columnStopIndex;o++){var i="".concat(r,"-").concat(o);this._styleCache[i]=e[i],t&&(this._cellCache[i]=n[i])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollTopForScrollToRowStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}}],[{key:"getDerivedStateFromProps",value:function(e,n){var r={};0===e.columnCount&&0!==n.scrollLeft||0===e.rowCount&&0!==n.scrollTop?(r.scrollLeft=0,r.scrollTop=0):(e.scrollLeft!==n.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==n.scrollTop&&e.scrollToRow<0)&&Object.assign(r,t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var o,i,a=n.instanceProps;return r.needToResetStyleCache=!1,e.columnWidth===a.prevColumnWidth&&e.rowHeight===a.prevRowHeight||(r.needToResetStyleCache=!0),a.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:t._getEstimatedColumnSize(e),cellSizeGetter:t._wrapSizeGetter(e.columnWidth)}),a.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:t._getEstimatedRowSize(e),cellSizeGetter:t._wrapSizeGetter(e.rowHeight)}),0!==a.prevColumnCount&&0!==a.prevRowCount||(a.prevColumnCount=0,a.prevRowCount=0),e.autoHeight&&!1===e.isScrolling&&!0===a.prevIsScrolling&&Object.assign(r,{isScrolling:!1}),y({cellCount:a.prevColumnCount,cellSize:"number"==typeof a.prevColumnWidth?a.prevColumnWidth:null,computeMetadataCallback:function(){return a.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"==typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:a.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){o=t._getScrollLeftForScrollToColumnStateUpdate(e,n)}}),y({cellCount:a.prevRowCount,cellSize:"number"==typeof a.prevRowHeight?a.prevRowHeight:null,computeMetadataCallback:function(){return a.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"==typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:a.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){i=t._getScrollTopForScrollToRowStateUpdate(e,n)}}),a.prevColumnCount=e.columnCount,a.prevColumnWidth=e.columnWidth,a.prevIsScrolling=!0===e.isScrolling,a.prevRowCount=e.rowCount,a.prevRowHeight=e.rowHeight,a.prevScrollToColumn=e.scrollToColumn,a.prevScrollToRow=e.scrollToRow,a.scrollbarSize=e.getScrollbarSize(),void 0===a.scrollbarSize?(a.scrollbarSizeMeasured=!1,a.scrollbarSize=0):a.scrollbarSizeMeasured=!0,r.instanceProps=a,W({},r,{},o,{},i)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"==typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"==typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var n=e.prevState,t=e.scrollLeft,r=e.scrollTop,o={scrollPositionChangeReason:G};return"number"==typeof t&&t>=0&&(o.scrollDirectionHorizontal=t>n.scrollLeft?1:-1,o.scrollLeft=t),"number"==typeof r&&r>=0&&(o.scrollDirectionVertical=r>n.scrollTop?1:-1,o.scrollTop=r),"number"==typeof t&&t>=0&&t!==n.scrollLeft||"number"==typeof r&&r>=0&&r!==n.scrollTop?o:{}}},{key:"_wrapSizeGetter",value:function(e){return"function"==typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,n){var t=e.columnCount,r=e.height,o=e.scrollToAlignment,i=e.scrollToColumn,a=e.width,l=n.scrollLeft,c=n.instanceProps;if(t>0){var u=t-1,s=i<0?u:Math.min(u,i),f=c.rowSizeAndPositionManager.getTotalSize(),p=c.scrollbarSizeMeasured&&f>r?c.scrollbarSize:0;return c.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:a-p,currentOffset:l,targetIndex:s})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,n){var r=n.scrollLeft,o=t._getCalculatedScrollLeft(e,n);return"number"==typeof o&&o>=0&&r!==o?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:o,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,n){var t=e.height,r=e.rowCount,o=e.scrollToAlignment,i=e.scrollToRow,a=e.width,l=n.scrollTop,c=n.instanceProps;if(r>0){var u=r-1,s=i<0?u:Math.min(u,i),f=c.columnSizeAndPositionManager.getTotalSize(),p=c.scrollbarSizeMeasured&&f>a?c.scrollbarSize:0;return c.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:t-p,currentOffset:l,targetIndex:s})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,n){var r=n.scrollTop,o=t._getCalculatedScrollTop(e,n);return"number"==typeof o&&o>=0&&r!==o?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:-1,scrollTop:o}):{}}}]),t}(e.PureComponent),A(j,"propTypes",null),z);A(q,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var n=e.cellCache,t=e.cellRenderer,r=e.columnSizeAndPositionManager,o=e.columnStartIndex,i=e.columnStopIndex,a=e.deferredMeasurementCache,l=e.horizontalOffsetAdjustment,c=e.isScrolling,u=e.isScrollingOptOut,s=e.parent,f=e.rowSizeAndPositionManager,p=e.rowStartIndex,d=e.rowStopIndex,h=e.styleCache,g=e.verticalOffsetAdjustment,v=e.visibleColumnIndices,A=e.visibleRowIndices,b=[],m=r.areOffsetsAdjusted()||f.areOffsetsAdjusted(),y=!c&&!m,E=p;E<=d;E++)for(var _=f.getSizeAndPositionOfCell(E),C=o;C<=i;C++){var w=r.getSizeAndPositionOfCell(C),x=C>=v.start&&C<=v.stop&&E>=A.start&&E<=A.stop,k="".concat(E,"-").concat(C),S=void 0;y&&h[k]?S=h[k]:a&&!a.has(E,C)?S={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(S={height:_.size,left:w.offset+l,position:"absolute",top:_.offset+g,width:w.size},h[k]=S);var O={columnIndex:C,isScrolling:c,isVisible:x,key:k,parent:s,rowIndex:E,style:S},B=void 0;!u&&!c||l||g?B=t(O):(n[k]||(n[k]=t(O)),B=n[k]),null!=B&&!1!==B&&b.push(B)}return b},containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:function(e){if((!O&&0!==O||e)&&S){var n=document.createElement("div");n.style.position="absolute",n.style.top="-9999px",n.style.width="50px",n.style.height="50px",n.style.overflow="scroll",document.body.appendChild(n),O=n.offsetWidth-n.clientWidth,document.body.removeChild(n)}return O},noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(e){var n=e.cellCount,t=e.overscanCellsCount,r=e.scrollDirection,o=e.startIndex,i=e.stopIndex;return 1===r?{overscanStartIndex:Math.max(0,o),overscanStopIndex:Math.min(n-1,i+t)}:{overscanStartIndex:Math.max(0,o-t),overscanStopIndex:Math.min(n-1,i)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),function(e){var n=e.prototype;if(!n||!n.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof n.getSnapshotBeforeUpdate)return e;var t=null,r=null,o=null;if("function"==typeof n.componentWillMount?t="componentWillMount":"function"==typeof n.UNSAFE_componentWillMount&&(t="UNSAFE_componentWillMount"),"function"==typeof n.componentWillReceiveProps?r="componentWillReceiveProps":"function"==typeof n.UNSAFE_componentWillReceiveProps&&(r="UNSAFE_componentWillReceiveProps"),"function"==typeof n.componentWillUpdate?o="componentWillUpdate":"function"==typeof n.UNSAFE_componentWillUpdate&&(o="UNSAFE_componentWillUpdate"),null!==t||null!==r||null!==o){var i=e.displayName||e.name,a="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+i+" uses "+a+" but also contains the following legacy lifecycles:"+(null!==t?"\n "+t:"")+(null!==r?"\n "+r:"")+(null!==o?"\n "+o:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(n.componentWillMount=I,n.componentWillReceiveProps=T),"function"==typeof n.getSnapshotBeforeUpdate){if("function"!=typeof n.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");n.componentWillUpdate=P;var l=n.componentDidUpdate;n.componentDidUpdate=function(e,n,t){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:t;l.call(this,e,n,r)}}}(q);const V=q;var $,K,Y,X,Z=(K=$=function(n){function t(){var e,n;c(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=e.columnIndex,t=void 0===n?0:n,r=e.rowIndex,o=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:o,columnIndex:t})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var n=this.props,t=n.className,r=n.noRowsRenderer,o=n.scrollToIndex,i=n.width,a=m("ReactVirtualized__List",t);return e.createElement(V,l({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:a,columnWidth:i,columnCount:1,noContentRenderer:r,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:o}))}}]),t}(e.PureComponent),A($,"propTypes",null),K);function Q(e,n){var r,o=void 0!==(r=void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:t.g).document&&r.document.attachEvent;if(!o){var i=function(){var e=r.requestAnimationFrame||r.mozRequestAnimationFrame||r.webkitRequestAnimationFrame||function(e){return r.setTimeout(e,20)};return function(n){return e(n)}}(),a=function(){var e=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||r.clearTimeout;return function(n){return e(n)}}(),l=function(e){var n=e.__resizeTriggers__,t=n.firstElementChild,r=n.lastElementChild,o=t.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,o.style.width=t.offsetWidth+1+"px",o.style.height=t.offsetHeight+1+"px",t.scrollLeft=t.scrollWidth,t.scrollTop=t.scrollHeight},c=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var n=this;l(this),this.__resizeRAF__&&a(this.__resizeRAF__),this.__resizeRAF__=i((function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(n)&&(n.__resizeLast__.width=n.offsetWidth,n.__resizeLast__.height=n.offsetHeight,n.__resizeListeners__.forEach((function(t){t.call(n,e)})))}))}},u=!1,s="",f="animationstart",p="Webkit Moz O ms".split(" "),d="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),h=r.document.createElement("fakeelement");if(void 0!==h.style.animationName&&(u=!0),!1===u)for(var g=0;g div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=n.head||n.getElementsByTagName("head")[0],o=n.createElement("style");o.id="detectElementResize",o.type="text/css",null!=e&&o.setAttribute("nonce",e),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(n.createTextNode(t)),r.appendChild(o)}}(i),n.__resizeLast__={},n.__resizeListeners__=[],(n.__resizeTriggers__=i.createElement("div")).className="resize-triggers";var u='
';if(window.trustedTypes){var s=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return u}});n.__resizeTriggers__.innerHTML=s.createHTML("")}else n.__resizeTriggers__.innerHTML=u;n.appendChild(n.__resizeTriggers__),l(n),n.addEventListener("scroll",c,!0),f&&(n.__resizeTriggers__.__animationListener__=function(e){e.animationName==v&&l(n)},n.__resizeTriggers__.addEventListener(f,n.__resizeTriggers__.__animationListener__))}n.__resizeListeners__.push(t)}},removeResizeListener:function(e,n){if(o)e.detachEvent("onresize",n);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(n),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",c,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(f,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}function J(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ee(e){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,t=this.props.onResize,r=this.state,o=r.height,i=r.width,a=this._child||n.findDOMNode(this);if(a instanceof Element&&e){var l=ge(a,e);this._positionFromTop=l.top,this._positionFromLeft=l.left}var c=he(e,this.props);o===c.height&&i===c.width||(this.setState({height:c.height,width:c.width}),t({height:c.height,width:c.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=Q(),this.updatePosition(e),e&&(ce(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,n){var t=this.props.scrollElement,r=e.scrollElement;r!==t&&null!=r&&null!=t&&(this.updatePosition(t),ue(this,r),ce(this,t),this._unregisterResizeListener(r),this._registerResizeListener(t))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(ue(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,n=this.state,t=n.isScrolling,r=n.scrollTop,o=n.scrollLeft,i=n.height,a=n.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:i,isScrolling:t,scrollLeft:o,scrollTop:r,width:a})}}]),t}(e.PureComponent),A(se,"propTypes",null),fe);A(ye,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:me(),serverHeight:0,serverWidth:0});const Ee=ye;var _e,Ce,we=(Ce=_e=function(e){function t(){var e,n;c(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:{};c(this,e),A(this,"_cellHeightCache",{}),A(this,"_cellWidthCache",{}),A(this,"_columnWidthCache",{}),A(this,"_rowHeightCache",{}),A(this,"_defaultHeight",void 0),A(this,"_defaultWidth",void 0),A(this,"_minHeight",void 0),A(this,"_minWidth",void 0),A(this,"_keyMapper",void 0),A(this,"_hasFixedHeight",void 0),A(this,"_hasFixedWidth",void 0),A(this,"_columnCount",0),A(this,"_rowCount",0),A(this,"columnWidth",(function(e){var t=e.index,r=n._keyMapper(0,t);return void 0!==n._columnWidthCache[r]?n._columnWidthCache[r]:n._defaultWidth})),A(this,"rowHeight",(function(e){var t=e.index,r=n._keyMapper(t,0);return void 0!==n._rowHeightCache[r]?n._rowHeightCache[r]:n._defaultHeight}));var r=t.defaultHeight,o=t.defaultWidth,i=t.fixedHeight,a=t.fixedWidth,l=t.keyMapper,u=t.minHeight,s=t.minWidth;this._hasFixedHeight=!0===i,this._hasFixedWidth=!0===a,this._minHeight=u||0,this._minWidth=s||0,this._keyMapper=l||ke,this._defaultHeight=Math.max(this._minHeight,"number"==typeof r?r:30),this._defaultWidth=Math.max(this._minWidth,"number"==typeof o?o:100)}return s(e,[{key:"clear",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=this._keyMapper(e,n);delete this._cellHeightCache[t],delete this._cellWidthCache[t],this._updateCachedColumnAndRowSizes(e,n)}},{key:"clearAll",value:function(){this._cellHeightCache={},this._cellWidthCache={},this._columnWidthCache={},this._rowHeightCache={},this._rowCount=0,this._columnCount=0}},{key:"hasFixedHeight",value:function(){return this._hasFixedHeight}},{key:"hasFixedWidth",value:function(){return this._hasFixedWidth}},{key:"getHeight",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._hasFixedHeight)return this._defaultHeight;var t=this._keyMapper(e,n);return void 0!==this._cellHeightCache[t]?Math.max(this._minHeight,this._cellHeightCache[t]):this._defaultHeight}},{key:"getWidth",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._hasFixedWidth)return this._defaultWidth;var t=this._keyMapper(e,n);return void 0!==this._cellWidthCache[t]?Math.max(this._minWidth,this._cellWidthCache[t]):this._defaultWidth}},{key:"has",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=this._keyMapper(e,n);return void 0!==this._cellHeightCache[t]}},{key:"set",value:function(e,n,t,r){var o=this._keyMapper(e,n);n>=this._columnCount&&(this._columnCount=n+1),e>=this._rowCount&&(this._rowCount=e+1),this._cellHeightCache[o]=r,this._cellWidthCache[o]=t,this._updateCachedColumnAndRowSizes(e,n)}},{key:"_updateCachedColumnAndRowSizes",value:function(e,n){if(!this._hasFixedWidth){for(var t=0,r=0;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:"__singleValue__",o=r instanceof Object?t:n;if(o.has(r))return o.get(r);var i=e(r);return o.set(r,i),i}}t(4812),t(3123),t(189);function He(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:"";t.split(/\s+/g).filter((function(e){return!!e})).forEach((function(t){return n[e](t)}))}};Xe("add"),Xe("remove");var Ze=function(){function e(){var n,t,r;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,t="_all",r=new Set,t in n?Object.defineProperty(n,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[t]=r}var n,t,r;return n=e,(t=[{key:"add",value:function(e,n,t,r){e.addEventListener(n,t,r);var o=function(){return e.removeEventListener(n,t,r)};return this._all.add(o),o}},{key:"remove",value:function(e){e(),this._all.delete(e)}},{key:"removeAll",value:function(){var e=this;this._all.forEach((function(n){return e.remove(n)}))}}])&&He(n.prototype,t),r&&He(n,r),e}();t(1249),t(561),t(4723);var Qe=t(8736),Je=t.n(Qe),en=t(3854),nn=new(t.n(en)());nn.sniff();const tn=nn;function rn(e){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(e)}function on(e,n){for(var t=0;t=0;o--){var i=n._scopeChain[o];if((r=n._scopes[i.scopeId])&&r[t]){var a=r[t](e,t,i.scopeId);if(!0!==a)return a}if(i.options.modal)return!0}})),an(this,"_defaultFilter",(function(e,t,r){return t!==document&&!t.matches(n.ALLOW_SHORTCUTS_SELECTOR)&&!(null!=t.dataset.enabledShortcuts?t.dataset.enabledShortcuts.split(",").includes(r):null!=t.closest(n.ALLOW_SHORTCUTS_SELECTOR))&&(t.matches("input,select,textarea")||t.contentEditable&&"true"===t.contentEditable)})),this.setFilter(),this.setScope()}var n,t,r;return n=e,t=[{key:"bind",value:function(e){if(!(e instanceof Object)||"function"!=typeof e.handler)throw new Error("Shortcut handler should exist");if(e.scope||(e.scope=this.ROOT_SCOPE.scopeId),Array.isArray(e.key))for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(e){var t=this.indexOfScope(e);-1!==t&&this._scopeChain.splice(t,1),this._scopeChain.push(this.wrapScope(e,n))}}},{key:"popScope",value:function(e){if(e){var n=this.indexOfScope(e);if(-1!==n)return this._scopeChain.splice(n,this._scopeChain.length-1)}}},{key:"spliceScope",value:function(e){if(e){var n=this.indexOfScope(e);-1!==n&&this._scopeChain.splice(n,1)}}},{key:"setScope",value:function(e){var n=this;if(e){var t;if(t="string"==typeof e||!Array.isArray(e)&&"object"===rn(e)&&null!==e?[e]:e,!Array.isArray(t))return;t=t.map((function(e){return"string"==typeof e?n.wrapScope(e):e})),this._scopeChain=[this.ROOT_SCOPE].concat(t)}else this._scopeChain=[this.ROOT_SCOPE]}},{key:"wrapScope",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{scopeId:e,options:n}}},{key:"hasKey",value:function(e,n){return!(!this._scopes[n]||!this._scopes[n][e])}},{key:"_getKeyboardEventType",value:function(e){return!e.type&&"windows"===tn.os.name&&e.key.match(/ctrl/i)&&e.key.match(/shift/i)&&e.key.match(/[0-9]/)?"keyup":e.type}},{key:"setFilter",value:function(e){this.combokeys.stopCallback="function"==typeof e?e:this._defaultFilter}},{key:"indexOfScope",value:function(e){return this._scopeChain.findIndex((function(n){return n.scopeId===e}))}},{key:"reset",value:function(){this._scopes={},this.setScope(),this.combokeys.reset()}}],t&&on(n.prototype,t),r&&on(n,r),e}();const cn=new ln;function un(e){return un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(e)}function sn(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function fn(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function wn(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function xn(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Fn(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Un(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function it(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function at(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=o})),f=s.length>0?Math.min.apply(Math,mt(s)):Math.max.apply(Math,mt(xt)),p=wt[f],d=i?"50%":p.radius,h=(0,e.useMemo)((function(){return Fe("gradient-")}),[]);return e.createElement("svg",{viewBox:"0 0 ".concat(f," ").concat(f),xmlns:"http://www.w3.org/2000/svg"},e.createElement("defs",null,e.createElement("linearGradient",{id:h,x1:"0",y1:"0",x2:"0",y2:"1"},e.createElement("stop",{stopColor:c,offset:"0"}),e.createElement("stop",{stopColor:u,offset:"1"}))),e.createElement("g",null,e.createElement("rect",{fill:"url(#".concat(h,")"),x:"0",y:"0",width:f,height:f,rx:d,ry:d}),e.createElement("text",{x:p.text.x,y:p.text.y,fontFamily:"Arial, Helvetica, sans-serif",fontSize:p.fontSize,letterSpacing:p.letterSpacing,fill:"#FFFFFF",textAnchor:p.textAnchor},e.createElement("tspan",null,(t=r.split(/[\s._]+/).filter(Boolean)).length>=2?t[0][0].toUpperCase()+t[1][0].toUpperCase():1===t.length?t[0].length>=2?t[0].slice(0,2).toUpperCase():"".concat(t[0][0].toUpperCase(),"X"):"XX"),p.underscore&&e.createElement("tspan",{x:p.underscore.x,y:p.underscore.y},"_"))))}function St(e){return St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},St(e)}kt.propTypes={username:o().string.isRequired,size:o().number.isRequired,round:o().bool};var Ot=["size","url","dpr","style","round","subavatar","subavatarSize","username","skipParams"];function Bt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,l=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(l)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return It(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return It(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function It(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Rt(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Mt(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var rr=We((function(e){var n=document.createElement("div");n.innerHTML=e;var t,r,o=n.firstElementChild;return o.remove?o.remove():n.removeChild(o),{props:(t=o,r=t.attributes,r.length>0?function(e){for(var n={},t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function sr(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function fr(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function xr(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function kr(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Lr(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Fr(e,n){for(var t=0;t=32||13===n?n:0}(e);return 32===t?"Enter":String.fromCharCode(t)}return"keydown"===e.type||"keyup"===e.type?Yr[e.keyCode]||"Unidentified":""}function Zr(e){return Zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zr(e)}var Qr=["scrolling","hover","className","disabled","template","rgItemType","tabIndex","onClick","onCheckboxChange","onMouseOver","onMouseUp","role","tagName"];function Jr(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function eo(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function no(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function $o(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ko(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:"",r=(0,e.createContext)(n),i=(0,e.createContext)((function(){}));function a(t){var o=t.children,a=bn((0,e.useState)(n),2),l=a[0],c=a[1];return e.createElement(r.Provider,{value:l},e.createElement(i.Provider,{value:c},o))}function l(n,t){var r=(0,e.useContext)(i);(0,e.useEffect)((function(){t||r(n)}),[r,n,t])}function c(e){return l(e.value,e.skipUpdate),null}return a.propTypes={children:o().node},a.displayName="".concat(t,"Provider"),c.displayName="".concat(t,"Updater"),{ValueContext:r,UpdateContext:i,Provider:a,useUpdate:l,Updater:(0,e.memo)(c)}}(void 0,"ActiveItem"),ci=function(n){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&Yo(e,n)}(l,n);var t,r,o,i=Xo(l);function l(){var n;$o(this,l);for(var t=arguments.length,r=new Array(t),o=0;o1&&void 0!==arguments[1]&&arguments[1],o=n.props.data[e];!n.props.useMouseUp&&o.onClick?o.onClick(o,t):n.props.useMouseUp&&o.onMouseUp&&o.onMouseUp(o,t),n.props.onSelect&&n.props.onSelect(o,t,{tryKeepOpen:r})}}))),ei(Qo(n),"checkboxHandler",We((function(e){return function(t){return n.selectHandler(e)(t,!0)}}))),ei(Qo(n),"upHandler",(function(e){var t,r=n.props,o=r.data,i=r.disableMoveOverflow,a=n.state.activeIndex;if(null===a||0===a){if(i)return;t=o.length-1}else t=a-1;n.moveHandler(t,n.upHandler,e)})),ei(Qo(n),"downHandler",(function(e){var t,r=n.props,o=r.data,i=r.disableMoveOverflow,a=r.disableMoveDownOverflow,l=n.state.activeIndex;if(null===l)t=0;else if(l+1===o.length){if(i||a)return;t=0}else t=l+1;n.moveHandler(t,n.downHandler,e)})),ei(Qo(n),"homeHandler",(function(e){n.moveHandler(0,n.downHandler,e)})),ei(Qo(n),"endHandler",(function(e){n.moveHandler(n.props.data.length-1,n.upHandler,e)})),ei(Qo(n),"onDocumentMouseMove",(function(){n.state.disabledHover&&n.setState({disabledHover:!1})})),ei(Qo(n),"onDocumentKeyDown",(function(e){n.state.disabledHover||[16,17,18,19,20,91].includes(e.keyCode)||n.setState({disabledHover:!0})})),ei(Qo(n),"mouseHandler",(function(){n.setState({scrolling:!1})})),ei(Qo(n),"scrollHandler",(function(){n.setState({scrolling:!0},n.scrollEndHandler)})),ei(Qo(n),"enterHandler",(function(e,t){if(null!==n.state.activeIndex){var r=n.props.data[n.state.activeIndex];return n.selectHandler(n.state.activeIndex)(e),r.href&&!e.defaultPrevented&&(["command+enter","ctrl+enter"].includes(t)?window.open(r.href,"_blank"):"shift+enter"===t?window.open(r.href):window.location.href=r.href),!1}return!0})),ei(Qo(n),"clearSelected",(function(){n.setState({activeIndex:null,needScrollToActive:!1})})),ei(Qo(n),"scrollEndHandler",(function(){return ni((function(){var e=n.inner;if(e){var t=e.scrollHeight,r=n.defaultItemHeight()/2,o=e.scrollTop+e.clientHeight+r,i=t>0&&o>=t;n.unmounted||n.setState({scrolledToBottom:i}),i&&n.props.onScrollToBottom()}}))})),ei(Qo(n),"checkOverflow",(function(){n.inner&&n.setState({hasOverflow:n.inner.scrollHeight-n.inner.clientHeight>1})})),ei(Qo(n),"renderItem",(function(t){var r,o,i=t.index,l=t.style,c=t.isScrolling,u=t.parent,s=t.key,f=i-1,p=n.props.data[f],d=n.getId(p);if(0===i||i===n.props.data.length+1||p.rgItemType===Lo.MARGIN)r=s||"".concat(Lo.MARGIN,"_").concat(i),o=e.createElement("div",{style:{height:Fo.MARGIN}});else{p.selectedLabel,p.originalModel;var h=Vo(p,Ho),g=Object.assign({rgItemType:Uo},h);g.url&&(g.href=g.url),g.href&&(g.rgItemType=Lo.LINK),r=s||d,g.hover=f===n.state.activeIndex,null!=g.hoverClassName&&g.hover&&(g.className=a()(g.className,g.hoverClassName)),g.onMouseOver=n.hoverHandler(f),g.tabIndex=-1,g.scrolling=c;var v,A=n.selectHandler(f);n.props.useMouseUp?g.onMouseUp=A:g.onClick=A,g.onCheckboxChange=n.checkboxHandler(f),null==g.compact&&(g.compact=n.props.compact);var b=1===i;switch(g.rgItemType){case Lo.SEPARATOR:v=So,g.isFirst=b;break;case Lo.LINK:v=pt,n.addItemDataTestToProp(g);break;case Lo.ITEM:v=$r,n.addItemDataTestToProp(g);break;case Lo.CUSTOM:v=co,n.addItemDataTestToProp(g);break;case Lo.TITLE:g.isFirst=b,v=bo;break;default:throw new Error("Unknown menu element type: ".concat(g.rgItemType))}o=e.createElement(v,g)}return u?e.createElement(we,{cache:n._cache,key:r,parent:u,rowIndex:i,columnIndex:0},(function(n){var t=n.registerChild;return e.createElement("div",{ref:t,style:l,role:"row",id:d},e.createElement("div",{role:"cell"},o))})):e.createElement("div",{role:"row",id:d,key:r},e.createElement("div",{role:"cell"},(0,e.cloneElement)(o)))})),ei(Qo(n),"addItemDataTestToProp",(function(e){return e["data-test"]=Ne("ring-list-item",e["data-test"]),e})),ei(Qo(n),"virtualizedListRef",(function(e){n.virtualizedList=e})),ei(Qo(n),"containerRef",(function(e){n.container=e})),ei(Qo(n),"id",Fe("list-")),ei(Qo(n),"shortcutsScope",n.id),ei(Qo(n),"shortcutsMap",{up:n.upHandler,down:n.downHandler,home:n.homeHandler,end:n.endHandler,enter:n.enterHandler,"meta+enter":n.enterHandler,"ctrl+enter":n.enterHandler,"command+enter":n.enterHandler,"shift+enter":n.enterHandler}),n}return t=l,r=[{key:"componentDidMount",value:function(){document.addEventListener("mousemove",this.onDocumentMouseMove),document.addEventListener("keydown",this.onDocumentKeyDown,!0)}},{key:"shouldComponentUpdate",value:function(e,n){var t=this;return e!==this.props||Object.keys(n).some((function(e){return n[e]!==t.state[e]}))}},{key:"componentDidUpdate",value:function(e){this.virtualizedList&&e.data!==this.props.data&&this.virtualizedList.recomputeRowHeights(),this.checkOverflow()}},{key:"componentWillUnmount",value:function(){this.unmounted=!0,document.removeEventListener("mousemove",this.onDocumentMouseMove),document.removeEventListener("keydown",this.onDocumentKeyDown,!0)}},{key:"hasActivatableItems",value:function(){return this._hasActivatableItems(this.props.data)}},{key:"moveHandler",value:function(e,n,t){var r;if(0!==this.props.data.length&&this.hasActivatableItems()){r=this.props.data.length=0&&Object.assign(u,{activeIndex:s,activeItem:a[s]})}if(null==l&&null==n.activeIndex&&((t=e).activateFirstItem||t.activateSingleItem&&1===t.data.length)){var f=a.findIndex(ai);f>=0&&Object.assign(u,{activeIndex:f,activeItem:a[f],needScrollToActive:!0})}return u}}],r&&Ko(t.prototype,r),o&&Ko(t,o),l}(e.Component);ei(ci,"propTypes",{id:o().string,className:o().string,hint:o().node,hintOnSelection:o().string,data:o().array,maxHeight:o().oneOfType([o().string,o().number]),activeIndex:o().number,restoreActiveIndex:o().bool,activateSingleItem:o().bool,activateFirstItem:o().bool,shortcuts:o().bool,onMouseOut:o().func,onSelect:o().func,onScrollToBottom:o().func,onResize:o().func,useMouseUp:o().bool,visible:o().bool,renderOptimization:o().bool,disableMoveOverflow:o().bool,disableMoveDownOverflow:o().bool,compact:o().bool,disableScrollToActive:o().bool,hidden:o().bool,ariaLabel:o().string}),ei(ci,"defaultProps",{data:[],restoreActiveIndex:!1,activateSingleItem:!1,activateFirstItem:!1,onMouseOut:ri,onSelect:ri,onScrollToBottom:ri,onResize:ri,shortcuts:!1,renderOptimization:!0,disableMoveDownOverflow:!1,ariaLabel:"List"}),ei(ci,"isItemType",(function(e,n){var t=n.rgItemType;return null==t&&(t=Uo),t===e})),ei(ci,"ListHint",No),ei(ci,"ListProps",{Type:Lo,Dimension:Fo});t(3210),t(6541),t(2564),t(6833),t(6649),t(6078);var ui=t(5570),si=t.n(ui),fi=t(107),pi=t.n(fi),di=t(251),hi=t.n(di),gi=(t(5218),["theme"]);function vi(){return vi=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var bi={LIGHT:"light",DARK:"dark"},mi=(0,e.createContext)(null),yi=function(e){var n,t;return"string"==typeof e?e:null!==(n=null!==(t=e.name)&&void 0!==t?t:e.displayName)&&void 0!==n?n:"Component"},Ei=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bi.LIGHT;return function(t){var r=(0,e.memo)((0,e.forwardRef)((function(r,o){var i=r.theme,a=Ai(r,gi);return e.createElement(mi.Consumer,null,(function(r){var l=i||r||n;return e.createElement(mi.Provider,{value:l},e.createElement(t,vi({ref:o},a,{theme:l})))}))})));return Object.assign(r,t),r.propTypes=t.propTypes,r.displayName="withTheme(".concat(yi(t),")"),r}};const _i=bi;var Ci=t(5526),wi=t.n(Ci);function xi(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ki(e){return ki="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ki(e)}var Si=["theme","active","danger","delayed","loader","primary","short","text","inline","dropdown","icon","iconSize","iconClassName","iconSuppressSizeWarning","className","children"];function Oi(){return Oi=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Ii(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ti(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var qi=function(n){var t=n.children,r=n.className,o=Gi(n,Wi);return e.createElement(Li,Hi({text:!0,className:a()(Ui().anchor,r)},o),t,e.createElement(br,{glyph:si(),className:Ui().chevron}))};qi.propTypes={children:o().node,className:o().string};const Vi=(0,e.memo)(qi);t(3710),t(9714);var $i=t(335),Ki=t.n($i);function Yi(e){return Yi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yi(e)}var Xi=["children","trapDisabled","autoFocusFirst","focusBackOnClose","focusBackOnExit"];function Zi(){return Zi=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Ji(e){return function(e){if(Array.isArray(e))return ea(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return ea(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ea(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ea(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0])||arguments[0],t=aa(e),r=t.node;if(r){var o=Ji(r.querySelectorAll(ua)).filter((function(e){return e.tabIndex>=0})),i=n?o[0]:o[o.length-1];i&&i.focus()}})),ca(aa(e),"focusFirst",(function(){return e.focusElement(!0)})),ca(aa(e),"focusLast",(function(){return e.focusElement(!1)})),ca(aa(e),"focusLastIfEnabled",(function(n){if(!e.trapWithoutFocus)if(e.props.focusBackOnExit){var t=n.nativeEvent.relatedTarget;null!=t&&null!=e.node&&e.node.contains(t)&&e.restoreFocus()}else e.focusLast()})),ca(aa(e),"handleBlurIfWithoutFocus",(function(n){if(e.trapWithoutFocus){e.trapWithoutFocus=!1;var t=n.nativeEvent.relatedTarget;t&&(e.node.contains(t)||e.focusLast())}})),ca(aa(e),"trapButtonRef",(function(n){n&&(e.trapButtonNode=n)})),e}return t=a,(r=[{key:"componentDidMount",value:function(){this.previousFocusedNode=document.activeElement,this.props.autoFocusFirst?this.focusFirst():this.props.trapDisabled||this.node&&this.node.contains(this.previousFocusedNode)||(this.trapWithoutFocus=!0,this.trapButtonNode.focus())}},{key:"componentWillUnmount",value:function(){this.props.focusBackOnClose&&this.restoreFocus()}},{key:"render",value:function(){var n=this.props,t=n.children,r=n.trapDisabled,o=(n.autoFocusFirst,n.focusBackOnClose,n.focusBackOnExit),i=Qi(n,Xi);return r?e.createElement("div",Zi({ref:this.containerRef},i),t):e.createElement("div",Zi({ref:this.containerRef},i),e.createElement("div",{tabIndex:0,ref:this.trapButtonRef,className:Ki().trapButton,onFocus:this.focusLastIfEnabled,onBlur:this.handleBlurIfWithoutFocus,"data-trap-button":!0}),t,e.createElement("div",{tabIndex:0,onFocus:o?this.restoreFocus:this.focusFirst,"data-trap-button":!0}))}}])&&ta(t.prototype,r),o&&ta(t,o),a}(e.Component);ca(sa,"propTypes",{children:o().node.isRequired,trapDisabled:o().bool,autoFocusFirst:o().bool,focusBackOnClose:o().bool,focusBackOnExit:o().bool}),ca(sa,"defaultProps",{trapDisabled:!1,autoFocusFirst:!0,focusBackOnClose:!0,focusBackOnExit:!1});t(2707);var fa={BOTTOM_RIGHT:"BOTTOM_RIGHT",BOTTOM_LEFT:"BOTTOM_LEFT",BOTTOM_CENTER:"BOTTOM_CENTER",TOP_LEFT:"TOP_LEFT",TOP_RIGHT:"TOP_RIGHT",TOP_CENTER:"TOP_CENTER",RIGHT_TOP:"RIGHT_TOP",RIGHT_BOTTOM:"RIGHT_BOTTOM",RIGHT_CENTER:"RIGHT_CENTER",LEFT_TOP:"LEFT_TOP",LEFT_BOTTOM:"LEFT_BOTTOM",LEFT_CENTER:"LEFT_CENTER"},pa=[fa.BOTTOM_RIGHT,fa.BOTTOM_LEFT,fa.TOP_LEFT,fa.TOP_RIGHT,fa.RIGHT_TOP,fa.RIGHT_BOTTOM,fa.LEFT_TOP,fa.LEFT_BOTTOM],da={MARGIN:16,BORDER_WIDTH:1},ha={TARGET:-1},ga={SCREEN:-1},va=1,Aa=2;function ba(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ma(e,n,t){var r=null!==t.container?t.container.clientHeight:Ke(),o=n.top+t.sidePadding,i=n.top+r-t.sidePadding,a=Math.max(o-e.top,0),l=t.popup.clientHeight,c=e.top+l-i;return a+Math.max(c,0)}function ya(e,n,t){var r=null!==t.container?t.container.clientWidth:window.innerWidth,o=n.left+t.sidePadding,i=n.left+r-t.sidePadding,a=Math.max(o-e.left,0),l=t.popup.clientWidth,c=e.left+l-i;return a+Math.max(c,0)}var Ea=["directions","autoPositioning","autoCorrectTopOverflow","sidePadding","top","left","offset","maxHeight","minWidth"],_a={top:0,left:0};function Ca(e,n,t){var r=t||document.documentElement,o=n.getBoundingClientRect(),i=r.getBoundingClientRect(),a=Math.max(o.top-i.top,0),l=Math.max(i.height,r===document.documentElement?r.clientHeight:0),c=Math.max(l-(a+o.height),0);switch(e){case fa.TOP_LEFT:case fa.TOP_CENTER:case fa.TOP_RIGHT:return a;case fa.BOTTOM_LEFT:case fa.BOTTOM_CENTER:case fa.BOTTOM_RIGHT:return c;case fa.LEFT_BOTTOM:case fa.RIGHT_BOTTOM:return o.height+c;case fa.LEFT_TOP:case fa.RIGHT_TOP:return o.height+a;case fa.RIGHT_CENTER:case fa.LEFT_CENTER:return o.height/2+Math.min(c/2,a/2);default:return null}}function wa(e){var n=e.popup,t=e.anchor,r=e.container,o=e.directions,i=e.autoPositioning,a=e.sidePadding,l=e.top,c=e.left,u=e.offset,s=e.maxHeight,f=e.minWidth,p=e.autoCorrectTopOverflow,d=void 0===p||p,h={top:0,left:0},g=null,v=null!==r?$e(r):_a,A=null!==r?r:document.body,b=$e(qe(t)?t:A),m=function(e){return null!==e?{top:e.scrollTop,left:e.scrollLeft}:{top:document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop,left:document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft}}(r),y=b.left+m.left+c-v.left,E=b.top+m.top+l-v.top;if(n){var _=function(e,n,t,r,o){var i,a=e.clientWidth,l=e.clientHeight,c=r+n.height,u=t+n.width,s=t-a,f=r-l,p=u-a,d=t+n.width/2-a/2,h=r+n.height/2-l/2,g=c-l;return ba(i={},fa.BOTTOM_RIGHT,{left:t,top:c+o}),ba(i,fa.BOTTOM_LEFT,{left:p,top:c+o}),ba(i,fa.BOTTOM_CENTER,{left:d,top:c+o}),ba(i,fa.TOP_RIGHT,{left:t,top:f-o}),ba(i,fa.TOP_LEFT,{left:p,top:f-o}),ba(i,fa.TOP_CENTER,{left:d,top:f-o}),ba(i,fa.LEFT_BOTTOM,{left:s-o,top:r}),ba(i,fa.LEFT_TOP,{left:s-o,top:g}),ba(i,fa.LEFT_CENTER,{left:s-o,top:h}),ba(i,fa.RIGHT_BOTTOM,{left:u+o,top:r}),ba(i,fa.RIGHT_TOP,{left:u+o,top:g}),ba(i,fa.RIGHT_CENTER,{left:u+o,top:h}),i}(n,b,y,E,u);if(i&&1!==o.length){var C=o.concat(o[0]).filter((function(e){return _[e]})).map((function(e){return{styles:_[e],direction:e}})).sort((function(n,t){var r=n.styles,o=t.styles;return ma(r,m,e)+ya(r,m,e)-(ma(o,m,e)+ya(o,m,e))}));h=C[0].styles,g=C[0].direction}else h=_[o[0]],g=o[0];["left","top"].forEach((function(e){h[e]<0&&(h[e]=0)}))}return s===ga.SCREEN||"screen"===s?h.maxHeight=window.innerHeight+m.top-h.top-da.MARGIN:s&&(h.maxHeight=s),d&&(h=function(e){var n=e.sidePadding,t=e.styles,r=e.anchorRect,o=e.maxHeight,i=e.popupScrollHeight,a=e.direction,l=e.scroll,c=fa.TOP_LEFT,u=fa.TOP_RIGHT,s=fa.TOP_CENTER;if(![c,u,s,fa.RIGHT_TOP,fa.LEFT_TOP].includes(a))return t;var f=[c,s,u].includes(a)?r.top:r.bottom;return f-(o?Math.min(i,o):i)<=n&&(t.top=n+l.top,t.maxHeight=f-n+1),t}({sidePadding:a,styles:h,anchorRect:b,maxHeight:s,direction:g,popupScrollHeight:n.scrollHeight,scroll:m})),f===ha.TARGET||"target"===f?h.minWidth=b.width:f&&(h.minWidth=b.width=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var Ia=(0,e.createContext)(),Ta=(0,e.forwardRef)((function(n,t){var r=n.id,o=n.children,i=Ba(n,Sa),a="function"==typeof o,l=e.createElement("div",Oa({},i,{"data-portaltarget":r,ref:t}),!a&&o);return e.createElement(Ia.Provider,{value:r},a?o(l):l)}));function Pa(e){return Pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pa(e)}function ja(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function za(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Qa(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ja(e,n){for(var t=0;tthis.input.clientHeight&&this.stretch(this.input)}},{key:"stretch",value:function(e){e&&e.style&&(e.style.height="".concat(e.scrollHeight,"px"))}},{key:"adapt",value:function(){this.checkValue(),this.stretch(this.underlineNode)}},{key:"render",value:function(){var n,t=this.props,r=t.theme,o=t.size,i=t.active,l=t.multiline,c=t.borderless,u=t.compact,s=t.label,f=t.error,p=t.className,d=t.inputClassName,h=t.children,g=t.value,v=t.onClear,A=t.disabled,b=(t.inputRef,t.onChange,t.enableShortcuts),m=(t.id,t.placeholder),y=t.icon,E=t.renderUnderline,_=Za(t,Ya),C=u||c,w=this.state.empty,x=!!v,k=a()($a().container,p,$a()[r],[$a()["size".concat(o)]],(il(n={"ring-js-shortcuts":!0===b},$a().active,i),il(n,$a().error,null!=f),il(n,$a().empty,w),il(n,$a().noLabel,!this.props.label),il(n,$a().withIcon,null!=y),il(n,$a().clearable,x),il(n,$a().compact,C),n)),S=a()($a().input,d),O=l?"textarea":"input",B=null!=g?g:h;return e.createElement("div",{className:k,"data-test":"ring-input"},y&&e.createElement(br,{glyph:y,className:$a().icon}),e.createElement(O,Xa({ref:this.inputRef,onChange:this.handleChange,className:S,value:B,rows:l?1:null,disabled:A,id:this.getId(),placeholder:m,"aria-label":"string"==typeof s&&s?s:m,"data-enabled-shortcuts":Array.isArray(b)?b.join(","):null},_)),x&&!A&&e.createElement(Li,{title:"Clear input","data-test":"ring-input-clear",className:$a().clear,icon:pi(),onClick:this.clear}),!C&&e.createElement("label",{htmlFor:this.getId(),className:$a().label},s),!c&&e.createElement("div",{className:$a().underline}),!c&&e.createElement("div",{className:$a().focusUnderline}),!C&&e.createElement("div",{className:$a().errorUnderline}),!C&&E(this.underlineRef,f))}}],r&&Ja(t.prototype,r),o&&Ja(t,o),l}(e.PureComponent);il(cl,"propTypes",{value:o().string,theme:o().string,className:o().string,inputClassName:o().string,size:o().string,label:o().oneOfType([o().string,o().object]),active:o().bool,error:o().string,multiline:o().bool,borderless:o().bool,compact:o().bool,onChange:o().func,onClear:o().func,inputRef:o().oneOfType([o().func,o().shape({current:o().instanceOf(HTMLInputElement)})]),children:o().string,enableShortcuts:o().oneOfType([o().bool,o().arrayOf(o().string)]),disabled:o().bool,id:o().string,placeholder:o().string,icon:o().oneOfType([o().string,o().elementType]),renderUnderline:o().func}),il(cl,"defaultProps",{size:ll.M,onChange:al,inputRef:al,enableShortcuts:["esc"],renderUnderline:function(n,t){return e.createElement("div",{className:$a().errorText,ref:n},t)}});const ul=Ei()(cl);function sl(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sl(e)}function fl(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function pl(e,n){for(var t=0;t2&&void 0!==arguments[2]&&arguments[2],r=t?e:e.toLowerCase(),o=t?n:n.toLowerCase(),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;return{matched:e,highlight:t}},a=o.length,l=r.length;if(l>a)return i(!1);if(l===a){var c=r===o;return i(c,c?"".concat(El).concat(n).concat(El):n)}var u="",s=!1,f=0;e:for(var p=0;pe.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t\n \n \n ').concat(Object.entries(n).map((function(e){var n=Nl(e,2),t=n[0],r=n[1];return'\n \n ')})).join(""),'\n \n \n \n \n \n \n ')}}(kl().unit,{transparent:"".concat(71.875,"%"),white:"".concat(78.125,"%")});Dl(".".concat(kl().loader,"_").concat([_i.LIGHT],"::after, .ring-loader-inline::after"),zl(e,"#ff00eb,#bd3bff,#008eff, #58ba00,#f48700,#ff00eb",32)),Dl(".".concat(kl().loader,"_").concat([_i.DARK],"::after, .ring-loader-inline_dark::after"),zl(e,"#ff2eef,#d178ff,#289fff,#88d444,#ffe000,#ff2eef",32))}));function Hl(e){return Hl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hl(e)}var Gl=["className","theme","data-test","children"];function ql(){return ql=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function $l(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Kl(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function ic(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ac(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Bc(){return Bc=Object.assign||function(e){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{};if(this.isContentEditable()){e.avoidFocus||this.focus();var n=window.getSelection();if(!n.rangeCount)return 0;var t=n.getRangeAt(0),r=t.cloneRange();r.selectNodeContents(this.target),r.setEnd(t.endContainer,t.endOffset);var o=t.startContainer;if(this.target===o)return 0===t.startOffset?0:o.textContent.length;if(!this.target.contains(o))return-1;if(!o)return this.target.selectionStart;var i=this.getAbsolutePosition(o);if(t.startContainer===t.endContainer)return t.startOffset===t.endOffset?i+t.startOffset:{startOffset:i+t.startOffset,endOffset:i+t.endOffset,position:r.toString().length};var a=i+t.startOffset,l=this.getAbsolutePosition(t.endContainer),c=l+t.endOffset;return{startOffset:a,endOffset:c,position:r.toString().length}}return this.target.selectionStart}},{key:"getRelativePosition",value:function(e,n){var t=0,r=e;if(!r)return{_curNode:this.target,_correctedPosition:n};if(0===n){for(;3!==r.nodeType;)r=r.childNodes[0];return{_curNode:r,_correctedPosition:n}}var o=-1;if(r&&void 0!==r.nodeType)for(;t=n&&(t-=(r=r.childNodes[o]).textContent.length,o=-1);return{_curNode:r,_correctedPosition:n-t}}},{key:"setPosition",value:function(e){var n,t=this.isContentEditable(),r=this.target&&this.target.childNodes[0];if(void 0!==e)if(void 0!==e.startOffset){var o=new Range,i=this.getRelativePosition(r,e.startOffset);o.setStart(i._curNode,i._correctedPosition);var a=this.getRelativePosition(r,e.endOffset);o.setEnd(a._curNode,a._correctedPosition),n=o}else if(-1===e)n=(t?this.target.textContent:this.constructor.normalizeNewlines(this.target.value)).length;else{var l=this.getRelativePosition(r,e);r=l._curNode,n=l._correctedPosition}if(t){this.focus();try{n instanceof Range?(window.getSelection().removeAllRanges(),window.getSelection().addRange(n)):window.getSelection().collapse(r||this.target,n)}catch(e){}}else this.target.setSelectionRange(n,n);return n}},{key:"getOffset",value:function(){var e,n=0;try{(e=window.getSelection().getRangeAt(0).cloneRange()).setStart(e.startContainer,e.startOffset-1)}catch(e){return n}return e&&0!==e.endOffset&&""!==e.toString()&&(n=$e(e).right-$e(this.target).left-(e.startContainer.offsetLeft||0)),n}}],r=[{key:"normalizeNewlines",value:function(e){return"string"==typeof e?e.replace(this.returnRE,""):e}}],t&&Lc(n.prototype,t),r&&Lc(n,r),e}();!function(e,n,t){n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}(Fc,"returnRE",/\r/g);var Uc=t(3833),Wc=t.n(Uc);function Hc(e){return Hc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hc(e)}var Gc=["children","className","info"];function qc(){return qc=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function $c(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Kc(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function lu(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function cu(e,n){for(var t=0;t0)){var n=null;e?n=null===this.state.tagsActiveIndex?this.props.selected.length-1:this.state.tagsActiveIndex-1:null!==this.state.tagsActiveIndex&&(n=this.state.tagsActiveIndex+1),null!==n&&(n>=this.props.selected.length||n<0)&&(n=null,this.focusFilter()),this.setState({tagsActiveIndex:n})}}},{key:"removeTag",value:function(e,n){var t=e||this.props.selected.slice(0)[this.props.selected.length-1];t&&(this.onListSelect(t,n,{tryKeepOpen:!0}),this.setState({tagsActiveIndex:null}),this.focusFilter())}},{key:"removeSelectedTag",value:function(){return null==this.state.tagsActiveIndex||(this.removeTag(this.props.selected[this.state.tagsActiveIndex]),!1)}},{key:"handleBackspace",value:function(e){return!(this.props.tags&&(this.isEventTargetFilter(e)?!e.target.value&&(this.removeTag(),1):(this.removeSelectedTag(),1)))}},{key:"_togglePopupFilterShortcuts",value:function(e){this.setState({popupFilterShortcutsOptions:{modal:!0,disabled:e}})}},{key:"isVisible",value:function(){return this.popup&&this.popup.isVisible()}},{key:"getFilter",value:function(){return this.props.filter||this.props.tags?e.createElement("div",{className:tu().filterWrapper,"data-test":"ring-select-popup-filter"},e.createElement(br,{glyph:wl(),className:tu().filterIcon,"data-test-custom":"ring-select-popup-filter-icon"}),e.createElement(ku,{rgShortcutsOptions:this.state.popupFilterShortcutsOptions,rgShortcutsMap:this.popupFilterShortcuts.map,value:this.props.filterValue,inputRef:this.filterRef,onBlur:this.popupFilterOnBlur,onFocus:this.onFilterFocus,className:"ring-js-shortcuts",placeholder:this.props.filter.placeholder,onChange:this.props.onFilter,onClick:this.onClickHandler,onClear:this.props.onClear,"data-test-custom":"ring-select-popup-filter-input",listId:this.props.listId,enableShortcuts:Object.keys(this.popupFilterShortcuts.map)})):null}},{key:"getTags",value:function(){return e.createElement("div",null,e.createElement(Nc,{tags:this.props.selected,activeIndex:this.state.tagsActiveIndex,handleRemove:this.handleRemoveTag,handleClick:this.handleTagClick,disabled:this.props.disabled}))}},{key:"getFilterWithTags",value:function(){if(this.props.tags){var n=a()([tu().filterWithTags,wu({},tu().filterWithTagsFocused,!this.state.popupFilterShortcutsOptions.disabled)]);return e.createElement("div",{className:n},this.getTags(),this.getFilter())}return this.getFilter()}},{key:"getBottomLine",value:function(){var n=this.props,t=n.loading,r=n.message;return(t||r)&&e.createElement("div",{className:tu().bottomLine},t&&e.createElement(nc,null),r&&e.createElement("div",{className:tu().message},r))}},{key:"getList",value:function(n){if(this.props.data.length){var t=this.props.maxHeight;return this.props.anchorElement&&(t=this._adjustListMaxHeight(this.props.hidden,t,n)),this.props.filter&&(t-=35),this.props.toolbar&&(t-=49),e.createElement(ci,{id:this.props.listId,maxHeight:t,data:this.props.data,activeIndex:this.props.activeIndex,ref:this.listRef,restoreActiveIndex:!0,activateFirstItem:!0,onSelect:this.onListSelect,onResize:this.handleListResize,onScrollToBottom:this.props.onLoadMore,hidden:this.props.hidden,shortcuts:!this.props.hidden,disableMoveOverflow:this.props.disableMoveOverflow,disableMoveDownOverflow:this.props.loading,disableScrollToActive:this.props.disableScrollToActive,compact:this.props.compact,renderOptimization:this.props.renderOptimization})}return null}},{key:"render",value:function(){var n=this,t=this.props,r=t.toolbar,o=t.className,i=t.multiple,l=t.hidden,c=t.isInputMode,u=t.anchorElement,s=t.minWidth,f=t.onCloseAttempt,p=t.directions,d=t.top,h=t.left,g=t.style,v=t.dir,A=t.filter,b=a()(tu().popup,o);return e.createElement(Ia.Consumer,null,(function(t){var o=n.getFilterWithTags(),a=i&&!i.limit&&i.selectAll&&n.getSelectAll(),m=n.getList(n.props.ringPopupTarget||t),y=n.getBottomLine(),E=o||a||m||y||r;return e.createElement(qa,{trapFocus:!1,ref:n.popupRef,hidden:l||!E,attached:c,className:b,dontCloseOnAnchorClick:!0,anchorElement:u,minWidth:s,onCloseAttempt:f,directions:p,top:d||(c?-14:null),left:h,onMouseDown:n.mouseDownHandler,target:n.props.ringPopupTarget,autoCorrectTopOverflow:!1,style:g},e.createElement("div",{dir:v},!l&&A&&e.createElement(An,{map:n.shortcutsMap,scope:n.shortcutsScope}),l?e.createElement("div",null):o,a,m,y,r))}))}}],r&&bu(t.prototype,r),o&&bu(t,o),l}(e.PureComponent);wu(Su,"propTypes",{activeIndex:o().number,anchorElement:o().instanceOf(HTMLElement),className:o().string,compact:o().bool,data:o().array,dir:o().oneOf(["ltr","rtl"]),directions:o().array,disabled:o().bool,disableMoveOverflow:o().bool,disableScrollToActive:o().bool,filter:o().oneOfType([o().bool,o().shape({value:o().string,placeholder:o().string})]),filterValue:o().string,hidden:o().bool,isInputMode:o().bool,listId:o().string,maxHeight:o().number,message:o().string,minWidth:o().number,multiple:o().oneOfType([o().bool,o().shape({label:o().string,limit:o().number,selectAll:o().bool})]),left:o().bool,loading:o().bool,onClear:o().func,onCloseAttempt:o().func,onEmptyPopupEnter:o().func,onFilter:o().func,onLoadMore:o().func,onSelect:o().func,onSelectAll:o().func,renderOptimization:o().bool,ringPopupTarget:o().string,selected:o().oneOfType([o().object,o().array]),style:o().object,tags:o().object,toolbar:o().node,top:o().number}),wu(Su,"defaultProps",{data:[],activeIndex:null,toolbar:null,filter:!1,multiple:!1,message:null,anchorElement:null,maxHeight:600,minWidth:240,loading:!1,onSelect:xu,onCloseAttempt:xu,onFilter:xu,onClear:xu,onLoadMore:xu,selected:[],tags:null,ringPopupTarget:null,onSelectAll:xu,onEmptyPopupEnter:xu});var Ou=t(1442),Bu=t.n(Ou);function Iu(e){return Iu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Iu(e)}function Tu(){return Tu=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function ju(e){var n=function(e,n){if("object"!==Iu(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==Iu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===Iu(n)?n:String(n)}function zu(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ru(e,n){for(var t=0;t=0}))}}var Zu=function(e){return e.reduce((function(e,n){return e[n.key]=!0,e}),{})};function Qu(e,n,t){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.data,o=t.trim();$u(e.type)&&n.selected&&o===n.selected.label&&(o="");for(var i=o.toLowerCase(),a=[],l=!1,c=Xu(e.filter),u=function(t){var u=Wu({},r[t]);c(u,i,r)&&(l=u.label===o,e.multiple&&!e.multiple.removeSelectedItems&&(u.checkbox=!!n.multipleMap[u.key]),e.multiple&&e.multiple.limit&&(u.disabled=e.multiple.limit===n.selected.length&&!n.selected.find((function(e){return e.key===u.key}))),e.multiple&&e.multiple.removeSelectedItems&&n.multipleMap[u.key]||a.push(u))},s=0;s1&&void 0!==arguments[1]?arguments[1]:{};if((!e.isInputMode()||e.state.focused)&&n!==e.state.filterValue){var r=n.replace(/^\s+/g,"");if(e.props.onFilter(r),e.props.allowAny){var o={key:Math.random(),label:r};e.setState({selected:""===r?null:o,selectedIndex:null},(function(){e.props.onSelect(o,t),e.props.onChange(o,t)}))}!e._popup.isVisible()&&e.props.onBeforeOpen(),e.setState({filterValue:r},(function(){e._showPopup()}))}})),Hu(Lu(e),"_redrawPopup",(function(){e.props.multiple&&setTimeout((function(){e.isInputMode()&&e.clearFilter(),e._showPopup()}),0)})),Hu(Lu(e),"_listSelectHandler",(function(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=ci.isItemType.bind(null,ci.ListProps.Type.ITEM),i=ci.isItemType.bind(null,ci.ListProps.Type.CUSTOM),a=t&&("select"===t.type||"keydown"===t.type);if(a&&t.preventDefault(),(o(n)||i(n))&&!n.disabled&&!n.isResetItem)if(e.props.multiple){var l=r.tryKeepOpen;if(l||e._hidePopup(a),null==n.key)throw new Error('Multiple selection requires each item to have the "key" property');e.setState((function(r){var o,i=r.selected;r.multipleMap[n.key]?(o=i.filter((function(e){return e.key!==n.key})),e.props.onDeselect&&e.props.onDeselect(n)):(o=i.concat(n),e.props.onSelect&&e.props.onSelect(n,t)),e.props.onChange(o,t);var a={selected:o,selectedIndex:e._getSelectedIndex(n,e.props.data)};if(e.props.multiple.limit&&o.length===e.props.multiple.limit&&(a.shownData=r.shownData.map((function(e){return o.find((function(n){return n.key===e.key}))?e:Wu(Wu({},e),{},{disabled:!0})}))),r.multipleMap[n.key]){var l=r.multipleMap,c=n.key,u=(l[c],Pu(l,[c].map(ju)));a.multipleMap=u}else a.multipleMap=Wu(Wu({},r.multipleMap),{},Hu({},n.key,!0));return a}),(function(){l&&e._redrawPopup()}))}else e._hidePopup(a),e.setState({selected:n,selectedIndex:e._getSelectedIndex(n,e.props.data)},(function(){var r=e.isInputMode()&&!e.props.hideSelected?es(n):"";e.filterValue(r),e.props.onFilter(r),e.props.onSelect(n,t),e.props.onChange(n,t)}))})),Hu(Lu(e),"_listSelectAllHandler",(function(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=ci.isItemType.bind(null,ci.ListProps.Type.ITEM),r=ci.isItemType.bind(null,ci.ListProps.Type.CUSTOM);e.setState((function(o){var i,a=o.selected;return n?(i=e.props.data.filter((function(e){return(t(e)||r(e))&&!e.disabled}))).filter((function(n){return!e.props.selected.find((function(e){return n.key===e.key}))})).forEach((function(n){e.props.onSelect&&e.props.onSelect(n)})):(i=[],a.forEach((function(n){e.props.onDeselect&&e.props.onDeselect(n)}))),e.props.onChange(i,event),{filterValue:"",selected:i,selectedIndex:n?e._getSelectedIndex(i,e.props.data):null,shownData:o.shownData.map((function(e){return Wu(Wu({},e),{},{checkbox:n})})),multipleMap:n?Zu(e.props.data.filter((function(e){return!e.disabled}))):{}}}),e._redrawPopup)})),Hu(Lu(e),"_onCloseAttempt",(function(n,t){e.isInputMode()&&(e.props.allowAny||(e.props.hideSelected||!e.state.selected||e.props.multiple?e.clearFilter():e.state.selected&&e.filterValue(es(e.state.selected)))),e.props.tags&&n&&n.target&&n.target.matches('[data-test="ring-tag-remove"]')||e._hidePopup(t)})),Hu(Lu(e),"clearFilter",(function(n){e._setFilter("",n)})),Hu(Lu(e),"clear",(function(n){n&&n.stopPropagation();var t=l._getEmptyValue(e.props.multiple);return e.setState({selected:t,selectedIndex:null,filterValue:""},(function(){e.props.onChange&&e.props.onChange(t,n)})),!1})),Hu(Lu(e),"popupRef",(function(n){e._popup=n})),Hu(Lu(e),"buttonRef",(function(n){e.button=n})),Hu(Lu(e),"filterRef",(function(n){e.filter=n})),e}return t=l,o=[{key:"_getEmptyValue",value:function(e){return e?[]:null}},{key:"getDerivedStateFromProps",value:function(e,n){var t=e.multiple,r=e.data,o=e.type,i=n.prevSelected,a=n.prevData,c=n.prevMultiple,u=n.filterValue,s={prevData:r,prevSelected:e.selected,prevMultiple:t};if("data"in e&&r!==a){var f=Qu(e,n,u,r),p=f.filteredData,d=f.addButton;Object.assign(s,{shownData:p,addButton:d}),n.selected&&Object.assign(s,{selectedIndex:Ju(n.selected,r,t),prevFilterValue:ns(n.selected,o,u)})}if("selected"in e&&e.selected!==i){var h=e.selected||l._getEmptyValue(t),g=Ju(h,r||a,t);Object.assign(s,{selected:h,prevFilterValue:ns(h,o,u)}),t&&function(e,n){if(!e||!n||e.length!==n.length)return!1;var t=n.reduce((function(e,n){return e[n.key]=!0,e}),{});return e.every((function(e){return t[e.key]}))}(i,h)||Object.assign(s,{selectedIndex:g})}c===t||hi()(c,t)||(s.selected=l._getEmptyValue(t));var v=Wu(Wu({},n),s).selected;if(v&&t){s.multipleMap=Zu(v);var A=Qu(e,s,u,r),b=A.filteredData,m=A.addButton;Object.assign(s,{shownData:b,addButton:m})}return s}}],(r=[{key:"componentDidUpdate",value:function(e,n){var t=this.state,r=t.showPopup,o=t.selected,i=this.props,a=i.onClose,l=i.onOpen,c=i.onChange,u=i.multiple;n.showPopup&&!r?a(o):!n.showPopup&&r&&l(),u===e.multiple||hi()(u,e.multiple)||c(o)}},{key:"getValueForFilter",value:function(e){return ns(e,this.props.type,this.state.filterValue)}},{key:"_getSelectedIndex",value:function(e,n){return Ju(e,n,this.props.multiple)}},{key:"_getResetOption",value:function(){var n=this,t=this.state.selected&&this.state.selected.length,r=this.props.tags&&this.props.tags.reset;if(!t||!r)return null;var o=this.props.tags.reset;return{isResetItem:!0,separator:o.separator,key:o.label,rgItemType:ci.ListProps.Type.CUSTOM,template:e.createElement(Li,{text:!0,className:Bu().button,"data-test":"ring-select-reset-tags-button"},o.label),glyph:o.glyph,onClick:function(e,t){n.clear(t),n.clearFilter(),n.props.onFilter(""),n.setState((function(e){return{shownData:e.shownData.slice(o.separator?2:1),multipleMap:{}}})),n._redrawPopup()}}}},{key:"_prependResetOption",value:function(e){var n=this._getResetOption(),t={rgItemType:ci.ListProps.Type.MARGIN};if(n){var r=[t,n,t];return n.separator&&r.push({rgItemType:ci.ListProps.Type.SEPARATOR}),r.concat(e)}return e}},{key:"_renderPopup",value:function(){var n=this.props.targetElement||this.node,t=this.state,r=t.showPopup,o=t.shownData,i=this._prependResetOption(o),a=null;return this.props.loading?a=this.props.loadingMessage:o.length||(a=this.props.notFoundMessage),e.createElement(Su,{data:i,message:a,toolbar:r&&this.getToolbar(),loading:this.props.loading,activeIndex:this.state.selectedIndex,hidden:!r,ref:this.popupRef,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,directions:this.props.directions,className:this.props.popupClassName,style:this.props.popupStyle,top:this.props.top,left:this.props.left,filter:!this.isInputMode()&&this.props.filter,multiple:this.props.multiple,filterValue:this.state.filterValue,anchorElement:n,onCloseAttempt:this._onCloseAttempt,onSelect:this._listSelectHandler,onSelectAll:this._listSelectAllHandler,onFilter:this._filterChangeHandler,onClear:this.clearFilter,onLoadMore:this.props.onLoadMore,isInputMode:this.isInputMode(),selected:this.state.selected,tags:this.props.tags,compact:this.props.compact,renderOptimization:this.props.renderOptimization,ringPopupTarget:this.props.ringPopupTarget,disableMoveOverflow:this.props.disableMoveOverflow,disableScrollToActive:this.props.disableScrollToActive,dir:this.props.dir,onEmptyPopupEnter:this.onEmptyPopupEnter,listId:this.listId})}},{key:"_showPopup",value:function(){if(this.node){var e=this.getListItems(this.filterValue());this.setState({showPopup:!!e.length||!this.props.allowAny,shownData:e})}}},{key:"_hidePopup",value:function(e){if(this.node&&this.state.showPopup&&(this.setState({showPopup:!1,filterValue:""}),e)){var n=this.props.targetElement||this.node.querySelector("[data-test~=ring-select__focus]");n&&n.focus()}}},{key:"getToolbar",value:function(){var n=this.props.hint,t=this.state.addButton||{},r=t.prefix,o=t.label,i=t.delayed;return this.state.addButton||n?e.createElement("div",{className:a()(Hu({},Bu().toolbar,!!this.state.addButton)),"data-test":"ring-select-toolbar"},this.state.addButton&&e.createElement(Li,{text:!0,delayed:i,className:a()(Bu().button,Bu().buttonSpaced),onClick:this.addHandler,"data-test":"ring-select-toolbar-button"},r?"".concat(r," ").concat(o):o),n&&e.createElement(ci.ListHint,{label:n,"data-test":"ring-select-toolbar-hint"})):null}},{key:"getFilterFn",value:function(){return Xu(this.props.filter)}},{key:"getListItems",value:function(e,n){var t=Qu(this.props,this.state,e,n),r=t.filteredData,o=t.addButton;return this.setState({addButton:o}),r}},{key:"filterValue",value:function(e){if("string"!=typeof e&&"number"!=typeof e)return this.state.filterValue;this.setState({filterValue:e})}},{key:"isInputMode",value:function(){return $u(this.props.type)}},{key:"_rebuildMultipleMap",value:function(e,n){e&&n&&this.setState({multipleMap:Zu(e)})}},{key:"_selectionIsEmpty",value:function(){return this.props.multiple&&!this.state.selected.length||!this.state.selected}},{key:"_getLabel",value:function(){return this.props.label||this.props.selectedLabel||"Select an option"}},{key:"_getSelectedString",value:function(){if(this.props.multiple){for(var e=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:{captureNode:!1},t=n.captureNode;if(t)throw new Error('rerenderHOC: captureNode={true} is deprecated. Wrapped component must have "node" property captured itself')})(ts),t(108);var rs=t(2481),os=t.n(rs);function is(e){return is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},is(e)}var as=["children","data-test","title","delay","selfOverflowOnly","popupProps"];function ls(){return ls=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function us(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ss(e,n){for(var t=0;te.createElement("svg",ys({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},t),e.createElement("path",{d:"M19.64 18.36l-6.24-6.24a7.52 7.52 0 10-1.28 1.28l6.24 6.24zM7.5 13.4a5.9 5.9 0 115.9-5.9 5.91 5.91 0 01-5.9 5.9z"}));var _s;!function(e){e[e.WINDOWS=0]="WINDOWS",e[e.MACOS=1]="MACOS",e[e.LINUX=2]="LINUX",e[e.OTHER=3]="OTHER"}(_s||(_s={}));var Cs,ws=function(){function e(){}return e.metaKey={name:"Command",keyArg:"Meta"},e.ctrlKey={name:"Ctrl",keyArg:"Control"},e.altKey={name:"Alt",keyArg:"Alt"},e.shiftKey={name:"Shift",keyArg:"Shift"},e}(),xs=[ws.altKey,ws.shiftKey,ws.ctrlKey,ws.metaKey],ks=function(){function e(){var e,n=this;this.registerHotkeyWithAccel=function(e,t){var r=n.getOsAccelKey();document.onkeydown=function(n){var o=n.getModifierState(r.keyArg),i=xs.filter((function(e){return e!==r})).map((function(e){return n.getModifierState(e.keyArg)})).some((function(e){return e}));o&&!i&&n.key===t&&(n.preventDefault(),e())}},this.osKind=(e=navigator.userAgent).includes("Mac")?_s.MACOS:e.includes("Win")?_s.WINDOWS:e.includes("Linux")?_s.LINUX:_s.OTHER}return e.prototype.getOsAccelKeyName=function(){return this.getOsAccelKey().name},e.prototype.getOsAccelKey=function(){return this.osKind===_s.MACOS?ws.metaKey:ws.ctrlKey},e}(),Ss=function(){return Ss=Object.assign||function(e){for(var n,t=1,r=arguments.length;t { - let platformList = elem.getAttribute("data-filterable-set").split(' ').filter(v => -1 !== sourcesetList.indexOf(v)) - elem.setAttribute("data-filterable-current", platformList.join(' ')) + let platformList = elem.getAttribute("data-filterable-set").split(',').filter(v => -1 !== sourcesetList.indexOf(v)) + elem.setAttribute("data-filterable-current", platformList.join(',')) } ) refreshFilterButtons() diff --git a/api/scripts/sourceset_dependencies.js b/api/scripts/sourceset_dependencies.js index 1b9f456..0c4ad6b 100644 --- a/api/scripts/sourceset_dependencies.js +++ b/api/scripts/sourceset_dependencies.js @@ -1 +1 @@ -sourceset_dependencies = '{":cache4k:dokkaHtmlPartial/appleMain":[":cache4k:dokkaHtmlPartial/nativeMain"],":cache4k:dokkaHtmlPartial/commonMain":[],":cache4k:dokkaHtmlPartial/iosArm64Main":[":cache4k:dokkaHtmlPartial/iosMain",":cache4k:dokkaHtmlPartial/commonMain",":cache4k:dokkaHtmlPartial/jvmAndIosMain"],":cache4k:dokkaHtmlPartial/iosMain":[":cache4k:dokkaHtmlPartial/appleMain"],":cache4k:dokkaHtmlPartial/iosSimulatorArm64Main":[":cache4k:dokkaHtmlPartial/iosMain",":cache4k:dokkaHtmlPartial/commonMain",":cache4k:dokkaHtmlPartial/jvmAndIosMain"],":cache4k:dokkaHtmlPartial/iosX64Main":[":cache4k:dokkaHtmlPartial/iosMain",":cache4k:dokkaHtmlPartial/commonMain",":cache4k:dokkaHtmlPartial/jvmAndIosMain"],":cache4k:dokkaHtmlPartial/jsMain":[":cache4k:dokkaHtmlPartial/commonMain"],":cache4k:dokkaHtmlPartial/jvmAndIosMain":[],":cache4k:dokkaHtmlPartial/jvmMain":[":cache4k:dokkaHtmlPartial/commonMain",":cache4k:dokkaHtmlPartial/jvmAndIosMain"],":cache4k:dokkaHtmlPartial/linuxMain":[":cache4k:dokkaHtmlPartial/nativeMain"],":cache4k:dokkaHtmlPartial/linuxX64Main":[":cache4k:dokkaHtmlPartial/unixDesktopMain",":cache4k:dokkaHtmlPartial/commonMain",":cache4k:dokkaHtmlPartial/linuxMain"],":cache4k:dokkaHtmlPartial/macosArm64Main":[":cache4k:dokkaHtmlPartial/unixDesktopMain",":cache4k:dokkaHtmlPartial/commonMain",":cache4k:dokkaHtmlPartial/macosMain"],":cache4k:dokkaHtmlPartial/macosMain":[":cache4k:dokkaHtmlPartial/appleMain"],":cache4k:dokkaHtmlPartial/macosX64Main":[":cache4k:dokkaHtmlPartial/unixDesktopMain",":cache4k:dokkaHtmlPartial/commonMain",":cache4k:dokkaHtmlPartial/macosMain"],":cache4k:dokkaHtmlPartial/mingwMain":[":cache4k:dokkaHtmlPartial/nativeMain"],":cache4k:dokkaHtmlPartial/mingwX64Main":[":cache4k:dokkaHtmlPartial/commonMain",":cache4k:dokkaHtmlPartial/mingwMain"],":cache4k:dokkaHtmlPartial/nativeMain":[":cache4k:dokkaHtmlPartial/commonMain"],":cache4k:dokkaHtmlPartial/nonIosAppleMain":[],":cache4k:dokkaHtmlPartial/tvosArm64Main":[":cache4k:dokkaHtmlPartial/tvosMain",":cache4k:dokkaHtmlPartial/commonMain",":cache4k:dokkaHtmlPartial/nonIosAppleMain"],":cache4k:dokkaHtmlPartial/tvosMain":[":cache4k:dokkaHtmlPartial/appleMain"],":cache4k:dokkaHtmlPartial/tvosSimulatorArm64Main":[":cache4k:dokkaHtmlPartial/tvosMain",":cache4k:dokkaHtmlPartial/commonMain",":cache4k:dokkaHtmlPartial/nonIosAppleMain"],":cache4k:dokkaHtmlPartial/tvosX64Main":[":cache4k:dokkaHtmlPartial/tvosMain",":cache4k:dokkaHtmlPartial/commonMain",":cache4k:dokkaHtmlPartial/nonIosAppleMain"],":cache4k:dokkaHtmlPartial/unixDesktopMain":[],":cache4k:dokkaHtmlPartial/watchosArm64Main":[":cache4k:dokkaHtmlPartial/commonMain",":cache4k:dokkaHtmlPartial/nonIosAppleMain",":cache4k:dokkaHtmlPartial/watchosMain"],":cache4k:dokkaHtmlPartial/watchosMain":[":cache4k:dokkaHtmlPartial/appleMain"],":cache4k:dokkaHtmlPartial/watchosSimulatorArm64Main":[":cache4k:dokkaHtmlPartial/commonMain",":cache4k:dokkaHtmlPartial/nonIosAppleMain",":cache4k:dokkaHtmlPartial/watchosMain"],":cache4k:dokkaHtmlPartial/watchosX64Main":[":cache4k:dokkaHtmlPartial/commonMain",":cache4k:dokkaHtmlPartial/nonIosAppleMain",":cache4k:dokkaHtmlPartial/watchosMain"]}' \ No newline at end of file +sourceset_dependencies = '{":cache4k:dokkaHtmlPartial/appleMain":[":cache4k:dokkaHtmlPartial/nativeMain"],":cache4k:dokkaHtmlPartial/commonMain":[],":cache4k:dokkaHtmlPartial/iosArm64Main":[":cache4k:dokkaHtmlPartial/iosMain",":cache4k:dokkaHtmlPartial/nonJvmMain"],":cache4k:dokkaHtmlPartial/iosMain":[":cache4k:dokkaHtmlPartial/appleMain"],":cache4k:dokkaHtmlPartial/iosSimulatorArm64Main":[":cache4k:dokkaHtmlPartial/iosMain",":cache4k:dokkaHtmlPartial/nonJvmMain"],":cache4k:dokkaHtmlPartial/iosX64Main":[":cache4k:dokkaHtmlPartial/iosMain",":cache4k:dokkaHtmlPartial/nonJvmMain"],":cache4k:dokkaHtmlPartial/jsMain":[":cache4k:dokkaHtmlPartial/nonJvmMain",":cache4k:dokkaHtmlPartial/commonMain"],":cache4k:dokkaHtmlPartial/jvmAndIosMain":[],":cache4k:dokkaHtmlPartial/jvmMain":[":cache4k:dokkaHtmlPartial/commonMain",":cache4k:dokkaHtmlPartial/jvmAndIosMain"],":cache4k:dokkaHtmlPartial/linuxArm64Main":[":cache4k:dokkaHtmlPartial/nonJvmMain",":cache4k:dokkaHtmlPartial/linuxMain"],":cache4k:dokkaHtmlPartial/linuxMain":[":cache4k:dokkaHtmlPartial/nativeMain"],":cache4k:dokkaHtmlPartial/linuxX64Main":[":cache4k:dokkaHtmlPartial/nonJvmMain",":cache4k:dokkaHtmlPartial/linuxMain"],":cache4k:dokkaHtmlPartial/macosArm64Main":[":cache4k:dokkaHtmlPartial/nonJvmMain",":cache4k:dokkaHtmlPartial/macosMain"],":cache4k:dokkaHtmlPartial/macosMain":[":cache4k:dokkaHtmlPartial/appleMain"],":cache4k:dokkaHtmlPartial/macosX64Main":[":cache4k:dokkaHtmlPartial/nonJvmMain",":cache4k:dokkaHtmlPartial/macosMain"],":cache4k:dokkaHtmlPartial/mingwMain":[":cache4k:dokkaHtmlPartial/nativeMain"],":cache4k:dokkaHtmlPartial/mingwX64Main":[":cache4k:dokkaHtmlPartial/nonJvmMain",":cache4k:dokkaHtmlPartial/mingwMain"],":cache4k:dokkaHtmlPartial/nativeMain":[":cache4k:dokkaHtmlPartial/commonMain"],":cache4k:dokkaHtmlPartial/nonJvmMain":[":cache4k:dokkaHtmlPartial/commonMain"],":cache4k:dokkaHtmlPartial/tvosArm64Main":[":cache4k:dokkaHtmlPartial/tvosMain",":cache4k:dokkaHtmlPartial/nonJvmMain"],":cache4k:dokkaHtmlPartial/tvosMain":[":cache4k:dokkaHtmlPartial/appleMain"],":cache4k:dokkaHtmlPartial/tvosSimulatorArm64Main":[":cache4k:dokkaHtmlPartial/tvosMain",":cache4k:dokkaHtmlPartial/nonJvmMain"],":cache4k:dokkaHtmlPartial/tvosX64Main":[":cache4k:dokkaHtmlPartial/tvosMain",":cache4k:dokkaHtmlPartial/nonJvmMain"],":cache4k:dokkaHtmlPartial/watchosArm64Main":[":cache4k:dokkaHtmlPartial/nonJvmMain",":cache4k:dokkaHtmlPartial/watchosMain"],":cache4k:dokkaHtmlPartial/watchosMain":[":cache4k:dokkaHtmlPartial/appleMain"],":cache4k:dokkaHtmlPartial/watchosSimulatorArm64Main":[":cache4k:dokkaHtmlPartial/nonJvmMain",":cache4k:dokkaHtmlPartial/watchosMain"],":cache4k:dokkaHtmlPartial/watchosX64Main":[":cache4k:dokkaHtmlPartial/nonJvmMain",":cache4k:dokkaHtmlPartial/watchosMain"]}' \ No newline at end of file diff --git a/assets/javascripts/bundle.51198bba.min.js b/assets/javascripts/bundle.51198bba.min.js deleted file mode 100644 index 31bd041..0000000 --- a/assets/javascripts/bundle.51198bba.min.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict";(()=>{var Ri=Object.create;var gr=Object.defineProperty;var ki=Object.getOwnPropertyDescriptor;var Hi=Object.getOwnPropertyNames,Ht=Object.getOwnPropertySymbols,Pi=Object.getPrototypeOf,yr=Object.prototype.hasOwnProperty,on=Object.prototype.propertyIsEnumerable;var nn=(e,t,r)=>t in e?gr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P=(e,t)=>{for(var r in t||(t={}))yr.call(t,r)&&nn(e,r,t[r]);if(Ht)for(var r of Ht(t))on.call(t,r)&&nn(e,r,t[r]);return e};var an=(e,t)=>{var r={};for(var n in e)yr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ht)for(var n of Ht(e))t.indexOf(n)<0&&on.call(e,n)&&(r[n]=e[n]);return r};var Pt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var $i=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Hi(t))!yr.call(e,o)&&o!==r&&gr(e,o,{get:()=>t[o],enumerable:!(n=ki(t,o))||n.enumerable});return e};var yt=(e,t,r)=>(r=e!=null?Ri(Pi(e)):{},$i(t||!e||!e.__esModule?gr(r,"default",{value:e,enumerable:!0}):r,e));var cn=Pt((xr,sn)=>{(function(e,t){typeof xr=="object"&&typeof sn!="undefined"?t():typeof define=="function"&&define.amd?define(t):t()})(xr,function(){"use strict";function e(r){var n=!0,o=!1,i=null,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function a(T){return!!(T&&T!==document&&T.nodeName!=="HTML"&&T.nodeName!=="BODY"&&"classList"in T&&"contains"in T.classList)}function c(T){var Qe=T.type,De=T.tagName;return!!(De==="INPUT"&&s[Qe]&&!T.readOnly||De==="TEXTAREA"&&!T.readOnly||T.isContentEditable)}function f(T){T.classList.contains("focus-visible")||(T.classList.add("focus-visible"),T.setAttribute("data-focus-visible-added",""))}function u(T){T.hasAttribute("data-focus-visible-added")&&(T.classList.remove("focus-visible"),T.removeAttribute("data-focus-visible-added"))}function p(T){T.metaKey||T.altKey||T.ctrlKey||(a(r.activeElement)&&f(r.activeElement),n=!0)}function m(T){n=!1}function d(T){a(T.target)&&(n||c(T.target))&&f(T.target)}function h(T){a(T.target)&&(T.target.classList.contains("focus-visible")||T.target.hasAttribute("data-focus-visible-added"))&&(o=!0,window.clearTimeout(i),i=window.setTimeout(function(){o=!1},100),u(T.target))}function v(T){document.visibilityState==="hidden"&&(o&&(n=!0),G())}function G(){document.addEventListener("mousemove",N),document.addEventListener("mousedown",N),document.addEventListener("mouseup",N),document.addEventListener("pointermove",N),document.addEventListener("pointerdown",N),document.addEventListener("pointerup",N),document.addEventListener("touchmove",N),document.addEventListener("touchstart",N),document.addEventListener("touchend",N)}function oe(){document.removeEventListener("mousemove",N),document.removeEventListener("mousedown",N),document.removeEventListener("mouseup",N),document.removeEventListener("pointermove",N),document.removeEventListener("pointerdown",N),document.removeEventListener("pointerup",N),document.removeEventListener("touchmove",N),document.removeEventListener("touchstart",N),document.removeEventListener("touchend",N)}function N(T){T.target.nodeName&&T.target.nodeName.toLowerCase()==="html"||(n=!1,oe())}document.addEventListener("keydown",p,!0),document.addEventListener("mousedown",m,!0),document.addEventListener("pointerdown",m,!0),document.addEventListener("touchstart",m,!0),document.addEventListener("visibilitychange",v,!0),G(),r.addEventListener("focus",d,!0),r.addEventListener("blur",h,!0),r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host?r.host.setAttribute("data-js-focus-visible",""):r.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if(typeof window!="undefined"&&typeof document!="undefined"){window.applyFocusVisiblePolyfill=e;var t;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(r){t=document.createEvent("CustomEvent"),t.initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}typeof document!="undefined"&&e(document)})});var fn=Pt(Er=>{(function(e){var t=function(){try{return!!Symbol.iterator}catch(f){return!1}},r=t(),n=function(f){var u={next:function(){var p=f.shift();return{done:p===void 0,value:p}}};return r&&(u[Symbol.iterator]=function(){return u}),u},o=function(f){return encodeURIComponent(f).replace(/%20/g,"+")},i=function(f){return decodeURIComponent(String(f).replace(/\+/g," "))},s=function(){var f=function(p){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var m=typeof p;if(m!=="undefined")if(m==="string")p!==""&&this._fromString(p);else if(p instanceof f){var d=this;p.forEach(function(oe,N){d.append(N,oe)})}else if(p!==null&&m==="object")if(Object.prototype.toString.call(p)==="[object Array]")for(var h=0;hd[0]?1:0}),f._entries&&(f._entries={});for(var p=0;p1?i(d[1]):"")}})})(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:Er);(function(e){var t=function(){try{var o=new e.URL("b","http://a");return o.pathname="c d",o.href==="http://a/c%20d"&&o.searchParams}catch(i){return!1}},r=function(){var o=e.URL,i=function(c,f){typeof c!="string"&&(c=String(c)),f&&typeof f!="string"&&(f=String(f));var u=document,p;if(f&&(e.location===void 0||f!==e.location.href)){f=f.toLowerCase(),u=document.implementation.createHTMLDocument(""),p=u.createElement("base"),p.href=f,u.head.appendChild(p);try{if(p.href.indexOf(f)!==0)throw new Error(p.href)}catch(T){throw new Error("URL unable to set base "+f+" due to "+T)}}var m=u.createElement("a");m.href=c,p&&(u.body.appendChild(m),m.href=m.href);var d=u.createElement("input");if(d.type="url",d.value=c,m.protocol===":"||!/:/.test(m.href)||!d.checkValidity()&&!f)throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:m});var h=new e.URLSearchParams(this.search),v=!0,G=!0,oe=this;["append","delete","set"].forEach(function(T){var Qe=h[T];h[T]=function(){Qe.apply(h,arguments),v&&(G=!1,oe.search=h.toString(),G=!0)}}),Object.defineProperty(this,"searchParams",{value:h,enumerable:!0});var N=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==N&&(N=this.search,G&&(v=!1,this.searchParams._fromString(this.search),v=!0))}})},s=i.prototype,a=function(c){Object.defineProperty(s,c,{get:function(){return this._anchorElement[c]},set:function(f){this._anchorElement[c]=f},enumerable:!0})};["hash","host","hostname","port","protocol"].forEach(function(c){a(c)}),Object.defineProperty(s,"search",{get:function(){return this._anchorElement.search},set:function(c){this._anchorElement.search=c,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(s,{toString:{get:function(){var c=this;return function(){return c.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(c){this._anchorElement.href=c,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(c){this._anchorElement.pathname=c},enumerable:!0},origin:{get:function(){var c={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],f=this._anchorElement.port!=c&&this._anchorElement.port!=="";return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(f?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(c){},enumerable:!0},username:{get:function(){return""},set:function(c){},enumerable:!0}}),i.createObjectURL=function(c){return o.createObjectURL.apply(o,arguments)},i.revokeObjectURL=function(c){return o.revokeObjectURL.apply(o,arguments)},e.URL=i};if(t()||r(),e.location!==void 0&&!("origin"in e.location)){var n=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:n,enumerable:!0})}catch(o){setInterval(function(){e.location.origin=n()},100)}}})(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:Er)});var Kr=Pt((Mt,qr)=>{/*! - * clipboard.js v2.0.11 - * https://clipboardjs.com/ - * - * Licensed MIT © Zeno Rocha - */(function(t,r){typeof Mt=="object"&&typeof qr=="object"?qr.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Mt=="object"?Mt.ClipboardJS=r():t.ClipboardJS=r()})(Mt,function(){return function(){var e={686:function(n,o,i){"use strict";i.d(o,{default:function(){return Ci}});var s=i(279),a=i.n(s),c=i(370),f=i.n(c),u=i(817),p=i.n(u);function m(j){try{return document.execCommand(j)}catch(O){return!1}}var d=function(O){var E=p()(O);return m("cut"),E},h=d;function v(j){var O=document.documentElement.getAttribute("dir")==="rtl",E=document.createElement("textarea");E.style.fontSize="12pt",E.style.border="0",E.style.padding="0",E.style.margin="0",E.style.position="absolute",E.style[O?"right":"left"]="-9999px";var H=window.pageYOffset||document.documentElement.scrollTop;return E.style.top="".concat(H,"px"),E.setAttribute("readonly",""),E.value=j,E}var G=function(O,E){var H=v(O);E.container.appendChild(H);var I=p()(H);return m("copy"),H.remove(),I},oe=function(O){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},H="";return typeof O=="string"?H=G(O,E):O instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(O==null?void 0:O.type)?H=G(O.value,E):(H=p()(O),m("copy")),H},N=oe;function T(j){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?T=function(E){return typeof E}:T=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},T(j)}var Qe=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=O.action,H=E===void 0?"copy":E,I=O.container,q=O.target,Me=O.text;if(H!=="copy"&&H!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(q!==void 0)if(q&&T(q)==="object"&&q.nodeType===1){if(H==="copy"&&q.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(H==="cut"&&(q.hasAttribute("readonly")||q.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Me)return N(Me,{container:I});if(q)return H==="cut"?h(q):N(q,{container:I})},De=Qe;function $e(j){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$e=function(E){return typeof E}:$e=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},$e(j)}function wi(j,O){if(!(j instanceof O))throw new TypeError("Cannot call a class as a function")}function rn(j,O){for(var E=0;E0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof I.action=="function"?I.action:this.defaultAction,this.target=typeof I.target=="function"?I.target:this.defaultTarget,this.text=typeof I.text=="function"?I.text:this.defaultText,this.container=$e(I.container)==="object"?I.container:document.body}},{key:"listenClick",value:function(I){var q=this;this.listener=f()(I,"click",function(Me){return q.onClick(Me)})}},{key:"onClick",value:function(I){var q=I.delegateTarget||I.currentTarget,Me=this.action(q)||"copy",kt=De({action:Me,container:this.container,target:this.target(q),text:this.text(q)});this.emit(kt?"success":"error",{action:Me,text:kt,trigger:q,clearSelection:function(){q&&q.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(I){return vr("action",I)}},{key:"defaultTarget",value:function(I){var q=vr("target",I);if(q)return document.querySelector(q)}},{key:"defaultText",value:function(I){return vr("text",I)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(I){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return N(I,q)}},{key:"cut",value:function(I){return h(I)}},{key:"isSupported",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],q=typeof I=="string"?[I]:I,Me=!!document.queryCommandSupported;return q.forEach(function(kt){Me=Me&&!!document.queryCommandSupported(kt)}),Me}}]),E}(a()),Ci=Ai},828:function(n){var o=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var i=Element.prototype;i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector}function s(a,c){for(;a&&a.nodeType!==o;){if(typeof a.matches=="function"&&a.matches(c))return a;a=a.parentNode}}n.exports=s},438:function(n,o,i){var s=i(828);function a(u,p,m,d,h){var v=f.apply(this,arguments);return u.addEventListener(m,v,h),{destroy:function(){u.removeEventListener(m,v,h)}}}function c(u,p,m,d,h){return typeof u.addEventListener=="function"?a.apply(null,arguments):typeof m=="function"?a.bind(null,document).apply(null,arguments):(typeof u=="string"&&(u=document.querySelectorAll(u)),Array.prototype.map.call(u,function(v){return a(v,p,m,d,h)}))}function f(u,p,m,d){return function(h){h.delegateTarget=s(h.target,p),h.delegateTarget&&d.call(u,h)}}n.exports=c},879:function(n,o){o.node=function(i){return i!==void 0&&i instanceof HTMLElement&&i.nodeType===1},o.nodeList=function(i){var s=Object.prototype.toString.call(i);return i!==void 0&&(s==="[object NodeList]"||s==="[object HTMLCollection]")&&"length"in i&&(i.length===0||o.node(i[0]))},o.string=function(i){return typeof i=="string"||i instanceof String},o.fn=function(i){var s=Object.prototype.toString.call(i);return s==="[object Function]"}},370:function(n,o,i){var s=i(879),a=i(438);function c(m,d,h){if(!m&&!d&&!h)throw new Error("Missing required arguments");if(!s.string(d))throw new TypeError("Second argument must be a String");if(!s.fn(h))throw new TypeError("Third argument must be a Function");if(s.node(m))return f(m,d,h);if(s.nodeList(m))return u(m,d,h);if(s.string(m))return p(m,d,h);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function f(m,d,h){return m.addEventListener(d,h),{destroy:function(){m.removeEventListener(d,h)}}}function u(m,d,h){return Array.prototype.forEach.call(m,function(v){v.addEventListener(d,h)}),{destroy:function(){Array.prototype.forEach.call(m,function(v){v.removeEventListener(d,h)})}}}function p(m,d,h){return a(document.body,m,d,h)}n.exports=c},817:function(n){function o(i){var s;if(i.nodeName==="SELECT")i.focus(),s=i.value;else if(i.nodeName==="INPUT"||i.nodeName==="TEXTAREA"){var a=i.hasAttribute("readonly");a||i.setAttribute("readonly",""),i.select(),i.setSelectionRange(0,i.value.length),a||i.removeAttribute("readonly"),s=i.value}else{i.hasAttribute("contenteditable")&&i.focus();var c=window.getSelection(),f=document.createRange();f.selectNodeContents(i),c.removeAllRanges(),c.addRange(f),s=c.toString()}return s}n.exports=o},279:function(n){function o(){}o.prototype={on:function(i,s,a){var c=this.e||(this.e={});return(c[i]||(c[i]=[])).push({fn:s,ctx:a}),this},once:function(i,s,a){var c=this;function f(){c.off(i,f),s.apply(a,arguments)}return f._=s,this.on(i,f,a)},emit:function(i){var s=[].slice.call(arguments,1),a=((this.e||(this.e={}))[i]||[]).slice(),c=0,f=a.length;for(c;c{"use strict";/*! - * escape-html - * Copyright(c) 2012-2013 TJ Holowaychuk - * Copyright(c) 2015 Andreas Lubbe - * Copyright(c) 2015 Tiancheng "Timothy" Gu - * MIT Licensed - */var ns=/["'&<>]/;Go.exports=os;function os(e){var t=""+e,r=ns.exec(t);if(!r)return t;var n,o="",i=0,s=0;for(i=r.index;i0&&i[i.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function W(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i}function D(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n1||a(m,d)})})}function a(m,d){try{c(n[m](d))}catch(h){p(i[0][3],h)}}function c(m){m.value instanceof et?Promise.resolve(m.value.v).then(f,u):p(i[0][2],m)}function f(m){a("next",m)}function u(m){a("throw",m)}function p(m,d){m(d),i.shift(),i.length&&a(i[0][0],i[0][1])}}function ln(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Ee=="function"?Ee(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(s){return new Promise(function(a,c){s=e[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(f){i({value:f,done:a})},s)}}function C(e){return typeof e=="function"}function at(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var It=at(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription: -`+r.map(function(n,o){return o+1+") "+n.toString()}).join(` - `):"",this.name="UnsubscriptionError",this.errors=r}});function Ve(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Ie=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,o,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=Ee(s),c=a.next();!c.done;c=a.next()){var f=c.value;f.remove(this)}}catch(v){t={error:v}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}else s.remove(this);var u=this.initialTeardown;if(C(u))try{u()}catch(v){i=v instanceof It?v.errors:[v]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var m=Ee(p),d=m.next();!d.done;d=m.next()){var h=d.value;try{mn(h)}catch(v){i=i!=null?i:[],v instanceof It?i=D(D([],W(i)),W(v.errors)):i.push(v)}}}catch(v){n={error:v}}finally{try{d&&!d.done&&(o=m.return)&&o.call(m)}finally{if(n)throw n.error}}}if(i)throw new It(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)mn(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Ve(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Ve(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();var Sr=Ie.EMPTY;function jt(e){return e instanceof Ie||e&&"closed"in e&&C(e.remove)&&C(e.add)&&C(e.unsubscribe)}function mn(e){C(e)?e():e.unsubscribe()}var Le={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var st={setTimeout:function(e,t){for(var r=[],n=2;n0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,o=this,i=o.hasError,s=o.isStopped,a=o.observers;return i||s?Sr:(this.currentObservers=null,a.push(r),new Ie(function(){n.currentObservers=null,Ve(a,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,o=n.hasError,i=n.thrownError,s=n.isStopped;o?r.error(i):s&&r.complete()},t.prototype.asObservable=function(){var r=new F;return r.source=this,r},t.create=function(r,n){return new En(r,n)},t}(F);var En=function(e){ie(t,e);function t(r,n){var o=e.call(this)||this;return o.destination=r,o.source=n,o}return t.prototype.next=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.next)===null||o===void 0||o.call(n,r)},t.prototype.error=function(r){var n,o;(o=(n=this.destination)===null||n===void 0?void 0:n.error)===null||o===void 0||o.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,o;return(o=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&o!==void 0?o:Sr},t}(x);var Et={now:function(){return(Et.delegate||Date).now()},delegate:void 0};var wt=function(e){ie(t,e);function t(r,n,o){r===void 0&&(r=1/0),n===void 0&&(n=1/0),o===void 0&&(o=Et);var i=e.call(this)||this;return i._bufferSize=r,i._windowTime=n,i._timestampProvider=o,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,r),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(r){var n=this,o=n.isStopped,i=n._buffer,s=n._infiniteTimeWindow,a=n._timestampProvider,c=n._windowTime;o||(i.push(r),!s&&i.push(a.now()+c)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),o=this,i=o._infiniteTimeWindow,s=o._buffer,a=s.slice(),c=0;c0?e.prototype.requestAsyncId.call(this,r,n,o):(r.actions.push(this),r._scheduled||(r._scheduled=ut.requestAnimationFrame(function(){return r.flush(void 0)})))},t.prototype.recycleAsyncId=function(r,n,o){var i;if(o===void 0&&(o=0),o!=null?o>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,o);var s=r.actions;n!=null&&((i=s[s.length-1])===null||i===void 0?void 0:i.id)!==n&&(ut.cancelAnimationFrame(n),r._scheduled=void 0)},t}(Wt);var Tn=function(e){ie(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var o=this.actions,i;r=r||o.shift();do if(i=r.execute(r.state,r.delay))break;while((r=o[0])&&r.id===n&&o.shift());if(this._active=!1,i){for(;(r=o[0])&&r.id===n&&o.shift();)r.unsubscribe();throw i}},t}(Dt);var Te=new Tn(Sn);var _=new F(function(e){return e.complete()});function Vt(e){return e&&C(e.schedule)}function Cr(e){return e[e.length-1]}function Ye(e){return C(Cr(e))?e.pop():void 0}function Oe(e){return Vt(Cr(e))?e.pop():void 0}function zt(e,t){return typeof Cr(e)=="number"?e.pop():t}var pt=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function Nt(e){return C(e==null?void 0:e.then)}function qt(e){return C(e[ft])}function Kt(e){return Symbol.asyncIterator&&C(e==null?void 0:e[Symbol.asyncIterator])}function Qt(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Ni(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Yt=Ni();function Gt(e){return C(e==null?void 0:e[Yt])}function Bt(e){return pn(this,arguments,function(){var r,n,o,i;return $t(this,function(s){switch(s.label){case 0:r=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,et(r.read())];case 3:return n=s.sent(),o=n.value,i=n.done,i?[4,et(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,et(o)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function Jt(e){return C(e==null?void 0:e.getReader)}function U(e){if(e instanceof F)return e;if(e!=null){if(qt(e))return qi(e);if(pt(e))return Ki(e);if(Nt(e))return Qi(e);if(Kt(e))return On(e);if(Gt(e))return Yi(e);if(Jt(e))return Gi(e)}throw Qt(e)}function qi(e){return new F(function(t){var r=e[ft]();if(C(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Ki(e){return new F(function(t){for(var r=0;r=2;return function(n){return n.pipe(e?A(function(o,i){return e(o,i,n)}):de,ge(1),r?He(t):Vn(function(){return new Zt}))}}function zn(){for(var e=[],t=0;t=2,!0))}function pe(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new x}:t,n=e.resetOnError,o=n===void 0?!0:n,i=e.resetOnComplete,s=i===void 0?!0:i,a=e.resetOnRefCountZero,c=a===void 0?!0:a;return function(f){var u,p,m,d=0,h=!1,v=!1,G=function(){p==null||p.unsubscribe(),p=void 0},oe=function(){G(),u=m=void 0,h=v=!1},N=function(){var T=u;oe(),T==null||T.unsubscribe()};return y(function(T,Qe){d++,!v&&!h&&G();var De=m=m!=null?m:r();Qe.add(function(){d--,d===0&&!v&&!h&&(p=$r(N,c))}),De.subscribe(Qe),!u&&d>0&&(u=new rt({next:function($e){return De.next($e)},error:function($e){v=!0,G(),p=$r(oe,o,$e),De.error($e)},complete:function(){h=!0,G(),p=$r(oe,s),De.complete()}}),U(T).subscribe(u))})(f)}}function $r(e,t){for(var r=[],n=2;ne.next(document)),e}function K(e,t=document){return Array.from(t.querySelectorAll(e))}function z(e,t=document){let r=ce(e,t);if(typeof r=="undefined")throw new ReferenceError(`Missing element: expected "${e}" to be present`);return r}function ce(e,t=document){return t.querySelector(e)||void 0}function _e(){return document.activeElement instanceof HTMLElement&&document.activeElement||void 0}function tr(e){return L(b(document.body,"focusin"),b(document.body,"focusout")).pipe(ke(1),l(()=>{let t=_e();return typeof t!="undefined"?e.contains(t):!1}),V(e===_e()),B())}function Xe(e){return{x:e.offsetLeft,y:e.offsetTop}}function Qn(e){return L(b(window,"load"),b(window,"resize")).pipe(Ce(0,Te),l(()=>Xe(e)),V(Xe(e)))}function rr(e){return{x:e.scrollLeft,y:e.scrollTop}}function dt(e){return L(b(e,"scroll"),b(window,"resize")).pipe(Ce(0,Te),l(()=>rr(e)),V(rr(e)))}var Gn=function(){if(typeof Map!="undefined")return Map;function e(t,r){var n=-1;return t.some(function(o,i){return o[0]===r?(n=i,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(r,n){var o=e(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,o=e(n,r);~o&&n.splice(o,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,i=this.__entries__;o0},e.prototype.connect_=function(){!Dr||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),ga?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!Dr||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,o=va.some(function(i){return!!~n.indexOf(i)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Bn=function(e,t){for(var r=0,n=Object.keys(t);r0},e}(),Xn=typeof WeakMap!="undefined"?new WeakMap:new Gn,Zn=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=ya.getInstance(),n=new Aa(t,r,this);Xn.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){Zn.prototype[e]=function(){var t;return(t=Xn.get(this))[e].apply(t,arguments)}});var Ca=function(){return typeof nr.ResizeObserver!="undefined"?nr.ResizeObserver:Zn}(),eo=Ca;var to=new x,Ra=$(()=>k(new eo(e=>{for(let t of e)to.next(t)}))).pipe(g(e=>L(ze,k(e)).pipe(R(()=>e.disconnect()))),J(1));function he(e){return{width:e.offsetWidth,height:e.offsetHeight}}function ye(e){return Ra.pipe(S(t=>t.observe(e)),g(t=>to.pipe(A(({target:r})=>r===e),R(()=>t.unobserve(e)),l(()=>he(e)))),V(he(e)))}function bt(e){return{width:e.scrollWidth,height:e.scrollHeight}}function ar(e){let t=e.parentElement;for(;t&&(e.scrollWidth<=t.scrollWidth&&e.scrollHeight<=t.scrollHeight);)t=(e=t).parentElement;return t?e:void 0}var ro=new x,ka=$(()=>k(new IntersectionObserver(e=>{for(let t of e)ro.next(t)},{threshold:0}))).pipe(g(e=>L(ze,k(e)).pipe(R(()=>e.disconnect()))),J(1));function sr(e){return ka.pipe(S(t=>t.observe(e)),g(t=>ro.pipe(A(({target:r})=>r===e),R(()=>t.unobserve(e)),l(({isIntersecting:r})=>r))))}function no(e,t=16){return dt(e).pipe(l(({y:r})=>{let n=he(e),o=bt(e);return r>=o.height-n.height-t}),B())}var cr={drawer:z("[data-md-toggle=drawer]"),search:z("[data-md-toggle=search]")};function oo(e){return cr[e].checked}function Ke(e,t){cr[e].checked!==t&&cr[e].click()}function Ue(e){let t=cr[e];return b(t,"change").pipe(l(()=>t.checked),V(t.checked))}function Ha(e,t){switch(e.constructor){case HTMLInputElement:return e.type==="radio"?/^Arrow/.test(t):!0;case HTMLSelectElement:case HTMLTextAreaElement:return!0;default:return e.isContentEditable}}function Pa(){return L(b(window,"compositionstart").pipe(l(()=>!0)),b(window,"compositionend").pipe(l(()=>!1))).pipe(V(!1))}function io(){let e=b(window,"keydown").pipe(A(t=>!(t.metaKey||t.ctrlKey)),l(t=>({mode:oo("search")?"search":"global",type:t.key,claim(){t.preventDefault(),t.stopPropagation()}})),A(({mode:t,type:r})=>{if(t==="global"){let n=_e();if(typeof n!="undefined")return!Ha(n,r)}return!0}),pe());return Pa().pipe(g(t=>t?_:e))}function le(){return new URL(location.href)}function ot(e){location.href=e.href}function ao(){return new x}function so(e,t){if(typeof t=="string"||typeof t=="number")e.innerHTML+=t.toString();else if(t instanceof Node)e.appendChild(t);else if(Array.isArray(t))for(let r of t)so(e,r)}function M(e,t,...r){let n=document.createElement(e);if(t)for(let o of Object.keys(t))typeof t[o]!="undefined"&&(typeof t[o]!="boolean"?n.setAttribute(o,t[o]):n.setAttribute(o,""));for(let o of r)so(n,o);return n}function fr(e){if(e>999){let t=+((e-950)%1e3>99);return`${((e+1e-6)/1e3).toFixed(t)}k`}else return e.toString()}function co(){return location.hash.substring(1)}function Vr(e){let t=M("a",{href:e});t.addEventListener("click",r=>r.stopPropagation()),t.click()}function $a(e){return L(b(window,"hashchange"),e).pipe(l(co),V(co()),A(t=>t.length>0),J(1))}function fo(e){return $a(e).pipe(l(t=>ce(`[id="${t}"]`)),A(t=>typeof t!="undefined"))}function zr(e){let t=matchMedia(e);return er(r=>t.addListener(()=>r(t.matches))).pipe(V(t.matches))}function uo(){let e=matchMedia("print");return L(b(window,"beforeprint").pipe(l(()=>!0)),b(window,"afterprint").pipe(l(()=>!1))).pipe(V(e.matches))}function Nr(e,t){return e.pipe(g(r=>r?t():_))}function ur(e,t={credentials:"same-origin"}){return ue(fetch(`${e}`,t)).pipe(fe(()=>_),g(r=>r.status!==200?Tt(()=>new Error(r.statusText)):k(r)))}function We(e,t){return ur(e,t).pipe(g(r=>r.json()),J(1))}function po(e,t){let r=new DOMParser;return ur(e,t).pipe(g(n=>n.text()),l(n=>r.parseFromString(n,"text/xml")),J(1))}function pr(e){let t=M("script",{src:e});return $(()=>(document.head.appendChild(t),L(b(t,"load"),b(t,"error").pipe(g(()=>Tt(()=>new ReferenceError(`Invalid script: ${e}`))))).pipe(l(()=>{}),R(()=>document.head.removeChild(t)),ge(1))))}function lo(){return{x:Math.max(0,scrollX),y:Math.max(0,scrollY)}}function mo(){return L(b(window,"scroll",{passive:!0}),b(window,"resize",{passive:!0})).pipe(l(lo),V(lo()))}function ho(){return{width:innerWidth,height:innerHeight}}function bo(){return b(window,"resize",{passive:!0}).pipe(l(ho),V(ho()))}function vo(){return Q([mo(),bo()]).pipe(l(([e,t])=>({offset:e,size:t})),J(1))}function lr(e,{viewport$:t,header$:r}){let n=t.pipe(Z("size")),o=Q([n,r]).pipe(l(()=>Xe(e)));return Q([r,t,o]).pipe(l(([{height:i},{offset:s,size:a},{x:c,y:f}])=>({offset:{x:s.x-c,y:s.y-f+i},size:a})))}(()=>{function e(n,o){parent.postMessage(n,o||"*")}function t(...n){return n.reduce((o,i)=>o.then(()=>new Promise(s=>{let a=document.createElement("script");a.src=i,a.onload=s,document.body.appendChild(a)})),Promise.resolve())}var r=class extends EventTarget{constructor(n){super(),this.url=n,this.m=i=>{i.source===this.w&&(this.dispatchEvent(new MessageEvent("message",{data:i.data})),this.onmessage&&this.onmessage(i))},this.e=(i,s,a,c,f)=>{if(s===`${this.url}`){let u=new ErrorEvent("error",{message:i,filename:s,lineno:a,colno:c,error:f});this.dispatchEvent(u),this.onerror&&this.onerror(u)}};let o=document.createElement("iframe");o.hidden=!0,document.body.appendChild(this.iframe=o),this.w.document.open(),this.w.document.write(`

Change Log

0.11.0

Added

  • New event listener APIs (@darkxanter) - 35

Fixed

  • Downgrade stately to 1.2.5 to fix duplicate class error - 36

0.10.0

Added

Added new targets: - watchosArm64 - watchosSimulatorArm64 - watchosX64

FakeTimeSource is now public - #30

Changed

  • Kotlin 1.8.20.
  • AtomicFU 0.20.2.
  • Stately 2.0.0-rc1.

0.9.0

Fixed

  • Revert to using state-collections to fix JVM concurrency issue - #23

Changed

  • Kotlin 1.7.20.
  • AtomicFU 0.18.5.

0.8.0

Added

Added new targets: - linuxX64 - macosArm64

Changed

  • Kotlin 1.7.10.
  • Coroutines 1.6.4.
  • AtomicFU 0.18.3.

0.7.0

Changed

  • Kotlin 1.7.0.
  • Coroutines 1.6.3.
  • AtomicFU 0.18.2.

0.6.0

Changed

  • fakeTimeSource in Cache.Builder has been renamed to timeSource, and the FakeTimeSource implementation has been removed (still available in our tests) - #20
  • Kotlin 1.6.21.

0.5.0

This release adds support for new native memory model and drops support for the old one. Many thanks to @dcvz for the contribution.

Added

  • Synchronize cache loader by key - #15
  • Support new native memory model and drop support for old memory model - #17

Changed

  • Kotlin 1.6.20.
  • Coroutines 1.6.1.

0.4.0

Added

Added new targets: - iosSimulatorArm64 - macosArm64 - tvosArm64 - tvosSimulatorArm64 - tvosX64

Changed

  • Kotlin 1.6.10.
  • Stately 1.2.1.
  • Target Java 11.

0.3.0

Changed

  • Change fun newBuilder() to operator fun invoke() - #7.
  • Compile with Kotlin 1.5.21.

0.2.0

Changed

  • Support Kotlin 1.5.0.
  • Stately to 1.1.7.

0.1.1

Changed

  • Disable IR.

0.1.0

Initial release.

\ No newline at end of file + Change Log - cache4k

Change Log

0.11.0

Added

  • New event listener APIs (@darkxanter) - 35

Fixed

  • Downgrade stately to 1.2.5 to fix duplicate class error - 36

0.10.0

Added

Added new targets: - watchosArm64 - watchosSimulatorArm64 - watchosX64

FakeTimeSource is now public - #30

Changed

  • Kotlin 1.8.20.
  • AtomicFU 0.20.2.
  • Stately 2.0.0-rc1.

0.9.0

Fixed

  • Revert to using state-collections to fix JVM concurrency issue - #23

Changed

  • Kotlin 1.7.20.
  • AtomicFU 0.18.5.

0.8.0

Added

Added new targets: - linuxX64 - macosArm64

Changed

  • Kotlin 1.7.10.
  • Coroutines 1.6.4.
  • AtomicFU 0.18.3.

0.7.0

Changed

  • Kotlin 1.7.0.
  • Coroutines 1.6.3.
  • AtomicFU 0.18.2.

0.6.0

Changed

  • fakeTimeSource in Cache.Builder has been renamed to timeSource, and the FakeTimeSource implementation has been removed (still available in our tests) - #20
  • Kotlin 1.6.21.

0.5.0

This release adds support for new native memory model and drops support for the old one. Many thanks to @dcvz for the contribution.

Added

  • Synchronize cache loader by key - #15
  • Support new native memory model and drop support for old memory model - #17

Changed

  • Kotlin 1.6.20.
  • Coroutines 1.6.1.

0.4.0

Added

Added new targets: - iosSimulatorArm64 - macosArm64 - tvosArm64 - tvosSimulatorArm64 - tvosX64

Changed

  • Kotlin 1.6.10.
  • Stately 1.2.1.
  • Target Java 11.

0.3.0

Changed

  • Change fun newBuilder() to operator fun invoke() - #7.
  • Compile with Kotlin 1.5.21.

0.2.0

Changed

  • Support Kotlin 1.5.0.
  • Stately to 1.1.7.

0.1.1

Changed

  • Disable IR.

0.1.0

Initial release.

\ No newline at end of file diff --git a/index.html b/index.html index 86aa040..cd54fed 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - cache4k

cache4k

CI Maven Central License

In-memory Cache for Kotlin Multiplatform.

Work in progress.

cache4k provides a simple in-memory key-value cache for Kotlin Multiplatform, with support for time-based (expiration) and size-based evictions.

Note that only the new Kotlin Native memory model is supported.

The following targets are currently supported:

  • jvm
  • js
  • iosX64
  • iosArm64
  • iosSimulatorArm64
  • macosX64
  • macosArm64
  • tvosX64
  • tvosArm64
  • tvosSimulatorArm64
  • watchosX64
  • watchosArm64
  • watchosSimulatorArm64
  • linuxX64
  • mingwX64

Download

Dependencies are hosted on Maven Central.

Android

dependencies {
+ cache4k      

cache4k

CI Maven Central License

In-memory Cache for Kotlin Multiplatform.

Work in progress.

cache4k provides a simple in-memory key-value cache for Kotlin Multiplatform, with support for time-based (expiration) and size-based evictions.

Note that only the new Kotlin Native memory model is supported.

The following targets are currently supported:

  • jvm
  • js
  • iosX64
  • iosArm64
  • iosSimulatorArm64
  • macosX64
  • macosArm64
  • tvosX64
  • tvosArm64
  • tvosSimulatorArm64
  • watchosX64
  • watchosArm64
  • watchosSimulatorArm64
  • linuxX64
  • linuxArm64
  • mingwX64

Download

Dependencies are hosted on Maven Central.

Android

dependencies {
     implementation("io.github.reactivecircus.cache4k:cache4k:x.y.z")
 }
 

Multiplatform

kotlin {
@@ -79,7 +79,7 @@
 val cache2 = Cache.Builder<Long, File>()
     .eventListener(fileDeleteEventListener)
     .build()
-

Cache entry event firing behaviors for mutative methods:

Initial value Operation New value Event
{} put(K, V) {K: V} Created(K, V)
{K: V1} put(K, V2) {K: V2} Updated(K, V1, V2)
{K: V} invalidate(K) {} Removed(K, V)
{K1: V1, K2: V2} invalidateAll() {} Removed(K1, V1), Removed(K2, V2)
{K: V} any operation, K expired {} Expired(K, V)
{K1: V1} put(K2, V2), K1 evicted {K2: V2} Created(K2, V2), Evicted(K1, V1)

Unit testing cache expirations

To test logic that depends on cache expiration, pass in a FakeTimeSource when building a Cache so you can programmatically advance the reading of the time source:

@Test
+

Cache entry event firing behaviors for mutative methods:

Initial value Operation New value Event
{} put(K, V) {K: V} Created(K, V)
{K: V1} put(K, V2) {K: V2} Updated(K, V1, V2)
{K: V} invalidate(K) {} Removed(K, V)
{K1: V1, K2: V2} invalidateAll() {} Removed(K1, V1), Removed(K2, V2)
{K: V} any operation, K expired {} Expired(K, V)
{K1: V1} put(K2, V2), K1 evicted {K2: V2} Created(K2, V2), Evicted(K1, V1)

Unit testing cache expirations

To test logic that depends on cache expiration, pass in a FakeTimeSource when building a Cache so you can programmatically advance the reading of the time source:

@Test
 fun cacheEntryEvictedAfterExpiration() {
     private val fakeTimeSource = FakeTimeSource()
     val cache = Cache.Builder<Long, String>()
@@ -114,4 +114,4 @@
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-

YourKit

YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler, and YourKit YouMonitor.

\ No newline at end of file +

YourKit

YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler, and YourKit YouMonitor.

\ No newline at end of file diff --git a/search/search_index.json b/search/search_index.json index 74807fe..3bafa54 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"cache4k","text":"

In-memory Cache for Kotlin Multiplatform.

Work in progress.

cache4k provides a simple in-memory key-value cache for Kotlin Multiplatform, with support for time-based (expiration) and size-based evictions.

Note that only the new Kotlin Native memory model is supported.

The following targets are currently supported:

  • jvm
  • js
  • iosX64
  • iosArm64
  • iosSimulatorArm64
  • macosX64
  • macosArm64
  • tvosX64
  • tvosArm64
  • tvosSimulatorArm64
  • watchosX64
  • watchosArm64
  • watchosSimulatorArm64
  • linuxX64
  • mingwX64
"},{"location":"#download","title":"Download","text":"

Dependencies are hosted on Maven Central.

"},{"location":"#android","title":"Android","text":"
dependencies {\nimplementation(\"io.github.reactivecircus.cache4k:cache4k:x.y.z\")\n}\n
"},{"location":"#multiplatform","title":"Multiplatform","text":"
kotlin {\nsourceSets {\ncommonMain {\ndependencies {\nimplementation(\"io.github.reactivecircus.cache4k:cache4k:x.y.z\")\n}\n}\n}\n}\n
"},{"location":"#usage","title":"Usage","text":""},{"location":"#writing-and-reading-cache-entries","title":"Writing and reading cache entries","text":"

To create a new Cache instance using Long for the key and String for the value:

val cache = Cache.Builder<Long, String>().build()\n

To start writing entries to the cache:

cache.put(1, \"dog\")\ncache.put(2, \"cat\")\n

To read a cache entry by key:

cache.get(1) // returns \"dog\"\ncache.get(2) // returns \"cat\"\ncache.get(3) // returns null\n

To overwrite an existing cache entry:

cache.put(1, \"dog\")\ncache.put(1, \"bird\")\ncache.get(1) // returns \"bird\"\n
"},{"location":"#cache-loader","title":"Cache loader","text":"

Cache provides an API for getting cached value by key and using the provided loader: suspend () -> Value lambda to compute and cache the value automatically if none exists.

runBlockingTest {\nval cache = Cache.Builder<Long, User>().build()\n\nval userId = 1L\nval user = cache.get(userId) {\nfetchUserById(userId) // potentially expensive call (might be a suspend function)\n}\n\n// value successfully computed by the loader will be cached automatically\nassertThat(user).isEqualTo(cache.get(userId))\n}\n

Note that loader is executed on the caller\u2019s coroutine context. Concurrent calls from multiple threads using the same key will be blocked. Assuming the 1st call successfully computes a new value, none of the loader from the other calls will be executed and the cached value computed by the first loader will be returned for those calls.

Any exceptions thrown by the loader will be propagated to the caller of this function.

"},{"location":"#expirations-and-evictions","title":"Expirations and evictions","text":"

By default, Cache has an unlimited number of entries which never expire. But a cache can be configured to support both time-based expirations and size-based evictions.

"},{"location":"#time-based-expiration","title":"Time-based expiration","text":"

Expiration time can be specified for entries in the cache.

"},{"location":"#expire-after-access","title":"Expire after access","text":"

To set the maximum time an entry can live in the cache since the last access (also known as ** time-to-idle**), where \u201caccess\u201d means reading the cache, adding a new cache entry, or ** replacing an existing entry with a new one**:

val cache = Cache.Builder<Long, String>()\n.expireAfterAccess(24.hours)\n.build()\n

An entry in this cache will be removed if it has not been read or replaced after 24 hours since it\u2019s been written into the cache.

"},{"location":"#expire-after-write","title":"Expire after write","text":"

To set the maximum time an entry can live in the cache since the last write (also known as ** time-to-live**), where \u201cwrite\u201d means adding a new cache entry or replacing an existing entry with a new one:

val cache = Cache.Builder<Long, String>()\n.expireAfterWrite(30.minutes)\n.build()\n

An entry in this cache will be removed if it has not been replaced after 30 minutes since it\u2019s been written into the cache.

Note that cache entries are not removed immediately upon expiration at exact time. Expirations are checked in each interaction with the cache.

"},{"location":"#size-based-eviction","title":"Size-based eviction","text":"

To set the maximum number of entries to be kept in the cache:

val cache = Cache.Builder<Long, String>()\n.maximumCacheSize(100)\n.build()\n

Once there are more than 100 entries in this cache, the least recently used one will be removed, where \u201cused\u201d means reading the cache, adding a new cache entry, or replacing an existing entry with a new one.

"},{"location":"#getting-all-cache-entries-as-a-map","title":"Getting all cache entries as a Map","text":"

To get a copy of the current cache entries as a Map:

val cache = Cache.Builder<Long, String>()\n.build()\n\ncache.put(1, \"dog\")\ncache.put(2, \"cat\")\n\nassertThat(cache.asMap())\n.isEqualTo(mapOf(1L to \"dog\", 2L to \"cat\"))\n

Note that calling asMap() has no effect on the access expiry of the cache.

"},{"location":"#deleting-cache-entries","title":"Deleting cache entries","text":"

Cache entries can also be deleted explicitly.

To delete a cache entry for a given key:

val cache = Cache.Builder<Long, String>().build()\ncache.put(1, \"dog\")\n\ncache.invalidate(1)\n\nassertThat(cache.get(1)).isNull()\n

To delete all entries in the cache:

cache.invalidateAll()\n
"},{"location":"#event-listener","title":"Event listener","text":"

You can set an event listener as a lambda:

val cache1 = Cache.Builder<Long, String>()\n.eventListener { event ->\nprintln(\"onEvent: $event\")\n}\n.build()\n

Or declare it as a class and share logic across many stores:

class FileDeleteEventListener : CacheEventListener<Long, File> {\noverride fun onEvent(event: CacheEvent<Long, File>) {\nwhen(event) {\nis CacheEvent.Created -> {}\nis CacheEvent.Updated -> event.oldValue.delete()\nis CacheEvent.Evicted -> event.value.delete()\nis CacheEvent.Expired -> event.value.delete()\nis CacheEvent.Removed -> event.value.delete()\n}\n}\n}\nval fileDeleteEventListener = FileDeleteEventListener()\n\nval cache1 = Cache.Builder<Long, File>()\n.eventListener(fileDeleteEventListener)\n.build()\n\nval cache2 = Cache.Builder<Long, File>()\n.eventListener(fileDeleteEventListener)\n.build()\n

Cache entry event firing behaviors for mutative methods:

Initial value Operation New value Event {} put(K, V) {K: V} Created(K, V) {K: V1} put(K, V2) {K: V2} Updated(K, V1, V2) {K: V} invalidate(K) {} Removed(K, V) {K1: V1, K2: V2} invalidateAll() {} Removed(K1, V1), Removed(K2, V2) {K: V} any operation, K expired {} Expired(K, V) {K1: V1} put(K2, V2), K1 evicted {K2: V2} Created(K2, V2), Evicted(K1, V1)"},{"location":"#unit-testing-cache-expirations","title":"Unit testing cache expirations","text":"

To test logic that depends on cache expiration, pass in a FakeTimeSource when building a Cache so you can programmatically advance the reading of the time source:

@Test\nfun cacheEntryEvictedAfterExpiration() {\nprivate val fakeTimeSource = FakeTimeSource()\nval cache = Cache.Builder<Long, String>()\n.timeSource(fakeTimeSource)\n.expireAfterWrite(1.minutes)\n.build()\n\ncache.put(1, \"dog\")\n\n// just before expiry\nfakeTimeSource += 1.minutes - 1.nanoseconds\n\nassertThat(cache.get(1))\n.isEqualTo(\"dog\")\n\n// now expires\nfakeTimeSource += 1.nanoseconds\n\nassertThat(cache.get(1))\n.isNull()\n}\n
"},{"location":"#credits","title":"Credits","text":"

The library was ported from a kotlin / JVM cache which I contributed to dropbox/Store to help unblock Store\u2019s multiplatform support ( it was reverted before the 1.0 release as multiplatform wasn\u2019t a priority). Many thanks to Store\u2019s owners and contributors for reviewing and improving the original implementation.

"},{"location":"#license","title":"License","text":"
Copyright 2021 Yang Chen\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n

YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler, and YourKit YouMonitor.

"},{"location":"changelog/","title":"Change Log","text":""},{"location":"changelog/#0110","title":"0.11.0","text":""},{"location":"changelog/#added","title":"Added","text":"
  • New event listener APIs (@darkxanter) - 35
"},{"location":"changelog/#fixed","title":"Fixed","text":"
  • Downgrade stately to 1.2.5 to fix duplicate class error - 36
"},{"location":"changelog/#0100","title":"0.10.0","text":""},{"location":"changelog/#added_1","title":"Added","text":"

Added new targets: - watchosArm64 - watchosSimulatorArm64 - watchosX64

FakeTimeSource is now public - #30

"},{"location":"changelog/#changed","title":"Changed","text":"
  • Kotlin 1.8.20.
  • AtomicFU 0.20.2.
  • Stately 2.0.0-rc1.
"},{"location":"changelog/#090","title":"0.9.0","text":""},{"location":"changelog/#fixed_1","title":"Fixed","text":"
  • Revert to using state-collections to fix JVM concurrency issue - #23
"},{"location":"changelog/#changed_1","title":"Changed","text":"
  • Kotlin 1.7.20.
  • AtomicFU 0.18.5.
"},{"location":"changelog/#080","title":"0.8.0","text":""},{"location":"changelog/#added_2","title":"Added","text":"

Added new targets: - linuxX64 - macosArm64

"},{"location":"changelog/#changed_2","title":"Changed","text":"
  • Kotlin 1.7.10.
  • Coroutines 1.6.4.
  • AtomicFU 0.18.3.
"},{"location":"changelog/#070","title":"0.7.0","text":""},{"location":"changelog/#changed_3","title":"Changed","text":"
  • Kotlin 1.7.0.
  • Coroutines 1.6.3.
  • AtomicFU 0.18.2.
"},{"location":"changelog/#060","title":"0.6.0","text":""},{"location":"changelog/#changed_4","title":"Changed","text":"
  • fakeTimeSource in Cache.Builder has been renamed to timeSource, and the FakeTimeSource implementation has been removed (still available in our tests) - #20
  • Kotlin 1.6.21.
"},{"location":"changelog/#050","title":"0.5.0","text":"

This release adds support for new native memory model and drops support for the old one. Many thanks to @dcvz for the contribution.

"},{"location":"changelog/#added_3","title":"Added","text":"
  • Synchronize cache loader by key - #15
  • Support new native memory model and drop support for old memory model - #17
"},{"location":"changelog/#changed_5","title":"Changed","text":"
  • Kotlin 1.6.20.
  • Coroutines 1.6.1.
"},{"location":"changelog/#040","title":"0.4.0","text":""},{"location":"changelog/#added_4","title":"Added","text":"

Added new targets: - iosSimulatorArm64 - macosArm64 - tvosArm64 - tvosSimulatorArm64 - tvosX64

"},{"location":"changelog/#changed_6","title":"Changed","text":"
  • Kotlin 1.6.10.
  • Stately 1.2.1.
  • Target Java 11.
"},{"location":"changelog/#030","title":"0.3.0","text":""},{"location":"changelog/#changed_7","title":"Changed","text":"
  • Change fun newBuilder() to operator fun invoke() - #7.
  • Compile with Kotlin 1.5.21.
"},{"location":"changelog/#020","title":"0.2.0","text":""},{"location":"changelog/#changed_8","title":"Changed","text":"
  • Support Kotlin 1.5.0.
  • Stately to 1.1.7.
"},{"location":"changelog/#011","title":"0.1.1","text":""},{"location":"changelog/#changed_9","title":"Changed","text":"
  • Disable IR.
"},{"location":"changelog/#010","title":"0.1.0","text":"

Initial release.

"}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"cache4k","text":"

In-memory Cache for Kotlin Multiplatform.

Work in progress.

cache4k provides a simple in-memory key-value cache for Kotlin Multiplatform, with support for time-based (expiration) and size-based evictions.

Note that only the new Kotlin Native memory model is supported.

The following targets are currently supported:

  • jvm
  • js
  • iosX64
  • iosArm64
  • iosSimulatorArm64
  • macosX64
  • macosArm64
  • tvosX64
  • tvosArm64
  • tvosSimulatorArm64
  • watchosX64
  • watchosArm64
  • watchosSimulatorArm64
  • linuxX64
  • linuxArm64
  • mingwX64
"},{"location":"#download","title":"Download","text":"

Dependencies are hosted on Maven Central.

"},{"location":"#android","title":"Android","text":"
dependencies {\nimplementation(\"io.github.reactivecircus.cache4k:cache4k:x.y.z\")\n}\n
"},{"location":"#multiplatform","title":"Multiplatform","text":"
kotlin {\nsourceSets {\ncommonMain {\ndependencies {\nimplementation(\"io.github.reactivecircus.cache4k:cache4k:x.y.z\")\n}\n}\n}\n}\n
"},{"location":"#usage","title":"Usage","text":""},{"location":"#writing-and-reading-cache-entries","title":"Writing and reading cache entries","text":"

To create a new Cache instance using Long for the key and String for the value:

val cache = Cache.Builder<Long, String>().build()\n

To start writing entries to the cache:

cache.put(1, \"dog\")\ncache.put(2, \"cat\")\n

To read a cache entry by key:

cache.get(1) // returns \"dog\"\ncache.get(2) // returns \"cat\"\ncache.get(3) // returns null\n

To overwrite an existing cache entry:

cache.put(1, \"dog\")\ncache.put(1, \"bird\")\ncache.get(1) // returns \"bird\"\n
"},{"location":"#cache-loader","title":"Cache loader","text":"

Cache provides an API for getting cached value by key and using the provided loader: suspend () -> Value lambda to compute and cache the value automatically if none exists.

runBlockingTest {\nval cache = Cache.Builder<Long, User>().build()\n\nval userId = 1L\nval user = cache.get(userId) {\nfetchUserById(userId) // potentially expensive call (might be a suspend function)\n}\n\n// value successfully computed by the loader will be cached automatically\nassertThat(user).isEqualTo(cache.get(userId))\n}\n

Note that loader is executed on the caller\u2019s coroutine context. Concurrent calls from multiple threads using the same key will be blocked. Assuming the 1st call successfully computes a new value, none of the loader from the other calls will be executed and the cached value computed by the first loader will be returned for those calls.

Any exceptions thrown by the loader will be propagated to the caller of this function.

"},{"location":"#expirations-and-evictions","title":"Expirations and evictions","text":"

By default, Cache has an unlimited number of entries which never expire. But a cache can be configured to support both time-based expirations and size-based evictions.

"},{"location":"#time-based-expiration","title":"Time-based expiration","text":"

Expiration time can be specified for entries in the cache.

"},{"location":"#expire-after-access","title":"Expire after access","text":"

To set the maximum time an entry can live in the cache since the last access (also known as ** time-to-idle**), where \u201caccess\u201d means reading the cache, adding a new cache entry, or ** replacing an existing entry with a new one**:

val cache = Cache.Builder<Long, String>()\n.expireAfterAccess(24.hours)\n.build()\n

An entry in this cache will be removed if it has not been read or replaced after 24 hours since it\u2019s been written into the cache.

"},{"location":"#expire-after-write","title":"Expire after write","text":"

To set the maximum time an entry can live in the cache since the last write (also known as ** time-to-live**), where \u201cwrite\u201d means adding a new cache entry or replacing an existing entry with a new one:

val cache = Cache.Builder<Long, String>()\n.expireAfterWrite(30.minutes)\n.build()\n

An entry in this cache will be removed if it has not been replaced after 30 minutes since it\u2019s been written into the cache.

Note that cache entries are not removed immediately upon expiration at exact time. Expirations are checked in each interaction with the cache.

"},{"location":"#size-based-eviction","title":"Size-based eviction","text":"

To set the maximum number of entries to be kept in the cache:

val cache = Cache.Builder<Long, String>()\n.maximumCacheSize(100)\n.build()\n

Once there are more than 100 entries in this cache, the least recently used one will be removed, where \u201cused\u201d means reading the cache, adding a new cache entry, or replacing an existing entry with a new one.

"},{"location":"#getting-all-cache-entries-as-a-map","title":"Getting all cache entries as a Map","text":"

To get a copy of the current cache entries as a Map:

val cache = Cache.Builder<Long, String>()\n.build()\n\ncache.put(1, \"dog\")\ncache.put(2, \"cat\")\n\nassertThat(cache.asMap())\n.isEqualTo(mapOf(1L to \"dog\", 2L to \"cat\"))\n

Note that calling asMap() has no effect on the access expiry of the cache.

"},{"location":"#deleting-cache-entries","title":"Deleting cache entries","text":"

Cache entries can also be deleted explicitly.

To delete a cache entry for a given key:

val cache = Cache.Builder<Long, String>().build()\ncache.put(1, \"dog\")\n\ncache.invalidate(1)\n\nassertThat(cache.get(1)).isNull()\n

To delete all entries in the cache:

cache.invalidateAll()\n
"},{"location":"#event-listener","title":"Event listener","text":"

You can set an event listener as a lambda:

val cache1 = Cache.Builder<Long, String>()\n.eventListener { event ->\nprintln(\"onEvent: $event\")\n}\n.build()\n

Or declare it as a class and share logic across many stores:

class FileDeleteEventListener : CacheEventListener<Long, File> {\noverride fun onEvent(event: CacheEvent<Long, File>) {\nwhen(event) {\nis CacheEvent.Created -> {}\nis CacheEvent.Updated -> event.oldValue.delete()\nis CacheEvent.Evicted -> event.value.delete()\nis CacheEvent.Expired -> event.value.delete()\nis CacheEvent.Removed -> event.value.delete()\n}\n}\n}\nval fileDeleteEventListener = FileDeleteEventListener()\n\nval cache1 = Cache.Builder<Long, File>()\n.eventListener(fileDeleteEventListener)\n.build()\n\nval cache2 = Cache.Builder<Long, File>()\n.eventListener(fileDeleteEventListener)\n.build()\n

Cache entry event firing behaviors for mutative methods:

Initial value Operation New value Event {} put(K, V) {K: V} Created(K, V) {K: V1} put(K, V2) {K: V2} Updated(K, V1, V2) {K: V} invalidate(K) {} Removed(K, V) {K1: V1, K2: V2} invalidateAll() {} Removed(K1, V1), Removed(K2, V2) {K: V} any operation, K expired {} Expired(K, V) {K1: V1} put(K2, V2), K1 evicted {K2: V2} Created(K2, V2), Evicted(K1, V1)"},{"location":"#unit-testing-cache-expirations","title":"Unit testing cache expirations","text":"

To test logic that depends on cache expiration, pass in a FakeTimeSource when building a Cache so you can programmatically advance the reading of the time source:

@Test\nfun cacheEntryEvictedAfterExpiration() {\nprivate val fakeTimeSource = FakeTimeSource()\nval cache = Cache.Builder<Long, String>()\n.timeSource(fakeTimeSource)\n.expireAfterWrite(1.minutes)\n.build()\n\ncache.put(1, \"dog\")\n\n// just before expiry\nfakeTimeSource += 1.minutes - 1.nanoseconds\n\nassertThat(cache.get(1))\n.isEqualTo(\"dog\")\n\n// now expires\nfakeTimeSource += 1.nanoseconds\n\nassertThat(cache.get(1))\n.isNull()\n}\n
"},{"location":"#credits","title":"Credits","text":"

The library was ported from a kotlin / JVM cache which I contributed to dropbox/Store to help unblock Store\u2019s multiplatform support ( it was reverted before the 1.0 release as multiplatform wasn\u2019t a priority). Many thanks to Store\u2019s owners and contributors for reviewing and improving the original implementation.

"},{"location":"#license","title":"License","text":"
Copyright 2021 Yang Chen\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n

YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler, and YourKit YouMonitor.

"},{"location":"changelog/","title":"Change Log","text":""},{"location":"changelog/#0110","title":"0.11.0","text":""},{"location":"changelog/#added","title":"Added","text":"
  • New event listener APIs (@darkxanter) - 35
"},{"location":"changelog/#fixed","title":"Fixed","text":"
  • Downgrade stately to 1.2.5 to fix duplicate class error - 36
"},{"location":"changelog/#0100","title":"0.10.0","text":""},{"location":"changelog/#added_1","title":"Added","text":"

Added new targets: - watchosArm64 - watchosSimulatorArm64 - watchosX64

FakeTimeSource is now public - #30

"},{"location":"changelog/#changed","title":"Changed","text":"
  • Kotlin 1.8.20.
  • AtomicFU 0.20.2.
  • Stately 2.0.0-rc1.
"},{"location":"changelog/#090","title":"0.9.0","text":""},{"location":"changelog/#fixed_1","title":"Fixed","text":"
  • Revert to using state-collections to fix JVM concurrency issue - #23
"},{"location":"changelog/#changed_1","title":"Changed","text":"
  • Kotlin 1.7.20.
  • AtomicFU 0.18.5.
"},{"location":"changelog/#080","title":"0.8.0","text":""},{"location":"changelog/#added_2","title":"Added","text":"

Added new targets: - linuxX64 - macosArm64

"},{"location":"changelog/#changed_2","title":"Changed","text":"
  • Kotlin 1.7.10.
  • Coroutines 1.6.4.
  • AtomicFU 0.18.3.
"},{"location":"changelog/#070","title":"0.7.0","text":""},{"location":"changelog/#changed_3","title":"Changed","text":"
  • Kotlin 1.7.0.
  • Coroutines 1.6.3.
  • AtomicFU 0.18.2.
"},{"location":"changelog/#060","title":"0.6.0","text":""},{"location":"changelog/#changed_4","title":"Changed","text":"
  • fakeTimeSource in Cache.Builder has been renamed to timeSource, and the FakeTimeSource implementation has been removed (still available in our tests) - #20
  • Kotlin 1.6.21.
"},{"location":"changelog/#050","title":"0.5.0","text":"

This release adds support for new native memory model and drops support for the old one. Many thanks to @dcvz for the contribution.

"},{"location":"changelog/#added_3","title":"Added","text":"
  • Synchronize cache loader by key - #15
  • Support new native memory model and drop support for old memory model - #17
"},{"location":"changelog/#changed_5","title":"Changed","text":"
  • Kotlin 1.6.20.
  • Coroutines 1.6.1.
"},{"location":"changelog/#040","title":"0.4.0","text":""},{"location":"changelog/#added_4","title":"Added","text":"

Added new targets: - iosSimulatorArm64 - macosArm64 - tvosArm64 - tvosSimulatorArm64 - tvosX64

"},{"location":"changelog/#changed_6","title":"Changed","text":"
  • Kotlin 1.6.10.
  • Stately 1.2.1.
  • Target Java 11.
"},{"location":"changelog/#030","title":"0.3.0","text":""},{"location":"changelog/#changed_7","title":"Changed","text":"
  • Change fun newBuilder() to operator fun invoke() - #7.
  • Compile with Kotlin 1.5.21.
"},{"location":"changelog/#020","title":"0.2.0","text":""},{"location":"changelog/#changed_8","title":"Changed","text":"
  • Support Kotlin 1.5.0.
  • Stately to 1.1.7.
"},{"location":"changelog/#011","title":"0.1.1","text":""},{"location":"changelog/#changed_9","title":"Changed","text":"
  • Disable IR.
"},{"location":"changelog/#010","title":"0.1.0","text":"

Initial release.

"}]} \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 9fa3a8a..043bd9f 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,12 +2,12 @@ https://reactivecircus.github.io/cache4k/ - 2023-04-23 + 2023-09-26 daily https://reactivecircus.github.io/cache4k/changelog/ - 2023-04-23 + 2023-09-26 daily \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index b56be18..5b9ede9 100644 Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ