import{c as X,j as ee,u as he,a as Q,d as te,R as o,L as ve,O as be,b as z,D as _e,s as Se,T as I,e as ae,C as we,f as Ee,g as E,h as ke,i as Ae,B as xe,k as Te,l as De,m as Oe,n as q,t as Le,o as Ce,p as ne,r as K,q as U,v as Fe,w as Ie,x as Pe,y as Me,H as Ne,V as Re,z as Ge,I as Ke,A as ze,G as qe,E as Ue,F as je,J as Qe,K as We,M as Ve,N as Be}from"./index.cbde2f1d.js";const He=X(ee.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1z"}),"DarkMode"),$e=X(ee.jsx("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41l-1.06-1.06zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"}),"LightMode"),Ye=`import fiftyone as fo

# Name of an existing dataset
name = "quickstart"

dataset = fo.load_dataset(name)

# Launch a new App session
session = fo.launch_app(dataset)

# If you already have an active App session
# session.dataset = dataset`,Ze=`import fiftyone as fo

dataset = fo.load_dataset("$CURRENT_DATASET_NAME")

samples = []
for filepath, label in zip(filepaths, labels):
    sample = fo.Sample(filepath=filepath)
    sample["ground_truth"] = fo.Classification(label=label)
    samples.append(sample)

dataset.add_samples(samples)`,Je=`import fiftyone as fo

# A name for the dataset
name = "my-dataset"

# The directory containing the data to import
dataset_dir = "/path/to/data"

# The type of data being imported
dataset_type = fo.types.COCODetectionDataset

dataset = fo.Dataset.from_dir(
    dataset_dir=dataset_dir,
    dataset_type=dataset_type,
    name=name,
)`,Xe={SELECT_DATASET:{title:"No dataset selected",code:Ye,subtitle:"Select a dataset with dataset selector above or",codeTitle:"Select a dataset with code",codeSubtitle:"Use Python or command line tools to set dataset for the current session",learnMoreLink:"https://docs.voxel51.com/user_guide/app.html",learnMoreLabel:"about using the Fiftyone App"},ADD_SAMPLE:{title:"No samples yet",code:Ze,subtitle:"Add samples to this dataset with code or",codeTitle:"Add samples with code",codeSubtitle:"Use Python or command line tools to add sample to this dataset",learnMoreLink:"https://docs.voxel51.com/user_guide/dataset_creation/index.html#custom-formats",learnMoreLabel:"about loading data into FiftyOne"},ADD_DATASET:{title:"No datasets yet",code:Je,subtitle:"Add a dataset to FiftyOne with code or",codeTitle:"Create dataset with code",codeSubtitle:"Use Python or command line tools to add dataset to FiftyOne",learnMoreLink:"https://docs.voxel51.com/user_guide/dataset_creation/index.html",learnMoreLabel:"about loading data into FiftyOne"}},Z="@voxel51/utils/create_dataset",J="@voxel51/io/import_samples",et="https://github.com/voxel51/fiftyone-plugins/tree/main/plugins/utils",tt="https://github.com/voxel51/fiftyone-plugins/tree/main/plugins/io",at="@voxel51/utils",nt="@voxel51/io";function bt(r){const{mode:i}=r,d=he(!0),c=Q(te);if(!i)return null;if(!d)return o.createElement(ve,null,"Pixelating...");const{code:p,codeTitle:h,learnMoreLabel:y,learnMoreLink:u,title:f}=Xe[i],g=p.replace("$CURRENT_DATASET_NAME",c),m=i==="SELECT_DATASET";return o.createElement(o.Fragment,null,o.createElement(be,null),o.createElement(z,{spacing:6,divider:o.createElement(_e,{sx:{width:"100%"}}),sx:{fontWeight:"normal",alignItems:"center",width:"100%",py:8,overflow:"auto"},className:Se},o.createElement(z,{alignItems:"center",spacing:1},o.createElement(I,{sx:{fontSize:16}},f),m&&o.createElement(I,{color:"text.secondary"},"You can use the selector above to open an existing dataset"),o.createElement(rt,{...r}),!m&&o.createElement(I,{color:"text.secondary"},o.createElement(ae,{href:u,target:"_blank",sx:{textDecoration:"underline",":hover":{textDecoration:"none"}}},"Learn more"),"\xA0",y)),o.createElement(z,{alignItems:"center"},o.createElement(I,{sx:{fontSize:16}},h),o.createElement(I,{sx:{pb:2},color:"text.secondary"},"You can use Python to\xA0",i==="ADD_DATASET"&&o.createElement(o.Fragment,null,o.createElement(j,{href:u,target:"_blank"},"load data"),"\xA0into FiftyOne"),m&&o.createElement(o.Fragment,null,"load a dataset in the App"),i==="ADD_SAMPLE"&&o.createElement(o.Fragment,null,o.createElement(j,{href:u,target:"_blank"},"add samples"),"\xA0to this dataset")),o.createElement(we,{tabs:[{id:"python",label:"Python",code:g}]}))))}function rt(r){const{mode:i}=r,d=Ee(),c=i==="ADD_SAMPLE",p=E.exports.useCallback(D=>Array.isArray(d.choices)?d.choices.some(O=>(O==null?void 0:O.value)===D):!1,[d]),h=E.exports.useMemo(()=>c?!1:p(Z),[c,p]),y=E.exports.useMemo(()=>c?p(J):!1,[c,p]),u=c?y:h,f=c?tt:et,g=c?nt:at,m=c?"add samples to this dataset":"create a new dataset",w=c?"add samples to datasets":"create datasets",T=c?J:Z;return o.createElement(I,{color:"text.secondary"},u?o.createElement(o.Fragment,null,o.createElement(ot,{uri:T}),"to ",m):o.createElement(o.Fragment,null,"Did you know? You can ",w," in the App by installing the\xA0",o.createElement(j,{href:f,target:"_blank"},g),"\xA0plugin"),", or\xA0",o.createElement(re,{onClick:d.toggle},"browse operations")," for other options")}function ot(r){const{uri:i,prompt:d=!0}=r,c=ke(),{execute:p}=Ae(i),h=E.exports.useCallback(()=>{d?c(i):p({})},[d,c,i,p]);return o.createElement(re,{onClick:h},"Click here")}function re(r){return o.createElement(xe,{...r,sx:{p:0,textTransform:"none",fontSize:"inherit",lineHeight:"inherit",verticalAlign:"baseline",color:i=>i.palette.text.primary,textDecoration:"underline",...(r==null?void 0:r.sx)||{}}})}function j(r){return o.createElement(ae,{...r,sx:{textDecoration:"underline",":hover":{textDecoration:"none"},...(r==null?void 0:r.sx)||{}}})}const oe={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"NavFragment",selections:[{args:null,kind:"FragmentSpread",name:"NavDatasets"},{args:null,kind:"FragmentSpread",name:"NavGA"},{alias:null,args:null,kind:"ScalarField",name:"teamsSubmission",storageKey:null}],type:"Query",abstractKey:null};oe.hash="7cbd09bfdfce2f5c3b283eb3fec3a78b";const le={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"NavGA",selections:[{alias:null,args:null,kind:"ScalarField",name:"context",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"dev",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"doNotTrack",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"uid",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"version",storageKey:null}],type:"Query",abstractKey:null};le.hash="a2d13e827ff06e46baffc9244d708b0a";const ie=function(){var r=[{defaultValue:null,kind:"LocalArgument",name:"count"},{defaultValue:null,kind:"LocalArgument",name:"cursor"},{defaultValue:null,kind:"LocalArgument",name:"search"}],i=[{kind:"Variable",name:"after",variableName:"cursor"},{kind:"Variable",name:"first",variableName:"count"},{kind:"Variable",name:"search",variableName:"search"}];return{fragment:{argumentDefinitions:r,kind:"Fragment",metadata:null,name:"DatasetsPaginationQuery",selections:[{args:null,kind:"FragmentSpread",name:"NavDatasets"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:r,kind:"Operation",name:"DatasetsPaginationQuery",selections:[{alias:null,args:i,concreteType:"DatasetStrConnection",kind:"LinkedField",name:"datasets",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"total",storageKey:null},{alias:null,args:null,concreteType:"DatasetStrEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetStrPageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:i,filters:["search"],handle:"connection",key:"DatasetsList_query_datasets",kind:"LinkedHandle",name:"datasets"}]},params:{cacheID:"51829dc84906da9b415d984d01b4ef24",id:null,metadata:{},name:"DatasetsPaginationQuery",operationKind:"query",text:`query DatasetsPaginationQuery(
  $count: Int
  $cursor: String
  $search: String
) {
  ...NavDatasets
}

fragment NavDatasets on Query {
  datasets(search: $search, first: $count, after: $cursor) {
    total
    edges {
      cursor
      node {
        name
        id
        __typename
      }
    }
    pageInfo {
      endCursor
      hasNextPage
    }
  }
}
`}}}();ie.hash="c3d4960b5532b1af0f3fe881adf27805";const se=function(){var r=["datasets"];return{argumentDefinitions:[{kind:"RootArgument",name:"count"},{kind:"RootArgument",name:"cursor"},{kind:"RootArgument",name:"search"}],kind:"Fragment",metadata:{connection:[{count:"count",cursor:"cursor",direction:"forward",path:r}],refetch:{connection:{forward:{count:"count",cursor:"cursor"},backward:null,path:r},fragmentPathInResult:[],operation:ie}},name:"NavDatasets",selections:[{alias:"datasets",args:[{kind:"Variable",name:"search",variableName:"search"}],concreteType:"DatasetStrConnection",kind:"LinkedField",name:"__DatasetsList_query_datasets_connection",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"total",storageKey:null},{alias:null,args:null,concreteType:"DatasetStrEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null},{alias:null,args:null,concreteType:"Dataset",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"DatasetStrPageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null}}();se.hash="c3d4960b5532b1af0f3fe881adf27805";var ue={},ce={},de={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=function(){for(var p=arguments.length,h=new Array(p),y=0;y<p;y++)h[y]=arguments[y];if(typeof window<"u"){var u;typeof window.gtag>"u"&&(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)}),(u=window).gtag.apply(u,h)}},d=i;r.default=d})(de);var me={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=y;var i=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;function d(u){return u.toString().trim().replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,function(f,g,m){return g>0&&g+f.length!==m.length&&f.search(i)>-1&&m.charAt(g-2)!==":"&&(m.charAt(g+f.length)!=="-"||m.charAt(g-1)==="-")&&m.charAt(g-1).search(/[^\s-]/)<0?f.toLowerCase():f.substr(1).search(/[A-Z]|\../)>-1?f:f.charAt(0).toUpperCase()+f.substr(1)})}function c(u){return typeof u=="string"&&u.indexOf("@")!==-1}var p="REDACTED (Potential Email Address)";function h(u){return c(u)?(console.warn("This arg looks like an email address, redacting."),p):u}function y(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,m=u||"";return f&&(m=d(u)),g&&(m=h(m)),m}})(me);(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.GA4=void 0;var i=y(de),d=y(me),c=["eventCategory","eventAction","eventLabel","eventValue","hitType"],p=["title","location"],h=["page","hitType"];function y(n){return n&&n.__esModule?n:{default:n}}function u(n,e){if(n==null)return{};var t=f(n,e),a,l;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(l=0;l<s.length;l++)a=s[l],!(e.indexOf(a)>=0)&&(!Object.prototype.propertyIsEnumerable.call(n,a)||(t[a]=n[a]))}return t}function f(n,e){if(n==null)return{};var t={},a=Object.keys(n),l,s;for(s=0;s<a.length;s++)l=a[s],!(e.indexOf(l)>=0)&&(t[l]=n[l]);return t}function g(n){return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(n)}function m(n){return D(n)||T(n)||P(n)||w()}function w(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function D(n){if(Array.isArray(n))return C(n)}function O(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable})),t.push.apply(t,a)}return t}function x(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?O(Object(t),!0).forEach(function(a){_(n,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(t,a))})}return n}function M(n,e){return F(n)||R(n,e)||P(n,e)||N()}function N(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P(n,e){if(!!n){if(typeof n=="string")return C(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return C(n,e)}}function C(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=n[t];return a}function R(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var a,l,s,v,b=[],S=!0,k=!1;try{if(s=(t=t.call(n)).next,e===0){if(Object(t)!==t)return;S=!1}else for(;!(S=(a=s.call(t)).done)&&(b.push(a.value),b.length!==e);S=!0);}catch(A){k=!0,l=A}finally{try{if(!S&&t.return!=null&&(v=t.return(),Object(v)!==v))return}finally{if(k)throw l}}return b}}function F(n){if(Array.isArray(n))return n}function L(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function W(n,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,V(a.key),a)}}function ge(n,e,t){return e&&W(n.prototype,e),t&&W(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function _(n,e,t){return e=V(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function V(n){var e=pe(n,"string");return g(e)==="symbol"?e:String(e)}function pe(n,e){if(g(n)!=="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var a=t.call(n,e||"default");if(g(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var B=function(){function n(){var e=this;L(this,n),_(this,"reset",function(){e.isInitialized=!1,e._testMode=!1,e._currentMeasurementId,e._hasLoadedGA=!1,e._isQueuing=!1,e._queueGtag=[]}),_(this,"_gtag",function(){for(var t=arguments.length,a=new Array(t),l=0;l<t;l++)a[l]=arguments[l];e._testMode||e._isQueuing?e._queueGtag.push(a):i.default.apply(void 0,a)}),_(this,"_loadGA",function(t,a){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"https://www.googletagmanager.com/gtag/js";if(!(typeof window>"u"||typeof document>"u")&&!e._hasLoadedGA){var s=document.createElement("script");s.async=!0,s.src="".concat(l,"?id=").concat(t),a&&s.setAttribute("nonce",a),document.body.appendChild(s),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},e._hasLoadedGA=!0}}),_(this,"_toGtagOptions",function(t){if(!!t){var a={cookieUpdate:"cookie_update",cookieExpires:"cookie_expires",cookieDomain:"cookie_domain",cookieFlags:"cookie_flags",userId:"user_id",clientId:"client_id",anonymizeIp:"anonymize_ip",contentGroup1:"content_group1",contentGroup2:"content_group2",contentGroup3:"content_group3",contentGroup4:"content_group4",contentGroup5:"content_group5",allowAdFeatures:"allow_google_signals",allowAdPersonalizationSignals:"allow_ad_personalization_signals",nonInteraction:"non_interaction",page:"page_path",hitCallback:"event_callback"},l=Object.entries(t).reduce(function(s,v){var b=M(v,2),S=b[0],k=b[1];return a[S]?s[a[S]]=k:s[S]=k,s},{});return l}}),_(this,"initialize",function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!t)throw new Error("Require GA_MEASUREMENT_ID");var l=typeof t=="string"?[{trackingId:t}]:t;e._currentMeasurementId=l[0].trackingId;var s=a.gaOptions,v=a.gtagOptions,b=a.nonce,S=a.testMode,k=S===void 0?!1:S,A=a.gtagUrl;if(e._testMode=k,k||e._loadGA(e._currentMeasurementId,b,A),e.isInitialized||(e._gtag("js",new Date),l.forEach(function(G){var Y=x(x(x({},e._toGtagOptions(x(x({},s),G.gaOptions))),v),G.gtagOptions);Object.keys(Y).length?e._gtag("config",G.trackingId,Y):e._gtag("config",G.trackingId)})),e.isInitialized=!0,!k){var H=m(e._queueGtag);for(e._queueGtag=[],e._isQueuing=!1;H.length;){var $=H.shift();e._gtag.apply(e,m($)),$[0]==="get"&&(e._isQueuing=!0)}}}),_(this,"set",function(t){if(!t){console.warn("`fieldsObject` is required in .set()");return}if(g(t)!=="object"){console.warn("Expected `fieldsObject` arg to be an Object");return}Object.keys(t).length===0&&console.warn("empty `fieldsObject` given to .set()"),e._gaCommand("set",t)}),_(this,"_gaCommandSendEvent",function(t,a,l,s,v){e._gtag("event",a,x(x({event_category:t,event_label:l,value:s},v&&{non_interaction:v.nonInteraction}),e._toGtagOptions(v)))}),_(this,"_gaCommandSendEventParameters",function(){for(var t=arguments.length,a=new Array(t),l=0;l<t;l++)a[l]=arguments[l];if(typeof a[0]=="string")e._gaCommandSendEvent.apply(e,m(a.slice(1)));else{var s=a[0],v=s.eventCategory,b=s.eventAction,S=s.eventLabel,k=s.eventValue;s.hitType;var A=u(s,c);e._gaCommandSendEvent(v,b,S,k,A)}}),_(this,"_gaCommandSendTiming",function(t,a,l,s){e._gtag("event","timing_complete",{name:a,value:l,event_category:t,event_label:s})}),_(this,"_gaCommandSendPageview",function(t,a){if(a&&Object.keys(a).length){var l=e._toGtagOptions(a),s=l.title,v=l.location,b=u(l,p);e._gtag("event","page_view",x(x(x(x({},t&&{page_path:t}),s&&{page_title:s}),v&&{page_location:v}),b))}else t?e._gtag("event","page_view",{page_path:t}):e._gtag("event","page_view")}),_(this,"_gaCommandSendPageviewParameters",function(){for(var t=arguments.length,a=new Array(t),l=0;l<t;l++)a[l]=arguments[l];if(typeof a[0]=="string")e._gaCommandSendPageview.apply(e,m(a.slice(1)));else{var s=a[0],v=s.page;s.hitType;var b=u(s,h);e._gaCommandSendPageview(v,b)}}),_(this,"_gaCommandSend",function(){for(var t=arguments.length,a=new Array(t),l=0;l<t;l++)a[l]=arguments[l];var s=typeof a[0]=="string"?a[0]:a[0].hitType;switch(s){case"event":e._gaCommandSendEventParameters.apply(e,a);break;case"pageview":e._gaCommandSendPageviewParameters.apply(e,a);break;case"timing":e._gaCommandSendTiming.apply(e,m(a.slice(1)));break;case"screenview":case"transaction":case"item":case"social":case"exception":console.warn("Unsupported send command: ".concat(s));break;default:console.warn("Send command doesn't exist: ".concat(s))}}),_(this,"_gaCommandSet",function(){for(var t=arguments.length,a=new Array(t),l=0;l<t;l++)a[l]=arguments[l];typeof a[0]=="string"&&(a[0]=_({},a[0],a[1])),e._gtag("set",e._toGtagOptions(a[0]))}),_(this,"_gaCommand",function(t){for(var a=arguments.length,l=new Array(a>1?a-1:0),s=1;s<a;s++)l[s-1]=arguments[s];switch(t){case"send":e._gaCommandSend.apply(e,l);break;case"set":e._gaCommandSet.apply(e,l);break;default:console.warn("Command doesn't exist: ".concat(t))}}),_(this,"ga",function(){for(var t=arguments.length,a=new Array(t),l=0;l<t;l++)a[l]=arguments[l];if(typeof a[0]=="string")e._gaCommand.apply(e,a);else{var s=a[0];e._gtag("get",e._currentMeasurementId,"client_id",function(v){e._isQueuing=!1;var b=e._queueGtag;for(s({get:function(A){return A==="clientId"?v:A==="trackingId"?e._currentMeasurementId:A==="apiVersion"?"1":void 0}});b.length;){var S=b.shift();e._gtag.apply(e,m(S))}}),e._isQueuing=!0}return e.ga}),_(this,"event",function(t,a){if(typeof t=="string")e._gtag("event",t,e._toGtagOptions(a));else{var l=t.action,s=t.category,v=t.label,b=t.value,S=t.nonInteraction,k=t.transport;if(!s||!l){console.warn("args.category AND args.action are required in event()");return}var A={hitType:"event",eventCategory:(0,d.default)(s),eventAction:(0,d.default)(l)};v&&(A.eventLabel=(0,d.default)(v)),typeof b<"u"&&(typeof b!="number"?console.warn("Expected `args.value` arg to be a Number."):A.eventValue=b),typeof S<"u"&&(typeof S!="boolean"?console.warn("`args.nonInteraction` must be a boolean."):A.nonInteraction=S),typeof k<"u"&&(typeof k!="string"?console.warn("`args.transport` must be a string."):(["beacon","xhr","image"].indexOf(k)===-1&&console.warn("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`"),A.transport=k)),e._gaCommand("send",A)}}),_(this,"send",function(t){e._gaCommand("send",t)}),this.reset()}return ge(n,[{key:"gtag",value:function(){this._gtag.apply(this,arguments)}}]),n}();r.GA4=B;var ye=new B;r.default=ye})(ce);(function(r){function i(u){return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},i(u)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ReactGAImplementation=void 0;var d=p(ce);function c(u){if(typeof WeakMap!="function")return null;var f=new WeakMap,g=new WeakMap;return(c=function(w){return w?g:f})(u)}function p(u,f){if(!f&&u&&u.__esModule)return u;if(u===null||i(u)!=="object"&&typeof u!="function")return{default:u};var g=c(f);if(g&&g.has(u))return g.get(u);var m={},w=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var T in u)if(T!=="default"&&Object.prototype.hasOwnProperty.call(u,T)){var D=w?Object.getOwnPropertyDescriptor(u,T):null;D&&(D.get||D.set)?Object.defineProperty(m,T,D):m[T]=u[T]}return m.default=u,g&&g.set(u,m),m}var h=d.GA4;r.ReactGAImplementation=h;var y=d.default;r.default=y})(ue);const lt=Te(ue);function it(r,i){i===void 0&&(i=0);var d=E.exports.useRef(!1),c=E.exports.useRef(),p=E.exports.useRef(r),h=E.exports.useCallback(function(){return d.current},[]),y=E.exports.useCallback(function(){d.current=!1,c.current&&clearTimeout(c.current),c.current=setTimeout(function(){d.current=!0,p.current()},i)},[i]),u=E.exports.useCallback(function(){d.current=null,c.current&&clearTimeout(c.current)},[]);return E.exports.useEffect(function(){p.current=r},[r]),E.exports.useEffect(function(){return y(),u},[i]),[h,u,y]}function st(r,i,d){i===void 0&&(i=0),d===void 0&&(d=[]);var c=it(r,i),p=c[0],h=c[1],y=c[2];return E.exports.useEffect(y,d),[p,h]}const ut={app_ids:{prod:"G-NT3FLN0QHF",dev:"G-7TMZEFFWB7"},dimensions:{dev:"dimension1",version:"dimension2",context:"dimension3"}},ct=({className:r,value:i})=>o.createElement("a",{className:r,title:i},i),dt=({useSearch:r})=>{const i=De(),d=Q(te);return o.createElement(Oe,{component:ct,placeholder:"Select dataset",inputStyle:{height:40,maxWidth:300},containerStyle:{position:"relative"},onSelect:async c=>(i(c),c),overflow:!0,useSearch:r,value:d})},fe=function(){var r=[{alias:null,args:null,kind:"ScalarField",name:"storeTeamsSubmission",storageKey:null}];return{fragment:{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"TeamsStoreTeamsSubmissionMutation",selections:r,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[],kind:"Operation",name:"TeamsStoreTeamsSubmissionMutation",selections:r},params:{cacheID:"65a385a73975d2daf14d156ff5b7ed6a",id:null,metadata:{},name:"TeamsStoreTeamsSubmissionMutation",operationKind:"mutation",text:`mutation TeamsStoreTeamsSubmissionMutation {
  storeTeamsSubmission
}
`}}}();fe.hash="75deb5f0c490b3073749a77128b435e4";const mt="_form_8vzxe_1",ft="_header_8vzxe_19",gt="_text_8vzxe_26";const pt=()=>{var D,O,x,M,N,P,C,R;const[r,i]=E.exports.useState({email:"",firstname:"",lastname:"",company:"",role:""}),[d,c]=E.exports.useState("Submit"),[p,h]=q(Le),y=Ce(ne),g=`https://api.hsforms.com/submissions/v3/integration/submit/${4972700}/bca87445-10be-424c-9c07-e2b16770caf6`,[m]=K.exports.useMutation(fe),w=F=>L=>i({...r,[F]:L.target.value}),T=()=>{c("Submitting...");const F=new Headers;F.append("Content-Type","application/json"),fetch(g,{method:"post",headers:F,mode:"cors",body:JSON.stringify({submittedAt:Date.now(),fields:[{name:"firstname",value:r.firstname},{name:"lastname",value:r.lastname},{name:"email",value:r.email},{name:"company",value:r.company},{name:"role",value:r.role}],context:{pageName:"FiftyOne App"}})}).then(L=>{if(L.status!==200)throw new Error("Failed submission");return L.json()}).then(()=>{c("Submitted. Thank you!"),h(L=>({...L,submitted:!0})),m({variables:{}}),setTimeout(()=>y(!1),2e3)}).catch(L=>{c("Something went wrong")})};return o.createElement("div",{className:mt},o.createElement("div",{className:ft},o.createElement("h3",null,"Get FiftyOne for your team"),o.createElement(U,{onClick:()=>y(!1),style:{display:"flex",alignItems:"center",padding:0}},o.createElement(Fe,null))),o.createElement("div",{className:gt},"FiftyOne is and will always be open source software that is freely available to our tens of thousands of individual users. However, if you\u2019re part of a team, you may need more. That\u2019s why we\u2019ve begun deploying team-based versions of FiftyOne with multiuser collaboration features.",o.createElement("br",null),o.createElement("br",null),"Are you interested in a team-based deployment of FiftyOne? Let us know how to contact you and we will reach out."),o.createElement("input",{key:"firstname",placeholder:"First name*",value:(D=r.firstname)!=null?D:"",maxLength:40,onChange:w("firstname")}),o.createElement("input",{key:"lastname",placeholder:"Last name*",value:(O=r.lastname)!=null?O:"",maxLength:40,onChange:w("lastname")}),o.createElement("input",{key:"email",placeholder:"Email*",type:"email",value:(x=r.email)!=null?x:"",onChange:w("email")}),o.createElement("input",{key:"company",placeholder:"Company",value:(M=r.company)!=null?M:"",maxLength:100,onChange:w("company")}),o.createElement("input",{key:"role",placeholder:"Role",value:(N=r.role)!=null?N:"",maxLength:100,onChange:w("role")}),o.createElement(U,{key:"submit",onClick:T,disabled:!(((P=r.email)==null?void 0:P.length)&&((C=r.firstname)==null?void 0:C.length)&&((R=r.lastname)==null?void 0:R.length))||p.submitted,style:{color:"unset"}},d))},yt=r=>i=>{const d=Q(Be),{data:c,refetch:p}=K.exports.usePaginationFragment(se,r);return st(()=>{p({search:i})},200,[i,d]),E.exports.useMemo(()=>({total:c.datasets.total===null?void 0:c.datasets.total,values:c.datasets.edges.map(h=>h.node.name)}),[c])},ht=r=>{const i=K.exports.useFragment(le,r);E.exports.useEffect(()=>{if(i.doNotTrack)return;const c=i.dev?"dev":"prod";lt.initialize(ut.app_ids[c],{testMode:!1,gaOptions:{storage:"none",cookieDomain:"none",clientId:i.uid,page_location:"omitted",page_path:"omitted",kind:Ve()?"Desktop":"Web",version:i.version,context:i.context,checkProtocolTask:null}})},[])},_t=({fragment:r,hasDataset:i})=>{const d=K.exports.useFragment(oe,r);ht(d);const c=yt(d),[p,h]=q(ne),y=Ie(),{mode:u,setMode:f}=Pe(),[g,m]=q(Me);return o.createElement(o.Fragment,null,o.createElement(Ne,{title:"FiftyOne",onRefresh:y,navChildren:o.createElement(dt,{useSearch:c})},i&&o.createElement(E.exports.Suspense,{fallback:o.createElement("div",{style:{flex:1}})},o.createElement(Re,null)),!i&&o.createElement("div",{style:{flex:1}}),o.createElement("div",{className:Ge},!d.teamsSubmission&&o.createElement(U,{onClick:()=>{h(!0)}},"Have a Team?"),o.createElement(Ke,{title:u==="dark"?"Light mode":"Dark mode",onClick:()=>{const w=u==="dark"?"light":"dark";f(w),m(w)},sx:{color:w=>w.palette.text.secondary,pr:0}},u==="dark"?o.createElement($e,{color:"inherit"}):o.createElement(He,null)),o.createElement(ze,null),o.createElement(qe,null),o.createElement(Ue,null))),je.createPortal(o.createElement(Qe,null,p&&o.createElement(We.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},key:"teams"},o.createElement(pt,null))),document.getElementById("teams")))};export{_t as N,bt as S};
