Plugin Directory

Changeset 3327832


Ignore:
Timestamp:
07/14/2025 11:45:02 PM (9 months ago)
Author:
openvideo
Message:

update open-video-block build

Location:
open-video/trunk/open-video-block/build
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • open-video/trunk/open-video-block/build/index.asset.php

    r3320896 r3327832  
    1 <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '629f61c9c991636246f5');
     1<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'e30cbc93a5e281fa7ce1');
  • open-video/trunk/open-video-block/build/index.js

    r3320896 r3327832  
    1 !function(){var e,t={2168:function(e,t,n){"use strict";var r=window.wp.blocks,o=window.wp.element;window.wp.i18n,n(9196),n(1038),n(8446);var i=window.wp.blockEditor,a=window.wp.components,c=window.wp.data,s=window.wp.apiFetch,l=n.n(s);function u(e,t){return function(){return e.apply(t,arguments)}}const{toString:f}=Object.prototype,{getPrototypeOf:p}=Object,d=(h=Object.create(null),e=>{const t=f.call(e);return h[t]||(h[t]=t.slice(8,-1).toLowerCase())});var h;const y=e=>(e=e.toLowerCase(),t=>d(t)===e),b=e=>t=>typeof t===e,{isArray:v}=Array,g=b("undefined"),m=y("ArrayBuffer"),w=b("string"),O=b("function"),j=b("number"),S=e=>null!==e&&"object"==typeof e,_=e=>{if("object"!==d(e))return!1;const t=p(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},E=y("Date"),P=y("File"),x=y("Blob"),k=y("FileList"),T=y("URLSearchParams");function C(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),v(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function R(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,A=e=>!g(e)&&e!==N,D=(B="undefined"!=typeof Uint8Array&&p(Uint8Array),e=>B&&e instanceof B);var B;const I=y("HTMLFormElement"),F=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),M=y("RegExp"),L=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};C(n,((n,o)=>{!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},U="abcdefghijklmnopqrstuvwxyz",V="0123456789",z={DIGIT:V,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+V},q=y("AsyncFunction");var K={isArray:v,isArrayBuffer:m,isBuffer:function(e){return null!==e&&!g(e)&&null!==e.constructor&&!g(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||O(e.append)&&("formdata"===(t=d(e))||"object"===t&&O(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer),t},isString:w,isNumber:j,isBoolean:e=>!0===e||!1===e,isObject:S,isPlainObject:_,isUndefined:g,isDate:E,isFile:P,isBlob:x,isRegExp:M,isFunction:O,isStream:e=>S(e)&&O(e.pipe),isURLSearchParams:T,isTypedArray:D,isFileList:k,forEach:C,merge:function e(){const{caseless:t}=A(this)&&this||{},n={},r=(r,o)=>{const i=t&&R(n,o)||o;_(n[i])&&_(r)?n[i]=e(n[i],r):_(r)?n[i]=e({},r):v(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&C(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(C(t,((t,r)=>{n&&O(t)?e[r]=u(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&p(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:d,kindOfTest:y,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(v(e))return e;let t=e.length;if(!j(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:I,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:L,freezeMethods:e=>{L(e,((t,n)=>{if(O(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];O(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return v(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:R,global:N,isContextDefined:A,ALPHABET:z,generateString:(e=16,t=z.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&O(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(S(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=v(e)?[]:{};return C(e,((e,t)=>{const i=n(e,r+1);!g(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:q,isThenable:e=>e&&(S(e)||O(e))&&O(e.then)&&O(e.catch)};function H(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}K.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const W=H.prototype,$={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{$[e]={value:e}})),Object.defineProperties(H,$),Object.defineProperty(W,"isAxiosError",{value:!0}),H.from=(e,t,n,r,o,i)=>{const a=Object.create(W);return K.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),H.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var Y=H;function J(e){return K.isPlainObject(e)||K.isArray(e)}function G(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function X(e,t,n){return e?e.concat(t).map((function(e,t){return e=G(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Q=K.toFlatObject(K,{},null,(function(e){return/^is[A-Z]/.test(e)}));var Z=function(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!K.isUndefined(t[e])}))).metaTokens,o=n.visitor||l,i=n.dots,a=n.indexes,c=(n.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(o))throw new TypeError("visitor must be a function");function s(e){if(null===e)return"";if(K.isDate(e))return e.toISOString();if(!c&&K.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(e)||K.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,o){let c=e;if(e&&!o&&"object"==typeof e)if(K.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(K.isArray(e)&&function(e){return K.isArray(e)&&!e.some(J)}(e)||(K.isFileList(e)||K.endsWith(n,"[]"))&&(c=K.toArray(e)))return n=G(n),c.forEach((function(e,r){!K.isUndefined(e)&&null!==e&&t.append(!0===a?X([n],r,i):null===a?n:n+"[]",s(e))})),!1;return!!J(e)||(t.append(X(o,n,i),s(e)),!1)}const u=[],f=Object.assign(Q,{defaultVisitor:l,convertValue:s,isVisitable:J});if(!K.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!K.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),K.forEach(n,(function(n,i){!0===(!(K.isUndefined(n)||null===n)&&o.call(t,n,K.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),u.pop()}}(e),t};function ee(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function te(e,t){this._pairs=[],e&&Z(e,this,t)}const ne=te.prototype;ne.append=function(e,t){this._pairs.push([e,t])},ne.toString=function(e){const t=e?function(t){return e.call(this,t,ee)}:ee;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var re=te;function oe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ie(e,t,n){if(!t)return e;const r=n&&n.encode||oe,o=n&&n.serialize;let i;if(i=o?o(t,n):K.isURLSearchParams(t)?t.toString():new re(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}var ae=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){K.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},se={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:re,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]},le=function(e){function t(e,n,r,o){let i=e[o++];const a=Number.isFinite(+i),c=o>=e.length;return i=!i&&K.isArray(r)?r.length:i,c?(K.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&K.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&K.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a)}if(K.isFormData(e)&&K.isFunction(e.entries)){const n={};return K.forEachEntry(e,((e,r)=>{t(function(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const ue={"Content-Type":void 0},fe={transitional:ce,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=K.isObject(e);if(o&&K.isHTMLForm(e)&&(e=new FormData(e)),K.isFormData(e))return r&&r?JSON.stringify(le(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Z(e,new se.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return se.isNode&&K.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=K.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Z(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(K.isString(e))try{return(0,JSON.parse)(e),K.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||fe.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&K.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Y.from(e,Y.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:se.classes.FormData,Blob:se.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};K.forEach(["delete","get","head"],(function(e){fe.headers[e]={}})),K.forEach(["post","put","patch"],(function(e){fe.headers[e]=K.merge(ue)}));var pe=fe;const de=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),he=Symbol("internals");function ye(e){return e&&String(e).trim().toLowerCase()}function be(e){return!1===e||null==e?e:K.isArray(e)?e.map(be):String(e)}function ve(e,t,n,r,o){return K.isFunction(r)?r.call(this,t,n):(o&&(t=n),K.isString(t)?K.isString(r)?-1!==t.indexOf(r):K.isRegExp(r)?r.test(t):void 0:void 0)}class ge{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ye(t);if(!o)throw new Error("header name must be a non-empty string");const i=K.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=be(e))}const i=(e,t)=>K.forEach(e,((e,n)=>o(e,n,t)));return K.isPlainObject(e)||e instanceof this.constructor?i(e,t):K.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&de[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=ye(e)){const n=K.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(K.isFunction(t))return t.call(this,e,n);if(K.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ye(e)){const n=K.findKey(this,e);return!(!n||void 0===this[n]||t&&!ve(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ye(e)){const o=K.findKey(n,e);!o||t&&!ve(0,n[o],o,t)||(delete n[o],r=!0)}}return K.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ve(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return K.forEach(this,((r,o)=>{const i=K.findKey(n,o);if(i)return t[i]=be(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=be(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return K.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&K.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[he]=this[he]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ye(e);t[r]||(function(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return K.isArray(e)?e.forEach(r):r(e),this}}ge.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.freezeMethods(ge.prototype),K.freezeMethods(ge);var me=ge;function we(e,t){const n=this||pe,r=t||n,o=me.from(r.headers);let i=r.data;return K.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Oe(e){return!(!e||!e.__CANCEL__)}function je(e,t,n){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,n),this.name="CanceledError"}K.inherits(je,Y,{__CANCEL__:!0});var Se=je,_e=se.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){const a=[];a.push(e+"="+encodeURIComponent(t)),K.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),K.isString(r)&&a.push("path="+r),K.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Ee(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Pe=se.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=K.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function xe(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(c){const s=Date.now(),l=r[a];o||(o=s),n[i]=c,r[i]=s;let u=a,f=0;for(;u!==i;)f+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),s-o<t)return;const p=l&&s-l;return p?Math.round(1e3*f/p):void 0}}(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,c=i-n,s=r(c);n=i;const l={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:s||void 0,estimated:s&&a&&i<=a?(a-i)/s:void 0,event:o};l[t?"download":"upload"]=!0,e(l)}}const ke={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=me.from(e.headers).normalize(),i=e.responseType;let a;function c(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}K.isFormData(r)&&(se.isStandardBrowserEnv||se.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let s=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const l=Ee(e.baseURL,e.url);function u(){if(!s)return;const r=me.from("getAllResponseHeaders"in s&&s.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),c()}),(function(e){n(e),c()}),{data:i&&"text"!==i&&"json"!==i?s.response:s.responseText,status:s.status,statusText:s.statusText,headers:r,config:e,request:s}),s=null}if(s.open(e.method.toUpperCase(),ie(l,e.params,e.paramsSerializer),!0),s.timeout=e.timeout,"onloadend"in s?s.onloadend=u:s.onreadystatechange=function(){s&&4===s.readyState&&(0!==s.status||s.responseURL&&0===s.responseURL.indexOf("file:"))&&setTimeout(u)},s.onabort=function(){s&&(n(new Y("Request aborted",Y.ECONNABORTED,e,s)),s=null)},s.onerror=function(){n(new Y("Network Error",Y.ERR_NETWORK,e,s)),s=null},s.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||ce;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Y(t,r.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,s)),s=null},se.isStandardBrowserEnv){const t=(e.withCredentials||Pe(l))&&e.xsrfCookieName&&_e.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in s&&K.forEach(o.toJSON(),(function(e,t){s.setRequestHeader(t,e)})),K.isUndefined(e.withCredentials)||(s.withCredentials=!!e.withCredentials),i&&"json"!==i&&(s.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&s.addEventListener("progress",xe(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&s.upload&&s.upload.addEventListener("progress",xe(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{s&&(n(!t||t.type?new Se(null,e,s):t),s.abort(),s=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const f=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(l);f&&-1===se.protocols.indexOf(f)?n(new Y("Unsupported protocol "+f+":",Y.ERR_BAD_REQUEST,e)):s.send(r||null)}))}};K.forEach(ke,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));function Te(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Se(null,e)}function Ce(e){return Te(e),e.headers=me.from(e.headers),e.data=we.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),(e=>{e=K.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=K.isString(n)?ke[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new Y(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(K.hasOwnProp(ke,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!K.isFunction(r))throw new TypeError("adapter is not a function");return r})(e.adapter||pe.adapter)(e).then((function(t){return Te(e),t.data=we.call(e,e.transformResponse,t),t.headers=me.from(t.headers),t}),(function(t){return Oe(t)||(Te(e),t&&t.response&&(t.response.data=we.call(e,e.transformResponse,t.response),t.response.headers=me.from(t.response.headers))),Promise.reject(t)}))}const Re=e=>e instanceof me?e.toJSON():e;function Ne(e,t){t=t||{};const n={};function r(e,t,n){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:n},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function o(e,t,n){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!K.isUndefined(t))return r(void 0,t)}function a(e,t){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function c(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const s={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(e,t)=>o(Re(e),Re(t),!0)};return K.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=s[r]||o,a=i(e[r],t[r],r);K.isUndefined(a)&&i!==c||(n[r]=a)})),n}const Ae={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ae[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const De={};Ae.transitional=function(e,t,n){function r(e,t){return"[Axios v1.4.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Y(r(o," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!De[o]&&(De[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var Be={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new Y("option "+i+" must be "+n,Y.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Y("Unknown option "+i,Y.ERR_BAD_OPTION)}},validators:Ae};const Ie=Be.validators;class Fe{constructor(e){this.defaults=e,this.interceptors={request:new ae,response:new ae}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ne(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;let i;void 0!==n&&Be.assertOptions(n,{silentJSONParsing:Ie.transitional(Ie.boolean),forcedJSONParsing:Ie.transitional(Ie.boolean),clarifyTimeoutError:Ie.transitional(Ie.boolean)},!1),null!=r&&(K.isFunction(r)?t.paramsSerializer={serialize:r}:Be.assertOptions(r,{encode:Ie.function,serialize:Ie.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),i=o&&K.merge(o.common,o[t.method]),i&&K.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=me.concat(i,o);const a=[];let c=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const s=[];let l;this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)}));let u,f=0;if(!c){const e=[Ce.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,s),u=e.length,l=Promise.resolve(t);f<u;)l=l.then(e[f++],e[f++]);return l}u=a.length;let p=t;for(f=0;f<u;){const e=a[f++],t=a[f++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=Ce.call(this,p)}catch(e){return Promise.reject(e)}for(f=0,u=s.length;f<u;)l=l.then(s[f++],s[f++]);return l}getUri(e){return ie(Ee((e=Ne(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}K.forEach(["delete","get","head","options"],(function(e){Fe.prototype[e]=function(t,n){return this.request(Ne(n||{},{method:e,url:t,data:(n||{}).data}))}})),K.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Ne(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Fe.prototype[e]=t(),Fe.prototype[e+"Form"]=t(!0)}));var Me=Fe;class Le{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Se(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Le((function(t){e=t})),cancel:e}}}var Ue=Le;const Ve={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ve).forEach((([e,t])=>{Ve[t]=e}));var ze=Ve;const qe=function e(t){const n=new Me(t),r=u(Me.prototype.request,n);return K.extend(r,Me.prototype,n,{allOwnKeys:!0}),K.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ne(t,n))},r}(pe);qe.Axios=Me,qe.CanceledError=Se,qe.CancelToken=Ue,qe.isCancel=Oe,qe.VERSION="1.4.0",qe.toFormData=Z,qe.AxiosError=Y,qe.Cancel=qe.CanceledError,qe.all=function(e){return Promise.all(e)},qe.spread=function(e){return function(t){return e.apply(null,t)}},qe.isAxiosError=function(e){return K.isObject(e)&&!0===e.isAxiosError},qe.mergeConfig=Ne,qe.AxiosHeaders=me,qe.formToJSON=e=>le(K.isHTMLForm(e)?new FormData(e):e),qe.HttpStatusCode=ze,qe.default=qe;var Ke=qe,He=(0,c.withSelect)((e=>{const{getEntityRecords:t}=e("core");return{categories:t("taxonomy","category",{per_page:-1})}}))((e=>{let{attributes:t,updateSelectedCategory:n,categories:r,disabled:i}=e,c=[];return Array.isArray(r)&&(c=r.map((e=>{let{id:t,name:n}=e;return{label:(r=n,"Uncategorized"===r?"Posts with no category assigned (Uncategorized)":`Posts assigned the '${r}' category`),value:t};var r})),c.unshift({value:-1,label:"All posts in site"})),(0,o.createElement)(a.SelectControl,{label:"Add this Video to:",disabled:i,value:t.category,onChange:e=>n(e),options:c})})),We=n.p+"images/openvideologo.d7e568e7.png";n(361);const $e=/^https?:\/\/(www\.)?(open\.video\/(?:@[\w-]+\/)?((video|v)\/(playlist\/)?[\w-]+)|[\w.-]+\/open-video\/(playlist\/)?[\w-]+)([\?&][\w-]+=[\w-]*)*$/;function Ye(){return Ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ye.apply(this,arguments)}var Je=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"open-video/open-video-block","version":"0.1.0","title":"Open.Video Block","category":"embed","icon":"open-video-icon","description":"Open.Video Block for embedding videos","attributes":{"url":{"type":"string","default":""},"providerNameSlug":{"type":"string","default":""},"allowResponsive":{"type":"boolean","default":true},"responsive":{"type":"boolean","default":false},"previewable":{"type":"boolean","default":true},"floatOption":{"type":"number","default":1},"displayType":{"type":"string","default":"url"},"html":{"type":"string","default":""},"autoplay":{"type":"boolean","default":true},"loop":{"type":"boolean","default":false},"category":{"type":"string","default":""},"alignment":{"type":"string","default":"none"}},"supports":{"spacing":{"margin":true}},"textdomain":"open-video-block","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');const Ge=()=>{const e={};for(const[t,n]of Object.entries(Je.attributes))n.hasOwnProperty("default")&&(e[t]=n.default);return e},Xe={...Je,edit:function(e){let{clientId:t,attributes:n,setAttributes:s}=e;const u="1",f="edit",p="preview",d="add_to_posts",h="skip_if_video_exists",y="replace_all_videos",b=(0,i.useBlockEditContext)(),v=(0,c.select)("core/editor");let g=null;v&&(g=v.getCurrentPost());let m=0,w=0,O=0,j=0;const{url:S,floatOption:_,html:E,category:P,autoplay:x}=n,[k,T]=(0,o.useState)(S),[C,R]=(0,o.useState)(_),[N,A]=(0,o.useState)(E),[D,B]=(0,o.useState)(x),[I,F]=(0,o.useState)(u),[M,L]=(0,o.useState)(P),[U,V]=(0,o.useState)(!1),[z,q]=(0,o.useState)(!1),[K,H]=(0,o.useState)(h),[W,$]=(0,o.useState)(0),[Y,J]=(0,o.useState)(!1),[G,X]=(0,o.useState)(0),[Q,Z]=(0,o.useState)(0),[ee,te]=(0,o.useState)(0),[ne,re]=(0,o.useState)(0),[oe,ie]=(0,o.useState)(0),ae=()=>ce(k),ce=e=>$e.test(e),[se,le]=(0,o.useState)(ae()?p:f);(0,o.useEffect)((()=>{if(!v)return;let e=0;const n=v.getBlocks();n.forEach(((r,o)=>{"core/paragraph"===r.name&&e++,r.clientId===t&&(0===e?F("0"):1===e?F(u):2===e?F("2"):o<n.length/2?F("3"):F("4"))}))}),[]),(0,o.useEffect)((()=>{s({category:M})}),[M]),(0,o.useEffect)((()=>{s({url:k}),ce(k)&&ue()}),[k]),(0,o.useEffect)((()=>{s({floatOption:C}),ae()&&ue()}),[C]),(0,o.useEffect)((()=>{s({html:N})}),[N]),(0,o.useEffect)((()=>{s({autoplay:D}),ae()&&ue()}),[D]),(0,o.useEffect)((()=>{ie(0!==G?Math.floor((W+Q+ee+ne)/G*100):0)}),[W,Q,ee,ne]);const ue=async()=>{let e="";if(k&&k.includes("/playlist")){if(e=(e=>{let t=e,n=k.split("/");if(!n)return;if(n=n[n.length-1].split("?"),!n)return;const r=n[0],o=function(){let{autoplay:e=!1,floatOption:t=!0,videoId:n="",autoMatch:r=!1,startTime:o=0,width:i=640,height:a=360,preview:c=!1,embedCodeSource:s="w"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const l={auto_play:e,float:t,width:i,height:a,embed_code_source:s};return n&&(l.videoId=n),o>0&&(l.time_start=o),c&&(l.preview=c),JSON.stringify(l)}({autoplay:!!D,floatOption:!!C,videoId:r});return o?t+o:void 0})("https://www.open.video/generate-embed-code?j="),!e)return}else{if(!k)return;if(e=(e=>{let t="https://www.open.video/openvideo/oembed?url=";return t+=k,t+=`&float=${C}`,t+=`&autoplay=${D}`,t})(),!e)return}const t=await Ke({method:"get",url:e});if(t&&t.data){const e=t.data;e.html?A(e.html):A(e),e.provider_name?s({providerSlug:e.provider_name}):s({providerSlug:"Open.Video"})}},fe=()=>{ae()&&le(p)},pe=()=>{ae()&&le(d)};return(0,o.createElement)("div",(0,i.useBlockProps)(),(0,o.createElement)(i.BlockControls,null,(0,o.createElement)(i.BlockAlignmentToolbar,{value:n.alignment,onChange:e=>{s({alignment:e})},controls:["left","center","right"]})),se===p&&""!=N&&(0,o.createElement)("div",{className:"preview-block"},(0,o.createElement)("div",{class:"preview-btn-group"},(0,o.createElement)("button",{onClick:()=>{le(f)},"aria-label":"Edit Video Settings",style:{marginRight:"15px"}},"Edit"),(0,o.createElement)("button",{onClick:pe},"Add to Other Posts")),(0,o.createElement)("iframe",{src:(()=>{let e=`https://www.open.video/embed?idFromURL=${encodeURIComponent(k)}&play_nextvid=0`;return D||(e+="&autoplay=0"),e})()}),(z||Y)&&(0,o.createElement)("div",{class:"propagate-notice"},z&&(0,o.createElement)(a.Animate,{type:"slide-in",options:{origin:"top"}},(()=>(0,o.createElement)(a.Notice,{status:W>0?"success":"warning",isDismissible:!1},W>0&&(0,o.createElement)("p",null,(0,o.createElement)(a.Icon,{icon:"saved",className:"openvideoplugin-success"}),"Open.Video video added to ",(0,o.createElement)("strong",null,W)," other post",1===W?"":"s","!"),0===W&&(0,o.createElement)("p",null,(0,o.createElement)(a.Icon,{icon:"warning",className:"openvideoplugin-warning"}),"No Open.Video videos were added to other posts"),W!==G&&G>0&&(0,o.createElement)("ul",null,Q>0&&(0,o.createElement)("li",null,(0,o.createElement)("strong",null,Q)," post",1===Q?" was skipped because it already has":"s were skipped because they already have"," a Open.Video video"),ee>0&&(0,o.createElement)("li",null,(0,o.createElement)("strong",null,ee)," post",1===ee?"":"s"," did not have an appropriate location to add the video to"),ne>0&&(0,o.createElement)("li",null,(0,o.createElement)("strong",null,ne)," post",1===ne?"":"s"," failed to update due to an internal error, please try again"))))),Y&&(0,o.createElement)(a.Animate,{type:"slide-in",options:{origin:"top"}},(()=>(0,o.createElement)(a.Notice,{status:"error",isDismissible:!1},(0,o.createElement)("p",null,(0,o.createElement)(a.Icon,{icon:"warning",className:"openvideoplugin-error"}),"There was an error adding the Open.Video video to other pages")))))),se===f&&(0,o.createElement)("div",{className:"edit-block"},(0,o.createElement)("div",{style:{height:"35px",maxWidth:"150px",marginBottom:"20px"}},(0,o.createElement)("a",{href:"https://www.open.video/",target:"_blank"},(0,o.createElement)("img",{src:We}))),(0,o.createElement)("div",{style:{marginBottom:"18px"}}),(0,o.createElement)("div",null,(0,o.createElement)("p",{for:"open-video-url-input",style:{fontSize:"small",marginBottom:"20px"}},"Please provide a link to the video or playlist you'd like to serve on your website. You can easily copy the links from either ",(0,o.createElement)("a",{href:"https://app.open.video/videos",target:"_blank"},"Open.Video Studio")," or ",(0,o.createElement)("a",{href:"https://www.open.video",target:"_blank"},"Open.Video.com"),". For additional details, please refer to ",(0,o.createElement)("a",{href:"https://support.ezoic.com/scp/article.php?id=595",target:"_blank"},"this article"),"."),(0,o.createElement)(a.TextControl,{id:"open-video-url-input",label:"Video or Playlist URL",value:k,placeholder:"Enter URL here",onChange:T})),(0,o.createElement)("hr",null),(0,o.createElement)("p",null,"Video Playback Settings"),(0,o.createElement)(a.CheckboxControl,{label:"Float",checked:_,onChange:e=>{R(e)}}),(0,o.createElement)(a.CheckboxControl,{label:"Auto Play",checked:x,onChange:e=>{B(e)}}),g&&(0,o.createElement)("span",null),(0,o.createElement)("div",{class:"openvideoplugin-btn-group"},(0,o.createElement)("button",{onClick:fe,disabled:!ae()},"Done"),(0,o.createElement)("button",{onClick:pe,disabled:!ae()},"Done & Add to Other Posts"))),(0,o.createElement)("div",{className:"edit-block",style:{display:se===d?"block":"none"}},(0,o.createElement)("div",{style:{height:"35px",maxWidth:"150px",marginBottom:"20px"}},(0,o.createElement)("a",{href:"https://www.open.video/",target:"_blank"},(0,o.createElement)("img",{src:We}))),(0,o.createElement)("div",{style:{marginBottom:"15px"}},"Add this Open.Video Video to other posts in your site"),(0,o.createElement)("p",null,(0,o.createElement)(He,{disabled:U,attributes:n,updateSelectedCategory:e=>{L(e)}})),(0,o.createElement)("p",null,(0,o.createElement)(a.SelectControl,{label:"Choose location in post to add this video:",disabled:U,onChange:e=>{F(e)},value:I,options:[{label:"Before 1st paragraph",value:"0"},{label:"Under 1st paragraph (recommended)",value:u},{label:"Under 2nd paragraph",value:"2"},{label:"Middle of page",value:"3"},{label:"Bottom of page",value:"4"}]})),(0,o.createElement)("p",null,(0,o.createElement)(a.RadioControl,{label:"If post already has one or more Open.Video Videos:",disabled:U,onChange:e=>{H(e)},selected:K,options:[{label:"Skip adding this video",value:h},{label:"Remove existing videos and add this one",value:y},{label:"Add this video without affecting other videos",value:"add_anyway"}]})),U&&G>0&&(0,o.createElement)(a.Notice,{status:"info",isDismissible:!1,className:"openvideoplugin-notice__loading"},(0,o.createElement)("p",null,(0,o.createElement)(a.Icon,{icon:"update",className:"openvideoplugin-loading openvideoplugin-info"}),(0,o.createElement)("span",null,"Adding video to ",(0,o.createElement)("strong",null,G)," posts... (",oe,"%)"))),(0,o.createElement)("div",{class:"openvideoplugin-btn-group"},(0,o.createElement)("button",{disabled:U,onClick:fe,style:{backgroundColor:"white"}},"Cancel"),(0,o.createElement)("button",{disabled:U,onClick:async()=>{if(!N)return;if(U)return;m=0,w=0,O=0,j=0,te(0),re(0),X(0),$(0),Z(0),V(!0);let e="/wp/v2/posts?context=edit";parseInt(M)>0&&(e+=`&categories=${M}`);const t=await l()({path:e,method:"GET"}).catch((e=>{console.error(e),function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];V(!1),q(!e),J(e),fe(),setTimeout((()=>{q(!1),J(!1),$(0)}),15e3)}(!0)}));if(!Array.isArray(t))return void propagateBlockComplete(!0);const o=g.id,i=t.filter((e=>e.id!==o));X(i.length);let a=i.map((e=>{let t=((e,t)=>{const n=e.some((e=>"open-video/open-video-block"===e.name||!("core/shortcode"!==e.name||"string"!=typeof e.originalContent||!e.originalContent.includes("[open-video"))||!("string"!=typeof e.originalContent||!e.originalContent.includes('id="open-video-'))));if(K===h&&n)return w++,Z(w),!1;if(K===y&&n){let t=[];e.forEach((e=>{"open-video/open-video-block"!==e.name&&("core/shortcode"===e.name&&"string"==typeof e.originalContent&&e.originalContent.includes("[open-video")||"string"==typeof e.originalContent&&e.originalContent.includes('id="open-video-')||t.push(e))})),e=[...t]}switch(I){case"0":return e.unshift(t),e;case u:let n=[],r=0;return e.forEach((e=>{n.push(e),"core/paragraph"===e.name&&r++,1===r&&n.push(t)})),n.length===e.length?(O++,te(O),!1):n;case"2":let o=[],i=0;return e.forEach((e=>{o.push(e),"core/paragraph"===e.name&&i++,2===i&&o.push(t)})),o.length===e.length?(O++,te(O),!1):o;case"3":let a=Math.floor(e.length/2);return e.splice(a,0,t),e;case"4":return e.push(t),e;default:return e}})((0,r.parse)(e.content.raw),(0,r.createBlock)(b.name,n));if(!t)return Promise.resolve();const o=(0,r.serialize)(t);return l()({path:`/wp/v2/posts/${e.id}`,method:"POST",data:{content:o}}).then((()=>{m++,$(m)})).catch((e=>{console.error(e),j++,re(j)}))}));await Promise.all(a),propagateBlockComplete()}},"Add to Posts"))))},save:function(e){let{attributes:t}=e;const n=i.useBlockProps.save(),{html:r,alignment:a}=t;let c={justifyContent:"center"};return"left"===a?c.justifyContent="flex-start":"right"===a&&(c.justifyContent="flex-end"),(0,o.createElement)("div",Ye({},n,{style:c}),(0,o.createElement)(o.RawHTML,null,r))},transforms:{from:[{type:"block",blocks:["core/embed"],isMatch(e){return $e.test(e.url)},transform(e){const t=Ge();return t.url=e.url,t.displayType="url",(0,r.createBlock)("open-video/open-video-block",t)},priority:2},{type:"raw",isMatch:e=>"P"===e.nodeName&&$e.test(e.textContent),transform:e=>{const t=Ge();return t.url=e.textContent.trim(),t.displayType="url",(0,r.createBlock)("open-video/open-video-block",t)},priority:1}]}};(0,r.registerBlockType)(Je.name,Xe)},8552:function(e,t,n){var r=n(852)(n(5639),"DataView");e.exports=r},1989:function(e,t,n){var r=n(1789),o=n(401),i=n(7667),a=n(1327),c=n(1866);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,e.exports=s},8407:function(e,t,n){var r=n(7040),o=n(4125),i=n(2117),a=n(7518),c=n(4705);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,e.exports=s},7071:function(e,t,n){var r=n(852)(n(5639),"Map");e.exports=r},3369:function(e,t,n){var r=n(4785),o=n(1285),i=n(6e3),a=n(9916),c=n(5265);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,e.exports=s},3818:function(e,t,n){var r=n(852)(n(5639),"Promise");e.exports=r},8525:function(e,t,n){var r=n(852)(n(5639),"Set");e.exports=r},8668:function(e,t,n){var r=n(3369),o=n(619),i=n(2385);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},6384:function(e,t,n){var r=n(8407),o=n(7465),i=n(3779),a=n(7599),c=n(4758),s=n(4309);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=c,l.prototype.set=s,e.exports=l},2705:function(e,t,n){var r=n(5639).Symbol;e.exports=r},1149:function(e,t,n){var r=n(5639).Uint8Array;e.exports=r},577:function(e,t,n){var r=n(852)(n(5639),"WeakMap");e.exports=r},7412:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},4963:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},4636:function(e,t,n){var r=n(2545),o=n(5694),i=n(1469),a=n(4144),c=n(5776),s=n(6719),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),u=!n&&o(e),f=!n&&!u&&a(e),p=!n&&!u&&!f&&s(e),d=n||u||f||p,h=d?r(e.length,String):[],y=h.length;for(var b in e)!t&&!l.call(e,b)||d&&("length"==b||f&&("offset"==b||"parent"==b)||p&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||c(b,y))||h.push(b);return h}},2488:function(e){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},2908:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},4865:function(e,t,n){var r=n(9465),o=n(7813),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},8470:function(e,t,n){var r=n(7813);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},4037:function(e,t,n){var r=n(8363),o=n(3674);e.exports=function(e,t){return e&&r(t,o(t),e)}},3886:function(e,t,n){var r=n(8363),o=n(1704);e.exports=function(e,t){return e&&r(t,o(t),e)}},9465:function(e,t,n){var r=n(8777);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},5990:function(e,t,n){var r=n(6384),o=n(7412),i=n(4865),a=n(4037),c=n(3886),s=n(4626),l=n(278),u=n(8805),f=n(1911),p=n(8234),d=n(6904),h=n(4160),y=n(3824),b=n(9148),v=n(8517),g=n(1469),m=n(4144),w=n(6688),O=n(3218),j=n(2928),S=n(3674),_=n(1704),E="[object Arguments]",P="[object Function]",x="[object Object]",k={};k[E]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k[x]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k[P]=k["[object WeakMap]"]=!1,e.exports=function e(t,n,T,C,R,N){var A,D=1&n,B=2&n,I=4&n;if(T&&(A=R?T(t,C,R,N):T(t)),void 0!==A)return A;if(!O(t))return t;var F=g(t);if(F){if(A=y(t),!D)return l(t,A)}else{var M=h(t),L=M==P||"[object GeneratorFunction]"==M;if(m(t))return s(t,D);if(M==x||M==E||L&&!R){if(A=B||L?{}:v(t),!D)return B?f(t,c(A,t)):u(t,a(A,t))}else{if(!k[M])return R?t:{};A=b(t,M,D)}}N||(N=new r);var U=N.get(t);if(U)return U;N.set(t,A),j(t)?t.forEach((function(r){A.add(e(r,n,T,r,t,N))})):w(t)&&t.forEach((function(r,o){A.set(o,e(r,n,T,o,t,N))}));var V=F?void 0:(I?B?d:p:B?_:S)(t);return o(V||t,(function(r,o){V&&(r=t[o=r]),i(A,o,e(r,n,T,o,t,N))})),A}},3118:function(e,t,n){var r=n(3218),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},8866:function(e,t,n){var r=n(2488),o=n(1469);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},4239:function(e,t,n){var r=n(2705),o=n(9607),i=n(2333),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},9454:function(e,t,n){var r=n(4239),o=n(7005);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},939:function(e,t,n){var r=n(2492),o=n(7005);e.exports=function e(t,n,i,a,c){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,c))}},2492:function(e,t,n){var r=n(6384),o=n(7114),i=n(8351),a=n(6096),c=n(4160),s=n(1469),l=n(4144),u=n(6719),f="[object Arguments]",p="[object Array]",d="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,y,b,v){var g=s(e),m=s(t),w=g?p:c(e),O=m?p:c(t),j=(w=w==f?d:w)==d,S=(O=O==f?d:O)==d,_=w==O;if(_&&l(e)){if(!l(t))return!1;g=!0,j=!1}if(_&&!j)return v||(v=new r),g||u(e)?o(e,t,n,y,b,v):i(e,t,w,n,y,b,v);if(!(1&n)){var E=j&&h.call(e,"__wrapped__"),P=S&&h.call(t,"__wrapped__");if(E||P){var x=E?e.value():e,k=P?t.value():t;return v||(v=new r),b(x,k,n,y,v)}}return!!_&&(v||(v=new r),a(e,t,n,y,b,v))}},5588:function(e,t,n){var r=n(4160),o=n(7005);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},8458:function(e,t,n){var r=n(3560),o=n(5346),i=n(3218),a=n(346),c=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,u=s.toString,f=l.hasOwnProperty,p=RegExp("^"+u.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?p:c).test(a(e))}},9221:function(e,t,n){var r=n(4160),o=n(7005);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},8749:function(e,t,n){var r=n(4239),o=n(1780),i=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},280:function(e,t,n){var r=n(5726),o=n(6916),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},313:function(e,t,n){var r=n(3218),o=n(5726),i=n(3498),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var c in e)("constructor"!=c||!t&&a.call(e,c))&&n.push(c);return n}},2545:function(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},1717:function(e){e.exports=function(e){return function(t){return e(t)}}},4757:function(e){e.exports=function(e,t){return e.has(t)}},4318:function(e,t,n){var r=n(1149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},4626:function(e,t,n){e=n.nmd(e);var r=n(5639),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,c=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=c?c(n):new e.constructor(n);return e.copy(r),r}},7157:function(e,t,n){var r=n(4318);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},3147:function(e){var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},419:function(e,t,n){var r=n(2705),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},7133:function(e,t,n){var r=n(4318);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},278:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},8363:function(e,t,n){var r=n(4865),o=n(9465);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var c=-1,s=t.length;++c<s;){var l=t[c],u=i?i(n[l],e[l],l,n,e):void 0;void 0===u&&(u=e[l]),a?o(n,l,u):r(n,l,u)}return n}},8805:function(e,t,n){var r=n(8363),o=n(9551);e.exports=function(e,t){return r(e,o(e),t)}},1911:function(e,t,n){var r=n(8363),o=n(1442);e.exports=function(e,t){return r(e,o(e),t)}},4429:function(e,t,n){var r=n(5639)["__core-js_shared__"];e.exports=r},8777:function(e,t,n){var r=n(852),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},7114:function(e,t,n){var r=n(8668),o=n(2908),i=n(4757);e.exports=function(e,t,n,a,c,s){var l=1&n,u=e.length,f=t.length;if(u!=f&&!(l&&f>u))return!1;var p=s.get(e),d=s.get(t);if(p&&d)return p==t&&d==e;var h=-1,y=!0,b=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++h<u;){var v=e[h],g=t[h];if(a)var m=l?a(g,v,h,t,e,s):a(v,g,h,e,t,s);if(void 0!==m){if(m)continue;y=!1;break}if(b){if(!o(t,(function(e,t){if(!i(b,t)&&(v===e||c(v,e,n,a,s)))return b.push(t)}))){y=!1;break}}else if(v!==g&&!c(v,g,n,a,s)){y=!1;break}}return s.delete(e),s.delete(t),y}},8351:function(e,t,n){var r=n(2705),o=n(1149),i=n(7813),a=n(7114),c=n(8776),s=n(1814),l=r?r.prototype:void 0,u=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=c;case"[object Set]":var h=1&r;if(d||(d=s),e.size!=t.size&&!h)return!1;var y=p.get(e);if(y)return y==t;r|=2,p.set(e,t);var b=a(d(e),d(t),r,l,f,p);return p.delete(e),b;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},6096:function(e,t,n){var r=n(8234),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,c){var s=1&n,l=r(e),u=l.length;if(u!=r(t).length&&!s)return!1;for(var f=u;f--;){var p=l[f];if(!(s?p in t:o.call(t,p)))return!1}var d=c.get(e),h=c.get(t);if(d&&h)return d==t&&h==e;var y=!0;c.set(e,t),c.set(t,e);for(var b=s;++f<u;){var v=e[p=l[f]],g=t[p];if(i)var m=s?i(g,v,p,t,e,c):i(v,g,p,e,t,c);if(!(void 0===m?v===g||a(v,g,n,i,c):m)){y=!1;break}b||(b="constructor"==p)}if(y&&!b){var w=e.constructor,O=t.constructor;w==O||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof O&&O instanceof O||(y=!1)}return c.delete(e),c.delete(t),y}},1957:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},8234:function(e,t,n){var r=n(8866),o=n(9551),i=n(3674);e.exports=function(e){return r(e,i,o)}},6904:function(e,t,n){var r=n(8866),o=n(1442),i=n(1704);e.exports=function(e){return r(e,i,o)}},5050:function(e,t,n){var r=n(7019);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},852:function(e,t,n){var r=n(8458),o=n(7801);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},5924:function(e,t,n){var r=n(5569)(Object.getPrototypeOf,Object);e.exports=r},9607:function(e,t,n){var r=n(2705),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[c]=n:delete e[c]),o}},9551:function(e,t,n){var r=n(4963),o=n(479),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,c=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=c},1442:function(e,t,n){var r=n(2488),o=n(5924),i=n(9551),a=n(479),c=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=c},4160:function(e,t,n){var r=n(8552),o=n(7071),i=n(3818),a=n(8525),c=n(577),s=n(4239),l=n(346),u="[object Map]",f="[object Promise]",p="[object Set]",d="[object WeakMap]",h="[object DataView]",y=l(r),b=l(o),v=l(i),g=l(a),m=l(c),w=s;(r&&w(new r(new ArrayBuffer(1)))!=h||o&&w(new o)!=u||i&&w(i.resolve())!=f||a&&w(new a)!=p||c&&w(new c)!=d)&&(w=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case y:return h;case b:return u;case v:return f;case g:return p;case m:return d}return t}),e.exports=w},7801:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},1789:function(e,t,n){var r=n(4536);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:function(e,t,n){var r=n(4536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},1327:function(e,t,n){var r=n(4536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},1866:function(e,t,n){var r=n(4536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},3824:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},9148:function(e,t,n){var r=n(4318),o=n(7157),i=n(3147),a=n(419),c=n(7133);e.exports=function(e,t,n){var s=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return c(e,n);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return i(e);case"[object Symbol]":return a(e)}}},8517:function(e,t,n){var r=n(3118),o=n(5924),i=n(5726);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},5776:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},7019:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:function(e,t,n){var r,o=n(4429),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},5726:function(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},7040:function(e){e.exports=function(){this.__data__=[],this.size=0}},4125:function(e,t,n){var r=n(8470),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},2117:function(e,t,n){var r=n(8470);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7518:function(e,t,n){var r=n(8470);e.exports=function(e){return r(this.__data__,e)>-1}},4705:function(e,t,n){var r=n(8470);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4785:function(e,t,n){var r=n(1989),o=n(8407),i=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},1285:function(e,t,n){var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:function(e,t,n){var r=n(5050);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},4536:function(e,t,n){var r=n(852)(Object,"create");e.exports=r},6916:function(e,t,n){var r=n(5569)(Object.keys,Object);e.exports=r},3498:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:function(e,t,n){e=n.nmd(e);var r=n(1957),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,c=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=c},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5639:function(e,t,n){var r=n(1957),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},619:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:function(e){e.exports=function(e){return this.__data__.has(e)}},1814:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},7465:function(e,t,n){var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,n){var r=n(8407),o=n(7071),i=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},346:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},361:function(e,t,n){var r=n(5990);e.exports=function(e){return r(e,5)}},7813:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},5694:function(e,t,n){var r=n(9454),o=n(7005),i=Object.prototype,a=i.hasOwnProperty,c=i.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!c.call(e,"callee")};e.exports=s},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,n){var r=n(3560),o=n(1780);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},4144:function(e,t,n){e=n.nmd(e);var r=n(5639),o=n(5062),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,c=a&&a.exports===i?r.Buffer:void 0,s=(c?c.isBuffer:void 0)||o;e.exports=s},8446:function(e,t,n){var r=n(939);e.exports=function(e,t){return r(e,t)}},3560:function(e,t,n){var r=n(4239),o=n(3218);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6688:function(e,t,n){var r=n(5588),o=n(1717),i=n(1167),a=i&&i.isMap,c=a?o(a):r;e.exports=c},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},2928:function(e,t,n){var r=n(9221),o=n(1717),i=n(1167),a=i&&i.isSet,c=a?o(a):r;e.exports=c},6719:function(e,t,n){var r=n(8749),o=n(1717),i=n(1167),a=i&&i.isTypedArray,c=a?o(a):r;e.exports=c},3674:function(e,t,n){var r=n(4636),o=n(280),i=n(8612);e.exports=function(e){return i(e)?r(e):o(e)}},1704:function(e,t,n){var r=n(4636),o=n(313),i=n(8612);e.exports=function(e){return i(e)?r(e,!0):o(e)}},479:function(e){e.exports=function(){return[]}},5062:function(e){e.exports=function(){return!1}},1038:function(e,t,n){var r;r=e=>(()=>{var t={865:e=>{"use strict";e.exports=function(e,t){var n=e.filter(t);return 0!==n.length&&n.length!==e.length}},703:(e,t,n)=>{"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},385:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=n(8),c=i(a),s=i(n(6)),l=i(n(2)),u=n(1),f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;r=!1,null===o&&(o=Function.prototype);var c=Object.getOwnPropertyDescriptor(o,i);if(void 0!==c){if("value"in c)return c.value;var s=c.get;if(void 0===s)return;return s.call(a)}var l=Object.getPrototypeOf(o);if(null===l)return;e=l,t=i,n=a,r=!0,c=l=void 0}}(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.state={showLoader:!1,lastScrollTop:0,actionTriggered:!1,pullToRefreshThresholdBreached:!1},this.startY=0,this.currentY=0,this.dragging=!1,this.maxPullDownDistance=0,this.onScrollListener=this.onScrollListener.bind(this),this.throttledOnScrollListener=(0,l.default)(this.onScrollListener,150).bind(this),this.onStart=this.onStart.bind(this),this.onMove=this.onMove.bind(this),this.onEnd=this.onEnd.bind(this),this.getScrollableTarget=this.getScrollableTarget.bind(this)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown.firstChild.getBoundingClientRect().height,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n          Pull Down To Refresh functionality will not work\n          as expected. Check README.md for usage\'')}},{key:"componentWillUnmount",value:function(){this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd))}},{key:"componentWillReceiveProps",value:function(e){this.props.key===e.key&&this.props.dataLength===e.dataLength||this.setState({showLoader:!1,actionTriggered:!1,pullToRefreshThresholdBreached:!1})}},{key:"getScrollableTarget",value:function(){return this.props.scrollableTarget instanceof HTMLElement?this.props.scrollableTarget:"string"==typeof this.props.scrollableTarget?document.getElementById(this.props.scrollableTarget):(null===this.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n        happen because the element may not have been added to DOM yet.\n        See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n      "),null)}},{key:"onStart",value:function(e){this.state.lastScrollTop||(this.dragging=!0,this.startY=e.pageY||e.touches[0].pageY,this.currentY=this.startY,this._infScroll.style.willChange="transform",this._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)")}},{key:"onMove",value:function(e){this.dragging&&(this.currentY=e.pageY||e.touches[0].pageY,this.currentY<this.startY||(this.currentY-this.startY>=this.props.pullDownToRefreshThreshold&&this.setState({pullToRefreshThresholdBreached:!0}),this.currentY-this.startY>1.5*this.maxPullDownDistance||(this._infScroll.style.overflow="visible",this._infScroll.style.transform="translate3d(0px, "+(this.currentY-this.startY)+"px, 0px)")))}},{key:"onEnd",value:function(e){var t=this;this.startY=0,this.currentY=0,this.dragging=!1,this.state.pullToRefreshThresholdBreached&&this.props.refreshFunction&&this.props.refreshFunction(),requestAnimationFrame((function(){t._infScroll&&(t._infScroll.style.overflow="auto",t._infScroll.style.transform="none",t._infScroll.style.willChange="none")}))}},{key:"isElementAtBottom",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?.8:arguments[1],n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=(0,u.parseThreshold)(t);return r.unit===u.ThresholdUnits.Pixel?e.scrollTop+n>=e.scrollHeight-r.value:e.scrollTop+n>=r.value/100*e.scrollHeight}},{key:"onScrollListener",value:function(e){var t=this;"function"==typeof this.props.onScroll&&setTimeout((function(){return t.props.onScroll(e)}),0);var n=this.props.height||this._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;this.state.actionTriggered||(this.isElementAtBottom(n,this.props.scrollThreshold)&&this.props.hasMore&&(this.setState({actionTriggered:!0,showLoader:!0}),this.props.next()),this.setState({lastScrollTop:n.scrollTop}))}},{key:"render",value:function(){var e=this,t=r({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!(!this.props.children||!this.props.children.length),o=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return c.default.createElement("div",{style:o},c.default.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&c.default.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},c.default.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},!this.state.pullToRefreshThresholdBreached&&this.props.pullDownToRefreshContent,this.state.pullToRefreshThresholdBreached&&this.props.releaseToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))}}]),t}(a.Component);t.default=f,f.defaultProps={pullDownToRefreshContent:c.default.createElement("h3",null,"Pull down to refresh"),releaseToRefreshContent:c.default.createElement("h3",null,"Release to refresh"),pullDownToRefreshThreshold:100,disableBrowserPullToRefresh:!0},f.propTypes={next:s.default.func,hasMore:s.default.bool,children:s.default.node,loader:s.default.node.isRequired,scrollThreshold:s.default.oneOfType([s.default.number,s.default.string]),endMessage:s.default.node,style:s.default.object,height:s.default.number,scrollableTarget:s.default.node,hasChildren:s.default.bool,pullDownToRefresh:s.default.bool,pullDownToRefreshContent:s.default.node,releaseToRefreshContent:s.default.node,pullDownToRefreshThreshold:s.default.number,refreshFunction:s.default.func,onScroll:s.default.func,dataLength:s.default.number.isRequired,key:s.default.string},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseThreshold=function(e){return"number"==typeof e?{unit:n.Percent,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:n.Pixel,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:n.Percent,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),r):(console.warn("scrollThreshold should be string or number"),r)};var n={Pixel:"Pixel",Percent:"Percent"};t.ThresholdUnits=n;var r={unit:n.Percent,value:.8}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r,o;return t||(t=250),function(){var i=n||this,a=+new Date,c=arguments;r&&a<r+t?(clearTimeout(o),o=setTimeout((function(){r=a,e.apply(i,c)}),t)):(r=a,e.apply(i,c))}},e.exports=t.default},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,a,c){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,c],u=0;(s=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,t,n){"use strict";var r=n(3),o=n(4),i=n(7);e.exports=function(){function e(e,t,n,r,a,c){c!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){e.exports=n(5)()},function(e,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,n){t.exports=e}])},e.exports=r(n(787))},787:t=>{"use strict";t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";r.r(o),r.d(o,{default:()=>qt});var e=r(697),t=r.n(e),n=r(787),i=r.n(n);const a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){return t["data-".concat(function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}(n))]=e[n],t}),{})},c=function(e){return!e||Array.isArray(e)&&!e.length};var s,l;const u=(s=1,l=new WeakMap,{get:function(e){return l.has(e)||l.set(e,s++),"".concat("rdts").concat(l.get(e))},reset:function(){l=new WeakMap,s=1}}),f=function(e,t,n){if(Array.prototype.findIndex)return e.findIndex(t,n);if(!e)throw new TypeError("findIndex called on null or undefined");if("function"!=typeof t)throw new TypeError("findIndex predicate must be a function");for(var r=0;r<e.length;r++){var o=e[r];if(t.call(n,o,r,e))return r}return-1};function p(e,t){var n=function(e){return e?"#"===e[0]?{"aria-labelledby":e.substring(1).replace(/ #/g," ")}:{"aria-label":e}:{}}(e);return t&&(n["aria-labelledby"]="".concat(n["aria-labelledby"]||""," ").concat(t).trim()),n}function d(e){return d="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},d(e)}function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=v(r);if(o){var n=v(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}(this,e)});function c(e){var t,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),g(b(t=a.call(this,e)),"handleInputChange",(function(e){e.persist(),t.delayedCallback(e)})),t.delayedCallback=(n=function(e){return t.props.onInputChange(e.target.value)},function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var i=!r;clearTimeout(r),r=setTimeout((function(){r=null,n.apply(void 0,t)}),300),i&&n.apply(void 0,t)}),t}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.inputRef,n=e.texts,r=void 0===n?{}:n,o=e.onFocus,a=e.onBlur,c=e.disabled,s=e.readOnly,l=e.onKeyDown,u=e.activeDescendant,f=e.inlineSearchInput;return i().createElement("input",h({type:"text",disabled:c,ref:t,className:"search",placeholder:f?r.inlineSearchPlaceholder||"Search...":r.placeholder||"Choose...",onKeyDown:l,onChange:this.handleInputChange,onFocus:o,onBlur:a,readOnly:s,"aria-activedescendant":u,"aria-autocomplete":l?"list":void 0},p(r.label)))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);g(m,"propTypes",{tags:t().array,texts:t().object,onInputChange:t().func,onFocus:t().func,onBlur:t().func,onTagRemove:t().func,onKeyDown:t().func,inputRef:t().func,disabled:t().bool,readOnly:t().bool,activeDescendant:t().string,inlineSearchInput:t().bool});const w=m;function O(e){return O="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},O(e)}function j(e,t){return j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},j(e,t)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var P=function(e){return"".concat(e,"_tag")},x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_(r);if(o){var n=_(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return E(S(e=a.call.apply(a,[this].concat(n))),"handleClick",(function(t){var n=e.props,r=n.id,o=n.onDelete;t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),o(r,void 0!==(t.key||t.keyCode))})),E(S(e),"onKeyDown",(function(t){"Backspace"===t.key&&(e.handleClick(t),t.preventDefault())})),E(S(e),"onKeyUp",(function(t){(32===t.keyCode||["Delete","Enter"].indexOf(t.key)>-1)&&(e.handleClick(t),t.preventDefault())})),e}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.id,n=e.label,r=e.labelRemove,o=void 0===r?"Remove":r,a=e.readOnly,c=e.disabled,s=P(t),l="".concat(t,"_button"),u=["tag-remove",a&&"readOnly",c&&"disabled"].filter(Boolean).join(" "),f=a||c;return i().createElement("span",{className:"tag",id:s,"aria-label":n},n,i().createElement("button",{id:l,onClick:f?void 0:this.handleClick,onKeyDown:f?void 0:this.onKeyDown,onKeyUp:f?void 0:this.onKeyUp,className:u,type:"button","aria-label":o,"aria-labelledby":"".concat(l," ").concat(s),"aria-disabled":f},"x"))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);E(x,"propTypes",{id:t().string.isRequired,label:t().string.isRequired,onDelete:t().func,readOnly:t().bool,disabled:t().bool,labelRemove:t().string});const k=x;function T(e){return T="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},T(e)}function C(e,t){return C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},C(e,t)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function N(){return N=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N.apply(this,arguments)}var A,D,B,I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(s,e);var t,n,r,o,c=(r=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=R(r);if(o){var n=R(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return t=s,n=[{key:"render",value:function(){var e=this.props,t=e.tags,n=e.onTagRemove,r=e.texts,o=void 0===r?{}:r,c=e.disabled,s=e.readOnly,l=e.children||i().createElement("span",{className:"placeholder"},o.placeholder||"Choose...");return i().createElement("ul",{className:"tag-list"},function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(o){var c=o._id,s=o.label,l=o.tagClassName,u=o.dataset,f=o.tagLabel;return i().createElement("li",N({className:["tag-item",l].filter(Boolean).join(" "),key:"tag-item-".concat(c)},a(u)),i().createElement(k,{label:f||s,id:c,onDelete:e,readOnly:t,disabled:n||o.disabled,labelRemove:r}))}))}(t,n,s,c,o.labelRemove),i().createElement("li",{className:"tag-item"},l))}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(n.PureComponent);A=I,D="propTypes",B={tags:t().array,onTagRemove:t().func,readOnly:t().bool,disabled:t().bool,texts:t().object,children:t().node},D in A?Object.defineProperty(A,D,{value:B,enumerable:!0,configurable:!0,writable:!0}):A[D]=B;const F=I;function M(e){return M="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},M(e)}function L(){return L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(this,arguments)}function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e,t){return V=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},V(e,t)}function z(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q(e){return q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},q(e)}function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var H=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=q(r);if(o){var n=q(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===M(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return z(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return K(z(e=a.call.apply(a,[this].concat(n))),"getAriaAttributes",(function(){var t=e.props,n=t.mode,r=t.texts,o=void 0===r?{}:r,i=t.showDropdown,a=t.clientId,c=t.tags,s="".concat(a,"_trigger"),l=[],u=p(o.label);return c&&c.length&&(u["aria-label"]&&l.push(s),c.forEach((function(e){l.push(P(e._id))})),u=p(o.label,l.join(" "))),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){K(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:s,role:"button",tabIndex:e.props.tabIndex,"aria-haspopup":"simpleSelect"===n?"listbox":"tree","aria-expanded":i?"true":"false"},u)})),K(z(e),"handleTrigger",(function(t){t.key&&13!==t.keyCode&&32!==t.keyCode&&40!==t.keyCode||t.key&&e.triggerNode&&e.triggerNode!==document.activeElement||(e.props.showDropdown||32!==t.keyCode||t.preventDefault(),e.props.onTrigger(t))})),e}return t=c,(n=[{key:"render",value:function(){var e=this,t=this.props,n=t.disabled,r=t.readOnly,o=t.showDropdown,a=["dropdown-trigger","arrow",n&&"disabled",r&&"readOnly",o&&"top",!o&&"bottom"].filter(Boolean).join(" ");return i().createElement("a",L({ref:function(t){e.triggerNode=t},className:a,onClick:n?void 0:this.handleTrigger,onKeyDown:n?void 0:this.handleTrigger},this.getAriaAttributes()),this.props.children)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);K(H,"propTypes",{onTrigger:t().func,disabled:t().bool,readOnly:t().bool,showDropdown:t().bool,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),texts:t().object,clientId:t().string,tags:t().array,tabIndex:t().number});const W=H;var $=r(385),Y=r.n($);function J(e){return J="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},J(e)}function G(e,t){return G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},G(e,t)}function X(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Q(r);if(o){var n=Q(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return X(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Z(X(e=a.call.apply(a,[this].concat(n))),"handleClick",(function(){var t=e.props,n=t.onAction,r=t.actionData;n&&n(r.nodeId,r.action)})),e}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.title,n=e.className,r=e.text,o=e.readOnly;return i().createElement("i",{title:t,className:n,onClick:o?void 0:this.handleClick},r)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);Z(ee,"propTypes",{title:t().string,text:t().string,className:t().string,actionData:t().object,onAction:t().func,readOnly:t().bool}),Z(ee,"defaultProps",{onAction:function(){}});const te=ee;function ne(e){return ne="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},ne(e)}var re=["actions","id"];function oe(){return oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oe.apply(this,arguments)}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){le(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ce(e,t){return ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ce(e,t)}function se(e){return se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},se(e)}function le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ce(e,t)}(s,e);var t,n,r,o,a=(r=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=se(r);if(o){var n=se(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return t=s,(n=[{key:"render",value:function(){var e=this.props,t=e.actions,n=e.id,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,re);return c(t)?null:t.map((function(e,t){var o=e.id||"action-".concat(t);return i().createElement(te,oe({key:o},r,e,{actionData:{action:ae(ae({},e),{},{id:o}),nodeId:n}}))}))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(n.PureComponent);le(ue,"propTypes",{id:t().string.isRequired,actions:t().array});const fe=ue;function pe(e){return pe="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},pe(e)}var de=["checked","indeterminate","onChange","disabled","readOnly"];function he(){return he=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},he.apply(this,arguments)}function ye(e,t){return ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ye(e,t)}function be(e){return be=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},be(e)}var ve=function(e){var t=e.checked,n=e.indeterminate;return function(e){e&&(e.checked=t,e.indeterminate=n)}},ge=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ye(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=be(r);if(o){var n=be(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.apply(this,arguments)}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.checked,n=e.indeterminate,r=void 0!==n&&n,o=e.onChange,a=e.disabled,c=e.readOnly,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,de),l=a||c;return i().createElement("input",he({type:"checkbox",ref:ve({checked:t,indeterminate:r}),onChange:o,disabled:l},s))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(ge,"propTypes",{checked:t().bool,indeterminate:t().bool,onChange:t().func,disabled:t().bool,readOnly:t().bool});const me=ge;function we(e){return we="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},we(e)}var Oe=["name","checked","onChange","disabled","readOnly"];function je(){return je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},je.apply(this,arguments)}function Se(e,t){return Se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Se(e,t)}function _e(e){return _e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_e(e)}var Ee=function(e){var t=e.checked;return function(e){e&&(e.checked=t)}},Pe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Se(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_e(r);if(o){var n=_e(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===we(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.apply(this,arguments)}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.name,n=e.checked,r=e.onChange,o=e.disabled,a=e.readOnly,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Oe),s=o||a;return i().createElement("input",je({type:"radio",name:t,ref:Ee({checked:n}),onChange:r,disabled:s},c))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Pe,"propTypes",{name:t().string.isRequired,checked:t().bool,onChange:t().func,disabled:t().bool,readOnly:t().bool});const xe=Pe;function ke(e){return ke="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},ke(e)}function Te(){return Te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Te.apply(this,arguments)}function Ce(e,t){return Ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ce(e,t)}function Re(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ne(e){return Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ne(e)}function Ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var De=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ce(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ne(r);if(o){var n=Ne(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ke(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Re(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ae(Re(e=a.call.apply(a,[this].concat(n))),"handleCheckboxChange",(function(t){var n=e.props,r=n.mode,o=n.id;(0,n.onCheckboxChange)(o,"simpleSelect"===r||"radioSelect"===r||t.target.checked),t.stopPropagation(),t.nativeEvent.stopImmediatePropagation()})),e}return t=c,n=[{key:"render",value:function(){var e=this.props,t=e.mode,n=e.title,r=e.label,o=e.id,a=e.partial,c=e.checked,s=this.props,l=s.value,u=s.disabled,f=s.showPartiallySelected,p=s.readOnly,d=s.clientId,h={className:"node-label"};"simpleSelect"===t&&!p&&!u&&(h.onClick=this.handleCheckboxChange);var y={id:o,value:l,checked:c,disabled:u,readOnly:p,tabIndex:-1},b=["checkbox-item","simpleSelect"===t&&"simple-select"].filter(Boolean).join(" ");return i().createElement("label",{title:n||r,htmlFor:o},"radioSelect"===t?i().createElement(xe,Te({name:d,className:"radio-item",onChange:this.handleCheckboxChange},y)):i().createElement(me,Te({name:o,className:b,indeterminate:f&&a,onChange:this.handleCheckboxChange},y)),i().createElement("span",h,r))}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);Ae(De,"propTypes",{id:t().string.isRequired,actions:t().array,title:t().string,label:t().string.isRequired,value:t().string.isRequired,checked:t().bool,partial:t().bool,disabled:t().bool,dataset:t().object,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),showPartiallySelected:t().bool,onCheckboxChange:t().func,readOnly:t().bool,clientId:t().string});const Be=De;function Ie(e){return Ie="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},Ie(e)}function Fe(e,t){return Fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Fe(e,t)}function Me(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Le(e){return Le=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Le(e)}function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ve=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fe(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Le(r);if(o){var n=Le(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Me(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ue(Me(e=a.call.apply(a,[this].concat(n))),"onToggle",(function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),e.props.onNodeToggle(e.props.id)})),Ue(Me(e),"onKeyDown",(function(t){"Enter"!==t.key&&32!==t.keyCode||(e.props.onNodeToggle(e.props.id),t.preventDefault())})),e}return t=c,n=[{key:"render",value:function(){var e=this.props,t=e.expanded,n=e.isLeaf,r=["toggle",t&&"expanded",!t&&"collapsed"].filter(Boolean).join(" ");return n?i().createElement("i",{role:"button",tabIndex:-1,className:r,style:{visibility:"hidden"},"aria-hidden":!0}):i().createElement("i",{role:"button",tabIndex:-1,className:r,onClick:this.onToggle,onKeyDown:this.onKeyDown,"aria-hidden":!0})}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);Ue(Ve,"propTypes",{expanded:t().bool,isLeaf:t().bool,onNodeToggle:t().func,id:t().string});const ze=Ve;function qe(e){return qe="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},qe(e)}function Ke(){return Ke=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ke.apply(this,arguments)}function He(e,t){return He=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},He(e,t)}function We(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $e(e){return $e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},$e(e)}function Ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Je=function(e){return c(e)},Ge=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&He(e,t)}(s,e);var t,n,r,o,c=(r=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=$e(r);if(o){var n=$e(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return We(e)}(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ye(We(e=c.call.apply(c,[this].concat(n))),"getAriaAttributes",(function(){var t=e.props,n=t._children,r=t._depth,o=t.checked,i=t.disabled,a=t.expanded,c=t.readOnly,s=t.mode,l=t.partial,u={};return u.role="simpleSelect"===s?"option":"treeitem",u["aria-disabled"]=i||c,u["aria-selected"]=o,"simpleSelect"!==s&&(u["aria-checked"]=l?"mixed":o,u["aria-level"]=(r||0)+1,u["aria-expanded"]=n&&(a?"true":"false")),u})),e}return t=s,n=[{key:"render",value:function(){var e=this.props,t=e.mode,n=e.keepTreeOnSearch,r=e._id,o=e._children,c=e.dataset,s=e._depth,l=e.expanded,u=e.title,f=e.label,p=e.partial,d=e.checked,h=e.value,y=e.disabled,b=e.actions,v=e.onAction,g=e.searchModeOn,m=e.onNodeToggle,w=e.onCheckboxChange,O=e.showPartiallySelected,j=e.readOnly,S=e.clientId,_=function(e){var t=e.keepTreeOnSearch,n=e.keepChildrenOnSearch,r=e._children,o=e.matchInChildren,i=e.matchInParent,a=e.disabled,c=e.partial,s=e.hide,l=e.className,u=e.showPartiallySelected,f=e.readOnly,p=e.checked,d=e._focused;return["node",Je(r)&&"leaf",!Je(r)&&"tree",a&&"disabled",s&&"hide",t&&o&&"match-in-children",t&&n&&i&&"match-in-parent",u&&c&&"partial",f&&"readOnly",p&&"checked",d&&"focused",l].filter(Boolean).join(" ")}(this.props),E=n||!g?{paddingLeft:"".concat(20*(s||0),"px")}:{},P="".concat(r,"_li");return i().createElement("li",Ke({className:_,style:E,id:P},a(c),this.getAriaAttributes()),i().createElement(ze,{isLeaf:Je(o),expanded:l,id:r,onNodeToggle:m}),i().createElement(Be,{title:u,label:f,id:r,partial:p,checked:d,value:h,disabled:y,mode:t,onCheckboxChange:w,showPartiallySelected:O,readOnly:j,clientId:S}),i().createElement(fe,{actions:b,onAction:v,id:r,readOnly:j}))}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(n.PureComponent);Ye(Ge,"propTypes",{_id:t().string.isRequired,_depth:t().number,_children:t().array,actions:t().array,className:t().string,title:t().string,label:t().string.isRequired,value:t().string.isRequired,checked:t().bool,expanded:t().bool,disabled:t().bool,partial:t().bool,dataset:t().object,keepTreeOnSearch:t().bool,keepChildrenOnSearch:t().bool,searchModeOn:t().bool,onNodeToggle:t().func,onAction:t().func,onCheckboxChange:t().func,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),showPartiallySelected:t().bool,readOnly:t().bool,clientId:t().string});const Xe=Ge;function Qe(e){return Qe="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},Qe(e)}function Ze(){return Ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ze.apply(this,arguments)}function et(e,t){return et=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},et(e,t)}function tt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nt(e){return nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},nt(e)}function rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ot=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&et(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=nt(r);if(o){var n=nt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return tt(e)}(this,e)});function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),rt(tt(t=a.call(this,e)),"UNSAFE_componentWillReceiveProps",(function(e){var n=e.activeDescendant===t.props.activeDescendant;t.computeInstanceProps(e,!n),t.setState({items:t.allVisibleNodes.slice(0,t.currentPage*t.props.pageSize)})})),rt(tt(t),"componentDidMount",(function(){t.setState({scrollableTarget:t.node.parentNode})})),rt(tt(t),"computeInstanceProps",(function(e,n){if(t.allVisibleNodes=t.getNodes(e),t.totalPages=Math.ceil(t.allVisibleNodes.length/t.props.pageSize),n&&e.activeDescendant){var r=e.activeDescendant.replace(/_li$/,""),o=f(t.allVisibleNodes,(function(e){return e.key===r}))+1;t.currentPage=o>0?Math.ceil(o/t.props.pageSize):1}})),rt(tt(t),"shouldRenderNode",(function(e,t){var n=t.data,r=t.searchModeOn,o=e.expanded,i=e._parent;if(r||o)return!0;var a=i&&n.get(i);return!a||a.expanded})),rt(tt(t),"getNodes",(function(e){var n=e.data,r=e.keepTreeOnSearch,o=e.keepChildrenOnSearch,a=e.searchModeOn,c=e.mode,s=e.showPartiallySelected,l=e.readOnly,u=e.onAction,f=e.onChange,p=e.onCheckboxChange,d=e.onNodeToggle,h=e.activeDescendant,y=e.clientId,b=[];return n.forEach((function(n){t.shouldRenderNode(n,e)&&b.push(i().createElement(Xe,Ze({keepTreeOnSearch:r,keepChildrenOnSearch:o,key:n._id},n,{searchModeOn:a,onChange:f,onCheckboxChange:p,onNodeToggle:d,onAction:u,mode:c,showPartiallySelected:s,readOnly:l,clientId:y,activeDescendant:h})))})),b})),rt(tt(t),"hasMore",(function(){return t.currentPage<t.totalPages})),rt(tt(t),"loadMore",(function(){t.currentPage=t.currentPage+1;var e=t.allVisibleNodes.slice(0,t.currentPage*t.props.pageSize);t.setState({items:e})})),rt(tt(t),"setNodeRef",(function(e){t.node=e})),rt(tt(t),"getAriaAttributes",(function(){var e=t.props.mode;return{role:"simpleSelect"===e?"listbox":"tree","aria-multiselectable":/multiSelect|hierarchical/.test(e)}})),t.currentPage=1,t.computeInstanceProps(e,!0),t.state={items:t.allVisibleNodes.slice(0,t.props.pageSize)},t}return t=c,(n=[{key:"render",value:function(){var e=this.props.searchModeOn;return i().createElement("ul",Ze({className:"root ".concat(e?"searchModeOn":""),ref:this.setNodeRef},this.getAriaAttributes()),this.state.scrollableTarget&&i().createElement(Y(),{dataLength:this.state.items.length,next:this.loadMore,hasMore:this.hasMore(),loader:i().createElement("span",{className:"searchLoader"},"Loading..."),scrollableTarget:this.state.scrollableTarget},this.state.items))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.Component);rt(ot,"propTypes",{data:t().object,keepTreeOnSearch:t().bool,keepChildrenOnSearch:t().bool,searchModeOn:t().bool,onChange:t().func,onNodeToggle:t().func,onAction:t().func,onCheckboxChange:t().func,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),showPartiallySelected:t().bool,pageSize:t().number,readOnly:t().bool,clientId:t().string,activeDescendant:t().string}),rt(ot,"defaultProps",{pageSize:100});const it=ot;var at=r(865),ct=r.n(at),st=function(e){return e};const lt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"children",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:st;return ct()(e[t],(function(e){return n(e).checked}))||e[t].some((function(e){return n(e).partial}))};function ut(e){var t=e.nodes,n=e.parent,r=e.depth,o=void 0===r?0:r,i=e.simple,a=e.radio,s=e.showPartialState,l=e.hierarchical,u=e.rootPrefixId,f=e._rv,p=void 0===f?{list:new Map,defaultValues:[],singleSelectedNode:null}:f,d=i||a;return t.forEach((function(e,t){e._depth=o,n?(e._id=e.id||"".concat(n._id,"-").concat(t),e._parent=n._id,n._children.push(e._id)):e._id=e.id||"".concat(u?"".concat(u,"-").concat(t):t),d&&e.checked&&(p.singleSelectedNode?e.checked=!1:p.singleSelectedNode=e),d&&e.isDefaultValue&&p.singleSelectedNode&&!p.singleSelectedNode.isDefaultValue&&(p.singleSelectedNode.checked=!1,p.singleSelectedNode=null),!e.isDefaultValue||d&&0!==p.defaultValues.length||(p.defaultValues.push(e._id),e.checked=!0,d&&(p.singleSelectedNode=e)),l&&!a||function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?["disabled"]:["checked","disabled"],r=0;r<n.length;r++){var o=n[r];void 0===e[o]&&void 0!==t[o]&&(e[o]=t[o])}}(e,n,!a),p.list.set(e._id,e),!i&&e.children&&(e._children=[],ut({nodes:e.children,parent:e,depth:o+1,radio:a,showPartialState:s,hierarchical:l,_rv:p}),s&&!e.checked&&(e.partial=lt(e),d||c(e.children)||!e.children.every((function(e){return e.checked}))||(e.checked=!0)),e.children=void 0)})),p}const ft=function(e){var t=e.tree,n=e.simple,r=e.radio,o=e.showPartialState,i=e.hierarchical,a=e.rootPrefixId;return ut({nodes:Array.isArray(t)?t:[t],simple:n,radio:r,showPartialState:o,hierarchical:i,rootPrefixId:a})};var pt=function e(t,n,r){n[t._id]=!0,c(t._children)||t._children.forEach((function(t){return e(r(t),n,r)}))},dt=function(e,t){var n=[],r={};return e.forEach((function(e,o){r[o]||(t(e,o,r)&&n.push(e),r[o]=!0)})),n},ht={getNodesMatching:dt,getVisibleNodes:function(e,t,n){return dt(e,(function(e,r,o){return n&&e._children&&e._children.length&&!0!==e.expanded&&pt(e,o,t),!e.hide}))},markSubTreeVisited:pt};const yt=ht;function bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var vt="ArrowUp",gt="ArrowDown",mt="ArrowLeft",wt="ArrowRight",Ot="Enter",jt="Home",St="PageUp",_t="PageDown",Et={None:"None",FocusPrevious:"FocusPrevious",FocusNext:"FocusNext",FocusParent:"FocusParent",FocusFirst:"FocusFirst",FocusLast:"FocusLast",ToggleExpanded:"ToggleExpanded",ToggleChecked:"ToggleChecked"},Pt=new Set([Et.FocusPrevious,Et.FocusNext,Et.FocusParent,Et.FocusFirst,Et.FocusLast]),xt=[vt,gt,jt,St,"End",_t],kt=xt.concat([mt,wt,Ot]),Tt=function(e,t,n,r){return t.indexOf(e)>-1||!n&&e===r},Ct={isValidKey:function(e,t){return(t?kt:xt).indexOf(e)>-1},getAction:function(e,t){var n;return n=t===mt?function(e,t){return e&&t===mt?!0===e.expanded?Et.ToggleExpanded:e._parent?Et.FocusParent:Et.None:Et.None}(e,t):t===wt?function(e,t){return e&&e._children&&t===wt?!0!==e.expanded?Et.ToggleExpanded:Et.FocusNext:Et.None}(e,t):function(e,t){return Tt(e,[jt,St],t,gt)}(t,e)?Et.FocusFirst:function(e,t){return Tt(e,["End",_t],t,vt)}(t,e)?Et.FocusLast:function(e,t){if(!e)return Et.None;switch(t){case vt:return Et.FocusPrevious;case gt:return Et.FocusNext;case Ot:return Et.ToggleChecked;default:return Et.None}}(e,t),n},getNextFocus:function(e,t,n,r,o){if(n===Et.FocusParent)return function(e,t){return e&&e._parent?t(e._parent):e}(t,r);if(!Pt.has(n))return t;var i=yt.getVisibleNodes(e,r,o);return function(e){return Tt(e,[Et.FocusPrevious,Et.FocusLast],!0)}(n)&&(i=i.reverse()),function(e,t,n){if(!e||0===e.length)return t;var r,o=t;return function(e){return Tt(e,[Et.FocusFirst,Et.FocusLast],!0)}(n)?o=(r=e,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(r)||function(e,t){if(e){if("string"==typeof e)return bt(e,1);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bt(e,1):void 0}}(r)||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.")}())[0]:[Et.FocusPrevious,Et.FocusNext].indexOf(n)>-1&&(o=function(e,t){var n=e.indexOf(t)+1;return n%e.length==0?e[0]:e[n]}(e,t)),o}(i,t,n)},getNextFocusAfterTagDelete:function(e,t,n,r){var o=t?f(t,(function(t){return t._id===e})):-1;if(o<0||!n.length)return r;var i=n[o=n.length>o?o:n.length-1]._id,a=document.getElementById(P(i));return a&&a.firstElementChild||r},handleFocusNavigationkey:function(e,t,n,r,o){var i=Ct.getNextFocus(e,n,t,r,o);return Ct.adjustFocusedProps(n,i),i?i._id:n&&n._id},handleToggleNavigationkey:function(e,t,n,r,o){return e!==Et.ToggleChecked||n||t.readOnly||t.disabled?e===Et.ToggleExpanded&&o(t._id):r(t._id,!0!==t.checked),t&&t._id},adjustFocusedProps:function(e,t){e&&t&&e._id!==t._id&&(e._focused=!1),t&&(t._focused=!0)}};const Rt=Ct;var Nt=function(){function e(t){var n=t.data,r=t.mode,o=t.showPartiallySelected,i=t.rootPrefixId,a=t.searchPredicate;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._src=n,this.simpleSelect="simpleSelect"===r,this.radioSelect="radioSelect"===r,this.hierarchical="hierarchical"===r,this.searchPredicate=a;var c=ft({tree:JSON.parse(JSON.stringify(n)),simple:this.simpleSelect,radio:this.radioSelect,showPartialState:o,hierarchical:this.hierarchical,rootPrefixId:i}),s=c.list,l=c.defaultValues,u=c.singleSelectedNode;this.tree=s,this.defaultValues=l,this.showPartialState=!this.hierarchical&&o,this.searchMaps=new Map,(this.simpleSelect||this.radioSelect)&&u&&(this.currentChecked=u._id)}var t,n;return t=e,n=[{key:"getNodeById",value:function(e){return this.tree.get(e)}},{key:"getMatches",value:function(e){var t=this;if(this.searchMaps.has(e))return this.searchMaps.get(e);var n=-1,r=e;this.searchMaps.forEach((function(t,o){e.startsWith(o)&&o.length>n&&(n=o.length,r=o)}));var o=[],i=this._getAddOnMatch(o,e);return r!==e?this.searchMaps.get(r).forEach((function(e){return i(t.getNodeById(e))})):this.tree.forEach(i),this.searchMaps.set(e,o),o}},{key:"addParentsToTree",value:function(e,t){if(void 0!==e){var n=this.getNodeById(e);this.addParentsToTree(n._parent,t),n.hide=!n._isMatch||n.hide,n.matchInChildren=!0,t.set(e,n)}}},{key:"addChildrenToTree",value:function(e,t,n){var r=this;void 0!==e&&e.forEach((function(e){if(!n||!n.includes(e)){var o=r.getNodeById(e);o.matchInParent=!0,t.set(e,o),r.addChildrenToTree(o._children,t)}}))}},{key:"filterTree",value:function(e,t,n){var r=this,o=this.getMatches(e.toLowerCase()),i=new Map;o.forEach((function(e){var a=r.getNodeById(e);a.hide=!1,a._isMatch=!0,t&&r.addParentsToTree(a._parent,i),i.set(e,a),t&&n&&r.addChildrenToTree(a._children,i,o)}));var a=0===o.length;return this.matchTree=i,{allNodesHidden:a,tree:i}}},{key:"restoreNodes",value:function(){return this.tree.forEach((function(e){e.hide=!1})),this.tree}},{key:"restoreDefaultValues",value:function(){var e=this;return this.defaultValues.forEach((function(t){e.setNodeCheckedState(t,!0)})),this.tree}},{key:"togglePreviousChecked",value:function(e,t){var n=this.currentChecked;if(n&&n!==e){var r=this.getNodeById(n);r.checked=!1,this.radioSelect&&this.showPartialState&&this.partialCheckParents(r)}this.currentChecked=t?e:null}},{key:"setNodeCheckedState",value:function(e,t){this.radioSelect&&this.togglePreviousChecked(e,t);var n=this.getNodeById(e);n.checked=t,this.showPartialState&&(n.partial=!1),this.simpleSelect?this.togglePreviousChecked(e,t):this.radioSelect?(this.showPartialState&&this.partialCheckParents(n),t||this.unCheckParents(n)):(this.hierarchical||this.toggleChildren(e,t),this.showPartialState&&this.partialCheckParents(n),this.hierarchical||t||this.unCheckParents(n))}},{key:"unCheckParents",value:function(e){for(var t=e._parent;t;){var n=this.getNodeById(t);n.checked=!1,n.partial=lt(n,"_children",this.getNodeById.bind(this)),t=n._parent}}},{key:"partialCheckParents",value:function(e){for(var t=this,n=e._parent;n;){var r=this.getNodeById(n);r.checked=r._children.every((function(e){return t.getNodeById(e).checked})),r.partial=lt(r,"_children",this.getNodeById.bind(this)),n=r._parent}}},{key:"toggleChildren",value:function(e,t){var n=this,r=this.getNodeById(e);r.checked=t,this.showPartialState&&(r.partial=!1),c(r._children)||r._children.forEach((function(e){return n.toggleChildren(e,t)}))}},{key:"toggleNodeExpandState",value:function(e){var t=this.getNodeById(e);return t.expanded=!t.expanded,t.expanded||this.collapseChildren(t),this.tree}},{key:"collapseChildren",value:function(e){var t=this;e.expanded=!1,c(e._children)||e._children.forEach((function(e){return t.collapseChildren(t.getNodeById(e))}))}},{key:"tags",get:function(){var e=this;return this.radioSelect||this.simpleSelect?this.currentChecked?[this.getNodeById(this.currentChecked)]:[]:yt.getNodesMatching(this.tree,(function(t,n,r){return t.checked&&!e.hierarchical&&yt.markSubTreeVisited(t,r,(function(t){return e.getNodeById(t)})),t.checked}))}},{key:"getTreeAndTags",value:function(){return{tree:this.tree,tags:this.tags}}},{key:"handleNavigationKey",value:function(e,t,n,r,o,i,a){var c=this,s=e&&this.getNodeById(e),l=Rt.getAction(s,n);return Pt.has(l)?Rt.handleFocusNavigationkey(t,l,s,(function(e){return c.getNodeById(e)}),o):s&&t.has(s._id)?Rt.handleToggleNavigationkey(l,s,r,i,a):e}},{key:"_getAddOnMatch",value:function(e,t){var n=function(e,t){return e.label.toLowerCase().indexOf(t)>=0};return"function"==typeof this.searchPredicate&&(n=this.searchPredicate),function(r){n(r,t)&&e.push(r._id)}}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();const At=Nt;function Dt(e){return Dt="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},Dt(e)}function Bt(){return Bt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bt.apply(this,arguments)}function It(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?It(Object(n),!0).forEach((function(t){Vt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):It(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mt(e,t){return Mt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Mt(e,t)}function Lt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ut(e){return Ut=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ut(e)}function Vt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mt(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ut(r);if(o){var n=Ut(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Dt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Lt(e)}(this,e)});function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),Vt(Lt(t=a.call(this,e)),"initNewProps",(function(e){var n=e.data,r=e.mode,o=e.showDropdown,i=e.showPartiallySelected,a=e.searchPredicate;t.treeManager=new At({data:n,mode:r,showPartiallySelected:i,rootPrefixId:t.clientId,searchPredicate:a}),t.setState((function(e){var n=e.currentFocus&&t.treeManager.getNodeById(e.currentFocus);return n&&(n._focused=!0),Ft({showDropdown:/initial|always/.test(o)||!0===e.showDropdown},t.treeManager.getTreeAndTags())}))})),Vt(Lt(t),"resetSearchState",(function(){return t.searchInput&&(t.searchInput.value=""),{tree:t.treeManager.restoreNodes(),searchModeOn:!1,allNodesHidden:!1}})),Vt(Lt(t),"handleClick",(function(e,n){t.setState((function(e){var n="always"===t.props.showDropdown||t.keepDropdownActive||!e.showDropdown;return n!==e.showDropdown&&(n?document.addEventListener("click",t.handleOutsideClick,!1):document.removeEventListener("click",t.handleOutsideClick,!1)),n?t.props.onFocus():t.props.onBlur(),n?{showDropdown:n}:Ft({showDropdown:n},t.resetSearchState())}),n)})),Vt(Lt(t),"handleOutsideClick",(function(e){"always"!==t.props.showDropdown&&function(e,t){return e instanceof Event&&!function(e){if(e.path)return e.path;for(var t=e.target,n=[t];t.parentElement;)t=t.parentElement,n.unshift(t);return n}(e).some((function(e){return e===t}))}(e,t.node)&&t.handleClick()})),Vt(Lt(t),"onInputChange",(function(e){var n=e.length>0;if(n){var r=t.treeManager.filterTree(e,t.props.keepTreeOnSearch,t.props.keepChildrenOnSearch),o=r.allNodesHidden,i=r.tree;t.setState({tree:i,searchModeOn:n,allNodesHidden:o})}else t.setState(t.resetSearchState())})),Vt(Lt(t),"onTagRemove",(function(e,n){var r=t.state.tags;t.onCheckboxChange(e,!1,(function(o){n&&Rt.getNextFocusAfterTagDelete(e,r,o,t.searchInput).focus()}))})),Vt(Lt(t),"onNodeToggle",(function(e){t.treeManager.toggleNodeExpandState(e);var n=t.state.searchModeOn?t.treeManager.matchTree:t.treeManager.tree;t.setState({tree:n}),"function"==typeof t.props.onNodeToggle&&t.props.onNodeToggle(t.treeManager.getNodeById(e))})),Vt(Lt(t),"onCheckboxChange",(function(e,n,r){var o=t.props,i=o.mode,a=o.keepOpenOnSelect,c=o.clearSearchOnChange,s=t.state,l=s.currentFocus,u=s.searchModeOn;t.treeManager.setNodeCheckedState(e,n);var f=t.treeManager.tags,p=["simpleSelect","radioSelect"].indexOf(i)>-1,d=!(p&&!a)&&t.state.showDropdown,h=l&&t.treeManager.getNodeById(l),y=t.treeManager.getNodeById(e);f.length||(t.treeManager.restoreDefaultValues(),f=t.treeManager.tags);var b={tree:u?t.treeManager.matchTree:t.treeManager.tree,tags:f,showDropdown:d,currentFocus:e};(p&&!d||c)&&Object.assign(b,t.resetSearchState()),p&&!d&&document.removeEventListener("click",t.handleOutsideClick,!1),Rt.adjustFocusedProps(h,y),t.setState(b,(function(){r&&r(f)})),t.props.onChange(y,f)})),Vt(Lt(t),"onAction",(function(e,n){t.props.onAction(t.treeManager.getNodeById(e),n)})),Vt(Lt(t),"onInputFocus",(function(){t.keepDropdownActive=!0})),Vt(Lt(t),"onInputBlur",(function(){t.keepDropdownActive=!1})),Vt(Lt(t),"onTrigger",(function(e){t.handleClick(e,(function(){t.state.showDropdown&&t.searchInput.focus()}))})),Vt(Lt(t),"onKeyboardKeyDown",(function(e){var n=t.props,r=n.readOnly,o=n.mode,i=n.disablePoppingOnBackspace,a=t.state,c=a.showDropdown,s=a.tags,l=a.searchModeOn,u=a.currentFocus,f=t.treeManager,p=l?f.matchTree:f.tree;if(c||!Rt.isValidKey(e.key,!1)&&!/^\w$/i.test(e.key))if(c&&Rt.isValidKey(e.key,!0)){var d=f.handleNavigationKey(u,p,e.key,r,!l,t.onCheckboxChange,t.onNodeToggle);d!==u&&t.setState({currentFocus:d},(function(){var e=document&&document.getElementById("".concat(d,"_li"));e&&e.scrollIntoView()}))}else{if(c&&["Escape","Tab"].indexOf(e.key)>-1)return void("simpleSelect"===o&&p.has(u)?t.onCheckboxChange(u,!0):(t.keepDropdownActive=!1,t.handleClick()));if(i||"Backspace"!==e.key||!s.length||0!==t.searchInput.value.length)return;var h=s.pop();t.onCheckboxChange(h._id,!1)}else if(e.persist(),t.handleClick(null,(function(){return t.onKeyboardKeyDown(e)})),/\w/i.test(e.key))return;e.preventDefault()})),Vt(Lt(t),"getAriaAttributes",(function(){var e=t.props,n=e.mode,r=e.texts;return"radioSelect"!==n?{}:Ft({role:"radiogroup"},p(r.label))})),t.state={searchModeOn:!1,currentFocus:void 0},t.clientId=e.id||u.get(Lt(t)),t}return t=c,(n=[{key:"UNSAFE_componentWillMount",value:function(){this.initNewProps(this.props)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handleOutsideClick,!1)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.initNewProps(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.disabled,r=t.readOnly,o=t.mode,a=t.texts,c=t.inlineSearchInput,s=t.tabIndex,l=this.state,u=l.showDropdown,f=l.currentFocus,p=l.tags,d={disabled:n,readOnly:r,activeDescendant:f?"".concat(f,"_li"):void 0,texts:a,mode:o,clientId:this.clientId},h=i().createElement(w,Bt({inputRef:function(t){e.searchInput=t},onInputChange:this.onInputChange,onFocus:this.onInputFocus,onBlur:this.onInputBlur,onKeyDown:this.onKeyboardKeyDown},d,{inlineSearchInput:c}));return i().createElement("div",{id:this.clientId,className:[this.props.className&&this.props.className,"react-dropdown-tree-select"].filter(Boolean).join(" "),ref:function(t){e.node=t}},i().createElement("div",{className:["dropdown","simpleSelect"===o&&"simple-select","radioSelect"===o&&"radio-select"].filter(Boolean).join(" ")},i().createElement(W,Bt({onTrigger:this.onTrigger,showDropdown:u},d,{tags:p,tabIndex:s}),i().createElement(F,Bt({tags:p,onTagRemove:this.onTagRemove},d),!c&&h)),u&&i().createElement("div",Bt({className:"dropdown-content"},this.getAriaAttributes()),c&&h,this.state.allNodesHidden?i().createElement("span",{className:"no-matches"},a.noMatches||"No matches found"):i().createElement(it,Bt({data:this.state.tree,keepTreeOnSearch:this.props.keepTreeOnSearch,keepChildrenOnSearch:this.props.keepChildrenOnSearch,searchModeOn:this.state.searchModeOn,onAction:this.onAction,onCheckboxChange:this.onCheckboxChange,onNodeToggle:this.onNodeToggle,mode:o,showPartiallySelected:this.props.showPartiallySelected},d)))))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.Component);Vt(zt,"propTypes",{data:t().oneOfType([t().object,t().array]).isRequired,clearSearchOnChange:t().bool,keepTreeOnSearch:t().bool,keepChildrenOnSearch:t().bool,keepOpenOnSelect:t().bool,texts:t().shape({placeholder:t().string,inlineSearchPlaceholder:t().string,noMatches:t().string,label:t().string,labelRemove:t().string}),showDropdown:t().oneOf(["default","initial","always"]),className:t().string,onChange:t().func,onAction:t().func,onNodeToggle:t().func,onFocus:t().func,onBlur:t().func,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),showPartiallySelected:t().bool,disabled:t().bool,readOnly:t().bool,id:t().string,searchPredicate:t().func,inlineSearchInput:t().bool,tabIndex:t().number,disablePoppingOnBackspace:t().bool}),Vt(zt,"defaultProps",{onAction:function(){},onFocus:function(){},onBlur:function(){},onChange:function(){},texts:{},showDropdown:"default",inlineSearchInput:!1,tabIndex:0,disablePoppingOnBackspace:!1});const qt=zt})(),o})(),e.exports=r(n(9196))},9196:function(e){"use strict";e.exports=window.React}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=t,e=[],r.O=function(t,n,o,i){if(!n){var a=1/0;for(u=0;u<e.length;u++){n=e[u][0],o=e[u][1],i=e[u][2];for(var c=!0,s=0;s<n.length;s++)(!1&i||a>=i)&&Object.keys(r.O).every((function(e){return r.O[e](n[s])}))?n.splice(s--,1):(c=!1,i<a&&(a=i));if(c){e.splice(u--,1);var l=o();void 0!==l&&(t=l)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,o,i]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&!e;)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}(),function(){var e={826:0,431:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,i,a=n[0],c=n[1],s=n[2],l=0;if(a.some((function(t){return 0!==e[t]}))){for(o in c)r.o(c,o)&&(r.m[o]=c[o]);if(s)var u=s(r)}for(t&&t(n);l<a.length;l++)i=a[l],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return r.O(u)},n=self.webpackChunkopen_video_block=self.webpackChunkopen_video_block||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var o=r.O(void 0,[431],(function(){return r(2168)}));o=r.O(o)}();
     1!function(){var e,t={2168:function(e,t,n){"use strict";var r=window.wp.blocks,o=window.wp.element;window.wp.i18n,n(9196),n(1038),n(8446);var i=window.wp.blockEditor,a=window.wp.components,c=window.wp.data,s=window.wp.apiFetch,l=n.n(s);function u(e,t){return function(){return e.apply(t,arguments)}}const{toString:f}=Object.prototype,{getPrototypeOf:p}=Object,d=(h=Object.create(null),e=>{const t=f.call(e);return h[t]||(h[t]=t.slice(8,-1).toLowerCase())});var h;const y=e=>(e=e.toLowerCase(),t=>d(t)===e),b=e=>t=>typeof t===e,{isArray:v}=Array,g=b("undefined"),m=y("ArrayBuffer"),w=b("string"),O=b("function"),j=b("number"),S=e=>null!==e&&"object"==typeof e,_=e=>{if("object"!==d(e))return!1;const t=p(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},E=y("Date"),P=y("File"),x=y("Blob"),k=y("FileList"),T=y("URLSearchParams");function C(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),v(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function R(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,A=e=>!g(e)&&e!==N,D=(B="undefined"!=typeof Uint8Array&&p(Uint8Array),e=>B&&e instanceof B);var B;const I=y("HTMLFormElement"),F=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),M=y("RegExp"),L=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};C(n,((n,o)=>{!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},U="abcdefghijklmnopqrstuvwxyz",V="0123456789",z={DIGIT:V,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+V},q=y("AsyncFunction");var K={isArray:v,isArrayBuffer:m,isBuffer:function(e){return null!==e&&!g(e)&&null!==e.constructor&&!g(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||O(e.append)&&("formdata"===(t=d(e))||"object"===t&&O(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer),t},isString:w,isNumber:j,isBoolean:e=>!0===e||!1===e,isObject:S,isPlainObject:_,isUndefined:g,isDate:E,isFile:P,isBlob:x,isRegExp:M,isFunction:O,isStream:e=>S(e)&&O(e.pipe),isURLSearchParams:T,isTypedArray:D,isFileList:k,forEach:C,merge:function e(){const{caseless:t}=A(this)&&this||{},n={},r=(r,o)=>{const i=t&&R(n,o)||o;_(n[i])&&_(r)?n[i]=e(n[i],r):_(r)?n[i]=e({},r):v(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&C(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(C(t,((t,r)=>{n&&O(t)?e[r]=u(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&p(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:d,kindOfTest:y,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(v(e))return e;let t=e.length;if(!j(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:I,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:L,freezeMethods:e=>{L(e,((t,n)=>{if(O(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];O(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return v(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:R,global:N,isContextDefined:A,ALPHABET:z,generateString:(e=16,t=z.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&O(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(S(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=v(e)?[]:{};return C(e,((e,t)=>{const i=n(e,r+1);!g(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:q,isThenable:e=>e&&(S(e)||O(e))&&O(e.then)&&O(e.catch)};function H(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}K.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:K.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const W=H.prototype,$={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{$[e]={value:e}})),Object.defineProperties(H,$),Object.defineProperty(W,"isAxiosError",{value:!0}),H.from=(e,t,n,r,o,i)=>{const a=Object.create(W);return K.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),H.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var Y=H;function J(e){return K.isPlainObject(e)||K.isArray(e)}function G(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function X(e,t,n){return e?e.concat(t).map((function(e,t){return e=G(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Q=K.toFlatObject(K,{},null,(function(e){return/^is[A-Z]/.test(e)}));var Z=function(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!K.isUndefined(t[e])}))).metaTokens,o=n.visitor||l,i=n.dots,a=n.indexes,c=(n.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(o))throw new TypeError("visitor must be a function");function s(e){if(null===e)return"";if(K.isDate(e))return e.toISOString();if(!c&&K.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(e)||K.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,o){let c=e;if(e&&!o&&"object"==typeof e)if(K.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(K.isArray(e)&&function(e){return K.isArray(e)&&!e.some(J)}(e)||(K.isFileList(e)||K.endsWith(n,"[]"))&&(c=K.toArray(e)))return n=G(n),c.forEach((function(e,r){!K.isUndefined(e)&&null!==e&&t.append(!0===a?X([n],r,i):null===a?n:n+"[]",s(e))})),!1;return!!J(e)||(t.append(X(o,n,i),s(e)),!1)}const u=[],f=Object.assign(Q,{defaultVisitor:l,convertValue:s,isVisitable:J});if(!K.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!K.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),K.forEach(n,(function(n,i){!0===(!(K.isUndefined(n)||null===n)&&o.call(t,n,K.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),u.pop()}}(e),t};function ee(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function te(e,t){this._pairs=[],e&&Z(e,this,t)}const ne=te.prototype;ne.append=function(e,t){this._pairs.push([e,t])},ne.toString=function(e){const t=e?function(t){return e.call(this,t,ee)}:ee;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var re=te;function oe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ie(e,t,n){if(!t)return e;const r=n&&n.encode||oe,o=n&&n.serialize;let i;if(i=o?o(t,n):K.isURLSearchParams(t)?t.toString():new re(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}var ae=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){K.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},se={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:re,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]},le=function(e){function t(e,n,r,o){let i=e[o++];const a=Number.isFinite(+i),c=o>=e.length;return i=!i&&K.isArray(r)?r.length:i,c?(K.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&K.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&K.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a)}if(K.isFormData(e)&&K.isFunction(e.entries)){const n={};return K.forEachEntry(e,((e,r)=>{t(function(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const ue={"Content-Type":void 0},fe={transitional:ce,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=K.isObject(e);if(o&&K.isHTMLForm(e)&&(e=new FormData(e)),K.isFormData(e))return r&&r?JSON.stringify(le(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Z(e,new se.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return se.isNode&&K.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=K.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Z(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(K.isString(e))try{return(0,JSON.parse)(e),K.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||fe.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&K.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Y.from(e,Y.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:se.classes.FormData,Blob:se.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};K.forEach(["delete","get","head"],(function(e){fe.headers[e]={}})),K.forEach(["post","put","patch"],(function(e){fe.headers[e]=K.merge(ue)}));var pe=fe;const de=K.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),he=Symbol("internals");function ye(e){return e&&String(e).trim().toLowerCase()}function be(e){return!1===e||null==e?e:K.isArray(e)?e.map(be):String(e)}function ve(e,t,n,r,o){return K.isFunction(r)?r.call(this,t,n):(o&&(t=n),K.isString(t)?K.isString(r)?-1!==t.indexOf(r):K.isRegExp(r)?r.test(t):void 0:void 0)}class ge{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ye(t);if(!o)throw new Error("header name must be a non-empty string");const i=K.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=be(e))}const i=(e,t)=>K.forEach(e,((e,n)=>o(e,n,t)));return K.isPlainObject(e)||e instanceof this.constructor?i(e,t):K.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&de[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=ye(e)){const n=K.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(K.isFunction(t))return t.call(this,e,n);if(K.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ye(e)){const n=K.findKey(this,e);return!(!n||void 0===this[n]||t&&!ve(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ye(e)){const o=K.findKey(n,e);!o||t&&!ve(0,n[o],o,t)||(delete n[o],r=!0)}}return K.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ve(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return K.forEach(this,((r,o)=>{const i=K.findKey(n,o);if(i)return t[i]=be(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=be(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return K.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&K.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[he]=this[he]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ye(e);t[r]||(function(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return K.isArray(e)?e.forEach(r):r(e),this}}ge.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.freezeMethods(ge.prototype),K.freezeMethods(ge);var me=ge;function we(e,t){const n=this||pe,r=t||n,o=me.from(r.headers);let i=r.data;return K.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Oe(e){return!(!e||!e.__CANCEL__)}function je(e,t,n){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,n),this.name="CanceledError"}K.inherits(je,Y,{__CANCEL__:!0});var Se=je,_e=se.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){const a=[];a.push(e+"="+encodeURIComponent(t)),K.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),K.isString(r)&&a.push("path="+r),K.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Ee(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Pe=se.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=K.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function xe(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(c){const s=Date.now(),l=r[a];o||(o=s),n[i]=c,r[i]=s;let u=a,f=0;for(;u!==i;)f+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),s-o<t)return;const p=l&&s-l;return p?Math.round(1e3*f/p):void 0}}(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,c=i-n,s=r(c);n=i;const l={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:s||void 0,estimated:s&&a&&i<=a?(a-i)/s:void 0,event:o};l[t?"download":"upload"]=!0,e(l)}}const ke={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=me.from(e.headers).normalize(),i=e.responseType;let a;function c(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}K.isFormData(r)&&(se.isStandardBrowserEnv||se.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let s=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const l=Ee(e.baseURL,e.url);function u(){if(!s)return;const r=me.from("getAllResponseHeaders"in s&&s.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),c()}),(function(e){n(e),c()}),{data:i&&"text"!==i&&"json"!==i?s.response:s.responseText,status:s.status,statusText:s.statusText,headers:r,config:e,request:s}),s=null}if(s.open(e.method.toUpperCase(),ie(l,e.params,e.paramsSerializer),!0),s.timeout=e.timeout,"onloadend"in s?s.onloadend=u:s.onreadystatechange=function(){s&&4===s.readyState&&(0!==s.status||s.responseURL&&0===s.responseURL.indexOf("file:"))&&setTimeout(u)},s.onabort=function(){s&&(n(new Y("Request aborted",Y.ECONNABORTED,e,s)),s=null)},s.onerror=function(){n(new Y("Network Error",Y.ERR_NETWORK,e,s)),s=null},s.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||ce;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Y(t,r.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,s)),s=null},se.isStandardBrowserEnv){const t=(e.withCredentials||Pe(l))&&e.xsrfCookieName&&_e.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in s&&K.forEach(o.toJSON(),(function(e,t){s.setRequestHeader(t,e)})),K.isUndefined(e.withCredentials)||(s.withCredentials=!!e.withCredentials),i&&"json"!==i&&(s.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&s.addEventListener("progress",xe(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&s.upload&&s.upload.addEventListener("progress",xe(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{s&&(n(!t||t.type?new Se(null,e,s):t),s.abort(),s=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const f=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(l);f&&-1===se.protocols.indexOf(f)?n(new Y("Unsupported protocol "+f+":",Y.ERR_BAD_REQUEST,e)):s.send(r||null)}))}};K.forEach(ke,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));function Te(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Se(null,e)}function Ce(e){return Te(e),e.headers=me.from(e.headers),e.data=we.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),(e=>{e=K.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=K.isString(n)?ke[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new Y(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(K.hasOwnProp(ke,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!K.isFunction(r))throw new TypeError("adapter is not a function");return r})(e.adapter||pe.adapter)(e).then((function(t){return Te(e),t.data=we.call(e,e.transformResponse,t),t.headers=me.from(t.headers),t}),(function(t){return Oe(t)||(Te(e),t&&t.response&&(t.response.data=we.call(e,e.transformResponse,t.response),t.response.headers=me.from(t.response.headers))),Promise.reject(t)}))}const Re=e=>e instanceof me?e.toJSON():e;function Ne(e,t){t=t||{};const n={};function r(e,t,n){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:n},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function o(e,t,n){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!K.isUndefined(t))return r(void 0,t)}function a(e,t){return K.isUndefined(t)?K.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function c(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const s={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(e,t)=>o(Re(e),Re(t),!0)};return K.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=s[r]||o,a=i(e[r],t[r],r);K.isUndefined(a)&&i!==c||(n[r]=a)})),n}const Ae={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ae[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const De={};Ae.transitional=function(e,t,n){function r(e,t){return"[Axios v1.4.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Y(r(o," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!De[o]&&(De[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var Be={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new Y("option "+i+" must be "+n,Y.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Y("Unknown option "+i,Y.ERR_BAD_OPTION)}},validators:Ae};const Ie=Be.validators;class Fe{constructor(e){this.defaults=e,this.interceptors={request:new ae,response:new ae}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ne(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;let i;void 0!==n&&Be.assertOptions(n,{silentJSONParsing:Ie.transitional(Ie.boolean),forcedJSONParsing:Ie.transitional(Ie.boolean),clarifyTimeoutError:Ie.transitional(Ie.boolean)},!1),null!=r&&(K.isFunction(r)?t.paramsSerializer={serialize:r}:Be.assertOptions(r,{encode:Ie.function,serialize:Ie.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),i=o&&K.merge(o.common,o[t.method]),i&&K.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=me.concat(i,o);const a=[];let c=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const s=[];let l;this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)}));let u,f=0;if(!c){const e=[Ce.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,s),u=e.length,l=Promise.resolve(t);f<u;)l=l.then(e[f++],e[f++]);return l}u=a.length;let p=t;for(f=0;f<u;){const e=a[f++],t=a[f++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=Ce.call(this,p)}catch(e){return Promise.reject(e)}for(f=0,u=s.length;f<u;)l=l.then(s[f++],s[f++]);return l}getUri(e){return ie(Ee((e=Ne(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}K.forEach(["delete","get","head","options"],(function(e){Fe.prototype[e]=function(t,n){return this.request(Ne(n||{},{method:e,url:t,data:(n||{}).data}))}})),K.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Ne(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Fe.prototype[e]=t(),Fe.prototype[e+"Form"]=t(!0)}));var Me=Fe;class Le{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Se(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Le((function(t){e=t})),cancel:e}}}var Ue=Le;const Ve={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ve).forEach((([e,t])=>{Ve[t]=e}));var ze=Ve;const qe=function e(t){const n=new Me(t),r=u(Me.prototype.request,n);return K.extend(r,Me.prototype,n,{allOwnKeys:!0}),K.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ne(t,n))},r}(pe);qe.Axios=Me,qe.CanceledError=Se,qe.CancelToken=Ue,qe.isCancel=Oe,qe.VERSION="1.4.0",qe.toFormData=Z,qe.AxiosError=Y,qe.Cancel=qe.CanceledError,qe.all=function(e){return Promise.all(e)},qe.spread=function(e){return function(t){return e.apply(null,t)}},qe.isAxiosError=function(e){return K.isObject(e)&&!0===e.isAxiosError},qe.mergeConfig=Ne,qe.AxiosHeaders=me,qe.formToJSON=e=>le(K.isHTMLForm(e)?new FormData(e):e),qe.HttpStatusCode=ze,qe.default=qe;var Ke=qe,He=(0,c.withSelect)((e=>{const{getEntityRecords:t}=e("core");return{categories:t("taxonomy","category",{per_page:-1})}}))((e=>{let{attributes:t,updateSelectedCategory:n,categories:r,disabled:i}=e,c=[];return Array.isArray(r)&&(c=r.map((e=>{let{id:t,name:n}=e;return{label:(r=n,"Uncategorized"===r?"Posts with no category assigned (Uncategorized)":`Posts assigned the '${r}' category`),value:t};var r})),c.unshift({value:-1,label:"All posts in site"})),(0,o.createElement)(a.SelectControl,{label:"Add this Video to:",disabled:i,value:t.category,onChange:e=>n(e),options:c})})),We=n.p+"images/openvideologo.d7e568e7.png";n(361);const $e=/^https?:\/\/[\w.-]+\/.+(video|v|playlist)\/[\w-]+([\?&][\w-]+=[\w-]*)*$/;function Ye(){return Ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ye.apply(this,arguments)}var Je=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"open-video/open-video-block","version":"0.1.0","title":"Open.Video Block","category":"embed","icon":"open-video-icon","description":"Open.Video Block for embedding videos","attributes":{"url":{"type":"string","default":""},"providerNameSlug":{"type":"string","default":""},"allowResponsive":{"type":"boolean","default":true},"responsive":{"type":"boolean","default":false},"previewable":{"type":"boolean","default":true},"floatOption":{"type":"number","default":1},"displayType":{"type":"string","default":"url"},"html":{"type":"string","default":""},"autoplay":{"type":"boolean","default":true},"loop":{"type":"boolean","default":false},"category":{"type":"string","default":""},"alignment":{"type":"string","default":"none"}},"supports":{"spacing":{"margin":true}},"textdomain":"open-video-block","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');const Ge=()=>{const e={};for(const[t,n]of Object.entries(Je.attributes))n.hasOwnProperty("default")&&(e[t]=n.default);return e},Xe={...Je,edit:function(e){let{clientId:t,attributes:n,setAttributes:s}=e;const u="1",f="edit",p="preview",d="add_to_posts",h="skip_if_video_exists",y="replace_all_videos",b=(0,i.useBlockEditContext)(),v=(0,c.select)("core/editor");let g=null;v&&(g=v.getCurrentPost());let m=0,w=0,O=0,j=0;const{url:S,floatOption:_,html:E,category:P,autoplay:x}=n,[k,T]=(0,o.useState)(S),[C,R]=(0,o.useState)(_),[N,A]=(0,o.useState)(E),[D,B]=(0,o.useState)(x),[I,F]=(0,o.useState)(u),[M,L]=(0,o.useState)(P),[U,V]=(0,o.useState)(!1),[z,q]=(0,o.useState)(!1),[K,H]=(0,o.useState)(h),[W,$]=(0,o.useState)(0),[Y,J]=(0,o.useState)(!1),[G,X]=(0,o.useState)(0),[Q,Z]=(0,o.useState)(0),[ee,te]=(0,o.useState)(0),[ne,re]=(0,o.useState)(0),[oe,ie]=(0,o.useState)(0),[ae,ce]=(0,o.useState)(!1),se=()=>le(k),le=e=>$e.test(e),[ue,fe]=(0,o.useState)(f);(0,o.useEffect)((()=>{if(!v)return;let e=0;const n=v.getBlocks();n.forEach(((r,o)=>{"core/paragraph"===r.name&&e++,r.clientId===t&&(0===e?F("0"):1===e?F(u):2===e?F("2"):o<n.length/2?F("3"):F("4"))}))}),[]),(0,o.useEffect)((()=>{s({category:M})}),[M]),(0,o.useEffect)((()=>{s({url:k}),le(k)?pe():ce(!1)}),[k]),(0,o.useEffect)((()=>{s({floatOption:C}),se()&&pe()}),[C]),(0,o.useEffect)((()=>{s({html:N})}),[N]),(0,o.useEffect)((()=>{s({autoplay:D}),se()&&pe()}),[D]),(0,o.useEffect)((()=>{ie(0!==G?Math.floor((W+Q+ee+ne)/G*100):0)}),[W,Q,ee,ne]);const pe=async()=>{let e="";if(k&&k.includes("/playlist")){if(e=(e=>{let t=e,n=k.split("/");if(!n)return;if(n=n[n.length-1].split("?"),!n)return;const r=n[0],o=function(){let{autoplay:e=!1,floatOption:t=!0,videoId:n="",autoMatch:r=!1,startTime:o=0,width:i=640,height:a=360,preview:c=!1,embedCodeSource:s="w"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const l={auto_play:e,float:t,width:i,height:a,embed_code_source:s};return n&&(l.videoId=n),o>0&&(l.time_start=o),c&&(l.preview=c),JSON.stringify(l)}({autoplay:!!D,floatOption:!!C,videoId:r});return o?t+o:void 0})("https://www.open.video/generate-embed-code?j="),!e)return void ce(!1)}else{if(!k)return void ce(!1);if(e=(e=>{let t="https://www.open.video/openvideo/oembed?url=";return t+=k,t+=`&float=${C}`,t+=`&autoplay=${D}`,t})(),!e)return void ce(!1)}const t=await Ke({method:"get",url:e});if(t&&t.data){const e=t.data;e.html?A(e.html):A(e),e.provider_name?s({providerSlug:e.provider_name}):s({providerSlug:"Open.Video"}),ce(!0)}else ce(!1)},de=()=>{se()&&fe(p)},he=()=>{se()&&fe(d)};return(0,o.createElement)("div",(0,i.useBlockProps)(),(0,o.createElement)(i.BlockControls,null,(0,o.createElement)(i.BlockAlignmentToolbar,{value:n.alignment,onChange:e=>{s({alignment:e})},controls:["left","center","right"]})),ue===p&&""!=N&&(0,o.createElement)("div",{className:"preview-block"},(0,o.createElement)("div",{class:"preview-btn-group"},(0,o.createElement)("button",{onClick:()=>{fe(f)},"aria-label":"Edit Video Settings",style:{marginRight:"15px"}},"Edit"),(0,o.createElement)("button",{onClick:he},"Add to Other Posts")),(0,o.createElement)("iframe",{src:(()=>{let e=`https://www.open.video/embed?idFromURL=${encodeURIComponent(k)}&play_nextvid=0`;return D||(e+="&autoplay=0"),e})()}),(z||Y)&&(0,o.createElement)("div",{class:"propagate-notice"},z&&(0,o.createElement)(a.Animate,{type:"slide-in",options:{origin:"top"}},(()=>(0,o.createElement)(a.Notice,{status:W>0?"success":"warning",isDismissible:!1},W>0&&(0,o.createElement)("p",null,(0,o.createElement)(a.Icon,{icon:"saved",className:"openvideoplugin-success"}),"Open.Video video added to ",(0,o.createElement)("strong",null,W)," other post",1===W?"":"s","!"),0===W&&(0,o.createElement)("p",null,(0,o.createElement)(a.Icon,{icon:"warning",className:"openvideoplugin-warning"}),"No Open.Video videos were added to other posts"),W!==G&&G>0&&(0,o.createElement)("ul",null,Q>0&&(0,o.createElement)("li",null,(0,o.createElement)("strong",null,Q)," post",1===Q?" was skipped because it already has":"s were skipped because they already have"," a Open.Video video"),ee>0&&(0,o.createElement)("li",null,(0,o.createElement)("strong",null,ee)," post",1===ee?"":"s"," did not have an appropriate location to add the video to"),ne>0&&(0,o.createElement)("li",null,(0,o.createElement)("strong",null,ne)," post",1===ne?"":"s"," failed to update due to an internal error, please try again"))))),Y&&(0,o.createElement)(a.Animate,{type:"slide-in",options:{origin:"top"}},(()=>(0,o.createElement)(a.Notice,{status:"error",isDismissible:!1},(0,o.createElement)("p",null,(0,o.createElement)(a.Icon,{icon:"warning",className:"openvideoplugin-error"}),"There was an error adding the Open.Video video to other pages")))))),ue===f&&(0,o.createElement)("div",{className:"edit-block"},(0,o.createElement)("div",{style:{height:"35px",maxWidth:"150px",marginBottom:"20px"}},(0,o.createElement)("a",{href:"https://www.open.video/",target:"_blank"},(0,o.createElement)("img",{src:We}))),(0,o.createElement)("div",{style:{marginBottom:"18px"}}),(0,o.createElement)("div",null,(0,o.createElement)("p",{for:"open-video-url-input",style:{fontSize:"small",marginBottom:"20px"}},"Please provide a link to the video or playlist you'd like to serve on your website. You can easily copy the links from either ",(0,o.createElement)("a",{href:"https://app.open.video/videos",target:"_blank"},"Open.Video Studio")," or ",(0,o.createElement)("a",{href:"https://www.open.video",target:"_blank"},"Open.Video.com"),". For additional details, please refer to ",(0,o.createElement)("a",{href:"https://support.ezoic.com/scp/article.php?id=595",target:"_blank"},"this article"),"."),(0,o.createElement)(a.TextControl,{id:"open-video-url-input",label:"Video or Playlist URL",value:k,placeholder:"Enter URL here",onChange:T})),(0,o.createElement)("hr",null),(0,o.createElement)("p",null,"Video Playback Settings"),(0,o.createElement)(a.CheckboxControl,{label:"Float",checked:_,onChange:e=>{R(e)}}),(0,o.createElement)(a.CheckboxControl,{label:"Auto Play",checked:x,onChange:e=>{B(e)}}),g&&(0,o.createElement)("span",null),(0,o.createElement)("div",{class:"openvideoplugin-btn-group"},(0,o.createElement)("button",{onClick:de,disabled:!ae},"Done"),(0,o.createElement)("button",{onClick:he,disabled:!ae},"Done & Add to Other Posts"))),(0,o.createElement)("div",{className:"edit-block",style:{display:ue===d?"block":"none"}},(0,o.createElement)("div",{style:{height:"35px",maxWidth:"150px",marginBottom:"20px"}},(0,o.createElement)("a",{href:"https://www.open.video/",target:"_blank"},(0,o.createElement)("img",{src:We}))),(0,o.createElement)("div",{style:{marginBottom:"15px"}},"Add this Open.Video Video to other posts in your site"),(0,o.createElement)("p",null,(0,o.createElement)(He,{disabled:U,attributes:n,updateSelectedCategory:e=>{L(e)}})),(0,o.createElement)("p",null,(0,o.createElement)(a.SelectControl,{label:"Choose location in post to add this video:",disabled:U,onChange:e=>{F(e)},value:I,options:[{label:"Before 1st paragraph",value:"0"},{label:"Under 1st paragraph (recommended)",value:u},{label:"Under 2nd paragraph",value:"2"},{label:"Middle of page",value:"3"},{label:"Bottom of page",value:"4"}]})),(0,o.createElement)("p",null,(0,o.createElement)(a.RadioControl,{label:"If post already has one or more Open.Video Videos:",disabled:U,onChange:e=>{H(e)},selected:K,options:[{label:"Skip adding this video",value:h},{label:"Remove existing videos and add this one",value:y},{label:"Add this video without affecting other videos",value:"add_anyway"}]})),U&&G>0&&(0,o.createElement)(a.Notice,{status:"info",isDismissible:!1,className:"openvideoplugin-notice__loading"},(0,o.createElement)("p",null,(0,o.createElement)(a.Icon,{icon:"update",className:"openvideoplugin-loading openvideoplugin-info"}),(0,o.createElement)("span",null,"Adding video to ",(0,o.createElement)("strong",null,G)," posts... (",oe,"%)"))),(0,o.createElement)("div",{class:"openvideoplugin-btn-group"},(0,o.createElement)("button",{disabled:U,onClick:de,style:{backgroundColor:"white"}},"Cancel"),(0,o.createElement)("button",{disabled:U,onClick:async()=>{if(!N)return;if(U)return;m=0,w=0,O=0,j=0,te(0),re(0),X(0),$(0),Z(0),V(!0);let e="/wp/v2/posts?context=edit";parseInt(M)>0&&(e+=`&categories=${M}`);const t=await l()({path:e,method:"GET"}).catch((e=>{console.error(e),function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];V(!1),q(!e),J(e),de(),setTimeout((()=>{q(!1),J(!1),$(0)}),15e3)}(!0)}));if(!Array.isArray(t))return void propagateBlockComplete(!0);const o=g.id,i=t.filter((e=>e.id!==o));X(i.length);let a=i.map((e=>{let t=((e,t)=>{const n=e.some((e=>"open-video/open-video-block"===e.name||!("core/shortcode"!==e.name||"string"!=typeof e.originalContent||!e.originalContent.includes("[open-video"))||!("string"!=typeof e.originalContent||!e.originalContent.includes('id="open-video-'))));if(K===h&&n)return w++,Z(w),!1;if(K===y&&n){let t=[];e.forEach((e=>{"open-video/open-video-block"!==e.name&&("core/shortcode"===e.name&&"string"==typeof e.originalContent&&e.originalContent.includes("[open-video")||"string"==typeof e.originalContent&&e.originalContent.includes('id="open-video-')||t.push(e))})),e=[...t]}switch(I){case"0":return e.unshift(t),e;case u:let n=[],r=0;return e.forEach((e=>{n.push(e),"core/paragraph"===e.name&&r++,1===r&&n.push(t)})),n.length===e.length?(O++,te(O),!1):n;case"2":let o=[],i=0;return e.forEach((e=>{o.push(e),"core/paragraph"===e.name&&i++,2===i&&o.push(t)})),o.length===e.length?(O++,te(O),!1):o;case"3":let a=Math.floor(e.length/2);return e.splice(a,0,t),e;case"4":return e.push(t),e;default:return e}})((0,r.parse)(e.content.raw),(0,r.createBlock)(b.name,n));if(!t)return Promise.resolve();const o=(0,r.serialize)(t);return l()({path:`/wp/v2/posts/${e.id}`,method:"POST",data:{content:o}}).then((()=>{m++,$(m)})).catch((e=>{console.error(e),j++,re(j)}))}));await Promise.all(a),propagateBlockComplete()}},"Add to Posts"))))},save:function(e){let{attributes:t}=e;const n=i.useBlockProps.save(),{html:r,alignment:a}=t;let c={justifyContent:"center"};return"left"===a?c.justifyContent="flex-start":"right"===a&&(c.justifyContent="flex-end"),(0,o.createElement)("div",Ye({},n,{style:c}),(0,o.createElement)(o.RawHTML,null,r))},transforms:{from:[{type:"block",blocks:["core/embed"],isMatch(e){return $e.test(e.url)},transform(e){const t=Ge();return t.url=e.url,t.displayType="url",(0,r.createBlock)("open-video/open-video-block",t)},priority:2},{type:"raw",isMatch:e=>"P"===e.nodeName&&$e.test(e.textContent),transform:e=>{const t=Ge();return t.url=e.textContent.trim(),t.displayType="url",(0,r.createBlock)("open-video/open-video-block",t)},priority:1}]}};(0,r.registerBlockType)(Je.name,Xe)},8552:function(e,t,n){var r=n(852)(n(5639),"DataView");e.exports=r},1989:function(e,t,n){var r=n(1789),o=n(401),i=n(7667),a=n(1327),c=n(1866);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,e.exports=s},8407:function(e,t,n){var r=n(7040),o=n(4125),i=n(2117),a=n(7518),c=n(4705);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,e.exports=s},7071:function(e,t,n){var r=n(852)(n(5639),"Map");e.exports=r},3369:function(e,t,n){var r=n(4785),o=n(1285),i=n(6e3),a=n(9916),c=n(5265);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,e.exports=s},3818:function(e,t,n){var r=n(852)(n(5639),"Promise");e.exports=r},8525:function(e,t,n){var r=n(852)(n(5639),"Set");e.exports=r},8668:function(e,t,n){var r=n(3369),o=n(619),i=n(2385);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},6384:function(e,t,n){var r=n(8407),o=n(7465),i=n(3779),a=n(7599),c=n(4758),s=n(4309);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=c,l.prototype.set=s,e.exports=l},2705:function(e,t,n){var r=n(5639).Symbol;e.exports=r},1149:function(e,t,n){var r=n(5639).Uint8Array;e.exports=r},577:function(e,t,n){var r=n(852)(n(5639),"WeakMap");e.exports=r},7412:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},4963:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},4636:function(e,t,n){var r=n(2545),o=n(5694),i=n(1469),a=n(4144),c=n(5776),s=n(6719),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),u=!n&&o(e),f=!n&&!u&&a(e),p=!n&&!u&&!f&&s(e),d=n||u||f||p,h=d?r(e.length,String):[],y=h.length;for(var b in e)!t&&!l.call(e,b)||d&&("length"==b||f&&("offset"==b||"parent"==b)||p&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||c(b,y))||h.push(b);return h}},2488:function(e){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},2908:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},4865:function(e,t,n){var r=n(9465),o=n(7813),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},8470:function(e,t,n){var r=n(7813);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},4037:function(e,t,n){var r=n(8363),o=n(3674);e.exports=function(e,t){return e&&r(t,o(t),e)}},3886:function(e,t,n){var r=n(8363),o=n(1704);e.exports=function(e,t){return e&&r(t,o(t),e)}},9465:function(e,t,n){var r=n(8777);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},5990:function(e,t,n){var r=n(6384),o=n(7412),i=n(4865),a=n(4037),c=n(3886),s=n(4626),l=n(278),u=n(8805),f=n(1911),p=n(8234),d=n(6904),h=n(4160),y=n(3824),b=n(9148),v=n(8517),g=n(1469),m=n(4144),w=n(6688),O=n(3218),j=n(2928),S=n(3674),_=n(1704),E="[object Arguments]",P="[object Function]",x="[object Object]",k={};k[E]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k[x]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k[P]=k["[object WeakMap]"]=!1,e.exports=function e(t,n,T,C,R,N){var A,D=1&n,B=2&n,I=4&n;if(T&&(A=R?T(t,C,R,N):T(t)),void 0!==A)return A;if(!O(t))return t;var F=g(t);if(F){if(A=y(t),!D)return l(t,A)}else{var M=h(t),L=M==P||"[object GeneratorFunction]"==M;if(m(t))return s(t,D);if(M==x||M==E||L&&!R){if(A=B||L?{}:v(t),!D)return B?f(t,c(A,t)):u(t,a(A,t))}else{if(!k[M])return R?t:{};A=b(t,M,D)}}N||(N=new r);var U=N.get(t);if(U)return U;N.set(t,A),j(t)?t.forEach((function(r){A.add(e(r,n,T,r,t,N))})):w(t)&&t.forEach((function(r,o){A.set(o,e(r,n,T,o,t,N))}));var V=F?void 0:(I?B?d:p:B?_:S)(t);return o(V||t,(function(r,o){V&&(r=t[o=r]),i(A,o,e(r,n,T,o,t,N))})),A}},3118:function(e,t,n){var r=n(3218),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},8866:function(e,t,n){var r=n(2488),o=n(1469);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},4239:function(e,t,n){var r=n(2705),o=n(9607),i=n(2333),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},9454:function(e,t,n){var r=n(4239),o=n(7005);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},939:function(e,t,n){var r=n(2492),o=n(7005);e.exports=function e(t,n,i,a,c){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,c))}},2492:function(e,t,n){var r=n(6384),o=n(7114),i=n(8351),a=n(6096),c=n(4160),s=n(1469),l=n(4144),u=n(6719),f="[object Arguments]",p="[object Array]",d="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,y,b,v){var g=s(e),m=s(t),w=g?p:c(e),O=m?p:c(t),j=(w=w==f?d:w)==d,S=(O=O==f?d:O)==d,_=w==O;if(_&&l(e)){if(!l(t))return!1;g=!0,j=!1}if(_&&!j)return v||(v=new r),g||u(e)?o(e,t,n,y,b,v):i(e,t,w,n,y,b,v);if(!(1&n)){var E=j&&h.call(e,"__wrapped__"),P=S&&h.call(t,"__wrapped__");if(E||P){var x=E?e.value():e,k=P?t.value():t;return v||(v=new r),b(x,k,n,y,v)}}return!!_&&(v||(v=new r),a(e,t,n,y,b,v))}},5588:function(e,t,n){var r=n(4160),o=n(7005);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},8458:function(e,t,n){var r=n(3560),o=n(5346),i=n(3218),a=n(346),c=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,u=s.toString,f=l.hasOwnProperty,p=RegExp("^"+u.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?p:c).test(a(e))}},9221:function(e,t,n){var r=n(4160),o=n(7005);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},8749:function(e,t,n){var r=n(4239),o=n(1780),i=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},280:function(e,t,n){var r=n(5726),o=n(6916),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},313:function(e,t,n){var r=n(3218),o=n(5726),i=n(3498),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var c in e)("constructor"!=c||!t&&a.call(e,c))&&n.push(c);return n}},2545:function(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},1717:function(e){e.exports=function(e){return function(t){return e(t)}}},4757:function(e){e.exports=function(e,t){return e.has(t)}},4318:function(e,t,n){var r=n(1149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},4626:function(e,t,n){e=n.nmd(e);var r=n(5639),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,c=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=c?c(n):new e.constructor(n);return e.copy(r),r}},7157:function(e,t,n){var r=n(4318);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},3147:function(e){var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},419:function(e,t,n){var r=n(2705),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},7133:function(e,t,n){var r=n(4318);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},278:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},8363:function(e,t,n){var r=n(4865),o=n(9465);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var c=-1,s=t.length;++c<s;){var l=t[c],u=i?i(n[l],e[l],l,n,e):void 0;void 0===u&&(u=e[l]),a?o(n,l,u):r(n,l,u)}return n}},8805:function(e,t,n){var r=n(8363),o=n(9551);e.exports=function(e,t){return r(e,o(e),t)}},1911:function(e,t,n){var r=n(8363),o=n(1442);e.exports=function(e,t){return r(e,o(e),t)}},4429:function(e,t,n){var r=n(5639)["__core-js_shared__"];e.exports=r},8777:function(e,t,n){var r=n(852),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},7114:function(e,t,n){var r=n(8668),o=n(2908),i=n(4757);e.exports=function(e,t,n,a,c,s){var l=1&n,u=e.length,f=t.length;if(u!=f&&!(l&&f>u))return!1;var p=s.get(e),d=s.get(t);if(p&&d)return p==t&&d==e;var h=-1,y=!0,b=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++h<u;){var v=e[h],g=t[h];if(a)var m=l?a(g,v,h,t,e,s):a(v,g,h,e,t,s);if(void 0!==m){if(m)continue;y=!1;break}if(b){if(!o(t,(function(e,t){if(!i(b,t)&&(v===e||c(v,e,n,a,s)))return b.push(t)}))){y=!1;break}}else if(v!==g&&!c(v,g,n,a,s)){y=!1;break}}return s.delete(e),s.delete(t),y}},8351:function(e,t,n){var r=n(2705),o=n(1149),i=n(7813),a=n(7114),c=n(8776),s=n(1814),l=r?r.prototype:void 0,u=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=c;case"[object Set]":var h=1&r;if(d||(d=s),e.size!=t.size&&!h)return!1;var y=p.get(e);if(y)return y==t;r|=2,p.set(e,t);var b=a(d(e),d(t),r,l,f,p);return p.delete(e),b;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},6096:function(e,t,n){var r=n(8234),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,c){var s=1&n,l=r(e),u=l.length;if(u!=r(t).length&&!s)return!1;for(var f=u;f--;){var p=l[f];if(!(s?p in t:o.call(t,p)))return!1}var d=c.get(e),h=c.get(t);if(d&&h)return d==t&&h==e;var y=!0;c.set(e,t),c.set(t,e);for(var b=s;++f<u;){var v=e[p=l[f]],g=t[p];if(i)var m=s?i(g,v,p,t,e,c):i(v,g,p,e,t,c);if(!(void 0===m?v===g||a(v,g,n,i,c):m)){y=!1;break}b||(b="constructor"==p)}if(y&&!b){var w=e.constructor,O=t.constructor;w==O||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof O&&O instanceof O||(y=!1)}return c.delete(e),c.delete(t),y}},1957:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},8234:function(e,t,n){var r=n(8866),o=n(9551),i=n(3674);e.exports=function(e){return r(e,i,o)}},6904:function(e,t,n){var r=n(8866),o=n(1442),i=n(1704);e.exports=function(e){return r(e,i,o)}},5050:function(e,t,n){var r=n(7019);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},852:function(e,t,n){var r=n(8458),o=n(7801);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},5924:function(e,t,n){var r=n(5569)(Object.getPrototypeOf,Object);e.exports=r},9607:function(e,t,n){var r=n(2705),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[c]=n:delete e[c]),o}},9551:function(e,t,n){var r=n(4963),o=n(479),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,c=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=c},1442:function(e,t,n){var r=n(2488),o=n(5924),i=n(9551),a=n(479),c=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=c},4160:function(e,t,n){var r=n(8552),o=n(7071),i=n(3818),a=n(8525),c=n(577),s=n(4239),l=n(346),u="[object Map]",f="[object Promise]",p="[object Set]",d="[object WeakMap]",h="[object DataView]",y=l(r),b=l(o),v=l(i),g=l(a),m=l(c),w=s;(r&&w(new r(new ArrayBuffer(1)))!=h||o&&w(new o)!=u||i&&w(i.resolve())!=f||a&&w(new a)!=p||c&&w(new c)!=d)&&(w=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case y:return h;case b:return u;case v:return f;case g:return p;case m:return d}return t}),e.exports=w},7801:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},1789:function(e,t,n){var r=n(4536);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:function(e,t,n){var r=n(4536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},1327:function(e,t,n){var r=n(4536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},1866:function(e,t,n){var r=n(4536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},3824:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},9148:function(e,t,n){var r=n(4318),o=n(7157),i=n(3147),a=n(419),c=n(7133);e.exports=function(e,t,n){var s=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return c(e,n);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return i(e);case"[object Symbol]":return a(e)}}},8517:function(e,t,n){var r=n(3118),o=n(5924),i=n(5726);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},5776:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},7019:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:function(e,t,n){var r,o=n(4429),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},5726:function(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},7040:function(e){e.exports=function(){this.__data__=[],this.size=0}},4125:function(e,t,n){var r=n(8470),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},2117:function(e,t,n){var r=n(8470);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7518:function(e,t,n){var r=n(8470);e.exports=function(e){return r(this.__data__,e)>-1}},4705:function(e,t,n){var r=n(8470);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4785:function(e,t,n){var r=n(1989),o=n(8407),i=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},1285:function(e,t,n){var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:function(e,t,n){var r=n(5050);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},4536:function(e,t,n){var r=n(852)(Object,"create");e.exports=r},6916:function(e,t,n){var r=n(5569)(Object.keys,Object);e.exports=r},3498:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:function(e,t,n){e=n.nmd(e);var r=n(1957),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,c=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=c},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5639:function(e,t,n){var r=n(1957),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},619:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:function(e){e.exports=function(e){return this.__data__.has(e)}},1814:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},7465:function(e,t,n){var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,n){var r=n(8407),o=n(7071),i=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},346:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},361:function(e,t,n){var r=n(5990);e.exports=function(e){return r(e,5)}},7813:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},5694:function(e,t,n){var r=n(9454),o=n(7005),i=Object.prototype,a=i.hasOwnProperty,c=i.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!c.call(e,"callee")};e.exports=s},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,n){var r=n(3560),o=n(1780);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},4144:function(e,t,n){e=n.nmd(e);var r=n(5639),o=n(5062),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,c=a&&a.exports===i?r.Buffer:void 0,s=(c?c.isBuffer:void 0)||o;e.exports=s},8446:function(e,t,n){var r=n(939);e.exports=function(e,t){return r(e,t)}},3560:function(e,t,n){var r=n(4239),o=n(3218);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6688:function(e,t,n){var r=n(5588),o=n(1717),i=n(1167),a=i&&i.isMap,c=a?o(a):r;e.exports=c},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},2928:function(e,t,n){var r=n(9221),o=n(1717),i=n(1167),a=i&&i.isSet,c=a?o(a):r;e.exports=c},6719:function(e,t,n){var r=n(8749),o=n(1717),i=n(1167),a=i&&i.isTypedArray,c=a?o(a):r;e.exports=c},3674:function(e,t,n){var r=n(4636),o=n(280),i=n(8612);e.exports=function(e){return i(e)?r(e):o(e)}},1704:function(e,t,n){var r=n(4636),o=n(313),i=n(8612);e.exports=function(e){return i(e)?r(e,!0):o(e)}},479:function(e){e.exports=function(){return[]}},5062:function(e){e.exports=function(){return!1}},1038:function(e,t,n){var r;r=e=>(()=>{var t={865:e=>{"use strict";e.exports=function(e,t){var n=e.filter(t);return 0!==n.length&&n.length!==e.length}},703:(e,t,n)=>{"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},385:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=n(8),c=i(a),s=i(n(6)),l=i(n(2)),u=n(1),f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;r=!1,null===o&&(o=Function.prototype);var c=Object.getOwnPropertyDescriptor(o,i);if(void 0!==c){if("value"in c)return c.value;var s=c.get;if(void 0===s)return;return s.call(a)}var l=Object.getPrototypeOf(o);if(null===l)return;e=l,t=i,n=a,r=!0,c=l=void 0}}(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.state={showLoader:!1,lastScrollTop:0,actionTriggered:!1,pullToRefreshThresholdBreached:!1},this.startY=0,this.currentY=0,this.dragging=!1,this.maxPullDownDistance=0,this.onScrollListener=this.onScrollListener.bind(this),this.throttledOnScrollListener=(0,l.default)(this.onScrollListener,150).bind(this),this.onStart=this.onStart.bind(this),this.onMove=this.onMove.bind(this),this.onEnd=this.onEnd.bind(this),this.getScrollableTarget=this.getScrollableTarget.bind(this)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown.firstChild.getBoundingClientRect().height,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n          Pull Down To Refresh functionality will not work\n          as expected. Check README.md for usage\'')}},{key:"componentWillUnmount",value:function(){this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd))}},{key:"componentWillReceiveProps",value:function(e){this.props.key===e.key&&this.props.dataLength===e.dataLength||this.setState({showLoader:!1,actionTriggered:!1,pullToRefreshThresholdBreached:!1})}},{key:"getScrollableTarget",value:function(){return this.props.scrollableTarget instanceof HTMLElement?this.props.scrollableTarget:"string"==typeof this.props.scrollableTarget?document.getElementById(this.props.scrollableTarget):(null===this.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n        happen because the element may not have been added to DOM yet.\n        See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n      "),null)}},{key:"onStart",value:function(e){this.state.lastScrollTop||(this.dragging=!0,this.startY=e.pageY||e.touches[0].pageY,this.currentY=this.startY,this._infScroll.style.willChange="transform",this._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)")}},{key:"onMove",value:function(e){this.dragging&&(this.currentY=e.pageY||e.touches[0].pageY,this.currentY<this.startY||(this.currentY-this.startY>=this.props.pullDownToRefreshThreshold&&this.setState({pullToRefreshThresholdBreached:!0}),this.currentY-this.startY>1.5*this.maxPullDownDistance||(this._infScroll.style.overflow="visible",this._infScroll.style.transform="translate3d(0px, "+(this.currentY-this.startY)+"px, 0px)")))}},{key:"onEnd",value:function(e){var t=this;this.startY=0,this.currentY=0,this.dragging=!1,this.state.pullToRefreshThresholdBreached&&this.props.refreshFunction&&this.props.refreshFunction(),requestAnimationFrame((function(){t._infScroll&&(t._infScroll.style.overflow="auto",t._infScroll.style.transform="none",t._infScroll.style.willChange="none")}))}},{key:"isElementAtBottom",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?.8:arguments[1],n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,r=(0,u.parseThreshold)(t);return r.unit===u.ThresholdUnits.Pixel?e.scrollTop+n>=e.scrollHeight-r.value:e.scrollTop+n>=r.value/100*e.scrollHeight}},{key:"onScrollListener",value:function(e){var t=this;"function"==typeof this.props.onScroll&&setTimeout((function(){return t.props.onScroll(e)}),0);var n=this.props.height||this._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;this.state.actionTriggered||(this.isElementAtBottom(n,this.props.scrollThreshold)&&this.props.hasMore&&(this.setState({actionTriggered:!0,showLoader:!0}),this.props.next()),this.setState({lastScrollTop:n.scrollTop}))}},{key:"render",value:function(){var e=this,t=r({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!(!this.props.children||!this.props.children.length),o=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return c.default.createElement("div",{style:o},c.default.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&c.default.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},c.default.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},!this.state.pullToRefreshThresholdBreached&&this.props.pullDownToRefreshContent,this.state.pullToRefreshThresholdBreached&&this.props.releaseToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))}}]),t}(a.Component);t.default=f,f.defaultProps={pullDownToRefreshContent:c.default.createElement("h3",null,"Pull down to refresh"),releaseToRefreshContent:c.default.createElement("h3",null,"Release to refresh"),pullDownToRefreshThreshold:100,disableBrowserPullToRefresh:!0},f.propTypes={next:s.default.func,hasMore:s.default.bool,children:s.default.node,loader:s.default.node.isRequired,scrollThreshold:s.default.oneOfType([s.default.number,s.default.string]),endMessage:s.default.node,style:s.default.object,height:s.default.number,scrollableTarget:s.default.node,hasChildren:s.default.bool,pullDownToRefresh:s.default.bool,pullDownToRefreshContent:s.default.node,releaseToRefreshContent:s.default.node,pullDownToRefreshThreshold:s.default.number,refreshFunction:s.default.func,onScroll:s.default.func,dataLength:s.default.number.isRequired,key:s.default.string},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseThreshold=function(e){return"number"==typeof e?{unit:n.Percent,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:n.Pixel,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:n.Percent,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),r):(console.warn("scrollThreshold should be string or number"),r)};var n={Pixel:"Pixel",Percent:"Percent"};t.ThresholdUnits=n;var r={unit:n.Percent,value:.8}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r,o;return t||(t=250),function(){var i=n||this,a=+new Date,c=arguments;r&&a<r+t?(clearTimeout(o),o=setTimeout((function(){r=a,e.apply(i,c)}),t)):(r=a,e.apply(i,c))}},e.exports=t.default},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,a,c){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,c],u=0;(s=new Error(t.replace(/%s/g,(function(){return l[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,t,n){"use strict";var r=n(3),o=n(4),i=n(7);e.exports=function(){function e(e,t,n,r,a,c){c!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){e.exports=n(5)()},function(e,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,n){t.exports=e}])},e.exports=r(n(787))},787:t=>{"use strict";t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";r.r(o),r.d(o,{default:()=>qt});var e=r(697),t=r.n(e),n=r(787),i=r.n(n);const a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){return t["data-".concat(function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}(n))]=e[n],t}),{})},c=function(e){return!e||Array.isArray(e)&&!e.length};var s,l;const u=(s=1,l=new WeakMap,{get:function(e){return l.has(e)||l.set(e,s++),"".concat("rdts").concat(l.get(e))},reset:function(){l=new WeakMap,s=1}}),f=function(e,t,n){if(Array.prototype.findIndex)return e.findIndex(t,n);if(!e)throw new TypeError("findIndex called on null or undefined");if("function"!=typeof t)throw new TypeError("findIndex predicate must be a function");for(var r=0;r<e.length;r++){var o=e[r];if(t.call(n,o,r,e))return r}return-1};function p(e,t){var n=function(e){return e?"#"===e[0]?{"aria-labelledby":e.substring(1).replace(/ #/g," ")}:{"aria-label":e}:{}}(e);return t&&(n["aria-labelledby"]="".concat(n["aria-labelledby"]||""," ").concat(t).trim()),n}function d(e){return d="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},d(e)}function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=v(r);if(o){var n=v(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}(this,e)});function c(e){var t,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),g(b(t=a.call(this,e)),"handleInputChange",(function(e){e.persist(),t.delayedCallback(e)})),t.delayedCallback=(n=function(e){return t.props.onInputChange(e.target.value)},function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var i=!r;clearTimeout(r),r=setTimeout((function(){r=null,n.apply(void 0,t)}),300),i&&n.apply(void 0,t)}),t}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.inputRef,n=e.texts,r=void 0===n?{}:n,o=e.onFocus,a=e.onBlur,c=e.disabled,s=e.readOnly,l=e.onKeyDown,u=e.activeDescendant,f=e.inlineSearchInput;return i().createElement("input",h({type:"text",disabled:c,ref:t,className:"search",placeholder:f?r.inlineSearchPlaceholder||"Search...":r.placeholder||"Choose...",onKeyDown:l,onChange:this.handleInputChange,onFocus:o,onBlur:a,readOnly:s,"aria-activedescendant":u,"aria-autocomplete":l?"list":void 0},p(r.label)))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);g(m,"propTypes",{tags:t().array,texts:t().object,onInputChange:t().func,onFocus:t().func,onBlur:t().func,onTagRemove:t().func,onKeyDown:t().func,inputRef:t().func,disabled:t().bool,readOnly:t().bool,activeDescendant:t().string,inlineSearchInput:t().bool});const w=m;function O(e){return O="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},O(e)}function j(e,t){return j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},j(e,t)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var P=function(e){return"".concat(e,"_tag")},x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_(r);if(o){var n=_(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return E(S(e=a.call.apply(a,[this].concat(n))),"handleClick",(function(t){var n=e.props,r=n.id,o=n.onDelete;t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),o(r,void 0!==(t.key||t.keyCode))})),E(S(e),"onKeyDown",(function(t){"Backspace"===t.key&&(e.handleClick(t),t.preventDefault())})),E(S(e),"onKeyUp",(function(t){(32===t.keyCode||["Delete","Enter"].indexOf(t.key)>-1)&&(e.handleClick(t),t.preventDefault())})),e}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.id,n=e.label,r=e.labelRemove,o=void 0===r?"Remove":r,a=e.readOnly,c=e.disabled,s=P(t),l="".concat(t,"_button"),u=["tag-remove",a&&"readOnly",c&&"disabled"].filter(Boolean).join(" "),f=a||c;return i().createElement("span",{className:"tag",id:s,"aria-label":n},n,i().createElement("button",{id:l,onClick:f?void 0:this.handleClick,onKeyDown:f?void 0:this.onKeyDown,onKeyUp:f?void 0:this.onKeyUp,className:u,type:"button","aria-label":o,"aria-labelledby":"".concat(l," ").concat(s),"aria-disabled":f},"x"))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);E(x,"propTypes",{id:t().string.isRequired,label:t().string.isRequired,onDelete:t().func,readOnly:t().bool,disabled:t().bool,labelRemove:t().string});const k=x;function T(e){return T="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},T(e)}function C(e,t){return C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},C(e,t)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function N(){return N=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N.apply(this,arguments)}var A,D,B,I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(s,e);var t,n,r,o,c=(r=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=R(r);if(o){var n=R(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),c.apply(this,arguments)}return t=s,n=[{key:"render",value:function(){var e=this.props,t=e.tags,n=e.onTagRemove,r=e.texts,o=void 0===r?{}:r,c=e.disabled,s=e.readOnly,l=e.children||i().createElement("span",{className:"placeholder"},o.placeholder||"Choose...");return i().createElement("ul",{className:"tag-list"},function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(o){var c=o._id,s=o.label,l=o.tagClassName,u=o.dataset,f=o.tagLabel;return i().createElement("li",N({className:["tag-item",l].filter(Boolean).join(" "),key:"tag-item-".concat(c)},a(u)),i().createElement(k,{label:f||s,id:c,onDelete:e,readOnly:t,disabled:n||o.disabled,labelRemove:r}))}))}(t,n,s,c,o.labelRemove),i().createElement("li",{className:"tag-item"},l))}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(n.PureComponent);A=I,D="propTypes",B={tags:t().array,onTagRemove:t().func,readOnly:t().bool,disabled:t().bool,texts:t().object,children:t().node},D in A?Object.defineProperty(A,D,{value:B,enumerable:!0,configurable:!0,writable:!0}):A[D]=B;const F=I;function M(e){return M="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},M(e)}function L(){return L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(this,arguments)}function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e,t){return V=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},V(e,t)}function z(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q(e){return q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},q(e)}function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var H=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=q(r);if(o){var n=q(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===M(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return z(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return K(z(e=a.call.apply(a,[this].concat(n))),"getAriaAttributes",(function(){var t=e.props,n=t.mode,r=t.texts,o=void 0===r?{}:r,i=t.showDropdown,a=t.clientId,c=t.tags,s="".concat(a,"_trigger"),l=[],u=p(o.label);return c&&c.length&&(u["aria-label"]&&l.push(s),c.forEach((function(e){l.push(P(e._id))})),u=p(o.label,l.join(" "))),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){K(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:s,role:"button",tabIndex:e.props.tabIndex,"aria-haspopup":"simpleSelect"===n?"listbox":"tree","aria-expanded":i?"true":"false"},u)})),K(z(e),"handleTrigger",(function(t){t.key&&13!==t.keyCode&&32!==t.keyCode&&40!==t.keyCode||t.key&&e.triggerNode&&e.triggerNode!==document.activeElement||(e.props.showDropdown||32!==t.keyCode||t.preventDefault(),e.props.onTrigger(t))})),e}return t=c,(n=[{key:"render",value:function(){var e=this,t=this.props,n=t.disabled,r=t.readOnly,o=t.showDropdown,a=["dropdown-trigger","arrow",n&&"disabled",r&&"readOnly",o&&"top",!o&&"bottom"].filter(Boolean).join(" ");return i().createElement("a",L({ref:function(t){e.triggerNode=t},className:a,onClick:n?void 0:this.handleTrigger,onKeyDown:n?void 0:this.handleTrigger},this.getAriaAttributes()),this.props.children)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);K(H,"propTypes",{onTrigger:t().func,disabled:t().bool,readOnly:t().bool,showDropdown:t().bool,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),texts:t().object,clientId:t().string,tags:t().array,tabIndex:t().number});const W=H;var $=r(385),Y=r.n($);function J(e){return J="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},J(e)}function G(e,t){return G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},G(e,t)}function X(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ee=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Q(r);if(o){var n=Q(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return X(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Z(X(e=a.call.apply(a,[this].concat(n))),"handleClick",(function(){var t=e.props,n=t.onAction,r=t.actionData;n&&n(r.nodeId,r.action)})),e}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.title,n=e.className,r=e.text,o=e.readOnly;return i().createElement("i",{title:t,className:n,onClick:o?void 0:this.handleClick},r)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);Z(ee,"propTypes",{title:t().string,text:t().string,className:t().string,actionData:t().object,onAction:t().func,readOnly:t().bool}),Z(ee,"defaultProps",{onAction:function(){}});const te=ee;function ne(e){return ne="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},ne(e)}var re=["actions","id"];function oe(){return oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oe.apply(this,arguments)}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){le(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ce(e,t){return ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ce(e,t)}function se(e){return se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},se(e)}function le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ce(e,t)}(s,e);var t,n,r,o,a=(r=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=se(r);if(o){var n=se(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return t=s,(n=[{key:"render",value:function(){var e=this.props,t=e.actions,n=e.id,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,re);return c(t)?null:t.map((function(e,t){var o=e.id||"action-".concat(t);return i().createElement(te,oe({key:o},r,e,{actionData:{action:ae(ae({},e),{},{id:o}),nodeId:n}}))}))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(n.PureComponent);le(ue,"propTypes",{id:t().string.isRequired,actions:t().array});const fe=ue;function pe(e){return pe="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},pe(e)}var de=["checked","indeterminate","onChange","disabled","readOnly"];function he(){return he=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},he.apply(this,arguments)}function ye(e,t){return ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ye(e,t)}function be(e){return be=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},be(e)}var ve=function(e){var t=e.checked,n=e.indeterminate;return function(e){e&&(e.checked=t,e.indeterminate=n)}},ge=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ye(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=be(r);if(o){var n=be(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===pe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.apply(this,arguments)}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.checked,n=e.indeterminate,r=void 0!==n&&n,o=e.onChange,a=e.disabled,c=e.readOnly,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,de),l=a||c;return i().createElement("input",he({type:"checkbox",ref:ve({checked:t,indeterminate:r}),onChange:o,disabled:l},s))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(ge,"propTypes",{checked:t().bool,indeterminate:t().bool,onChange:t().func,disabled:t().bool,readOnly:t().bool});const me=ge;function we(e){return we="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},we(e)}var Oe=["name","checked","onChange","disabled","readOnly"];function je(){return je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},je.apply(this,arguments)}function Se(e,t){return Se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Se(e,t)}function _e(e){return _e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_e(e)}var Ee=function(e){var t=e.checked;return function(e){e&&(e.checked=t)}},Pe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Se(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_e(r);if(o){var n=_e(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===we(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.apply(this,arguments)}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.name,n=e.checked,r=e.onChange,o=e.disabled,a=e.readOnly,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Oe),s=o||a;return i().createElement("input",je({type:"radio",name:t,ref:Ee({checked:n}),onChange:r,disabled:s},c))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Pe,"propTypes",{name:t().string.isRequired,checked:t().bool,onChange:t().func,disabled:t().bool,readOnly:t().bool});const xe=Pe;function ke(e){return ke="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},ke(e)}function Te(){return Te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Te.apply(this,arguments)}function Ce(e,t){return Ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ce(e,t)}function Re(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ne(e){return Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ne(e)}function Ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var De=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ce(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ne(r);if(o){var n=Ne(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ke(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Re(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ae(Re(e=a.call.apply(a,[this].concat(n))),"handleCheckboxChange",(function(t){var n=e.props,r=n.mode,o=n.id;(0,n.onCheckboxChange)(o,"simpleSelect"===r||"radioSelect"===r||t.target.checked),t.stopPropagation(),t.nativeEvent.stopImmediatePropagation()})),e}return t=c,n=[{key:"render",value:function(){var e=this.props,t=e.mode,n=e.title,r=e.label,o=e.id,a=e.partial,c=e.checked,s=this.props,l=s.value,u=s.disabled,f=s.showPartiallySelected,p=s.readOnly,d=s.clientId,h={className:"node-label"};"simpleSelect"===t&&!p&&!u&&(h.onClick=this.handleCheckboxChange);var y={id:o,value:l,checked:c,disabled:u,readOnly:p,tabIndex:-1},b=["checkbox-item","simpleSelect"===t&&"simple-select"].filter(Boolean).join(" ");return i().createElement("label",{title:n||r,htmlFor:o},"radioSelect"===t?i().createElement(xe,Te({name:d,className:"radio-item",onChange:this.handleCheckboxChange},y)):i().createElement(me,Te({name:o,className:b,indeterminate:f&&a,onChange:this.handleCheckboxChange},y)),i().createElement("span",h,r))}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);Ae(De,"propTypes",{id:t().string.isRequired,actions:t().array,title:t().string,label:t().string.isRequired,value:t().string.isRequired,checked:t().bool,partial:t().bool,disabled:t().bool,dataset:t().object,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),showPartiallySelected:t().bool,onCheckboxChange:t().func,readOnly:t().bool,clientId:t().string});const Be=De;function Ie(e){return Ie="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},Ie(e)}function Fe(e,t){return Fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Fe(e,t)}function Me(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Le(e){return Le=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Le(e)}function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ve=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fe(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Le(r);if(o){var n=Le(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Me(e)}(this,e)});function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ue(Me(e=a.call.apply(a,[this].concat(n))),"onToggle",(function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),e.props.onNodeToggle(e.props.id)})),Ue(Me(e),"onKeyDown",(function(t){"Enter"!==t.key&&32!==t.keyCode||(e.props.onNodeToggle(e.props.id),t.preventDefault())})),e}return t=c,n=[{key:"render",value:function(){var e=this.props,t=e.expanded,n=e.isLeaf,r=["toggle",t&&"expanded",!t&&"collapsed"].filter(Boolean).join(" ");return n?i().createElement("i",{role:"button",tabIndex:-1,className:r,style:{visibility:"hidden"},"aria-hidden":!0}):i().createElement("i",{role:"button",tabIndex:-1,className:r,onClick:this.onToggle,onKeyDown:this.onKeyDown,"aria-hidden":!0})}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.PureComponent);Ue(Ve,"propTypes",{expanded:t().bool,isLeaf:t().bool,onNodeToggle:t().func,id:t().string});const ze=Ve;function qe(e){return qe="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},qe(e)}function Ke(){return Ke=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ke.apply(this,arguments)}function He(e,t){return He=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},He(e,t)}function We(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $e(e){return $e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},$e(e)}function Ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Je=function(e){return c(e)},Ge=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&He(e,t)}(s,e);var t,n,r,o,c=(r=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=$e(r);if(o){var n=$e(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return We(e)}(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ye(We(e=c.call.apply(c,[this].concat(n))),"getAriaAttributes",(function(){var t=e.props,n=t._children,r=t._depth,o=t.checked,i=t.disabled,a=t.expanded,c=t.readOnly,s=t.mode,l=t.partial,u={};return u.role="simpleSelect"===s?"option":"treeitem",u["aria-disabled"]=i||c,u["aria-selected"]=o,"simpleSelect"!==s&&(u["aria-checked"]=l?"mixed":o,u["aria-level"]=(r||0)+1,u["aria-expanded"]=n&&(a?"true":"false")),u})),e}return t=s,n=[{key:"render",value:function(){var e=this.props,t=e.mode,n=e.keepTreeOnSearch,r=e._id,o=e._children,c=e.dataset,s=e._depth,l=e.expanded,u=e.title,f=e.label,p=e.partial,d=e.checked,h=e.value,y=e.disabled,b=e.actions,v=e.onAction,g=e.searchModeOn,m=e.onNodeToggle,w=e.onCheckboxChange,O=e.showPartiallySelected,j=e.readOnly,S=e.clientId,_=function(e){var t=e.keepTreeOnSearch,n=e.keepChildrenOnSearch,r=e._children,o=e.matchInChildren,i=e.matchInParent,a=e.disabled,c=e.partial,s=e.hide,l=e.className,u=e.showPartiallySelected,f=e.readOnly,p=e.checked,d=e._focused;return["node",Je(r)&&"leaf",!Je(r)&&"tree",a&&"disabled",s&&"hide",t&&o&&"match-in-children",t&&n&&i&&"match-in-parent",u&&c&&"partial",f&&"readOnly",p&&"checked",d&&"focused",l].filter(Boolean).join(" ")}(this.props),E=n||!g?{paddingLeft:"".concat(20*(s||0),"px")}:{},P="".concat(r,"_li");return i().createElement("li",Ke({className:_,style:E,id:P},a(c),this.getAriaAttributes()),i().createElement(ze,{isLeaf:Je(o),expanded:l,id:r,onNodeToggle:m}),i().createElement(Be,{title:u,label:f,id:r,partial:p,checked:d,value:h,disabled:y,mode:t,onCheckboxChange:w,showPartiallySelected:O,readOnly:j,clientId:S}),i().createElement(fe,{actions:b,onAction:v,id:r,readOnly:j}))}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(n.PureComponent);Ye(Ge,"propTypes",{_id:t().string.isRequired,_depth:t().number,_children:t().array,actions:t().array,className:t().string,title:t().string,label:t().string.isRequired,value:t().string.isRequired,checked:t().bool,expanded:t().bool,disabled:t().bool,partial:t().bool,dataset:t().object,keepTreeOnSearch:t().bool,keepChildrenOnSearch:t().bool,searchModeOn:t().bool,onNodeToggle:t().func,onAction:t().func,onCheckboxChange:t().func,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),showPartiallySelected:t().bool,readOnly:t().bool,clientId:t().string});const Xe=Ge;function Qe(e){return Qe="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},Qe(e)}function Ze(){return Ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ze.apply(this,arguments)}function et(e,t){return et=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},et(e,t)}function tt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nt(e){return nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},nt(e)}function rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ot=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&et(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=nt(r);if(o){var n=nt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return tt(e)}(this,e)});function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),rt(tt(t=a.call(this,e)),"UNSAFE_componentWillReceiveProps",(function(e){var n=e.activeDescendant===t.props.activeDescendant;t.computeInstanceProps(e,!n),t.setState({items:t.allVisibleNodes.slice(0,t.currentPage*t.props.pageSize)})})),rt(tt(t),"componentDidMount",(function(){t.setState({scrollableTarget:t.node.parentNode})})),rt(tt(t),"computeInstanceProps",(function(e,n){if(t.allVisibleNodes=t.getNodes(e),t.totalPages=Math.ceil(t.allVisibleNodes.length/t.props.pageSize),n&&e.activeDescendant){var r=e.activeDescendant.replace(/_li$/,""),o=f(t.allVisibleNodes,(function(e){return e.key===r}))+1;t.currentPage=o>0?Math.ceil(o/t.props.pageSize):1}})),rt(tt(t),"shouldRenderNode",(function(e,t){var n=t.data,r=t.searchModeOn,o=e.expanded,i=e._parent;if(r||o)return!0;var a=i&&n.get(i);return!a||a.expanded})),rt(tt(t),"getNodes",(function(e){var n=e.data,r=e.keepTreeOnSearch,o=e.keepChildrenOnSearch,a=e.searchModeOn,c=e.mode,s=e.showPartiallySelected,l=e.readOnly,u=e.onAction,f=e.onChange,p=e.onCheckboxChange,d=e.onNodeToggle,h=e.activeDescendant,y=e.clientId,b=[];return n.forEach((function(n){t.shouldRenderNode(n,e)&&b.push(i().createElement(Xe,Ze({keepTreeOnSearch:r,keepChildrenOnSearch:o,key:n._id},n,{searchModeOn:a,onChange:f,onCheckboxChange:p,onNodeToggle:d,onAction:u,mode:c,showPartiallySelected:s,readOnly:l,clientId:y,activeDescendant:h})))})),b})),rt(tt(t),"hasMore",(function(){return t.currentPage<t.totalPages})),rt(tt(t),"loadMore",(function(){t.currentPage=t.currentPage+1;var e=t.allVisibleNodes.slice(0,t.currentPage*t.props.pageSize);t.setState({items:e})})),rt(tt(t),"setNodeRef",(function(e){t.node=e})),rt(tt(t),"getAriaAttributes",(function(){var e=t.props.mode;return{role:"simpleSelect"===e?"listbox":"tree","aria-multiselectable":/multiSelect|hierarchical/.test(e)}})),t.currentPage=1,t.computeInstanceProps(e,!0),t.state={items:t.allVisibleNodes.slice(0,t.props.pageSize)},t}return t=c,(n=[{key:"render",value:function(){var e=this.props.searchModeOn;return i().createElement("ul",Ze({className:"root ".concat(e?"searchModeOn":""),ref:this.setNodeRef},this.getAriaAttributes()),this.state.scrollableTarget&&i().createElement(Y(),{dataLength:this.state.items.length,next:this.loadMore,hasMore:this.hasMore(),loader:i().createElement("span",{className:"searchLoader"},"Loading..."),scrollableTarget:this.state.scrollableTarget},this.state.items))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.Component);rt(ot,"propTypes",{data:t().object,keepTreeOnSearch:t().bool,keepChildrenOnSearch:t().bool,searchModeOn:t().bool,onChange:t().func,onNodeToggle:t().func,onAction:t().func,onCheckboxChange:t().func,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),showPartiallySelected:t().bool,pageSize:t().number,readOnly:t().bool,clientId:t().string,activeDescendant:t().string}),rt(ot,"defaultProps",{pageSize:100});const it=ot;var at=r(865),ct=r.n(at),st=function(e){return e};const lt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"children",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:st;return ct()(e[t],(function(e){return n(e).checked}))||e[t].some((function(e){return n(e).partial}))};function ut(e){var t=e.nodes,n=e.parent,r=e.depth,o=void 0===r?0:r,i=e.simple,a=e.radio,s=e.showPartialState,l=e.hierarchical,u=e.rootPrefixId,f=e._rv,p=void 0===f?{list:new Map,defaultValues:[],singleSelectedNode:null}:f,d=i||a;return t.forEach((function(e,t){e._depth=o,n?(e._id=e.id||"".concat(n._id,"-").concat(t),e._parent=n._id,n._children.push(e._id)):e._id=e.id||"".concat(u?"".concat(u,"-").concat(t):t),d&&e.checked&&(p.singleSelectedNode?e.checked=!1:p.singleSelectedNode=e),d&&e.isDefaultValue&&p.singleSelectedNode&&!p.singleSelectedNode.isDefaultValue&&(p.singleSelectedNode.checked=!1,p.singleSelectedNode=null),!e.isDefaultValue||d&&0!==p.defaultValues.length||(p.defaultValues.push(e._id),e.checked=!0,d&&(p.singleSelectedNode=e)),l&&!a||function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?["disabled"]:["checked","disabled"],r=0;r<n.length;r++){var o=n[r];void 0===e[o]&&void 0!==t[o]&&(e[o]=t[o])}}(e,n,!a),p.list.set(e._id,e),!i&&e.children&&(e._children=[],ut({nodes:e.children,parent:e,depth:o+1,radio:a,showPartialState:s,hierarchical:l,_rv:p}),s&&!e.checked&&(e.partial=lt(e),d||c(e.children)||!e.children.every((function(e){return e.checked}))||(e.checked=!0)),e.children=void 0)})),p}const ft=function(e){var t=e.tree,n=e.simple,r=e.radio,o=e.showPartialState,i=e.hierarchical,a=e.rootPrefixId;return ut({nodes:Array.isArray(t)?t:[t],simple:n,radio:r,showPartialState:o,hierarchical:i,rootPrefixId:a})};var pt=function e(t,n,r){n[t._id]=!0,c(t._children)||t._children.forEach((function(t){return e(r(t),n,r)}))},dt=function(e,t){var n=[],r={};return e.forEach((function(e,o){r[o]||(t(e,o,r)&&n.push(e),r[o]=!0)})),n},ht={getNodesMatching:dt,getVisibleNodes:function(e,t,n){return dt(e,(function(e,r,o){return n&&e._children&&e._children.length&&!0!==e.expanded&&pt(e,o,t),!e.hide}))},markSubTreeVisited:pt};const yt=ht;function bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var vt="ArrowUp",gt="ArrowDown",mt="ArrowLeft",wt="ArrowRight",Ot="Enter",jt="Home",St="PageUp",_t="PageDown",Et={None:"None",FocusPrevious:"FocusPrevious",FocusNext:"FocusNext",FocusParent:"FocusParent",FocusFirst:"FocusFirst",FocusLast:"FocusLast",ToggleExpanded:"ToggleExpanded",ToggleChecked:"ToggleChecked"},Pt=new Set([Et.FocusPrevious,Et.FocusNext,Et.FocusParent,Et.FocusFirst,Et.FocusLast]),xt=[vt,gt,jt,St,"End",_t],kt=xt.concat([mt,wt,Ot]),Tt=function(e,t,n,r){return t.indexOf(e)>-1||!n&&e===r},Ct={isValidKey:function(e,t){return(t?kt:xt).indexOf(e)>-1},getAction:function(e,t){var n;return n=t===mt?function(e,t){return e&&t===mt?!0===e.expanded?Et.ToggleExpanded:e._parent?Et.FocusParent:Et.None:Et.None}(e,t):t===wt?function(e,t){return e&&e._children&&t===wt?!0!==e.expanded?Et.ToggleExpanded:Et.FocusNext:Et.None}(e,t):function(e,t){return Tt(e,[jt,St],t,gt)}(t,e)?Et.FocusFirst:function(e,t){return Tt(e,["End",_t],t,vt)}(t,e)?Et.FocusLast:function(e,t){if(!e)return Et.None;switch(t){case vt:return Et.FocusPrevious;case gt:return Et.FocusNext;case Ot:return Et.ToggleChecked;default:return Et.None}}(e,t),n},getNextFocus:function(e,t,n,r,o){if(n===Et.FocusParent)return function(e,t){return e&&e._parent?t(e._parent):e}(t,r);if(!Pt.has(n))return t;var i=yt.getVisibleNodes(e,r,o);return function(e){return Tt(e,[Et.FocusPrevious,Et.FocusLast],!0)}(n)&&(i=i.reverse()),function(e,t,n){if(!e||0===e.length)return t;var r,o=t;return function(e){return Tt(e,[Et.FocusFirst,Et.FocusLast],!0)}(n)?o=(r=e,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(r)||function(e,t){if(e){if("string"==typeof e)return bt(e,1);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bt(e,1):void 0}}(r)||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.")}())[0]:[Et.FocusPrevious,Et.FocusNext].indexOf(n)>-1&&(o=function(e,t){var n=e.indexOf(t)+1;return n%e.length==0?e[0]:e[n]}(e,t)),o}(i,t,n)},getNextFocusAfterTagDelete:function(e,t,n,r){var o=t?f(t,(function(t){return t._id===e})):-1;if(o<0||!n.length)return r;var i=n[o=n.length>o?o:n.length-1]._id,a=document.getElementById(P(i));return a&&a.firstElementChild||r},handleFocusNavigationkey:function(e,t,n,r,o){var i=Ct.getNextFocus(e,n,t,r,o);return Ct.adjustFocusedProps(n,i),i?i._id:n&&n._id},handleToggleNavigationkey:function(e,t,n,r,o){return e!==Et.ToggleChecked||n||t.readOnly||t.disabled?e===Et.ToggleExpanded&&o(t._id):r(t._id,!0!==t.checked),t&&t._id},adjustFocusedProps:function(e,t){e&&t&&e._id!==t._id&&(e._focused=!1),t&&(t._focused=!0)}};const Rt=Ct;var Nt=function(){function e(t){var n=t.data,r=t.mode,o=t.showPartiallySelected,i=t.rootPrefixId,a=t.searchPredicate;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._src=n,this.simpleSelect="simpleSelect"===r,this.radioSelect="radioSelect"===r,this.hierarchical="hierarchical"===r,this.searchPredicate=a;var c=ft({tree:JSON.parse(JSON.stringify(n)),simple:this.simpleSelect,radio:this.radioSelect,showPartialState:o,hierarchical:this.hierarchical,rootPrefixId:i}),s=c.list,l=c.defaultValues,u=c.singleSelectedNode;this.tree=s,this.defaultValues=l,this.showPartialState=!this.hierarchical&&o,this.searchMaps=new Map,(this.simpleSelect||this.radioSelect)&&u&&(this.currentChecked=u._id)}var t,n;return t=e,n=[{key:"getNodeById",value:function(e){return this.tree.get(e)}},{key:"getMatches",value:function(e){var t=this;if(this.searchMaps.has(e))return this.searchMaps.get(e);var n=-1,r=e;this.searchMaps.forEach((function(t,o){e.startsWith(o)&&o.length>n&&(n=o.length,r=o)}));var o=[],i=this._getAddOnMatch(o,e);return r!==e?this.searchMaps.get(r).forEach((function(e){return i(t.getNodeById(e))})):this.tree.forEach(i),this.searchMaps.set(e,o),o}},{key:"addParentsToTree",value:function(e,t){if(void 0!==e){var n=this.getNodeById(e);this.addParentsToTree(n._parent,t),n.hide=!n._isMatch||n.hide,n.matchInChildren=!0,t.set(e,n)}}},{key:"addChildrenToTree",value:function(e,t,n){var r=this;void 0!==e&&e.forEach((function(e){if(!n||!n.includes(e)){var o=r.getNodeById(e);o.matchInParent=!0,t.set(e,o),r.addChildrenToTree(o._children,t)}}))}},{key:"filterTree",value:function(e,t,n){var r=this,o=this.getMatches(e.toLowerCase()),i=new Map;o.forEach((function(e){var a=r.getNodeById(e);a.hide=!1,a._isMatch=!0,t&&r.addParentsToTree(a._parent,i),i.set(e,a),t&&n&&r.addChildrenToTree(a._children,i,o)}));var a=0===o.length;return this.matchTree=i,{allNodesHidden:a,tree:i}}},{key:"restoreNodes",value:function(){return this.tree.forEach((function(e){e.hide=!1})),this.tree}},{key:"restoreDefaultValues",value:function(){var e=this;return this.defaultValues.forEach((function(t){e.setNodeCheckedState(t,!0)})),this.tree}},{key:"togglePreviousChecked",value:function(e,t){var n=this.currentChecked;if(n&&n!==e){var r=this.getNodeById(n);r.checked=!1,this.radioSelect&&this.showPartialState&&this.partialCheckParents(r)}this.currentChecked=t?e:null}},{key:"setNodeCheckedState",value:function(e,t){this.radioSelect&&this.togglePreviousChecked(e,t);var n=this.getNodeById(e);n.checked=t,this.showPartialState&&(n.partial=!1),this.simpleSelect?this.togglePreviousChecked(e,t):this.radioSelect?(this.showPartialState&&this.partialCheckParents(n),t||this.unCheckParents(n)):(this.hierarchical||this.toggleChildren(e,t),this.showPartialState&&this.partialCheckParents(n),this.hierarchical||t||this.unCheckParents(n))}},{key:"unCheckParents",value:function(e){for(var t=e._parent;t;){var n=this.getNodeById(t);n.checked=!1,n.partial=lt(n,"_children",this.getNodeById.bind(this)),t=n._parent}}},{key:"partialCheckParents",value:function(e){for(var t=this,n=e._parent;n;){var r=this.getNodeById(n);r.checked=r._children.every((function(e){return t.getNodeById(e).checked})),r.partial=lt(r,"_children",this.getNodeById.bind(this)),n=r._parent}}},{key:"toggleChildren",value:function(e,t){var n=this,r=this.getNodeById(e);r.checked=t,this.showPartialState&&(r.partial=!1),c(r._children)||r._children.forEach((function(e){return n.toggleChildren(e,t)}))}},{key:"toggleNodeExpandState",value:function(e){var t=this.getNodeById(e);return t.expanded=!t.expanded,t.expanded||this.collapseChildren(t),this.tree}},{key:"collapseChildren",value:function(e){var t=this;e.expanded=!1,c(e._children)||e._children.forEach((function(e){return t.collapseChildren(t.getNodeById(e))}))}},{key:"tags",get:function(){var e=this;return this.radioSelect||this.simpleSelect?this.currentChecked?[this.getNodeById(this.currentChecked)]:[]:yt.getNodesMatching(this.tree,(function(t,n,r){return t.checked&&!e.hierarchical&&yt.markSubTreeVisited(t,r,(function(t){return e.getNodeById(t)})),t.checked}))}},{key:"getTreeAndTags",value:function(){return{tree:this.tree,tags:this.tags}}},{key:"handleNavigationKey",value:function(e,t,n,r,o,i,a){var c=this,s=e&&this.getNodeById(e),l=Rt.getAction(s,n);return Pt.has(l)?Rt.handleFocusNavigationkey(t,l,s,(function(e){return c.getNodeById(e)}),o):s&&t.has(s._id)?Rt.handleToggleNavigationkey(l,s,r,i,a):e}},{key:"_getAddOnMatch",value:function(e,t){var n=function(e,t){return e.label.toLowerCase().indexOf(t)>=0};return"function"==typeof this.searchPredicate&&(n=this.searchPredicate),function(r){n(r,t)&&e.push(r._id)}}}],n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();const At=Nt;function Dt(e){return Dt="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},Dt(e)}function Bt(){return Bt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bt.apply(this,arguments)}function It(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?It(Object(n),!0).forEach((function(t){Vt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):It(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mt(e,t){return Mt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Mt(e,t)}function Lt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ut(e){return Ut=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ut(e)}function Vt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mt(e,t)}(c,e);var t,n,r,o,a=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ut(r);if(o){var n=Ut(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Dt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Lt(e)}(this,e)});function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),Vt(Lt(t=a.call(this,e)),"initNewProps",(function(e){var n=e.data,r=e.mode,o=e.showDropdown,i=e.showPartiallySelected,a=e.searchPredicate;t.treeManager=new At({data:n,mode:r,showPartiallySelected:i,rootPrefixId:t.clientId,searchPredicate:a}),t.setState((function(e){var n=e.currentFocus&&t.treeManager.getNodeById(e.currentFocus);return n&&(n._focused=!0),Ft({showDropdown:/initial|always/.test(o)||!0===e.showDropdown},t.treeManager.getTreeAndTags())}))})),Vt(Lt(t),"resetSearchState",(function(){return t.searchInput&&(t.searchInput.value=""),{tree:t.treeManager.restoreNodes(),searchModeOn:!1,allNodesHidden:!1}})),Vt(Lt(t),"handleClick",(function(e,n){t.setState((function(e){var n="always"===t.props.showDropdown||t.keepDropdownActive||!e.showDropdown;return n!==e.showDropdown&&(n?document.addEventListener("click",t.handleOutsideClick,!1):document.removeEventListener("click",t.handleOutsideClick,!1)),n?t.props.onFocus():t.props.onBlur(),n?{showDropdown:n}:Ft({showDropdown:n},t.resetSearchState())}),n)})),Vt(Lt(t),"handleOutsideClick",(function(e){"always"!==t.props.showDropdown&&function(e,t){return e instanceof Event&&!function(e){if(e.path)return e.path;for(var t=e.target,n=[t];t.parentElement;)t=t.parentElement,n.unshift(t);return n}(e).some((function(e){return e===t}))}(e,t.node)&&t.handleClick()})),Vt(Lt(t),"onInputChange",(function(e){var n=e.length>0;if(n){var r=t.treeManager.filterTree(e,t.props.keepTreeOnSearch,t.props.keepChildrenOnSearch),o=r.allNodesHidden,i=r.tree;t.setState({tree:i,searchModeOn:n,allNodesHidden:o})}else t.setState(t.resetSearchState())})),Vt(Lt(t),"onTagRemove",(function(e,n){var r=t.state.tags;t.onCheckboxChange(e,!1,(function(o){n&&Rt.getNextFocusAfterTagDelete(e,r,o,t.searchInput).focus()}))})),Vt(Lt(t),"onNodeToggle",(function(e){t.treeManager.toggleNodeExpandState(e);var n=t.state.searchModeOn?t.treeManager.matchTree:t.treeManager.tree;t.setState({tree:n}),"function"==typeof t.props.onNodeToggle&&t.props.onNodeToggle(t.treeManager.getNodeById(e))})),Vt(Lt(t),"onCheckboxChange",(function(e,n,r){var o=t.props,i=o.mode,a=o.keepOpenOnSelect,c=o.clearSearchOnChange,s=t.state,l=s.currentFocus,u=s.searchModeOn;t.treeManager.setNodeCheckedState(e,n);var f=t.treeManager.tags,p=["simpleSelect","radioSelect"].indexOf(i)>-1,d=!(p&&!a)&&t.state.showDropdown,h=l&&t.treeManager.getNodeById(l),y=t.treeManager.getNodeById(e);f.length||(t.treeManager.restoreDefaultValues(),f=t.treeManager.tags);var b={tree:u?t.treeManager.matchTree:t.treeManager.tree,tags:f,showDropdown:d,currentFocus:e};(p&&!d||c)&&Object.assign(b,t.resetSearchState()),p&&!d&&document.removeEventListener("click",t.handleOutsideClick,!1),Rt.adjustFocusedProps(h,y),t.setState(b,(function(){r&&r(f)})),t.props.onChange(y,f)})),Vt(Lt(t),"onAction",(function(e,n){t.props.onAction(t.treeManager.getNodeById(e),n)})),Vt(Lt(t),"onInputFocus",(function(){t.keepDropdownActive=!0})),Vt(Lt(t),"onInputBlur",(function(){t.keepDropdownActive=!1})),Vt(Lt(t),"onTrigger",(function(e){t.handleClick(e,(function(){t.state.showDropdown&&t.searchInput.focus()}))})),Vt(Lt(t),"onKeyboardKeyDown",(function(e){var n=t.props,r=n.readOnly,o=n.mode,i=n.disablePoppingOnBackspace,a=t.state,c=a.showDropdown,s=a.tags,l=a.searchModeOn,u=a.currentFocus,f=t.treeManager,p=l?f.matchTree:f.tree;if(c||!Rt.isValidKey(e.key,!1)&&!/^\w$/i.test(e.key))if(c&&Rt.isValidKey(e.key,!0)){var d=f.handleNavigationKey(u,p,e.key,r,!l,t.onCheckboxChange,t.onNodeToggle);d!==u&&t.setState({currentFocus:d},(function(){var e=document&&document.getElementById("".concat(d,"_li"));e&&e.scrollIntoView()}))}else{if(c&&["Escape","Tab"].indexOf(e.key)>-1)return void("simpleSelect"===o&&p.has(u)?t.onCheckboxChange(u,!0):(t.keepDropdownActive=!1,t.handleClick()));if(i||"Backspace"!==e.key||!s.length||0!==t.searchInput.value.length)return;var h=s.pop();t.onCheckboxChange(h._id,!1)}else if(e.persist(),t.handleClick(null,(function(){return t.onKeyboardKeyDown(e)})),/\w/i.test(e.key))return;e.preventDefault()})),Vt(Lt(t),"getAriaAttributes",(function(){var e=t.props,n=e.mode,r=e.texts;return"radioSelect"!==n?{}:Ft({role:"radiogroup"},p(r.label))})),t.state={searchModeOn:!1,currentFocus:void 0},t.clientId=e.id||u.get(Lt(t)),t}return t=c,(n=[{key:"UNSAFE_componentWillMount",value:function(){this.initNewProps(this.props)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.handleOutsideClick,!1)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.initNewProps(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.disabled,r=t.readOnly,o=t.mode,a=t.texts,c=t.inlineSearchInput,s=t.tabIndex,l=this.state,u=l.showDropdown,f=l.currentFocus,p=l.tags,d={disabled:n,readOnly:r,activeDescendant:f?"".concat(f,"_li"):void 0,texts:a,mode:o,clientId:this.clientId},h=i().createElement(w,Bt({inputRef:function(t){e.searchInput=t},onInputChange:this.onInputChange,onFocus:this.onInputFocus,onBlur:this.onInputBlur,onKeyDown:this.onKeyboardKeyDown},d,{inlineSearchInput:c}));return i().createElement("div",{id:this.clientId,className:[this.props.className&&this.props.className,"react-dropdown-tree-select"].filter(Boolean).join(" "),ref:function(t){e.node=t}},i().createElement("div",{className:["dropdown","simpleSelect"===o&&"simple-select","radioSelect"===o&&"radio-select"].filter(Boolean).join(" ")},i().createElement(W,Bt({onTrigger:this.onTrigger,showDropdown:u},d,{tags:p,tabIndex:s}),i().createElement(F,Bt({tags:p,onTagRemove:this.onTagRemove},d),!c&&h)),u&&i().createElement("div",Bt({className:"dropdown-content"},this.getAriaAttributes()),c&&h,this.state.allNodesHidden?i().createElement("span",{className:"no-matches"},a.noMatches||"No matches found"):i().createElement(it,Bt({data:this.state.tree,keepTreeOnSearch:this.props.keepTreeOnSearch,keepChildrenOnSearch:this.props.keepChildrenOnSearch,searchModeOn:this.state.searchModeOn,onAction:this.onAction,onCheckboxChange:this.onCheckboxChange,onNodeToggle:this.onNodeToggle,mode:o,showPartiallySelected:this.props.showPartiallySelected},d)))))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.Component);Vt(zt,"propTypes",{data:t().oneOfType([t().object,t().array]).isRequired,clearSearchOnChange:t().bool,keepTreeOnSearch:t().bool,keepChildrenOnSearch:t().bool,keepOpenOnSelect:t().bool,texts:t().shape({placeholder:t().string,inlineSearchPlaceholder:t().string,noMatches:t().string,label:t().string,labelRemove:t().string}),showDropdown:t().oneOf(["default","initial","always"]),className:t().string,onChange:t().func,onAction:t().func,onNodeToggle:t().func,onFocus:t().func,onBlur:t().func,mode:t().oneOf(["multiSelect","simpleSelect","radioSelect","hierarchical"]),showPartiallySelected:t().bool,disabled:t().bool,readOnly:t().bool,id:t().string,searchPredicate:t().func,inlineSearchInput:t().bool,tabIndex:t().number,disablePoppingOnBackspace:t().bool}),Vt(zt,"defaultProps",{onAction:function(){},onFocus:function(){},onBlur:function(){},onChange:function(){},texts:{},showDropdown:"default",inlineSearchInput:!1,tabIndex:0,disablePoppingOnBackspace:!1});const qt=zt})(),o})(),e.exports=r(n(9196))},9196:function(e){"use strict";e.exports=window.React}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=t,e=[],r.O=function(t,n,o,i){if(!n){var a=1/0;for(u=0;u<e.length;u++){n=e[u][0],o=e[u][1],i=e[u][2];for(var c=!0,s=0;s<n.length;s++)(!1&i||a>=i)&&Object.keys(r.O).every((function(e){return r.O[e](n[s])}))?n.splice(s--,1):(c=!1,i<a&&(a=i));if(c){e.splice(u--,1);var l=o();void 0!==l&&(t=l)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,o,i]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&!e;)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}(),function(){var e={826:0,431:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,i,a=n[0],c=n[1],s=n[2],l=0;if(a.some((function(t){return 0!==e[t]}))){for(o in c)r.o(c,o)&&(r.m[o]=c[o]);if(s)var u=s(r)}for(t&&t(n);l<a.length;l++)i=a[l],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return r.O(u)},n=self.webpackChunkopen_video_block=self.webpackChunkopen_video_block||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var o=r.O(void 0,[431],(function(){return r(2168)}));o=r.O(o)}();
Note: See TracChangeset for help on using the changeset viewer.