/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */ (window.discoverLogExplorer_bundle_jsonpfunction=window.discoverLogExplorer_bundle_jsonpfunction||[]).push([[3],Array(28).concat([function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"m",(function(){return u})),n.d(t,"g",(function(){return l})),n.d(t,"p",(function(){return f})),n.d(t,"o",(function(){return d})),n.d(t,"j",(function(){return h})),n.d(t,"i",(function(){return p})),n.d(t,"l",(function(){return g})),n.d(t,"k",(function(){return y})),n.d(t,"f",(function(){return v})),n.d(t,"h",(function(){return m})),n.d(t,"n",(function(){return b}));var r=n(6);const o="dataset-selector-popover",i="integrations_panel",a="unmanaged_streams_panel",s=300,c={maxHeight:440},u=r.i18n.translate("xpack.discoverLogExplorer.datasetSelector.selectDataset",{defaultMessage:"Select dataset"}),l=r.i18n.translate("xpack.discoverLogExplorer.datasetSelector.integrations",{defaultMessage:"Integrations"}),f=r.i18n.translate("xpack.discoverLogExplorer.datasetSelector.uncategorized",{defaultMessage:"Uncategorized"}),d=r.i18n.translate("xpack.discoverLogExplorer.datasetSelector.sortOrders",{defaultMessage:"Sort directions"}),h=r.i18n.translate("xpack.discoverLogExplorer.datasetSelector.noDatasets",{defaultMessage:"No data streams found"}),p=r.i18n.translate("xpack.discoverLogExplorer.datasetSelector.noDatasetsDescription",{defaultMessage:"No datasets or search results found."}),g=r.i18n.translate("xpack.discoverLogExplorer.datasetSelector.noIntegrations",{defaultMessage:"No integrations found"}),y=r.i18n.translate("xpack.discoverLogExplorer.datasetSelector.noIntegrationsDescription",{defaultMessage:"No integrations or search results found."}),v=r.i18n.translate("xpack.discoverLogExplorer.datasetSelector.error",{defaultMessage:"error"}),m=r.i18n.translate("xpack.discoverLogExplorer.datasetSelector.noDataRetry",{defaultMessage:"Retry"}),b=[{id:"asc",iconType:"sortAscending",label:"Ascending"},{id:"desc",iconType:"sortDescending",label:"Descending"}]},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.isInterpreterStateEqual=t.isService=t.shallowEqual=t.getServiceSnapshot=t.partition=void 0;var i=n(24);function a(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}t.partition=function(e,t){var n,i,a=r([[],[]],2),s=a[0],c=a[1];try{for(var u=o(e),l=u.next();!l.done;l=u.next()){var f=l.value;t(f)?s.push(f):c.push(f)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return[s,c]},t.getServiceSnapshot=function(e){return 0!==e.status?e.getSnapshot():e.machine.initialState},t.shallowEqual=function(e,t){if(a(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o0||"boolean"==typeof t.changed);return!(n.changed||r)}},,,function(e,t,n){e.exports=n(7)(1294)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.useInterpret=t.useIdleInterpreter=void 0;var a=n(2),s=n(41),c=n(24),u=n(34);function l(e,t){var n=(0,u.default)((function(){return"function"==typeof e?e():e})),i=t.context,a=t.guards,l=t.actions,f=t.activities,d=t.services,h=t.delays,p=(t.state,o(t,["context","guards","actions","activities","services","delays","state"])),g=(0,u.default)((function(){var e={context:i,guards:a,actions:l,activities:f,services:d,delays:h},t=n.withConfig(e,(function(){return r(r({},n.context),i)}));return(0,c.interpret)(t,p)}));return(0,s.default)((function(){Object.assign(g.machine.options.actions,l),Object.assign(g.machine.options.guards,a),Object.assign(g.machine.options.activities,f),Object.assign(g.machine.options.services,d),Object.assign(g.machine.options.delays,h)}),[l,a,f,d,h]),g}t.useIdleInterpreter=l,t.useInterpret=function(e){for(var t=[],n=1;n0;){var t=u.current.shift();e.send(t)}}),[e]),[p,g]}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createActorContext=t.shallowEqual=t.useSpawn=t.useSelector=t.useInterpret=t.useActor=t.useMachine=void 0;var r=n(51);Object.defineProperty(t,"useMachine",{enumerable:!0,get:function(){return r.useMachine}});var o=n(35);Object.defineProperty(t,"useActor",{enumerable:!0,get:function(){return o.useActor}});var i=n(33);Object.defineProperty(t,"useInterpret",{enumerable:!0,get:function(){return i.useInterpret}});var a=n(42);Object.defineProperty(t,"useSelector",{enumerable:!0,get:function(){return a.useSelector}});var s=n(52);Object.defineProperty(t,"useSpawn",{enumerable:!0,get:function(){return s.useSpawn}});var c=n(29);Object.defineProperty(t,"shallowEqual",{enumerable:!0,get:function(){return c.shallowEqual}});var u=n(53);Object.defineProperty(t,"createActorContext",{enumerable:!0,get:function(){return u.createActorContext}})},function(e,t,n){"use strict";n.d(t,"e",(function(){return S})),n.d(t,"a",(function(){return all_dataset_selection_AllDatasetSelection})),n.d(t,"b",(function(){return single_dataset_selection_SingleDatasetSelection})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return b}));var r=n(5),o=n.n(r),i=n(27),a=n(14),s=n(48),c=n(49);class DatasetEncodingError extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype),this.name="DatasetEncodingError"}}var u=n(11);const l=u.type({selectionType:u.literal("all")}),f=u.partial({name:u.string}),d=u.partial({title:u.string}),h=u.partial({version:u.string}),p=u.intersection([f,d,h,u.type({dataset:i.c})]),g=u.type({selectionType:u.literal("single"),selection:p}),y=u.union([l,g]),v=e=>{const t=Object(c.a)(y,(e=>new DatasetEncodingError(`The current dataset selection is invalid: ${e}"`)))(e);return s.compressToBase64(Object(a.encode)(t))},m=e=>{const t=s.decompressFromBase64(e);if(null===t||""===t)throw new DatasetEncodingError("The stored id is not a valid compressed value.");const n=Object(a.decode)(t);return Object(c.a)(y,(e=>new DatasetEncodingError(`The current dataset selection is invalid: ${e}"`)))(n)};class all_dataset_selection_AllDatasetSelection{constructor(){o()(this,"selectionType",void 0),o()(this,"selection",void 0),this.selectionType="all",this.selection={dataset:i.a.createAllLogsDataset()}}toDataviewSpec(){const{name:e,title:t}=this.selection.dataset.toDataviewSpec();return{id:this.toURLSelectionId(),name:e,title:t}}toURLSelectionId(){return v({selectionType:this.selectionType})}static create(){return new all_dataset_selection_AllDatasetSelection}}class single_dataset_selection_SingleDatasetSelection{constructor(e){var t,n,r;o()(this,"selectionType",void 0),o()(this,"selection",void 0),this.selectionType="single",this.selection={name:null===(t=e.parentIntegration)||void 0===t?void 0:t.name,title:null===(n=e.parentIntegration)||void 0===n?void 0:n.title,version:null===(r=e.parentIntegration)||void 0===r?void 0:r.version,dataset:e}}toDataviewSpec(){const{name:e,title:t}=this.selection.dataset.toDataviewSpec();return{id:this.toURLSelectionId(),name:e,title:t}}toURLSelectionId(){return v({selectionType:this.selectionType,selection:{name:this.selection.name,title:this.selection.title,version:this.selection.version,dataset:this.selection.dataset.toPlain()}})}static fromSelection(e){const{name:t,title:n,version:r,dataset:o}=e,a=t&&r?{name:t,title:n,version:r}:void 0,s=i.a.create(o,a);return new single_dataset_selection_SingleDatasetSelection(s)}static create(e){return new single_dataset_selection_SingleDatasetSelection(e)}}const b=e=>"all"===e.selectionType?all_dataset_selection_AllDatasetSelection.create():"single"===e.selectionType?single_dataset_selection_SingleDatasetSelection.fromSelection(e.selection):void 0,S=e=>e instanceof all_dataset_selection_AllDatasetSelection||e instanceof single_dataset_selection_SingleDatasetSelection},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2).useLayoutEffect;t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useSelector=void 0;var r=n(2),o=n(32),i=n(35),a=n(29),s=function(e,t){return e===t};t.useSelector=function(e,t,n,c){void 0===n&&(n=s);var u=(0,r.useRef)(null),l=(0,r.useCallback)((function(t){return e.subscribe(t).unsubscribe}),[e]),f=(0,r.useCallback)((function(){return c?c(e):function(e,t){if((0,a.isService)(e)){if(0===e.status&&t.current)return t.current;var n=(0,a.getServiceSnapshot)(e);return t.current=0===e.status?n:null,n}return(0,i.isActorWithState)(e)?e.state:void 0}(e,u)}),[e,c]);return(0,o.useSyncExternalStoreWithSelector)(l,f,f,t,n)}},,,,,,function(e,t,n){var r,o=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",r={};function o(e,t){if(!r[e]){r[e]={};for(var n=0;n>>8,n[2*r+1]=a%256}return n},decompressFromUint8Array:function(t){if(null==t)return i.decompress(t);for(var n=new Array(t.length/2),r=0,o=n.length;r>=1}else{for(o=1,r=0;r>=1}0==--f&&(f=Math.pow(2,h),h++),delete s[l]}else for(o=a[l],r=0;r>=1;0==--f&&(f=Math.pow(2,h),h++),a[u]=d++,l=String(c)}if(""!==l){if(Object.prototype.hasOwnProperty.call(s,l)){if(l.charCodeAt(0)<256){for(r=0;r>=1}else{for(o=1,r=0;r>=1}0==--f&&(f=Math.pow(2,h),h++),delete s[l]}else for(o=a[l],r=0;r>=1;0==--f&&(f=Math.pow(2,h),h++)}for(o=2,r=0;r>=1;for(;;){if(g<<=1,y==t-1){p.push(n(g));break}y++}return p.join("")},decompress:function(e){return null==e?"":""==e?null:i._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(t,n,r){var o,i,a,s,c,u,l,f=[],d=4,h=4,p=3,g="",y=[],v={val:r(0),position:n,index:1};for(o=0;o<3;o+=1)f[o]=o;for(a=0,c=Math.pow(2,2),u=1;u!=c;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),a|=(s>0?1:0)*u,u<<=1;switch(a){case 0:for(a=0,c=Math.pow(2,8),u=1;u!=c;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),a|=(s>0?1:0)*u,u<<=1;l=e(a);break;case 1:for(a=0,c=Math.pow(2,16),u=1;u!=c;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),a|=(s>0?1:0)*u,u<<=1;l=e(a);break;case 2:return""}for(f[3]=l,i=l,y.push(l);;){if(v.index>t)return"";for(a=0,c=Math.pow(2,p),u=1;u!=c;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),a|=(s>0?1:0)*u,u<<=1;switch(l=a){case 0:for(a=0,c=Math.pow(2,8),u=1;u!=c;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),a|=(s>0?1:0)*u,u<<=1;f[h++]=e(a),l=h-1,d--;break;case 1:for(a=0,c=Math.pow(2,16),u=1;u!=c;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),a|=(s>0?1:0)*u,u<<=1;f[h++]=e(a),l=h-1,d--;break;case 2:return y.join("")}if(0==d&&(d=Math.pow(2,p),p++),f[l])g=f[l];else{if(l!==h)return null;g=i+i.charAt(0)}y.push(g),f[h++]=i+g.charAt(0),i=g,0==--d&&(d=Math.pow(2,p),p++)}}};return i}();void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)},,,function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.useMachine=void 0;var o=n(2),i=n(32),a=n(24),s=n(33),c=n(29);function u(e){return e}t.useMachine=function(e){for(var t=[],n=1;n component."));return e}return l.displayName="ActorProvider(".concat(e.id,")"),{Provider:l,useActorRef:f,useActor:function(){var e=f();return(0,a.useActor)(e)},useSelector:function(e,t){var n=f();return(0,s.useSelector)(n,e,t)}}}},,,,,function(e,t,n){e.exports=n(7)(1466)},function(e,t,n){"use strict";e.exports=n(85)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n(2);var r=n(12),o=n(28),i=n(0);const a=()=>Object(i.jsx)(r.EuiPanel,{"data-test-subj":"datasetSelectorSkeleton"},Object(i.jsx)(r.EuiSkeletonText,{lines:7,isLoading:!0,contentAriaLabel:o.p}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=!1,i={};t.default=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a=0||(o[n]=e[n]);return o}(t,["children"]),a=e(i),c=o,u=0;ut.maxAge:e[f]&&n>e[f]}function w(e){if(e[c]>e[s])for(var t=e[p].tail;e[c]>e[s]&&null!==t;){var n=t.prev;_(e,t),t=n}}function _(e,t){if(t){var n=t.value;e[d]&&e[d](n.key,n.value),e[c]-=n.length,e[g].delete(n.key),e[p].removeNode(t)}}function E(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}Object.defineProperty(v.prototype,"max",{set:function(e){(!e||"number"!=typeof e||e<=0)&&(e=1/0),this[s]=e,w(this)},get:function(){return this[s]},enumerable:!0}),Object.defineProperty(v.prototype,"allowStale",{set:function(e){this[l]=!!e},get:function(){return this[l]},enumerable:!0}),Object.defineProperty(v.prototype,"maxAge",{set:function(e){(!e||"number"!=typeof e||e<0)&&(e=0),this[f]=e,w(this)},get:function(){return this[f]},enumerable:!0}),Object.defineProperty(v.prototype,"lengthCalculator",{set:function(e){"function"!=typeof e&&(e=y),e!==this[u]&&(this[u]=e,this[c]=0,this[p].forEach((function(e){e.length=this[u](e.value,e.key),this[c]+=e.length}),this)),w(this)},get:function(){return this[u]},enumerable:!0}),Object.defineProperty(v.prototype,"length",{get:function(){return this[c]},enumerable:!0}),Object.defineProperty(v.prototype,"itemCount",{get:function(){return this[p].length},enumerable:!0}),v.prototype.rforEach=function(e,t){t=t||this;for(var n=this[p].tail;null!==n;){var r=n.prev;m(this,e,n,t),n=r}},v.prototype.forEach=function(e,t){t=t||this;for(var n=this[p].head;null!==n;){var r=n.next;m(this,e,n,t),n=r}},v.prototype.keys=function(){return this[p].toArray().map((function(e){return e.key}),this)},v.prototype.values=function(){return this[p].toArray().map((function(e){return e.value}),this)},v.prototype.reset=function(){this[d]&&this[p]&&this[p].length&&this[p].forEach((function(e){this[d](e.key,e.value)}),this),this[g]=new o,this[p]=new a,this[c]=0},v.prototype.dump=function(){return this[p].map((function(e){if(!S(this,e))return{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}}),this).toArray().filter((function(e){return e}))},v.prototype.dumpLru=function(){return this[p]},v.prototype.inspect=function(e,t){var n="LRUCache {",r=!1;this[l]&&(n+="\n allowStale: true",r=!0);var o=this[s];o&&o!==1/0&&(r&&(n+=","),n+="\n max: "+i.inspect(o,t),r=!0);var a=this[f];a&&(r&&(n+=","),n+="\n maxAge: "+i.inspect(a,t),r=!0);var d=this[u];d&&d!==y&&(r&&(n+=","),n+="\n length: "+i.inspect(this[c],t),r=!0);var h=!1;return this[p].forEach((function(e){h?n+=",\n ":(r&&(n+=",\n"),h=!0,n+="\n ");var o=i.inspect(e.key).split("\n").join("\n "),s={value:e.value};e.maxAge!==a&&(s.maxAge=e.maxAge),d!==y&&(s.length=e.length),S(this,e)&&(s.stale=!0),s=i.inspect(s,t).split("\n").join("\n "),n+=o+" => "+s})),(h||r)&&(n+="\n"),n+="}"},v.prototype.set=function(e,t,n){var r=(n=n||this[f])?Date.now():0,o=this[u](t,e);if(this[g].has(e)){if(o>this[s])return _(this,this[g].get(e)),!1;var i=this[g].get(e).value;return this[d]&&(this[h]||this[d](e,i.value)),i.now=r,i.maxAge=n,i.value=t,this[c]+=o-i.length,i.length=o,this.get(e),w(this),!0}var a=new E(e,t,o,r,n);return a.length>this[s]?(this[d]&&this[d](e,t),!1):(this[c]+=a.length,this[p].unshift(a),this[g].set(e,this[p].head),w(this),!0)},v.prototype.has=function(e){return!!this[g].has(e)&&!S(this,this[g].get(e).value)},v.prototype.get=function(e){return b(this,e,!0)},v.prototype.peek=function(e){return b(this,e,!1)},v.prototype.pop=function(){var e=this[p].tail;return e?(_(this,e),e.value):null},v.prototype.del=function(e){_(this,this[g].get(e))},v.prototype.load=function(e){this.reset();for(var t=Date.now(),n=e.length-1;n>=0;n--){var r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{var i=o-t;i>0&&this.set(r.k,r.v,i)}}},v.prototype.prune=function(){var e=this;this[g].forEach((function(t,n){b(e,n,!1)}))}},function(e,t,n){"pseudomap"===Object({IS_KIBANA_DISTRIBUTABLE:"true"}).npm_package_name&&"test"===Object({IS_KIBANA_DISTRIBUTABLE:"true"}).npm_lifecycle_script&&(Object({IS_KIBANA_DISTRIBUTABLE:"true"}).TEST_PSEUDOMAP="true"),"function"!=typeof Map||Object({IS_KIBANA_DISTRIBUTABLE:"true"}).TEST_PSEUDOMAP?e.exports=n(67):e.exports=Map},function(e,t){var n=Object.prototype.hasOwnProperty;function r(e){if(!(this instanceof r))throw new TypeError("Constructor PseudoMap requires 'new'");if(this.clear(),e)if(e instanceof r||"function"==typeof Map&&e instanceof Map)e.forEach((function(e,t){this.set(t,e)}),this);else{if(!Array.isArray(e))throw new TypeError("invalid argument");e.forEach((function(e){this.set(e[0],e[1])}),this)}}function o(e,t){return e===t||e!=e&&t!=t}function i(e,t,n){this.key=e,this.value=t,this._index=n}function a(e,t){for(var r=0,i="_"+t,a=i;n.call(e,a);a=i+r++)if(o(e[a].key,t))return e[a]}e.exports=r,r.prototype.forEach=function(e,t){t=t||this,Object.keys(this._data).forEach((function(n){"size"!==n&&e.call(t,this._data[n].value,this._data[n].key)}),this)},r.prototype.has=function(e){return!!a(this._data,e)},r.prototype.get=function(e){var t=a(this._data,e);return t&&t.value},r.prototype.set=function(e,t){!function(e,t,r){for(var a=0,s="_"+t,c=s;n.call(e,c);c=s+a++)if(o(e[c].key,t))return void(e[c].value=r);e.size++,e[c]=new i(t,r,c)}(this._data,e,t)},r.prototype.delete=function(e){var t=a(this._data,e);t&&(delete this._data[t._index],this._data.size--)},r.prototype.clear=function(){var e=Object.create(null);e.size=0,Object.defineProperty(this,"_data",{value:e,enumerable:!1,configurable:!0,writable:!1})},Object.defineProperty(r.prototype,"size",{get:function(){return this._data.size},set:function(e){},enumerable:!0,configurable:!0}),r.prototype.values=r.prototype.keys=r.prototype.entries=function(){throw new Error("iterators are not implemented in this version")}},function(e,t,n){e.exports=n(7)(2948)},function(e,t){function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,o=arguments.length;r1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;null!==r;o++)n=e(n,r.value,o),r=r.next;return n},n.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var o=this.length-1;null!==r;o--)n=e(n,r.value,o),r=r.prev;return n},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(tthis.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&othis.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)r.push(i.value);return r},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this}},function(e,t,n){var r;e.exports=function e(t,n,o){function i(s,c){if(!n[s]){if(!t[s]){if(!c&&"function"==typeof r&&r)return r(s,!0);if(a)return a(s,!0);throw new Error("Cannot find module '"+s+"'")}var u=n[s]={exports:{}};t[s][0].call(u.exports,(function(e){return i(t[s][1][e]||e)}),u,u.exports,e,t,n,o)}return n[s].exports}for(var a="function"==typeof r&&r,s=0;s=0)return this.dispatch("[CIRCULAR:"+s+"]");if(n.push(t),void 0!==i&&i.isBuffer&&i.isBuffer(t))return r("buffer:"),r(t);if("object"===a||"function"===a){var c=Object.keys(t);e.unorderedObjects&&(c=c.sort()),!1===e.respectType||p(t)||c.splice(0,0,"prototype","__proto__","constructor"),e.excludeKeys&&(c=c.filter((function(t){return!e.excludeKeys(t)}))),r("object:"+c.length+":");var u=this;return c.forEach((function(n){u.dispatch(n),r(":"),e.excludeValues||u.dispatch(t[n]),r(",")}))}if(!this["_"+a]){if(e.ignoreUnknown)return r("["+a+"]");throw new Error('Unknown object type "'+a+'"')}this["_"+a](t)},_array:function(t,o){o=void 0!==o?o:!1!==e.unorderedArrays;var i=this;if(r("array:"+t.length+":"),!o||t.length<=1)return t.forEach((function(e){return i.dispatch(e)}));var a=[],s=t.map((function(t){var r=new y,o=n.slice();return g(e,r,o).dispatch(t),a=a.concat(o.slice(n.length)),r.read().toString()}));return n=n.concat(a),s.sort(),this._array(s,!1)},_date:function(e){return r("date:"+e.toJSON())},_symbol:function(e){return r("symbol:"+e.toString())},_error:function(e){return r("error:"+e.toString())},_boolean:function(e){return r("bool:"+e.toString())},_string:function(e){r("string:"+e.length+":"),r(e.toString())},_function:function(t){r("fn:"),p(t)?this.dispatch("[native]"):this.dispatch(t.toString()),!1!==e.respectFunctionNames&&this.dispatch("function-name:"+String(t.name)),e.respectFunctionProperties&&this._object(t)},_number:function(e){return r("number:"+e.toString())},_xml:function(e){return r("xml:"+e.toString())},_null:function(){return r("Null")},_undefined:function(){return r("Undefined")},_regexp:function(e){return r("regex:"+e.toString())},_uint8array:function(e){return r("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return r("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return r("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return r("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_int16array:function(e){return r("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_uint32array:function(e){return r("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_int32array:function(e){return r("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_float32array:function(e){return r("float32array:"),this.dispatch(Array.prototype.slice.call(e))},_float64array:function(e){return r("float64array:"),this.dispatch(Array.prototype.slice.call(e))},_arraybuffer:function(e){return r("arraybuffer:"),this.dispatch(new Uint8Array(e))},_url:function(e){return r("url:"+e.toString())},_map:function(t){r("map:");var n=Array.from(t);return this._array(n,!1!==e.unorderedSets)},_set:function(t){r("set:");var n=Array.from(t);return this._array(n,!1!==e.unorderedSets)},_blob:function(){if(e.ignoreUnknown)return r("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return r("domwindow")},_process:function(){return r("process")},_timer:function(){return r("timer")},_pipe:function(){return r("pipe")},_tcp:function(){return r("tcp")},_udp:function(){return r("udp")},_tty:function(){return r("tty")},_statwatcher:function(){return r("statwatcher")},_securecontext:function(){return r("securecontext")},_connection:function(){return r("connection")},_zlib:function(){return r("zlib")},_context:function(){return r("context")},_nodescript:function(){return r("nodescript")},_httpparser:function(){return r("httpparser")},_dataview:function(){return r("dataview")},_signal:function(){return r("signal")},_fsevent:function(){return r("fsevent")},_tlswrap:function(){return r("tlswrap")}}}function y(){return{buf:"",write:function(e){this.buf+=e},end:function(e){this.buf+=e},read:function(){return this.buf}}}var v=e("crypto");(n=t.exports=d).sha1=function(e){return d(e)},n.keys=function(e){return d(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},n.MD5=function(e){return d(e,{algorithm:"md5",encoding:"hex"})},n.keysMD5=function(e){return d(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var m=v.getHashes?v.getHashes().slice():["sha1","md5"];m.push("passthrough");var b=["buffer","hex","binary","base64"];n.writeToStream=function(e,t,n){return void 0===n&&(n=t,t={}),g(t=h(e,t),n).dispatch(e)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_e8180ef5.js","/")},{buffer:3,crypto:5,lYpoI2:10}],2:[function(e,t,n){(function(e,t,r,o,i,a,s,c,u){var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===r||t===c?62:t===o||t===u?63:t0)throw new Error("Invalid string. Length must be a multiple of 4");var l=e.length;c="="===e.charAt(l-2)?2:"="===e.charAt(l-1)?1:0,u=new n(3*e.length/4-c),a=c>0?e.length-4:e.length;var f=0;for(o=0,i=0;o>16),r((65280&s)>>8),r(255&s);return 2===c?r(255&(s=t(e.charAt(o))<<2|t(e.charAt(o+1))>>4)):1===c&&(r((s=t(e.charAt(o))<<10|t(e.charAt(o+1))<<4|t(e.charAt(o+2))>>2)>>8&255),r(255&s)),u},e.fromByteArray=function(e){function t(e){return l.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var r,o,i,a=e.length%3,s="";for(r=0,i=e.length-a;r>2),s+=t(o<<4&63),s+="==";break;case 2:s+=t((o=(e[e.length-2]<<8)+e[e.length-1])>>10),s+=t(o>>4&63),s+=t(o<<2&63),s+="="}return s}}(void 0===n?this.base64js={}:n)}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:10}],3:[function(e,t,n){(function(t,r,o,i,a,s,c,u,l){function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);var r,i,a,s=typeof e;if("base64"===t&&"string"===s)for(e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e);e.length%4!=0;)e+="=";if("number"===s)r=T(e);else if("string"===s)r=o.byteLength(e,t);else{if("object"!==s)throw new Error("First argument needs to be a number, array or string.");r=T(e.length)}if(o._useTypedArrays?i=o._augment(new Uint8Array(r)):((i=this).length=r,i._isBuffer=!0),o._useTypedArrays&&"number"==typeof e.byteLength)i._set(e);else if(function(e){return k(e)||o.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}(e))for(a=0;ai&&(r=i):r=i;var a=t.length;F(a%2==0,"Invalid hex string"),r>a/2&&(r=a/2);for(var s=0;s>8,r=t%256,o.push(r),o.push(n);return o}(t),e,n,r)}function y(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o=i))return n?(o=e[t],t+1=i))return n?(t+2>>0)):(t+1>>0),o}function b(e,t,n,r){if(r||(F("boolean"==typeof n,"missing or invalid endian"),F(null!=t,"missing offset"),F(t+1=e.length)){var o=v(e,t,n,!0);return 32768&o?-1*(65535-o+1):o}}function S(e,t,n,r){if(r||(F("boolean"==typeof n,"missing or invalid endian"),F(null!=t,"missing offset"),F(t+3=e.length)){var o=m(e,t,n,!0);return 2147483648&o?-1*(4294967295-o+1):o}}function w(e,t,n,r){return r||(F("boolean"==typeof n,"missing or invalid endian"),F(t+3=i))for(var a=0,s=Math.min(i-n,2);a>>8*(r?a:1-a)}function I(e,t,n,r,o){o||(F(null!=t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(null!=n,"missing offset"),F(n+3=i))for(var a=0,s=Math.min(i-n,4);a>>8*(r?a:3-a)&255}function A(e,t,n,r,o){o||(F(null!=t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(null!=n,"missing offset"),F(n+1=e.length||E(e,t>=0?t:65535+t+1,n,r,o)}function O(e,t,n,r,o){o||(F(null!=t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(null!=n,"missing offset"),F(n+3=e.length||I(e,t>=0?t:4294967295+t+1,n,r,o)}function x(e,t,n,r,o){o||(F(null!=t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(null!=n,"missing offset"),F(n+3=e.length||H.write(e,t,n,r,23,4)}function j(e,t,n,r,o){o||(F(null!=t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(null!=n,"missing offset"),F(n+7=e.length||H.write(e,t,n,r,52,8)}function C(e,t,n){return"number"!=typeof e?n:(e=~~e)>=t?t:e>=0||(e+=t)>=0?e:0}function T(e){return(e=~~Math.ceil(+e))<0?0:e}function k(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function L(e){return e<16?"0"+e.toString(16):e.toString(16)}function R(e){for(var t=[],n=0;n=55296&&r<=57343&&n++;for(var i=encodeURIComponent(e.slice(o,n+1)).substr(1).split("%"),a=0;a=t.length||o>=e.length);o++)t[o+n]=e[o];return o}function B(e){try{return decodeURIComponent(e)}catch(e){return String.fromCharCode(65533)}}function P(e,t){F("number"==typeof e,"cannot write a non-number as a number"),F(e>=0,"specified a negative value for writing an unsigned value"),F(e<=t,"value is larger than maximum value for type"),F(Math.floor(e)===e,"value has a fractional component")}function N(e,t,n){F("number"==typeof e,"cannot write a non-number as a number"),F(e<=t,"value larger than maximum allowed value"),F(e>=n,"value smaller than minimum allowed value"),F(Math.floor(e)===e,"value has a fractional component")}function U(e,t,n){F("number"==typeof e,"cannot write a non-number as a number"),F(e<=t,"value larger than maximum allowed value"),F(e>=n,"value smaller than minimum allowed value")}function F(e,t){if(!e)throw new Error(t||"Failed assertion")}var z=e("base64-js"),H=e("ieee754");n.Buffer=o,n.SlowBuffer=o,n.INSPECT_MAX_BYTES=50,o.poolSize=8192,o._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(e){return!1}}(),o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.byteLength=function(e,t){var n;switch(e+="",t||"utf8"){case"hex":n=e.length/2;break;case"utf8":case"utf-8":n=R(e).length;break;case"ascii":case"binary":case"raw":n=e.length;break;case"base64":n=D(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*e.length;break;default:throw new Error("Unknown encoding")}return n},o.concat=function(e,t){if(F(k(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new o(0);if(1===e.length)return e[0];var n;if("number"!=typeof t)for(t=0,n=0;na&&(n=a):n=a,r=String(r||"utf8").toLowerCase()){case"hex":i=f(this,e,t,n);break;case"utf8":case"utf-8":i=d(this,e,t,n);break;case"ascii":i=h(this,e,t,n);break;case"binary":i=function(e,t,n,r){return h(e,t,n,r)}(this,e,t,n);break;case"base64":i=p(this,e,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":i=g(this,e,t,n);break;default:throw new Error("Unknown encoding")}return i},o.prototype.toString=function(e,t,n){var r,o=this;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,(n=void 0!==n?Number(n):n=o.length)===t)return"";switch(e){case"hex":r=function(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i=n,"sourceEnd < sourceStart"),F(t>=0&&t=0&&n=0&&r<=i.length,"sourceEnd out of bounds"),r>this.length&&(r=this.length),e.length-t=this.length))return this[e]},o.prototype.readUInt16LE=function(e,t){return v(this,e,!0,t)},o.prototype.readUInt16BE=function(e,t){return v(this,e,!1,t)},o.prototype.readUInt32LE=function(e,t){return m(this,e,!0,t)},o.prototype.readUInt32BE=function(e,t){return m(this,e,!1,t)},o.prototype.readInt8=function(e,t){if(t||(F(null!=e,"missing offset"),F(e=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){return b(this,e,!0,t)},o.prototype.readInt16BE=function(e,t){return b(this,e,!1,t)},o.prototype.readInt32LE=function(e,t){return S(this,e,!0,t)},o.prototype.readInt32BE=function(e,t){return S(this,e,!1,t)},o.prototype.readFloatLE=function(e,t){return w(this,e,!0,t)},o.prototype.readFloatBE=function(e,t){return w(this,e,!1,t)},o.prototype.readDoubleLE=function(e,t){return _(this,e,!0,t)},o.prototype.readDoubleBE=function(e,t){return _(this,e,!1,t)},o.prototype.writeUInt8=function(e,t,n){n||(F(null!=e,"missing value"),F(null!=t,"missing offset"),F(t=this.length||(this[t]=e)},o.prototype.writeUInt16LE=function(e,t,n){E(this,e,t,!0,n)},o.prototype.writeUInt16BE=function(e,t,n){E(this,e,t,!1,n)},o.prototype.writeUInt32LE=function(e,t,n){I(this,e,t,!0,n)},o.prototype.writeUInt32BE=function(e,t,n){I(this,e,t,!1,n)},o.prototype.writeInt8=function(e,t,n){n||(F(null!=e,"missing value"),F(null!=t,"missing offset"),F(t=this.length||(e>=0?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n))},o.prototype.writeInt16LE=function(e,t,n){A(this,e,t,!0,n)},o.prototype.writeInt16BE=function(e,t,n){A(this,e,t,!1,n)},o.prototype.writeInt32LE=function(e,t,n){O(this,e,t,!0,n)},o.prototype.writeInt32BE=function(e,t,n){O(this,e,t,!1,n)},o.prototype.writeFloatLE=function(e,t,n){x(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){x(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){j(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){j(this,e,t,!1,n)},o.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),"string"==typeof e&&(e=e.charCodeAt(0)),F("number"==typeof e&&!isNaN(e),"value is not a number"),F(n>=t,"end < start"),n!==t&&0!==this.length){F(t>=0&&t=0&&n<=this.length,"end out of bounds");for(var r=t;r"},o.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(o._useTypedArrays)return new o(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;tv?t=e(t):t.length>5]|=128<>>9<<4)]=t;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,a=0;a>>32-t}(v(v(t,e),v(r,i)),o),n)}function h(e,t,n,r,o,i,a){return d(t&n|~t&r,e,t,o,i,a)}function p(e,t,n,r,o,i,a){return d(t&r|n&~r,e,t,o,i,a)}function g(e,t,n,r,o,i,a){return d(t^n^r,e,t,o,i,a)}function y(e,t,n,r,o,i,a){return d(n^(t|~r),e,t,o,i,a)}function v(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}var m=e("./helpers");t.exports=function(e){return m.hash(e,f,16)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],7:[function(e,t,n){(function(e,n,r,o,i,a,s,c,u){!function(){var e,n;e=function(e){for(var t,n=new Array(e),r=0;r>>((3&r)<<3)&255;return n},this.crypto&&crypto.getRandomValues&&(n=function(e){var t=new Uint8Array(e);return crypto.getRandomValues(t),t}),t.exports=n||e}()}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],8:[function(e,t,n){(function(n,r,o,i,a,s,c,u,l){function f(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var n=Array(80),r=1732584193,o=-271733879,i=-1732584194,a=271733878,s=-1009589776,c=0;c>16)+(t>>16)+(n>>16)<<16|65535&n}function g(e,t){return e<>>32-t}var y=e("./helpers");t.exports=function(e){return y.hash(e,f,20,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],9:[function(e,t,n){(function(n,r,o,i,a,s,c,u,l){var f=e("./helpers"),d=function(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n},h=function(e,t){return e>>>t|e<<32-t},p=function(e,t){return e>>>t},g=function(e,t,n){return e&t^~e&n},y=function(e,t,n){return e&t^e&n^t&n},v=function(e){return h(e,2)^h(e,13)^h(e,22)},m=function(e){return h(e,6)^h(e,11)^h(e,25)},b=function(e){return h(e,7)^h(e,18)^p(e,3)},S=function(e){return h(e,17)^h(e,19)^p(e,10)},w=function(e,t){var n,r,o,i,a,s,c,u,l,f,h=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),p=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),w=new Array(64);e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var _=0;_0)&&n.shift()()}),!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=l,e.addListener=l,e.once=l,e.off=l,e.removeListener=l,e.removeAllListeners=l,e.emit=l,e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:10}],11:[function(e,t,n){(function(e,t,r,o,i,a,s,c,u){n.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<>1,l=-7,f=n?o-1:0,d=n?-1:1,h=e[t+f];for(f+=d,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=d,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=u}return(h?-1:1)*a*Math.pow(2,i-r)},n.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?d/c:d*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+h]=255&s,h+=p,s/=256,o-=8);for(a=a<0;e[n+h]=255&a,h+=p,a/=256,u-=8);e[n+h-p]|=128*g}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/ieee754/index.js","/node_modules/ieee754")},{buffer:3,lYpoI2:10}]},{},[1])(1)},,,,,,,,,,,function(e,t,n){"use strict";e.exports=n(82)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(58),o=n(2),i=n(83),a=n(0),s=n(86),c=n(88),u=n(94);function l(e){return e&&e.__esModule?e:{default:e}}function f(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var d=f(o),h=l(i).default,p=function(e){return"theme"!==e},g=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?h:p},y=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},v="undefined"!=typeof document,m=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;s.registerStyles(t,n,r);var o=u.useInsertionEffectAlwaysWithSyncFallback((function(){return s.insertStyles(t,n,r)}));if(!v&&void 0!==o){for(var i,a=n.name,c=n.next;void 0!==c;)a+=" "+c.name,c=c.next;return d.createElement("style",((i={})["data-emotion"]=t.key+" "+a,i.dangerouslySetInnerHTML={__html:o},i.nonce=t.sheet.nonce,i))}return null};t.default=function e(t,n){var o,i,u=t.__emotion_real===t,l=u&&t.__emotion_base||t;void 0!==n&&(o=n.label,i=n.target);var f=y(t,n,u),h=f||g(l),p=!h("as");return function(){var v=arguments,b=u&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==o&&b.push("label:"+o+";"),null==v[0]||void 0===v[0].raw)b.push.apply(b,v);else{b.push(v[0][0]);for(var S=v.length,w=1;w=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}},function(e,t,n){"use strict";e.exports=n(93)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(e,t,n){"use strict";e.exports=n(95)},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(2)),i="undefined"!=typeof document,a=!!o.useInsertionEffect&&o.useInsertionEffect,s=i&&a||function(e){return e()},c=a||o.useLayoutEffect;t.useInsertionEffectAlwaysWithSyncFallback=s,t.useInsertionEffectWithLayoutFallback=c},,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"CustomDatasetSelector",(function(){return Z}));var r=n(2),o=n(12),i=n(63),a=n.n(i),s=n(4),c=n(28),u=n(37),l=n(24),f=n(38),d=n(5),h=n.n(d),p=n(65),g=n.n(p),y=n(70),v=n.n(y);class hashed_cache_HashedCache{constructor(e={max:500}){h()(this,"cache",void 0),this.cache=new g.a(e)}get(e){const t=v()(e);return this.cache.get(t)}set(e,t){const n=v()(e);return this.cache.set(n,t)}has(e){const t=v()(e);return this.cache.has(t)}reset(){return this.cache.reset()}}const m={name:"",sortOrder:"asc"},b={selection:f.a.create(),searchCache:new hashed_cache_HashedCache,panelId:c.b,search:m},S=({initialContext:e,onIntegrationsLoadMore:t,onIntegrationsReload:n,onIntegrationsSearch:o,onIntegrationsSort:i,onIntegrationsStreamsSearch:a,onIntegrationsStreamsSort:s,onSelectionChange:d,onUnmanagedStreamsSearch:h,onUnmanagedStreamsSort:p,onUnmanagedStreamsReload:g})=>{const y=Object(u.useInterpret)((()=>(({initialContext:e,onIntegrationsLoadMore:t,onIntegrationsReload:n,onIntegrationsSearch:r,onIntegrationsSort:o,onIntegrationsStreamsSearch:i,onIntegrationsStreamsSort:a,onUnmanagedStreamsSearch:s,onUnmanagedStreamsSort:u,onSelectionChange:d,onUnmanagedStreamsReload:h})=>((e=b)=>Object(l.createMachine)({context:{...b,...e},preserveActionOrder:!0,predictableActionArguments:!0,id:"DatasetsSelector",type:"parallel",states:{popover:{initial:"closed",states:{closed:{id:"closed",on:{TOGGLE:"open.hist"}},open:{initial:"listingIntegrations",on:{CLOSE:"closed",TOGGLE:"closed"},states:{hist:{type:"history"},listingIntegrations:{entry:["storePanelId","retrieveSearchFromCache","maybeRestoreSearchResult"],on:{CHANGE_PANEL:[{cond:"isUnmanagedStreamsId",target:"listingUnmanagedStreams"},{target:"listingIntegrationStreams"}],SCROLL_TO_INTEGRATIONS_BOTTOM:{actions:"loadMoreIntegrations"},SEARCH_BY_NAME:{actions:["storeSearch","searchIntegrations"]},SORT_BY_ORDER:{actions:["storeSearch","sortIntegrations"]},SELECT_ALL_LOGS_DATASET:"#closed"}},listingIntegrationStreams:{entry:["storePanelId","retrieveSearchFromCache","maybeRestoreSearchResult"],on:{CHANGE_PANEL:"listingIntegrations",SEARCH_BY_NAME:{actions:["storeSearch","searchIntegrationsStreams"]},SORT_BY_ORDER:{actions:["storeSearch","sortIntegrationsStreams"]},SELECT_DATASET:"#closed"}},listingUnmanagedStreams:{entry:["storePanelId","retrieveSearchFromCache","maybeRestoreSearchResult"],on:{CHANGE_PANEL:"listingIntegrations",SEARCH_BY_NAME:{actions:["storeSearch","searchUnmanagedStreams"]},SORT_BY_ORDER:{actions:["storeSearch","sortUnmanagedStreams"]},SELECT_DATASET:"#closed"}}}}}},selection:{initial:"single",states:{single:{on:{SELECT_ALL_LOGS_DATASET:{actions:["storeAllSelection","notifySelectionChanged"],target:"all"},SELECT_DATASET:{actions:["storeSingleSelection","notifySelectionChanged"]}}},all:{on:{SELECT_DATASET:{actions:["storeSingleSelection","notifySelectionChanged"],target:"single"}}}}}}},{actions:{storePanelId:Object(l.assign)(((e,t)=>"panelId"in t?{panelId:t.panelId}:{})),storeSearch:Object(l.assign)(((e,t)=>"search"in t?(e.searchCache.set(e.panelId,t.search),{search:t.search}):{})),storeAllSelection:Object(l.assign)((e=>({selection:f.a.create()}))),storeSingleSelection:Object(l.assign)(((e,t)=>"dataset"in t?{selection:f.b.create(t.dataset)}:{})),retrieveSearchFromCache:Object(l.assign)(((e,t)=>{var n;return"panelId"in t?{search:null!==(n=e.searchCache.get(t.panelId))&&void 0!==n?n:m}:{}})),maybeRestoreSearchResult:l.actions.pure(((e,t)=>{if("CHANGE_PANEL"===t.type&&e.searchCache.has(t.panelId))return Object(l.raise)({type:"SORT_BY_ORDER",search:e.search})}))},guards:{isUnmanagedStreamsId:(e,t)=>"panelId"in t&&t.panelId===c.d}}))(e).withConfig({actions:{notifySelectionChanged:e=>d(e.selection),loadMoreIntegrations:t,relaodIntegrations:n,reloadUnmanagedStreams:h,searchIntegrations:(e,t)=>{"search"in t&&r(t.search)},sortIntegrations:(e,t)=>{"search"in t&&o(t.search)},searchIntegrationsStreams:(e,t)=>{"search"in t&&i({...t.search,integrationId:e.panelId})},sortIntegrationsStreams:(e,t)=>{"search"in t&&a({...t.search,integrationId:e.panelId})},searchUnmanagedStreams:(e,t)=>{"search"in t&&s(t.search)},sortUnmanagedStreams:(e,t)=>{"search"in t&&u(t.search)}}}))({initialContext:e,onIntegrationsLoadMore:t,onIntegrationsReload:n,onIntegrationsSearch:o,onIntegrationsSort:i,onIntegrationsStreamsSearch:a,onIntegrationsStreamsSort:s,onSelectionChange:d,onUnmanagedStreamsSearch:h,onUnmanagedStreamsSort:p,onUnmanagedStreamsReload:g}))),v=Object(u.useSelector)(y,(e=>e.matches("popover.open"))),S=Object(u.useSelector)(y,(e=>e.context.panelId)),w=Object(u.useSelector)(y,(e=>e.context.search)),_=Object(r.useCallback)((e=>y.send({type:"CHANGE_PANEL",panelId:e.panelId})),[y]),E=Object(r.useCallback)((()=>y.send({type:"SCROLL_TO_INTEGRATIONS_BOTTOM"})),[y]),I=Object(r.useCallback)((e=>y.send({type:"SEARCH_BY_NAME",search:e})),[y]),A=Object(r.useCallback)((()=>y.send({type:"SELECT_ALL_LOGS_DATASET"})),[y]),O=Object(r.useCallback)((e=>y.send({type:"SELECT_DATASET",dataset:e})),[y]),x=Object(r.useCallback)((e=>y.send({type:"SORT_BY_ORDER",search:e})),[y]);return{isOpen:v,panelId:S,search:w,closePopover:Object(r.useCallback)((()=>y.send({type:"CLOSE"})),[y]),changePanel:_,scrollToIntegrationsBottom:E,searchByName:I,selectAllLogDataset:A,selectDataset:O,sortByOrder:x,togglePopover:Object(r.useCallback)((()=>y.send({type:"TOGGLE"})),[y])}};var w=n(58),_=n.n(w),E=n(81),I=n.n(E),A=n(15),O=n(27),x=n(0);const j=Object(s.a)((()=>n.e(7).then(n.bind(null,99)))),C=({integrations:e,onDatasetSelected:t,spyRef:n})=>e.reduce(((r,o,i)=>{const{name:a,title:s,version:u,datasets:l,icons:f}=o,d=i===e.length-1;return r.items.push({name:s,icon:Object(x.jsx)(A.PackageIcon,{packageName:a,version:u,size:"m",icons:f,tryApi:!0}),"data-test-subj":o.id,panel:o.id,...d&&{buttonRef:n}}),r.panels.push({id:o.id,title:s,width:c.a,items:l.map((e=>({name:e.title,onClick:()=>t(e)})))}),r}),{items:[],panels:[]}),T=({onClick:e})=>{const t=O.a.createAllLogsDataset();return{name:t.title,"data-test-subj":"allLogDatasets",icon:t.iconType&&Object(x.jsx)(o.EuiIcon,{type:t.iconType}),onClick:e}},k=({onClick:e})=>({name:c.p,"data-test-subj":"unmanagedDatasets",icon:Object(x.jsx)(o.EuiIcon,{type:"documents"}),onClick:e,panel:c.d}),L=e=>({disabled:!0,name:Object(x.jsx)(j,e),"data-test-subj":"integrationStatusItem"}),R={width:c.a},D=({children:e,onClick:t,selection:n,...r})=>{const{iconType:i,parentIntegration:a}=n.dataset,s=n.dataset.getFullTitle(),u=Object(o.useIsWithinBreakpoints)(["xs","s"]),l=(({fullWidth:e})=>({maxWidth:e?void 0:c.a}))({fullWidth:u}),f="object"==typeof a;return Object(x.jsx)(o.EuiPopover,_()({id:c.c,"data-test-subj":"datasetSelectorPopover",anchorPosition:u?"downCenter":"downLeft",button:Object(x.jsx)(o.EuiButton,{css:l,iconType:"arrowDown",iconSide:"right",onClick:t,fullWidth:u,"data-test-subj":"datasetSelectorPopoverButton"},i?Object(x.jsx)(o.EuiIcon,{type:i}):f?Object(x.jsx)(A.PackageIcon,{packageName:a.name,version:a.version,icons:a.icons,size:"m",tryApi:!0}):null,Object(x.jsx)("span",{className:"eui-textTruncate"},s)),panelPaddingSize:"none",buffer:8},u&&{display:"block"},r),Object(x.jsx)(o.EuiPanel,{paddingSize:"none",hasShadow:!1,css:R,"data-test-subj":"datasetSelectorContent"},Object(x.jsx)(M,{size:"xxs"},Object(x.jsx)("span",null,c.m)),Object(x.jsx)(o.EuiHorizontalRule,{margin:"none"}),e))},M=I()(o.EuiTitle,{target:"ei6ao690"})({name:"1o6s4ej",styles:"padding:12px;display:block"});var B=n(60);const P=({search:e,onSearch:t,onSort:n,isLoading:r})=>Object(x.jsx)(o.EuiPanel,{paddingSize:"s",hasShadow:!1,css:Object(x.css)({width:c.a},"",""),"data-test-subj":"datasetSelectorSearchControls"},Object(x.jsx)(o.EuiFlexGroup,{gutterSize:"xs",responsive:!1},Object(x.jsx)(o.EuiFlexItem,null,Object(x.jsx)(o.EuiFieldSearch,{compressed:!0,incremental:!0,value:e.name,onChange:n=>{const r={...e,name:n.target.value};t(r)},isLoading:r})),Object(x.jsx)(o.EuiFlexItem,{grow:!1},Object(x.jsx)(o.EuiButtonGroup,{isIconOnly:!0,buttonSize:"compressed",options:c.n,legend:c.o,idSelected:e.sortOrder,onChange:t=>{const r={...e,sortOrder:t};n(r)}})))),N=Object(s.a)((()=>n.e(6).then(n.bind(null,98))),{fallback:Object(x.jsx)(B.a,null)});function U({datasets:e,datasetsError:t,datasetSelection:n,integrations:i,integrationsError:s,isLoadingIntegrations:u,isLoadingStreams:l,onIntegrationsLoadMore:f,onIntegrationsReload:d,onIntegrationsSearch:h,onIntegrationsSort:p,onIntegrationsStreamsSearch:g,onIntegrationsStreamsSort:y,onSelectionChange:v,onStreamsEntryClick:m,onUnmanagedStreamsReload:b,onUnmanagedStreamsSearch:w,onUnmanagedStreamsSort:_}){const{isOpen:E,panelId:I,search:A,closePopover:O,changePanel:j,scrollToIntegrationsBottom:R,searchByName:M,selectAllLogDataset:B,selectDataset:U,sortByOrder:F,togglePopover:z}=S({initialContext:{selection:n},onIntegrationsLoadMore:f,onIntegrationsReload:d,onIntegrationsSearch:h,onIntegrationsSort:p,onIntegrationsStreamsSearch:g,onIntegrationsStreamsSort:y,onUnmanagedStreamsSearch:w,onUnmanagedStreamsSort:_,onUnmanagedStreamsReload:b,onSelectionChange:v}),[H]=function({onIntersecting:e}={}){const[t,n]=Object(r.useState)(null),o=a()({current:t},{root:null,threshold:.5});return Object(r.useEffect)((()=>{null!=o&&o.isIntersecting&&e&&e()}),[o,e]),[n,o]}({onIntersecting:R}),{items:G,panels:Y}=Object(r.useMemo)((()=>{const e=T({onClick:B}),t=k({onClick:m});if(!i||0===i.length)return{items:[e,t,L({error:s,integrations:i,onRetry:d})],panels:[]};const{items:n,panels:r}=C({integrations:i,onDatasetSelected:U,spyRef:H});return{items:[e,t,...n],panels:r}}),[i,s,B,U,d,m,H]),W=[{id:c.b,title:c.g,width:c.a,items:G},{id:c.d,title:c.p,width:c.a,content:Object(x.jsx)(N,{datasets:e,error:t,isLoading:l,onRetry:b,onDatasetClick:U})},...Y];return Object(x.jsx)(D,{selection:n.selection,isOpen:E,closePopover:O,onClick:z},Object(x.jsx)(P,{key:I,search:A,onSearch:M,onSort:F,isLoading:u||l}),Object(x.jsx)(o.EuiHorizontalRule,{margin:"none"}),Object(x.jsx)(o.EuiContextMenu,{initialPanelId:I,panels:W,onPanelChange:j,className:"eui-yScroll",css:c.e,"data-test-subj":"datasetSelectorContextMenu",size:"s"}))}var F=n(61),z=n.n(F),H=n(13);const G={cache:new hashed_cache_HashedCache,datasets:null,error:null,search:{datasetQuery:"",sortOrder:"asc"}},[Y,W]=z()((({datasetsClient:e})=>{const t=Object(u.useInterpret)((()=>(({initialContext:e,datasetsClient:t})=>((e=G)=>Object(l.createMachine)({context:e,preserveActionOrder:!0,predictableActionArguments:!0,id:"Datasets",initial:"uninitialized",states:{uninitialized:{on:{LOAD_DATASETS:"loading"}},loading:{id:"loading",invoke:{src:"loadDatasets",onDone:{target:"loaded",actions:["storeInCache","aggregateAndStoreDatasets","storeSearch"]},onError:"loadingFailed"}},loaded:{on:{SEARCH_DATASETS:"debounceSearchingDatasets",SORT_DATASETS:{target:"loading",actions:"storeSearch"}}},debounceSearchingDatasets:{entry:"storeSearch",on:{SEARCH_DATASETS:"debounceSearchingDatasets"},after:{300:"loading"}},loadingFailed:{entry:["clearCache","clearData","storeError"],exit:"clearError",on:{RELOAD_DATASETS:"loading"}}}},{actions:{storeSearch:Object(l.assign)(((e,t)=>({..."search"in t&&{search:t.search}}))),aggregateAndStoreDatasets:Object(l.assign)(((e,t)=>"data"in t&&!Object(H.isError)(t.data)?{datasets:O.a.createWildcardDatasetsFrom(t.data.items)}:{})),storeInCache:(e,t)=>{"data"in t&&!Object(H.isError)(t.data)&&e.cache.set(e.search,t.data)},storeError:Object(l.assign)(((e,t)=>"data"in t&&Object(H.isError)(t.data)?{error:t.data}:{})),clearCache:e=>{e.cache.reset()},clearData:Object(l.assign)((e=>({datasets:null}))),clearError:Object(l.assign)((e=>({error:null})))}}))(e).withConfig({services:{loadDatasets:e=>{const n=e.search;return e.cache.has(n)?Promise.resolve(e.cache.get(n)):t.findDatasets(Object(H.omitBy)(n,H.isEmpty))}}}))({datasetsClient:e}))),n=Object(u.useSelector)(t,(e=>e.context.datasets)),o=Object(u.useSelector)(t,(e=>e.context.error)),i=Object(u.useSelector)(t,(e=>e.matches("loading")||e.matches("debounceSearchingDatasets"))),a=Object(r.useCallback)((()=>t.send({type:"LOAD_DATASETS"})),[t]),s=Object(r.useCallback)((()=>t.send({type:"RELOAD_DATASETS"})),[t]),c=Object(r.useCallback)((e=>t.send({type:"SEARCH_DATASETS",search:q(e)})),[t]),f=Object(r.useCallback)((e=>t.send({type:"SORT_DATASETS",search:q(e)})),[t]);return{datasetsStateService:t,error:o,isLoading:i,datasets:n,loadDatasets:a,reloadDatasets:s,searchDatasets:c,sortDatasets:f}})),q=({name:e,...t})=>({datasetQuery:e,...t});function V(e,t="asc"){return(n,r)=>{const o=n[e],i=r[e];return oi?"asc"===t?1:-1:0}}const K={cache:new hashed_cache_HashedCache,integrationsSource:null,integrations:null,error:null,search:{nameQuery:"",sortOrder:"asc"}},X=(e,t)=>{const{nameQuery:n,sortOrder:r,integrationId:o}=t;return e.map((e=>e.id!==o?e:O.b.create({...e,dataStreams:e.datasets.filter((e=>{var t;return Boolean(null===(t=e.title)||void 0===t?void 0:t.includes(null!=n?n:""))})).sort(V("name",r))})))},[Q,$]=z()((({datasetsClient:e})=>{const t=Object(u.useInterpret)((()=>(({initialContext:e,datasetsClient:t})=>((e=K)=>Object(l.createMachine)({context:e,preserveActionOrder:!0,predictableActionArguments:!0,id:"Integrations",initial:"uninitialized",states:{uninitialized:{always:"loading"},loading:{id:"loading",invoke:{src:"loadIntegrations",onDone:{target:"loaded",actions:["storeInCache","storeIntegrationsResponse","storeSearch"]},onError:"loadingFailed"}},loaded:{id:"loaded",initial:"idle",states:{idle:{on:{LOAD_MORE_INTEGRATIONS:{cond:"hasMoreIntegrations",target:"loadingMore"},SEARCH_INTEGRATIONS:"debounceSearchingIntegrations",SORT_INTEGRATIONS:{target:"#loading",actions:"storeSearch"},SEARCH_INTEGRATIONS_STREAMS:"debounceSearchingIntegrationsStreams",SORT_INTEGRATIONS_STREAMS:{target:"idle",actions:["storeSearch","searchIntegrationsStreams"]}}},loadingMore:{invoke:{src:"loadIntegrations",onDone:{target:"idle",actions:["storeInCache","appendIntegrations","storeSearch"]},onError:"#loadingFailed"}},debounceSearchingIntegrations:{entry:"storeSearch",on:{SEARCH_INTEGRATIONS:"debounceSearchingIntegrations"},after:{300:"#loading"}},debounceSearchingIntegrationsStreams:{entry:"storeSearch",on:{SEARCH_INTEGRATIONS_STREAMS:"debounceSearchingIntegrationsStreams"},after:{300:{target:"idle",actions:"searchIntegrationsStreams"}}}}},loadingFailed:{id:"loadingFailed",entry:["clearCache","clearData","storeError"],exit:"clearError",on:{RELOAD_INTEGRATIONS:"#loading"}}}},{actions:{storeSearch:Object(l.assign)(((e,t)=>({..."search"in t&&{search:t.search},..."data"in t&&!Object(H.isError)(t.data)&&{search:{...e.search,searchAfter:t.data.searchAfter}}}))),storeIntegrationsResponse:Object(l.assign)(((e,t)=>"data"in t&&!Object(H.isError)(t.data)?{integrationsSource:t.data.items,integrations:t.data.items,total:t.data.total}:{})),searchIntegrationsStreams:Object(l.assign)((e=>null!==e.integrationsSource?{integrations:X(e.integrationsSource,e.search)}:{})),storeInCache:(e,t)=>{"data"in t&&!Object(H.isError)(t.data)&&e.cache.set(e.search,t.data)},appendIntegrations:Object(l.assign)(((e,t)=>{var n,r,o,i;return"data"in t&&!Object(H.isError)(t.data)?{integrationsSource:null!==(n=null===(r=e.integrations)||void 0===r?void 0:r.concat(t.data.items))&&void 0!==n?n:[],integrations:null!==(o=null===(i=e.integrations)||void 0===i?void 0:i.concat(t.data.items))&&void 0!==o?o:[],total:t.data.total}:{}})),storeError:Object(l.assign)(((e,t)=>"data"in t&&Object(H.isError)(t.data)?{error:t.data}:{})),clearCache:e=>{e.cache.reset()},clearData:Object(l.assign)((e=>({integrationsSource:null,integrations:null}))),clearError:Object(l.assign)((e=>({error:null})))},guards:{hasMoreIntegrations:e=>Boolean(e.search.searchAfter)}}))(e).withConfig({services:{loadIntegrations:e=>{const n=e.search;return e.cache.has(n)?Promise.resolve(e.cache.get(n)):t.findIntegrations(Object(H.omitBy)(n,H.isEmpty))}}}))({datasetsClient:e}))),n=Object(u.useSelector)(t,(e=>e.context.integrations)),o=Object(u.useSelector)(t,(e=>e.context.error)),i=Object(u.useSelector)(t,(e=>e.matches("loading")||e.matches({loaded:"loadingMore"})||e.matches({loaded:"debounceSearchingIntegrations"})||e.matches({loaded:"debounceSearchingIntegrationsStreams"}))),a=Object(r.useCallback)((e=>t.send({type:"SEARCH_INTEGRATIONS",search:J(e)})),[t]),s=Object(r.useCallback)((e=>t.send({type:"SORT_INTEGRATIONS",search:J(e)})),[t]),c=Object(r.useCallback)((e=>t.send({type:"SEARCH_INTEGRATIONS_STREAMS",search:J(e)})),[t]),f=Object(r.useCallback)((e=>t.send({type:"SORT_INTEGRATIONS_STREAMS",search:J(e)})),[t]),d=Object(r.useCallback)((()=>t.send({type:"RELOAD_INTEGRATIONS"})),[t]),h=Object(r.useCallback)((()=>t.send({type:"LOAD_MORE_INTEGRATIONS"})),[t]);return{integrationsStateService:t,error:o,isLoading:i,integrations:n,loadMore:h,reloadIntegrations:d,searchIntegrations:a,sortIntegrations:s,searchIntegrationsStreams:c,sortIntegrationsStreams:f}})),J=({name:e,...t})=>({nameQuery:e,...t}),Z=(ee=({logExplorerProfileStateService:e})=>{const{datasetSelection:t,handleDatasetSelectionChange:n}=(e=>({datasetSelection:Object(u.useSelector)(e,(e=>e.context.datasetSelection)),handleDatasetSelectionChange:Object(r.useCallback)((t=>{e.send({type:"UPDATE_DATASET_SELECTION",data:t})}),[e])}))(e),{error:o,integrations:i,isLoading:a,loadMore:s,reloadIntegrations:c,searchIntegrations:l,searchIntegrationsStreams:f,sortIntegrations:d,sortIntegrationsStreams:h}=$(),{datasets:p,error:g,isLoading:y,loadDatasets:v,reloadDatasets:m,searchDatasets:b,sortDatasets:S}=W();return Object(x.jsx)(U,{datasets:p,datasetSelection:t,datasetsError:g,integrations:i,integrationsError:o,isLoadingIntegrations:a,isLoadingStreams:y,onIntegrationsLoadMore:s,onIntegrationsReload:c,onIntegrationsSearch:l,onIntegrationsSort:d,onIntegrationsStreamsSearch:f,onIntegrationsStreamsSort:h,onSelectionChange:n,onStreamsEntryClick:v,onUnmanagedStreamsReload:m,onUnmanagedStreamsSearch:b,onUnmanagedStreamsSort:S})},function({logExplorerProfileStateService:e,datasetsClient:t}){return Object(x.jsx)(Q,{datasetsClient:t},Object(x.jsx)(Y,{datasetsClient:t},Object(x.jsx)(ee,{logExplorerProfileStateService:e})))});var ee;t.default=Z}])]);