sanity-plugin-media 2.0.4 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +8 -19
- package/lib/index.esm.js +1 -2
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/package.json +5 -7
- package/src/components/AssetGridVirtualized/index.tsx +2 -1
- package/src/components/Browser/index.tsx +29 -25
- package/src/components/ButtonAssetCopy/index.tsx +4 -7
- package/src/components/CardUpload/index.tsx +12 -24
- package/src/components/DebugControls/index.tsx +1 -0
- package/src/components/DialogAssetEdit/index.tsx +5 -14
- package/src/components/FormBuilderTool/index.tsx +1 -1
- package/src/components/FormSubmitButton/index.tsx +1 -0
- package/src/components/OrderSelect/index.tsx +4 -0
- package/src/components/SearchFacetNumber/index.tsx +6 -3
- package/src/components/SearchFacetSelect/index.tsx +6 -3
- package/src/components/SearchFacetString/index.tsx +5 -3
- package/src/components/SearchFacetTags/index.tsx +5 -3
- package/src/components/SearchFacetsControl/index.tsx +7 -2
- package/src/components/TableRowUpload/index.tsx +12 -24
- package/src/components/Tag/index.tsx +2 -0
- package/src/components/TagViewHeader/index.tsx +2 -5
- package/src/hooks/useKeyPress.ts +14 -12
- package/src/hooks/usePortalPopoverProps.ts +12 -0
- package/src/modules/index.ts +18 -4
- package/src/components/FormFieldInputFilename/index.tsx +0 -50
package/lib/index.esm.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
const e=["onValueChange","value"];var t,n,i,a,l,o,r,s,d,c,u,p,h,g,m,y,f,v,b,x,C,w,I,T,k,_,S,R,E,z,A,O,D,q,j,L,F,U,P,M,N;function V(e,t){if(null==e)return{};var n,i,a=function(e,t){if(null==e)return{};var n,i,a={},l=Object.keys(e);for(i=0;i<l.length;i++)n=l[i],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)n=l[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){X(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}import{useClient as Y,useDocumentStore as $,WithReferringDocuments as W,useSchema as G,Preview as K,useFormValue as Z,definePlugin as J}from"sanity";import{ThLargeIcon as ee,ThListIcon as te,SortIcon as ne,SelectIcon as ie,CloseIcon as ae,AddCircleIcon as le,SearchIcon as oe,PlugIcon as re,ClipboardIcon as se,DownloadIcon as de,ErrorOutlineIcon as ce,ChevronDownIcon as ue,AddIcon as pe,WarningOutlineIcon as he,EditIcon as ge,ArrowUpIcon as me,ArrowDownIcon as ye,TrashIcon as fe,ComposeIcon as ve,Icon as be,UploadIcon as xe,WarningFilledIcon as Ce,CheckmarkCircleIcon as we,ChevronUpIcon as Ie,ImageIcon as Te}from"@sanity/icons";import{jsx as ke,jsxs as _e,Fragment as Se}from"react/jsx-runtime";import{Inline as Re,Button as Ee,MenuButton as ze,Menu as Ae,MenuItem as Oe,MenuDivider as De,Box as qe,Flex as je,Label as Le,Text as Fe,TextInput as Ue,studioTheme as Pe,Card as Me,MenuGroup as Ne,useMediaIndex as Ve,Tooltip as Qe,Switch as Be,Popover as Xe,Stack as He,Dialog as Ye,TextArea as $e,TabList as We,Tab as Ge,TabPanel as Ke,Container as Ze,Spinner as Je,Checkbox as et,Grid as tt,useToast as nt,ThemeProvider as it,ToastProvider as at,useLayer as lt,PortalProvider as ot,Portal as rt}from"@sanity/ui";import{useRef as st,useEffect as dt,createContext as ct,useContext as ut,useState as pt,forwardRef as ht,useCallback as gt,memo as mt,Component as yt}from"react";import ft from"is-hotkey";import vt from"groq";import{useSelector as bt,useDispatch as xt,Provider as Ct}from"react-redux";import{createAction as wt,createSlice as It,createSelector as Tt,combineReducers as kt,configureStore as _t}from"@reduxjs/toolkit";import{nanoid as St}from"nanoid";import{ofType as Rt,combineEpics as Et,createEpicMiddleware as zt}from"redux-observable";import{iif as At,throwError as Ot,of as Dt,from as qt,empty as jt,Subject as Lt,Observable as Ft,merge as Ut}from"rxjs";import{delay as Pt,mergeMap as Mt,filter as Nt,withLatestFrom as Vt,catchError as Qt,switchMap as Bt,bufferTime as Xt,debounceTime as Ht,first as Yt,map as $t,takeUntil as Wt}from"rxjs/operators";import{hues as Gt,white as Kt,black as Zt}from"@sanity/color";import Jt,{css as en,createGlobalStyle as tn}from"styled-components";import nn from"pluralize";import{useNProgress as an}from"@tanem/react-nprogress";import ln,{components as on}from"react-select";import{Virtuoso as rn,VirtuosoGrid as sn,GroupedVirtuoso as dn}from"react-virtuoso";import{yupResolver as cn}from"@hookform/resolvers/yup";import{Controller as un,useForm as pn}from"react-hook-form";import*as hn from"yup";import gn from"date-fns/format";import mn from"filesize";import yn from"copy-to-clipboard";import{useIntentLink as fn}from"sanity/router";import{FileIcon as vn,defaultStyles as bn}from"react-file-icon";import xn from"react-select/creatable";import Cn from"date-fns/formatRelative";import{useDropzone as wn}from"react-dropzone";const In=(e,t)=>{const n=st(!1);function i(i){ft(e,i)&&(n.current=!0,t&&t())}const a=()=>{n.current=!1};return dt((()=>(window.addEventListener("keydown",i),window.addEventListener("keyup",a),()=>{window.removeEventListener("keydown",i),window.removeEventListener("keyup",a)})),[]),n},Tn={type:"divider"},kn={altText:{assetTypes:["file","image"],field:"altText",name:"altText",operatorType:"empty",operatorTypes:["empty","notEmpty",null,"includes","doesNotInclude"],title:"Alt text",type:"string",value:""},description:{assetTypes:["file","image"],field:"description",name:"description",operatorType:"empty",operatorTypes:["empty","notEmpty",null,"includes","doesNotInclude"],title:"Description",type:"string",value:""},fileName:{assetTypes:["file","image"],field:"originalFilename",name:"filename",operatorType:"includes",operatorTypes:["includes","doesNotInclude"],title:"File name",type:"string",value:""},height:{assetTypes:["image"],field:"metadata.dimensions.height",name:"height",operatorType:"greaterThan",operatorTypes:["greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo",null,"equalTo"],title:"Height",type:"number",value:400},inCurrentDocument:{assetTypes:["file","image"],name:"inCurrentDocument",operatorType:"is",options:[{name:"true",title:"True",value:vt(t||(t=H(["_id in $documentAssetIds"])))},{name:"false",title:"False",value:vt(n||(n=H(["!(_id in $documentAssetIds)"])))}],selectOnly:!0,title:"In use in current document",type:"select",value:"true"},inUse:{assetTypes:["file","image"],name:"inUse",operatorType:"is",options:[{name:"true",title:"True",value:vt(i||(i=H(["count(*[references(^._id)]) > 0"])))},{name:"false",title:"False",value:vt(a||(a=H(["count(*[references(^._id)]) == 0"])))}],title:"In use",type:"select",value:"true"},isOpaque:{assetTypes:["image"],field:"metadata.isOpaque",name:"isOpaque",operatorType:"equalTo",options:[{name:"true",title:"True",value:"false"},{name:"false",title:"False",value:"true"}],title:"Has transparency",type:"select",value:"true"},orientation:{assetTypes:["image"],name:"orientation",operatorType:"is",operatorTypes:["is","isNot"],options:[{name:"portrait",title:"Portrait",value:"metadata.dimensions.aspectRatio < 1"},{name:"landscape",title:"Landscape",value:"metadata.dimensions.aspectRatio > 1"},{name:"square",title:"Square",value:"metadata.dimensions.aspectRatio == 1"}],title:"Orientation",type:"select",value:"portrait"},size:{assetTypes:["file","image"],field:"size",modifier:"kb",modifiers:[{name:"kb",title:"KB",fieldModifier:e=>"round(".concat(e," / 1000)")},{name:"mb",title:"MB",fieldModifier:e=>"round(".concat(e," / 1000000)")}],name:"size",operatorType:"greaterThan",operatorTypes:["greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo",null,"equalTo"],title:"File size",type:"number",value:0},tag:{assetTypes:["file","image"],field:"opt.media.tags",name:"tag",operatorType:"references",operatorTypes:["references","doesNotReference",null,"empty","notEmpty"],title:"Tags",type:"searchable"},title:{assetTypes:["file","image"],field:"title",name:"title",operatorType:"empty",operatorTypes:["empty","notEmpty",null,"includes","doesNotInclude"],title:"Title",type:"string",value:""},type:{assetTypes:["file","image"],name:"type",operatorType:"is",operatorTypes:["is","isNot"],options:[{name:"image",title:"Image",value:'mimeType match "image*"'},{name:"video",title:"Video",value:'mimeType match "video*"'},{name:"audio",title:"Audio",value:'mimeType match "audio*"'},{name:"pdf",title:"PDF",value:'mimeType == "application/pdf"'}],title:"File type",type:"select",value:"image"},width:{assetTypes:["image"],field:"metadata.dimensions.width",name:"width",operatorType:"greaterThan",operatorTypes:["greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo",null,"equalTo"],title:"Width",type:"number",value:400}},_n={doesNotInclude:{fn:(e,t)=>e?"!(".concat(t," match '*").concat(e,"*')"):void 0,label:"does not include"},doesNotReference:{fn:(e,t)=>e?"!references('".concat(e,"')"):void 0,label:"does not include"},empty:{fn:(e,t)=>"!defined(".concat(t,")"),hideInput:!0,label:"is empty"},equalTo:{fn:(e,t)=>e?"".concat(t," == ").concat(e):void 0,label:"is equal to"},greaterThan:{fn:(e,t)=>e?"".concat(t," > ").concat(e):void 0,label:"is greater than"},greaterThanOrEqualTo:{fn:(e,t)=>e?"".concat(t," >= ").concat(e):void 0,label:"is greater than or equal to"},includes:{fn:(e,t)=>e?"".concat(t," match '*").concat(e,"*'"):void 0,label:"includes"},is:{fn:(e,t)=>"".concat(e),label:"is"},isNot:{fn:(e,t)=>"!(".concat(e,")"),label:"is not"},lessThan:{fn:(e,t)=>e?"".concat(t," < ").concat(e):void 0,label:"is less than"},lessThanOrEqualTo:{fn:(e,t)=>e?"".concat(t," <= ").concat(e):void 0,label:"is less than or equal to"},notEmpty:{fn:(e,t)=>"defined(".concat(t,")"),hideInput:!0,label:"is not empty"},references:{fn:(e,t)=>e?"references('".concat(e,"')"):void 0,label:"includes"}},Sn=[{direction:"desc",field:"_createdAt"},{direction:"asc",field:"_createdAt"},null,{direction:"desc",field:"_updatedAt"},{direction:"asc",field:"_updatedAt"},null,{direction:"asc",field:"originalFilename"},{direction:"desc",field:"originalFilename"},null,{direction:"desc",field:"size"},{direction:"asc",field:"size"}],Rn=[kn.tag,Tn,kn.inUse,kn.inCurrentDocument,Tn,kn.title,kn.altText,kn.description,Tn,kn.isOpaque,Tn,kn.fileName,kn.size,kn.type,Tn,kn.orientation,kn.width,kn.height],En="3rem 100px auto 1.5rem",zn="3rem 100px auto 5.5rem 5.5rem 3.5rem 8.5rem 2rem",An=ct(void 0),On=e=>{const{children:t,onSelect:n}=e,i={onSelect:n};return ke(An.Provider,{value:i,children:t})},Dn=()=>{const e=ut(An);if(void 0===e)throw new Error("useAssetSourceActions must be used within an AssetSourceDispatchProvider");return e},qn=()=>Y({apiVersion:"2022-10-01"}),jn={_createdAt:{asc:"Last created: Oldest first",desc:"Last created: Newest first"},_updatedAt:{asc:"Last updated: Oldest first",desc:"Last updated: Newest first"},mimeType:{asc:"MIME type: A to Z",desc:"MIME type: Z to A"},originalFilename:{asc:"File name: A to Z",desc:"File name: Z to A"},size:{asc:"File size: Smallest first",desc:"File size: Largest first"}},Ln=(e,t)=>jn[e][t],Fn=e=>function(t){return At((()=>!!e),t.pipe(Pt(3e3),Mt((e=>Math.random()>.5?Ot({message:"Test error",statusCode:500}):Dt(e)))),t)},Un=e=>{let{assetTypes:t,searchFacets:n,searchQuery:i}=e;const a=t.map((e=>"sanity.".concat(e,"Asset"))),r=vt(l||(l=H(["\n _type in ",' && !(_id in path("drafts.**"))\n '])),JSON.stringify(a)),s=n.reduce(((e,t)=>{var n;if("number"===t.type){const{field:n,modifier:i,modifiers:a,operatorType:l,value:o}=t,r=_n[l],s=null==a?void 0:a.find((e=>e.name===i)),d=(null==s?void 0:s.fieldModifier)?s.fieldModifier(n):n,c=r.fn(o,d);c&&e.push(c)}if("searchable"===t.type){const{field:n,operatorType:i,value:a}=t,l=_n[i].fn(null==a?void 0:a.value,n);l&&e.push(l)}if("select"===t.type){const{field:i,operatorType:a,options:l,value:o}=t,r=_n[a],s=null==(n=null==l?void 0:l.find((e=>e.name===o)))?void 0:n.value,d=r.fn(s,i);d&&e.push(d)}if("string"===t.type){const{field:n,operatorType:i,value:a}=t,l=_n[i].fn(a,n);l&&e.push(l)}return e}),[]);return[r,...i?[vt(o||(o=H(["[_id, altText, assetId, description, originalFilename, title, url] match '*","*'"])),i.trim())]:[],...s].join(" && ")},Pn=(e,t)=>function(n){return n.pipe(Mt((()=>qt(e.fetch(vt(r||(r=H(['count(*[_type == "','" && name.current == $name])'])),"media.tag"),{name:t})))),Mt((e=>e>0?Ot({message:"Tag already exists",statusCode:409}):Dt(!0))))},Mn=e=>e.reduce(((e,t)=>{var n;const i=null==t?void 0:t.tag;return i&&e.push({label:null==(n=null==i?void 0:i.name)?void 0:n.current,value:null==i?void 0:i._id}),e}),[]),Nn={tagsAddComplete:wt("actions/tagsAddComplete",(function(e){let{assets:t,tag:n}=e;return{payload:{assets:t,tag:n}}})),tagsAddError:wt("actions/tagsAddError",(function(e){let{assets:t,error:n,tag:i}=e;return{payload:{assets:t,error:n,tag:i}}})),tagsAddRequest:wt("actions/tagsAddRequest",(function(e){let{assets:t,tag:n}=e;return{payload:{assets:t,tag:n}}})),tagsRemoveComplete:wt("actions/tagsRemoveComplete",(function(e){let{assets:t,tag:n}=e;return{payload:{assets:t,tag:n}}})),tagsRemoveError:wt("actions/tagsRemoveError",(function(e){let{assets:t,error:n,tag:i}=e;return{payload:{assets:t,error:n,tag:i}}})),tagsRemoveRequest:wt("actions/tagsRemoveRequest",(function(e){let{assets:t,tag:n}=e;return{payload:{assets:t,tag:n}}}))},Vn={showTagCreate:wt("dialog/showTagCreate"),showTagEdit:wt("dialog/showTagEdit",(function(e){let{tagId:t}=e;return{payload:{tagId:t}}}))},Qn=It({name:"tags",initialState:{allIds:[],byIds:{},creating:!1,creatingError:void 0,fetchCount:-1,fetching:!1,fetchingError:void 0,panelVisible:!0},extraReducers:e=>{e.addCase(Vn.showTagCreate,(e=>{delete e.creatingError})).addCase(Vn.showTagEdit,((e,t)=>{const{tagId:n}=t.payload;delete e.byIds[n].error})).addMatcher((e=>[Nn.tagsAddComplete.type,Nn.tagsAddError.type,Nn.tagsRemoveComplete.type,Nn.tagsRemoveError.type].includes(e.type)),((e,t)=>{const{tag:n}=t.payload;e.byIds[n._id].updating=!1})).addMatcher((e=>[Nn.tagsAddRequest.type,Nn.tagsRemoveRequest.type].includes(e.type)),((e,t)=>{const{tag:n}=t.payload;e.byIds[n._id].updating=!0}))},reducers:{createComplete(e,t){const{tag:n}=t.payload;e.creating=!1,e.allIds.includes(n._id)||e.allIds.push(n._id),e.byIds[n._id]={_type:"tag",picked:!1,tag:n,updating:!1}},createError(e,t){e.creating=!1,e.creatingError=t.payload.error},createRequest(e,t){e.creating=!0,delete e.creatingError},deleteComplete(e,t){const{tagId:n}=t.payload,i=e.allIds.indexOf(n);i>=0&&e.allIds.splice(i,1),delete e.byIds[n]},deleteError(e,t){const{error:n,tag:i}=t.payload,a=null==i?void 0:i._id;e.byIds[a].error=n,e.byIds[a].updating=!1},deleteRequest(e,t){var n,i;const a=null==(i=null==(n=t.payload)?void 0:n.tag)?void 0:i._id;e.byIds[a].picked=!1,e.byIds[a].updating=!0,Object.keys(e.byIds).forEach((t=>{delete e.byIds[t].error}))},fetchComplete(e,t){const{tags:n}=t.payload;null==n||n.forEach((t=>{e.allIds.push(t._id),e.byIds[t._id]={_type:"tag",picked:!1,tag:t,updating:!1}})),e.fetching=!1,e.fetchCount=n.length||0,delete e.fetchingError},fetchError(e,t){const{error:n}=t.payload;e.fetching=!1,e.fetchingError=n},fetchRequest:{reducer:(e,t)=>{e.fetching=!0,delete e.fetchingError},prepare:()=>({payload:{query:vt(s||(s=H(['\n {\n "items": *[\n _type == "','"\n && !(_id in path("drafts.**"))\n ] {\n _createdAt,\n _updatedAt,\n _id,\n _rev,\n _type,\n name\n } | order(name.current asc),\n }\n '])),"media.tag")}})},listenerCreateQueue(e,t){},listenerCreateQueueComplete(e,t){const{tags:n}=t.payload;null==n||n.forEach((t=>{e.byIds[t._id]={_type:"tag",picked:!1,tag:t,updating:!1},e.allIds.includes(t._id)||e.allIds.push(t._id)}))},listenerDeleteQueue(e,t){},listenerDeleteQueueComplete(e,t){const{tagIds:n}=t.payload;null==n||n.forEach((t=>{const n=e.allIds.indexOf(t);n>=0&&e.allIds.splice(n,1),delete e.byIds[t]}))},listenerUpdateQueue(e,t){},listenerUpdateQueueComplete(e,t){const{tags:n}=t.payload;null==n||n.forEach((t=>{e.byIds[t._id]&&(e.byIds[t._id].tag=t)}))},panelVisibleSet(e,t){const{panelVisible:n}=t.payload;e.panelVisible=n},sort(e){e.allIds.sort(((t,n)=>{const i=e.byIds[t].tag.name.current,a=e.byIds[n].tag.name.current;return i<a?-1:i>a?1:0}))},updateComplete(e,t){const{tag:n}=t.payload;e.byIds[n._id].tag=n,e.byIds[n._id].updating=!1},updateError(e,t){const{error:n,tag:i}=t.payload,a=null==i?void 0:i._id;e.byIds[a].error=n,e.byIds[a].updating=!1},updateRequest(e,t){const{tag:n}=t.payload;e.byIds[null==n?void 0:n._id].updating=!0}}}),Bn=e=>e.tags.byIds,Xn=Tt([Bn,e=>e.tags.allIds],((e,t)=>t.map((t=>e[t])))),Hn=Tt([Bn,(e,t)=>t],((e,t)=>e[t])),Yn=Qn.actions;var $n=Qn.reducer;const Wn=It({name:"search",initialState:{facets:[],query:""},reducers:{facetsAdd(e,t){e.facets.push(t.payload.facet)},facetsClear(e){e.facets=[]},facetsRemove(e,t){e.facets=e.facets.filter((e=>e.name!==t.payload.facetName))},facetsUpdate(e,t){const{modifier:n,name:i,operatorType:a,value:l}=t.payload;e.facets.forEach(((t,o)=>{t.name===i&&("number"===t.type&&n&&(t.modifier=n),a&&(t.operatorType=a),void 0!==l&&(e.facets[o].value=l))}))},querySet(e,t){var n;e.query=null==(n=t.payload)?void 0:n.searchQuery}}}),Gn=Tt((e=>e.search.facets),(e=>!!(null==e?void 0:e.find((e=>"tag"===e.name))))),Kn=Tt([e=>e.tags.byIds,e=>e.search.facets,(e,t)=>t],((e,t,n)=>{var i,a,l;const o=null==t?void 0:t.find((e=>"tag"===e.name));if("searchable"===(null==o?void 0:o.type)){const t=null==(i=o.value)?void 0:i.value;if(t)return(null==(l=null==(a=e[t])?void 0:a.tag)?void 0:l._id)===n&&"references"===(null==o?void 0:o.operatorType)}return!1})),Zn=Wn.actions;var Jn=Wn.reducer;const ei={uploadComplete:wt("uploads/uploadComplete",(function(e){let{asset:t}=e;return{payload:{asset:t}}}))},ti=Sn[0],ni={allIds:[],assetTypes:[],byIds:{},fetchCount:-1,fetching:!1,fetchingError:void 0,lastPicked:void 0,order:{direction:ti.direction,field:ti.field,title:Ln(ti.field,ti.direction)},pageIndex:0,pageSize:50,view:"grid"},ii=It({name:"assets",initialState:ni,extraReducers:e=>{e.addCase(ei.uploadComplete,((e,t)=>{const{asset:n}=t.payload;e.byIds[n._id]={_type:"asset",asset:n,picked:!1,updating:!1}})).addCase(Nn.tagsAddComplete,((e,t)=>{const{assets:n}=t.payload;n.forEach((t=>{e.byIds[t.asset._id].updating=!1}))})).addCase(Nn.tagsAddError,((e,t)=>{const{assets:n}=t.payload;n.forEach((t=>{e.byIds[t.asset._id].updating=!1}))})).addCase(Nn.tagsAddRequest,((e,t)=>{const{assets:n}=t.payload;n.forEach((t=>{e.byIds[t.asset._id].updating=!0}))})).addCase(Nn.tagsRemoveComplete,((e,t)=>{const{assets:n}=t.payload;n.forEach((t=>{e.byIds[t.asset._id].updating=!1}))})).addCase(Nn.tagsRemoveError,((e,t)=>{const{assets:n}=t.payload;n.forEach((t=>{e.byIds[t.asset._id].updating=!1}))})).addCase(Nn.tagsRemoveRequest,((e,t)=>{const{assets:n}=t.payload;n.forEach((t=>{e.byIds[t.asset._id].updating=!0}))}))},reducers:{clear(e){e.allIds=[]},deleteComplete(e,t){const{assetIds:n}=t.payload;null==n||n.forEach((t=>{const n=e.allIds.indexOf(t);n>=0&&e.allIds.splice(n,1),delete e.byIds[t]})),e.pageIndex=Math.floor(e.allIds.length/e.pageSize)-1},deleteError(e,t){var n,i,a,l;const{assetIds:o,error:r}=t.payload,s=null==(l=null==(a=null==(i=null==(n=null==r?void 0:r.response)?void 0:n.body)?void 0:i.error)?void 0:a.items)?void 0:l.map((e=>e.error));null==o||o.forEach((t=>{e.byIds[t].updating=!1})),null==s||s.forEach((t=>{e.byIds[t.id].error=t.description}))},deleteRequest(e,t){const{assets:n}=t.payload;n.forEach((t=>{e.byIds[null==t?void 0:t._id].updating=!0})),Object.keys(e.byIds).forEach((t=>{delete e.byIds[t].error}))},fetchComplete(e,t){var n;const i=(null==(n=t.payload)?void 0:n.assets)||[];i&&i.forEach((t=>{e.allIds.includes(t._id)||e.allIds.push(t._id),e.byIds[t._id]={_type:"asset",asset:t,picked:!1,updating:!1}})),e.fetching=!1,e.fetchCount=i.length||0,delete e.fetchingError},fetchError(e,t){const n=t.payload;e.fetching=!1,e.fetchingError=n},fetchRequest:{reducer:(e,t)=>{e.fetching=!0,delete e.fetchingError},prepare:e=>{let{params:t={},queryFilter:n,selector:i="",sort:a=vt(c||(c=H(["order(_updatedAt desc)"])))}=e;const l=a||i?"|":"";return{payload:{params:t,query:vt(u||(u=H(['\n {\n "items": *[',"] {\n _id,\n _type,\n _createdAt,\n _updatedAt,\n altText,\n description,\n extension,\n metadata {\n dimensions,\n exif,\n isOpaque,\n },\n mimeType,\n opt {\n media\n },\n originalFilename,\n size,\n title,\n url\n } "," "," ",",\n }\n "])),n,l,a,i)}}}},insertUploads(e,t){const{results:n}=t.payload;Object.entries(n).forEach((t=>{let[n,i]=t;i&&!e.allIds.includes(n)&&e.allIds.push(i)}))},listenerCreateQueue(e,t){},listenerCreateQueueComplete(e,t){const{assets:n}=t.payload;null==n||n.forEach((t=>{var n;(null==(n=e.byIds[null==t?void 0:t._id])?void 0:n.asset)&&(e.byIds[t._id].asset=t)}))},listenerDeleteQueue(e,t){},listenerDeleteQueueComplete(e,t){const{assetIds:n}=t.payload;null==n||n.forEach((t=>{const n=e.allIds.indexOf(t);n>=0&&e.allIds.splice(n,1),delete e.byIds[t]}))},listenerUpdateQueue(e,t){},listenerUpdateQueueComplete(e,t){const{assets:n}=t.payload;null==n||n.forEach((t=>{var n;(null==(n=e.byIds[null==t?void 0:t._id])?void 0:n.asset)&&(e.byIds[t._id].asset=t)}))},loadNextPage(){},loadPageIndex(e,t){e.pageIndex=t.payload.pageIndex},orderSet(e,t){var n;e.order=null==(n=t.payload)?void 0:n.order,e.pageIndex=0},pick(e,t){const{assetId:n,picked:i}=t.payload;e.byIds[n].picked=i,e.lastPicked=i?n:void 0},pickAll(e){e.allIds.forEach((t=>{e.byIds[t].picked=!0}))},pickClear(e){e.lastPicked=void 0,Object.values(e.byIds).forEach((t=>{e.byIds[t.asset._id].picked=!1}))},pickRange(e,t){const n=e.allIds.findIndex((e=>e===t.payload.startId)),i=e.allIds.findIndex((e=>e===t.payload.endId)),a=[n,i].sort(((e,t)=>e-t));e.allIds.slice(a[0],a[1]+1).forEach((t=>{e.byIds[t].picked=!0})),e.lastPicked=e.allIds[i]},sort(e){e.allIds.sort(((t,n)=>{const i=e.byIds[t].asset[e.order.field],a=e.byIds[n].asset[e.order.field];return i<a?"asc"===e.order.direction?-1:1:i>a?"asc"===e.order.direction?1:-1:0}))},updateComplete(e,t){const{asset:n}=t.payload;e.byIds[n._id].updating=!1,e.byIds[n._id].asset=n},updateError(e,t){const{asset:n,error:i}=t.payload,a=null==n?void 0:n._id;e.byIds[a].error=i.message,e.byIds[a].updating=!1},updateRequest(e,t){var n,i;const a=null==(i=null==(n=t.payload)?void 0:n.asset)?void 0:i._id;e.byIds[a].updating=!0},viewSet(e,t){var n;e.view=null==(n=t.payload)?void 0:n.view}}}),ai=Tt([e=>e.assets.byIds,(e,t)=>t],((e,t)=>e[t])),li=Tt([e=>e.assets.byIds,e=>e.assets.allIds],((e,t)=>t.map((t=>e[t])))),oi=Tt([li],(e=>e.length)),ri=Tt([li],(e=>e.filter((e=>null==e?void 0:e.picked)))),si=Tt([ri],(e=>e.length)),di=ii.actions;var ci,ui,pi=ii.reducer;const hi=en(m||(m=H(["\n ::-webkit-scrollbar {\n width: 14px;\n }\n\n ::-webkit-scrollbar-thumb {\n border-radius: 10px;\n border: 4px solid rgba(0, 0, 0, 0);\n background: ",";\n background-clip: padding-box;\n\n &:hover {\n background: ",";\n background-clip: padding-box;\n }\n }\n"])),null==(ci=Gt.gray)?void 0:ci[800].hex,null==(ui=Gt.gray)?void 0:ui[400].hex),gi=tn(y||(y=H(["\n .media__custom-scrollbar {\n ",'\n }\n\n // @sanity/ui overrides\n\n // Custom scrollbar on Box (used in Dialogs)\n div[data-ui="Box"] {\n ','\n }\n\n // Dialog background color\n div[data-ui="Dialog"] {\n background-color: rgba(15, 17, 18, 0.9);\n }\n\n'])),hi,hi),mi=bt,yi=It({name:"dialog",initialState:{items:[]},extraReducers:e=>{e.addCase(Vn.showTagCreate,(e=>{e.items.push({id:"tagCreate",type:"tagCreate"})})),e.addCase(Vn.showTagEdit,((e,t)=>{const{tagId:n}=t.payload;e.items.push({id:n,tagId:n,type:"tagEdit"})}))},reducers:{clear(e){e.items=[]},inlineTagCreate(e,t){const{assetId:n,tag:i}=t.payload;e.items.forEach((e=>{"assetEdit"===e.type&&e.assetId===n&&(e.lastCreatedTag={label:i.name.current,value:i._id})}))},inlineTagRemove(e,t){const{tagIds:n}=t.payload;e.items.forEach((e=>{"assetEdit"===e.type&&(e.lastRemovedTagIds=n)}))},remove(e,t){var n;const i=null==(n=t.payload)?void 0:n.id;e.items=e.items.filter((e=>e.id!==i))},showConfirmAssetsTagAdd(e,t){const{assetsPicked:n,closeDialogId:i,tag:a}=t.payload,l="".concat(n.length," ").concat(nn("asset",n.length));e.items.push({closeDialogId:i,confirmCallbackAction:Nn.tagsAddRequest({assets:n,tag:a}),confirmText:"Yes, add tag to ".concat(l),title:"Add tag ".concat(a.name.current," to ").concat(l,"?"),id:"confirm",headerTitle:"Confirm tag addition",tone:"primary",type:"confirm"})},showConfirmAssetsTagRemove(e,t){const{assetsPicked:n,closeDialogId:i,tag:a}=t.payload,l="".concat(n.length," ").concat(nn("asset",n.length));e.items.push({closeDialogId:i,confirmCallbackAction:Nn.tagsRemoveRequest({assets:n,tag:a}),confirmText:"Yes, remove tag from ".concat(l),headerTitle:"Confirm tag removal",id:"confirm",title:"Remove tag ".concat(a.name.current," from ").concat(l,"?"),tone:"critical",type:"confirm"})},showConfirmDeleteAssets(e,t){const{assets:n,closeDialogId:i}=t.payload,a="".concat(n.length," ").concat(nn("asset",n.length));e.items.push({closeDialogId:i,confirmCallbackAction:di.deleteRequest({assets:n.map((e=>e.asset))}),confirmText:"Yes, delete ".concat(a),description:"This operation cannot be reversed. Are you sure you want to continue?",title:"Permanently delete ".concat(a,"?"),id:"confirm",headerTitle:"Confirm deletion",tone:"critical",type:"confirm"})},showConfirmDeleteTag(e,t){const{closeDialogId:n,tag:i}=t.payload;e.items.push({closeDialogId:n,confirmCallbackAction:Yn.deleteRequest({tag:i}),confirmText:"Yes, delete ".concat("tag"),description:"This operation cannot be reversed. Are you sure you want to continue?",title:"Permanently delete ".concat("tag","?"),id:"confirm",headerTitle:"Confirm deletion",tone:"critical",type:"confirm"})},showAssetEdit(e,t){const{assetId:n}=t.payload;e.items.push({assetId:n,id:n,type:"assetEdit"})},showSearchFacets(e){e.items.push({id:"searchFacets",type:"searchFacets"})},showTags(e){e.items.push({id:"tags",type:"tags"})}}}),fi=yi.actions;var vi=yi.reducer;const bi=()=>{const e=xt(),t=mi((e=>e.assets.view));return _e(Re,{space:0,style:{whiteSpace:"nowrap"},children:[ke(Ee,{fontSize:1,icon:ee,mode:"grid"===t?"default":"ghost",onClick:()=>e(di.viewSet({view:"grid"})),style:{borderBottomRightRadius:0,borderTopRightRadius:0}}),ke(Ee,{fontSize:1,icon:te,mode:"table"===t?"default":"ghost",onClick:()=>e(di.viewSet({view:"table"})),style:{borderBottomLeftRadius:0,borderTopLeftRadius:0}})]})},xi=()=>{var e;const t=xt(),n=mi((e=>e.assets.order));return ke(ze,{button:ke(Ee,{fontSize:1,icon:ne,iconRight:ie,mode:"ghost",padding:3,text:Ln(n.field,n.direction)}),id:"order",menu:ke(Ae,{children:null==(e=Sn)?void 0:e.map(((e,i)=>e?ke(Oe,{disabled:n.field===e.field&&n.direction===e.direction,fontSize:1,onClick:()=>t(di.orderSet({order:{direction:e.direction,field:e.field}})),padding:2,text:Ln(e.field,e.direction)},i):ke(De,{},i)))})})},Ci=e=>{const{loading:t}=e,{animationDuration:n,isFinished:i,progress:a}=an({animationDuration:300,isAnimating:t});return ke(qe,{style:{opacity:i?0:1,transition:"opacity ".concat(n,"ms linear")},children:ke(qe,{style:{height:"1px",background:"rgba(255, 255, 255, 0.5)",position:"absolute",left:0,top:0,transition:"width ".concat(n,"ms linear"),width:"".concat(100*a,"%")}})})},wi=Jt(qe)(f||(f=H(["\n background: rgba(255, 255, 255, 0.05);\n border-radius: ","px;\n"])),(e=>e.theme.sanity.radius[2])),Ii=e=>{const{children:t,facet:n}=e,i=xt();return ke(wi,{padding:[2,2,1],children:_e(je,{align:["flex-start","flex-start","center"],direction:["column","column","row"],children:[ke(qe,{paddingBottom:[3,3,0],paddingLeft:1,paddingRight:2,paddingTop:[1,1,0],children:ke(Le,{size:0,style:{whiteSpace:"nowrap"},children:n.title})}),_e(je,{align:"center",children:[t,ke(qe,{marginLeft:1,paddingX:2,children:ke(Fe,{muted:!0,size:0,children:ke(ae,{onClick:()=>{i(Zn.facetsRemove({facetName:n.name}))}})})})]})]})})},Ti=t=>{const{onValueChange:n,value:i}=t,a=V(t,e);return ke(Ue,B(B({},a),{},{onChange:e=>{const t=e.target.value;(""===t||/^[0-9\b]+$/.test(t))&&n(parseInt(t,10)||"")},value:null!=i?i:""}))},ki=e=>{var t;const{facet:n}=e,i=xt(),a=null==n?void 0:n.modifiers,l=(null==n?void 0:n.modifier)?null==a?void 0:a.find((e=>e.name===(null==n?void 0:n.modifier))):null==a?void 0:a[0],o=null!=(t=n.operatorType)?t:"greaterThan";return _e(Ii,{facet:n,children:[(null==n?void 0:n.operatorTypes)&&ke(ze,{button:ke(Ee,{fontSize:1,iconRight:ie,padding:2,text:_n[o].label}),id:"operators",menu:ke(Ae,{children:n.operatorTypes.map(((e,t)=>e?ke(Oe,{disabled:e===o,fontSize:1,onClick:()=>(e=>{i(Zn.facetsUpdate({name:n.name,operatorType:e}))})(e),padding:2,text:_n[e].label},e):ke(De,{},t)))})}),ke(qe,{marginX:1,style:{maxWidth:"50px"},children:ke(Ti,{fontSize:1,onValueChange:e=>{i(Zn.facetsUpdate({name:n.name,value:e}))},padding:2,radius:2,width:2,value:null==n?void 0:n.value})}),a&&ke(ze,{button:ke(Ee,{fontSize:1,iconRight:ie,padding:2,text:null==l?void 0:l.title}),id:"modifier",menu:ke(Ae,{children:a.map((e=>ke(Oe,{disabled:e.name===n.modifier,fontSize:1,onClick:()=>(e=>{i(Zn.facetsUpdate({name:n.name,modifier:e.name}))})(e),padding:2,text:e.title},e.name)))})})]})},_i=e=>{var t;const{facet:n}=e,i=xt(),a=null==n?void 0:n.options,l=null==a?void 0:a.find((e=>e.name===(null==n?void 0:n.value))),o=null!=(t=null==n?void 0:n.operatorType)?t:"is";return _e(Ii,{facet:n,children:[(null==n?void 0:n.operatorTypes)&&ke(ze,{button:ke(Ee,{fontSize:1,iconRight:ie,padding:2,style:{marginRight:"4px"},text:_n[o].label}),id:"operators",menu:ke(Ae,{children:n.operatorTypes.map(((e,t)=>e?ke(Oe,{disabled:e===o,fontSize:1,onClick:()=>(e=>{i(Zn.facetsUpdate({name:n.name,operatorType:e}))})(e),padding:2,text:_n[e].label},e):ke(De,{},t)))})}),ke(ze,{button:ke(Ee,{fontSize:1,iconRight:ie,padding:2,text:null==l?void 0:l.title}),id:"list",menu:ke(Ae,{children:null==a?void 0:a.map(((e,t)=>ke(Oe,{disabled:e.name===(null==l?void 0:l.name),fontSize:1,onClick:()=>{return e=a[t],void i(Zn.facetsUpdate({name:n.name,value:e.name}));var e},padding:2,text:e.title},e.name)))})})]})},Si=e=>{const{facet:t}=e,n=xt(),i=t.operatorType;return _e(Ii,{facet:t,children:[(null==t?void 0:t.operatorTypes)&&ke(ze,{button:ke(Ee,{fontSize:1,iconRight:ie,padding:2,text:_n[i].label}),id:"operators",menu:ke(Ae,{children:t.operatorTypes.map(((e,a)=>e?ke(Oe,{disabled:e===i,fontSize:1,onClick:()=>(e=>{n(Zn.facetsUpdate({name:t.name,operatorType:e}))})(e),padding:2,text:_n[e].label},e):ke(De,{},a)))})}),!_n[i].hideInput&&ke(qe,{marginLeft:1,style:{maxWidth:"125px"},children:ke(Ue,{fontSize:1,onChange:e=>{n(Zn.facetsUpdate({name:t.name,value:e.target.value}))},padding:2,radius:2,width:2,value:null==t?void 0:t.value})})]})};var Ri,Ei,zi,Ai,Oi,Di,qi,ji,Li,Fi,Ui,Pi,Mi,Ni,Vi;const Qi=null==(Oi=null==(Ai=null==(zi=null==(Ei=null==(Ri=Pe)?void 0:Ri.color)?void 0:Ei.dark)?void 0:zi.primary)?void 0:Ai.spot)?void 0:Oi.blue,Bi=null==(Fi=null==(Li=null==(ji=null==(qi=null==(Di=Pe)?void 0:Di.color)?void 0:qi.dark)?void 0:ji.default)?void 0:Li.base)?void 0:Fi.bg,Xi=null==(Ui=Pe)?void 0:Ui.radius,Hi=null==(Pi=Pe)?void 0:Pi.space,Yi=null==(Vi=null==(Ni=null==(Mi=Pe)?void 0:Mi.fonts)?void 0:Ni.text)?void 0:Vi.sizes,$i={control:(e,t)=>{let{isDisabled:n,isFocused:i}=t,a="inset 0 0 0 1px ".concat(Gt.gray[900].hex);return i&&(a="inset 0 0 0 1px ".concat(Gt.gray[900].hex,", 0 0 0 1px var(--card-bg-color), 0 0 0 3px var(--card-focus-ring-color) !important")),B(B({},e),{},{backgroundColor:Bi,color:Kt.hex,border:"none",borderRadius:Xi[2],boxShadow:a,fontSize:Yi[1].fontSize,minHeight:"25px",opacity:n?.5:"inherit",outline:"none",transition:"none","&:hover":{boxShadow:"inset 0 0 0 1px ".concat(Pe.color.dark.default.input.default.hovered.border)}})},input:e=>B(B({},e),{},{color:Kt.hex,fontFamily:Pe.fonts.text.family,marginLeft:Hi[2]}),menuList:e=>B(B({},e),{},{padding:0}),noOptionsMessage:e=>B(B({},e),{},{fontFamily:Pe.fonts.text.family,fontSize:Yi[1].fontSize,lineHeight:"1em"}),option:(e,t)=>{let{isFocused:n}=t;return B(B({},e),{},{backgroundColor:n?Qi:"transparent",borderRadius:Xi[2],color:n?Zt.hex:"inherit",fontSize:Yi[1].fontSize,lineHeight:"1em",padding:"4px 6px","&:hover":{backgroundColor:Qi,color:Zt.hex}})},placeholder:e=>B(B({},e),{},{fontFamily:Pe.fonts.text.family,marginLeft:Hi[2],paddingBottom:"2px"}),singleValue:e=>B(B({},e),{},{color:Kt.hex,lineHeight:"1em",paddingBottom:"1px"}),valueContainer:e=>B(B({},e),{},{margin:0,padding:0})},Wi=e=>ke(qe,{padding:1,children:ke(on.Option,B(B({},e),{},{children:ke(qe,{paddingY:1,children:ke(Fe,{size:1,style:{color:"inherit"},textOverflow:"ellipsis",children:e.children})})}))}),Gi={ClearIndicator:e=>ke(on.ClearIndicator,B(B({},e),{},{children:ke(qe,{paddingRight:1,style:{transform:"scale(0.85)"},children:ke(Fe,{muted:!0,size:0,children:ke(ae,{})})})})),DropdownIndicator:null,IndicatorSeparator:null,Menu:e=>ke(on.Menu,B(B({},e),{},{children:ke(Me,{radius:1,shadow:2,children:e.children})})),MenuList:e=>{const{children:t}=e;if(Array.isArray(t)){const e=t.length>5?165:33*t.length;return ke(rn,{className:"media__custom-scrollbar",itemContent:e=>{const n=t[e];return ke(Wi,B({},n.props))},style:{height:e},totalCount:t.length})}return ke(on.MenuList,B(B({},e),{},{children:t}))},NoOptionsMessage:e=>ke(on.NoOptionsMessage,B(B({},e),{},{children:e.children})),Option:Wi,SingleValue:e=>ke(on.SingleValue,B(B({},e),{},{children:ke(qe,{paddingLeft:2,children:ke(Fe,{size:1,style:{color:"inherit",lineHeight:"2em"},textOverflow:"ellipsis",children:e.children})})}))},Ki=e=>{const{facet:t}=e,n=xt(),i=mi((e=>Xn(e))),a=mi((e=>e.tags.fetching)),l=Mn(i),o=t.operatorType;return _e(Ii,{facet:t,children:[(null==t?void 0:t.operatorTypes)&&ke(ze,{button:ke(Ee,{fontSize:1,iconRight:ie,padding:2,text:_n[o].label}),id:"operators",menu:ke(Ae,{children:t.operatorTypes.map(((e,i)=>e?ke(Oe,{disabled:e===o,fontSize:1,onClick:()=>(e=>{n(Zn.facetsUpdate({name:t.name,operatorType:e}))})(e),padding:2,text:_n[e].label},e):ke(De,{},i)))})}),!_n[o].hideInput&&ke(qe,{marginX:1,style:{width:"160px"},children:ke(ln,{components:Gi,instanceId:"facet-searchable",isClearable:!0,isDisabled:a,isSearchable:!0,name:"tags",noOptionsMessage:()=>"No tags",onChange:e=>{return i=e,void n(Zn.facetsUpdate({name:t.name,value:i}));var i},options:l,placeholder:a?"Loading...":"Select...",styles:$i,value:null==t?void 0:t.value})})]})},Zi=Jt(je)(v||(v=H(["\n > * {\n margin-bottom: ","px;\n }\n"])),(e=>e.theme.sanity.space[2])),Ji=e=>{const{layout:t="inline"}=e,n=mi((e=>e.search.facets)),i=n.map((e=>"number"===e.type?ke(ki,{facet:e},e.name):"searchable"===e.type?ke(Ki,{facet:e},e.name):"select"===e.type?ke(_i,{facet:e},e.name):"string"===e.type?ke(Si,{facet:e},e.name):null));if("inline"===t)return 0===n.length?null:ke(qe,{marginBottom:2,children:ke(Re,{space:2,children:i})});if("stack"===t)return ke(Zi,{align:"flex-start",direction:"column",children:i});throw Error("Invalid layout")},ea=()=>{const e=xt(),t=mi((e=>e.assets.assetTypes)),n=mi((e=>e.search.facets)),i=!mi((e=>e.selected.document)),a=Rn.filter((e=>{if("group"===e.type||"divider"===e.type)return!0;if(i)return!(null==e?void 0:e.selectOnly);return e.assetTypes.filter((e=>t.includes(e))).length>0})).filter(((e,t,n)=>{const i=n[t-1];return("divider"!==e.type||0!==t&&t!==n.length-1)&&("divider"!==e.type||"divider"!==(null==i?void 0:i.type))})),l=a.filter((e=>e)).length-n.length>0,o=function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return ke(Se,{children:null==t?void 0:t.map(((t,a)=>{if("divider"===t.type)return ke(De,{},a);if("group"===t.type)return ke(Ne,{text:t.title,title:t.title,children:o(t.facets,i+1)},"group-".concat(i,"-").concat(a));if(t){const i=!!n.find((e=>e.name===t.name));return ke(Oe,{disabled:i,fontSize:1,onClick:()=>e(Zn.facetsAdd({facet:t})),padding:2,text:t.title},t.name)}return null}))})};return _e(je,{children:[ke(ze,{button:ke(Ee,{disabled:!l,fontSize:1,icon:le,mode:"bleed",text:"Add filter",tone:"primary"}),id:"facets",menu:ke(Ae,{children:o(a)}),placement:"right-start",portal:!0}),n.length>0&&ke(Ee,{fontSize:1,mode:"bleed",onClick:()=>e(Zn.facetsClear()),text:"Clear"})]})},ta=()=>_e("svg",{"data-sanity-icon":"media__tag",fill:"currentColor",height:"1em",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",width:"1em",children:[ke("path",{d:"M435.25 48h-122.9a14.46 14.46 0 00-10.2 4.2L56.45 297.9a28.85 28.85 0 000 40.7l117 117a28.85 28.85 0 0040.7 0L459.75 210a14.46 14.46 0 004.2-10.2v-123a28.66 28.66 0 00-28.7-28.8z",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"}),ke("path",{d:"M384 160a32 32 0 1132-32 32 32 0 01-32 32z"})]}),na=()=>{const e=mi((e=>e.search.query)),t=xt();return _e(qe,{style:{position:"relative"},children:[ke(Ue,{fontSize:1,icon:oe,onChange:e=>{t(Zn.querySet({searchQuery:e.currentTarget.value}))},placeholder:"Search",radius:2,value:e}),e.length>0&&ke(je,{align:"center",justify:"center",onClick:()=>{t(Zn.querySet({searchQuery:""}))},style:{cursor:"pointer",height:"100%",opacity:.75,position:"absolute",right:0,top:0,width:"2em",zIndex:1},children:ke(ae,{})})]})},ia=()=>{var e;const t=xt(),n=mi((e=>e.assets.fetching)),i=mi((e=>e.assets.pageIndex)),a=mi((e=>e.search.facets)),l=mi((e=>e.tags.panelVisible)),o=Ve();return _e(qe,{paddingY:2,style:{borderBottom:"1px solid ".concat(null==(e=Gt.gray)?void 0:e[900].hex),zIndex:2},children:[ke(qe,{marginBottom:2,children:ke(je,{align:"flex-start",direction:["column","column","column","column","row"],justify:"space-between",children:_e(je,{flex:1,style:{alignItems:"flex-start",flex:1,height:"100%",justifyContent:o<2?"space-between":"flex-start",position:"relative",width:"100%"},children:[ke(qe,{marginX:2,style:{minWidth:"200px"},children:ke(na,{})}),_e(qe,{display:["none","none","block"],children:[ke(Ji,{}),ke(ea,{})]}),ke(qe,{display:["block","block","none"],marginX:2,children:_e(Re,{space:2,style:{whiteSpace:"nowrap"},children:[ke(Ee,{fontSize:1,mode:"ghost",onClick:()=>{t(fi.showSearchFacets())},text:"Filters".concat(a.length>0?" (".concat(a.length,")"):""),tone:"primary"}),ke(Ee,{fontSize:1,mode:"ghost",onClick:()=>{t(fi.showTags())},text:"Tags",tone:"primary"})]})})]})})}),ke(qe,{children:_e(je,{align:"center",justify:["space-between"],children:[ke(qe,{marginX:2,children:ke(bi,{})}),_e(je,{marginX:2,children:[ke(xi,{}),ke(qe,{display:["none","none","block"],marginLeft:2,children:ke(Ee,{fontSize:1,icon:ke(qe,{style:{transform:"scale(0.75)"},children:ke(ta,{})}),onClick:()=>{t(Yn.panelVisibleSet({panelVisible:!l}))},mode:l?"default":"ghost",text:l?"Tags":""})})]})]})}),ke(Ci,{loading:n},i)]})},aa=It({name:"debug",initialState:{badConnection:!1,enabled:!1},reducers:{setBadConnection(e,t){e.badConnection=t.payload},toggleEnabled(e){e.enabled=!e.enabled}}}),la=aa.actions;var oa=aa.reducer;const ra=()=>{const e=xt(),t=mi((e=>e.debug.badConnection)),n=mi((e=>e.debug.enabled));return In("alt+ctrl+shift+/",(()=>{e(la.toggleEnabled())})),n?ke(qe,{padding:4,style:{bottom:0,left:0,pointerEvents:"none",position:"fixed",width:"100%"},children:_e(je,{align:"center",children:[ke(qe,{marginRight:3,children:ke(Fe,{muted:!0,size:1,children:ke(re,{})})}),ke(Qe,{content:ke(qe,{padding:2,children:ke(Fe,{muted:!0,size:1,children:t?"Bad connection: +3000ms & 50% chance to fail":"No connection throttling"})}),fallbackPlacements:["right","left"],placement:"bottom",children:ke(Be,{checked:t,onChange:t=>{const n=t.target.checked;e(la.setBadConnection(n))},style:{pointerEvents:"auto"}})})]})}):null},sa=(e,t)=>{const n="undefined"!=typeof window&&window.devicePixelRatio?Math.round(window.devicePixelRatio):1,i=(null==t?void 0:t.height)?(null==t?void 0:t.height)*Math.max(1,n):void 0,a=t.width*Math.max(1,n),l=new URLSearchParams;return l.append("fit","max"),l.append("w",a.toString()),i&&l.append("h",i.toString()),"".concat(e.url,"?").concat(l.toString())},da=e=>Object.keys(e).reduce(((t,n)=>{const i=e[n];return"object"==typeof i&&null!==i&&i.constructor!==Array?t[n]=da(i):""===i||void 0===i||0===(null==i?void 0:i.length)?t[n]=null:t[n]="string"==typeof i&&i?e[n].trim():e[n],t}),{}),ca=e=>"sanity.fileAsset"===e._type,ua=e=>"sanity.imageAsset"===e._type,pa=e=>"".concat(e.metadata.dimensions.width,"x").concat(e.metadata.dimensions.height,"px"),ha=e=>{const{disabled:t,url:n}=e,i=st(),[a,l]=pt(!1);return dt((()=>()=>{i.current&&clearTimeout(i.current)}),[]),ke(Xe,{content:ke(Fe,{muted:!0,size:1,children:"Copied!"}),open:a,padding:2,placement:"top",radius:1,children:ke(Ee,{disabled:t,fontSize:1,icon:se,mode:"ghost",onClick:()=>{i.current&&clearTimeout(i.current),l(!0),yn(n),i.current=setTimeout((()=>{l(!1)}),1250)},text:"Copy URL"})})},ga=e=>{let{label:t,value:n}=e;return _e(je,{justify:"space-between",children:[ke(Fe,{size:1,style:{opacity:.8,width:"40%"},textOverflow:"ellipsis",children:t}),ke(Fe,{size:1,style:{opacity:.4,textAlign:"right",width:"60%"},textOverflow:"ellipsis",children:n})]})},ma=e=>{var t;const{asset:n,item:i}=e,a=null==(t=null==n?void 0:n.metadata)?void 0:t.exif;return _e(qe,{marginTop:3,children:[ke(qe,{children:_e(He,{space:3,children:[ke(ga,{label:"Size",value:mn(null==n?void 0:n.size,{base:10,round:0})}),ke(ga,{label:"MIME type",value:null==n?void 0:n.mimeType}),ke(ga,{label:"Extension",value:(null==n?void 0:n.extension).toUpperCase()}),ua(n)&&ke(ga,{label:"Dimensions",value:pa(n)})]})}),a&&_e(Se,{children:[ke(qe,{marginY:4,style:{background:"#222",height:"1px",width:"100%"}}),ke(qe,{children:_e(He,{space:3,children:[a.ISO&&ke(ga,{label:"ISO",value:a.ISO}),a.FNumber&&ke(ga,{label:"Aperture",value:"ƒ/".concat(a.FNumber)}),a.FocalLength&&ke(ga,{label:"Focal length",value:"".concat(a.FocalLength,"mm")}),a.ExposureTime&&ke(ga,{label:"Exposure time",value:"1/".concat(1/a.ExposureTime)}),a.DateTimeOriginal&&ke(ga,{label:"Original date",value:gn(new Date(a.DateTimeOriginal),"PPp")})]})})]}),ke(qe,{marginTop:5,children:_e(Re,{space:2,children:[ke(Ee,{disabled:!i||(null==i?void 0:i.updating),fontSize:1,icon:de,mode:"ghost",onClick:()=>{window.location.href="".concat(n.url,"?dl=").concat(n.originalFilename)},text:"Download"}),ke(ha,{disabled:!i||(null==i?void 0:i.updating),url:n.url})]})})]})},ya=e=>ke(Ye,B(B({},e),{},{style:{position:"fixed"}})),fa=e=>{const{assetId:t}=e,n=$();return ke(W,{documentStore:n,id:t,children:e=>{let{isLoading:t,referringDocuments:n}=e;return ke(va,{isLoading:t,referringDocuments:n})}})},va=e=>{const{isLoading:t,referringDocuments:n}=e,i=G(),a=n.reduce(((e,t)=>t._id.startsWith("drafts.")?e.concat(t._id.slice(7)):e),[]),l=n.filter((e=>!a.includes(e._id)));return t?ke(Fe,{size:1,children:"Loading..."}):0===l.length?ke(Fe,{size:1,children:"No documents are referencing this asset"}):ke(Me,{flex:1,marginBottom:2,padding:2,radius:2,shadow:1,children:ke(He,{space:2,children:null==l?void 0:l.map((e=>ke(ba,{doc:e,schemaType:i.get(e._type)},e._id)))})})},ba=e=>{const{doc:t,schemaType:n}=e,{onClick:i}=fn({intent:"edit",params:{id:t._id}});return n?ke(Ee,{mode:"bleed",onClick:i,padding:2,style:{width:"100%"},children:ke(K,{layout:"default",schemaType:n,value:t})},t._id):ke(qe,{padding:2,children:_e(Fe,{size:1,children:["A document of the unknown type ",ke("em",{children:t._type})]})})},xa=Jt(qe)(b||(b=H(["\n text {\n font-family: "," !important;\n font-size: 8px !important;\n font-weight: 500 !important;\n }\n"])),(e=>e.theme.sanity.fonts.text.family)),Ca=e=>{const{extension:t,onClick:n,width:i}=e;return ke(je,{align:"center",justify:"center",onClick:n,style:{height:"100%"},children:ke(xa,{style:{width:i},children:ke(vn,t?B({extension:t},bn[t]):{})})})},wa=e=>{const{asset:t}=e;return 0===t.mimeType.search("audio")?ke(je,{align:"center",justify:"center",style:{height:"100%"},children:ke("audio",{controls:!0,src:t.url,style:{width:"100%"}})}):0===t.mimeType.search("video")?ke("video",{controls:!0,src:t.url,style:{height:"100%",width:"100%"}}):ke(Ca,{extension:t.extension,width:"50%"})},Ia=Jt(ce)((e=>{let{theme:t}=e;return{color:t.sanity.color.spot.red}})),Ta=e=>{const{description:t,error:n,label:i,name:a}=e;return _e(Se,{children:[ke(qe,{marginY:3,children:_e(Re,{space:2,children:[ke(Fe,{as:"label",htmlFor:a,size:1,weight:"semibold",children:i}),n&&ke(Fe,{size:1,children:ke(Qe,{content:ke(qe,{padding:2,children:_e(Fe,{muted:!0,size:1,children:[ke(Ia,{style:{marginRight:"0.1em"}}),n.message]})}),fallbackPlacements:["top","left"],placement:"right",portal:!0,children:ke(Ia,{})})})]})}),t&&ke(qe,{marginY:3,children:ke(Fe,{htmlFor:a,muted:!0,size:1,children:t})})]})},ka=ht(((e,t)=>{const{description:n,disabled:i,error:a,extension:l,label:o,name:r,placeholder:s,value:d}=e;return _e(qe,{children:[ke(Ta,{description:n,error:a,label:o,name:r}),_e(je,{children:[ke(qe,{style:{flexGrow:1},children:ke(Ue,{autoComplete:"off",autoFocus:!0,defaultValue:d,disabled:i,id:r,name:r,placeholder:s,ref:t})}),ke(qe,{style:{width:"70px"},children:ke(Ue,{defaultValue:".".concat(l),disabled:!0})})]})]})}));var _a,Sa,Ra,Ea,za,Aa,Oa,Da,qa,ja,La,Fa;const Ua=null==(za=null==(Ea=null==(Ra=null==(Sa=null==(_a=Pe)?void 0:_a.color)?void 0:Sa.dark)?void 0:Ra.primary)?void 0:Ea.spot)?void 0:za.blue,Pa=null==(ja=null==(qa=null==(Da=null==(Oa=null==(Aa=Pe)?void 0:Aa.color)?void 0:Oa.dark)?void 0:Da.primary)?void 0:qa.spot)?void 0:ja.gray,Ma=null==(La=Pe)?void 0:La.radius,Na=null==(Fa=Pe)?void 0:Fa.space,Va={control:(e,t)=>{let{isDisabled:n,isFocused:i}=t,a="inset 0 0 0 1px ".concat(Gt.gray[900].hex);return i&&(a="inset 0 0 0 1px ".concat(Gt.gray[900].hex,", 0 0 0 1px var(--card-bg-color), 0 0 0 3px var(--card-focus-ring-color) !important")),B(B({},e),{},{background:n?Pe.color.dark.default.input.default.disabled.bg:"transparent",color:Kt.hex,border:"none",borderRadius:Ma[1],boxShadow:a,minHeight:"35px",outline:"none",transition:"none","&:hover":{boxShadow:"inset 0 0 0 1px ".concat(Pe.color.dark.default.input.default.hovered.border)}})},indicatorsContainer:(e,t)=>{let{isDisabled:n}=t;return B(B({},e),{},{opacity:n?.25:1})},input:e=>B(B({},e),{},{color:Kt.hex,fontFamily:Pe.fonts.text.family,marginLeft:Na[2]}),menuList:e=>B({},e),multiValue:(e,t)=>{let{isDisabled:n}=t;return B(B({},e),{},{backgroundColor:Pa,borderRadius:Ma[2],opacity:n?.5:1})},multiValueRemove:e=>B(B({},e),{},{paddingLeft:0,"&:hover":{background:"transparent",color:"inherit"}}),noOptionsMessage:e=>B(B({},e),{},{fontFamily:Pe.fonts.text.family,lineHeight:"1em"}),option:(e,t)=>{let{isFocused:n}=t;return B(B({},e),{},{backgroundColor:n?Ua:"transparent",borderRadius:Ma[2],color:n?Zt.hex:"inherit",fontFamily:Pe.fonts.text.family,padding:"4px 8px","&:hover":{backgroundColor:Ua,color:Zt.hex}})},placeholder:e=>B(B({},e),{},{fontFamily:Pe.fonts.text.family,marginLeft:Na[2]}),valueContainer:e=>B(B({},e),{},{marginBottom:Na[0],marginLeft:Na[1],marginTop:Na[0],padding:0})},Qa=e=>ke(qe,{paddingX:1,paddingY:1,children:ke(on.Option,B(B({},e),{},{children:_e(je,{align:"center",children:[e.data.__isNew__&&ke(pe,{style:{marginRight:"3px"}}),e.children]})}))}),Ba={DropdownIndicator:e=>ke(on.DropdownIndicator,B(B({},e),{},{children:ke(qe,{paddingX:2,children:ke(Fe,{size:1,children:ke(ue,{})})})})),IndicatorSeparator:null,Menu:e=>ke(on.Menu,B(B({},e),{},{children:ke(Me,{radius:1,shadow:2,children:e.children})})),MenuList:e=>{const{children:t}=e;if(Array.isArray(t)){const e=t.length>5?185:37*t.length;return ke(rn,{className:"media__custom-scrollbar",itemContent:e=>{const n=t[e];return ke(Qa,B({},n.props))},style:{height:e},totalCount:t.length})}return ke(on.MenuList,B(B({},e),{},{children:t}))},MultiValueLabel:e=>ke(qe,{paddingLeft:1,paddingRight:0,paddingY:1,children:ke(Fe,{size:2,weight:"medium",children:ke(on.MultiValueLabel,B({},e))})}),MultiValueRemove:e=>ke(on.MultiValueRemove,B(B({},e),{},{children:ke(ae,{color:"#1f2123"})})),Option:Qa},Xa=e=>{const{control:t,description:n,disabled:i,error:a,label:l,name:o,onCreateTag:r,options:s,placeholder:d,value:c}=e,u=mi((e=>e.tags.creating)),p=mi((e=>e.tags.fetching));return _e(qe,{style:{zIndex:2},children:[ke(Ta,{description:n,error:a,label:l,name:o}),ke(un,{control:t,defaultValue:c,name:o,render:e=>{let{onBlur:t,onChange:n,value:a}=e;return ke(xn,{components:Ba,instanceId:"tags",isClearable:!1,isDisabled:u||i||p,isLoading:u,isMulti:!0,name:o,noOptionsMessage:()=>"No tags",onBlur:t,onChange:n,onCreateOption:r,options:s,placeholder:p?"Loading...":d,styles:Va,value:a})}})]})},Ha=ht(((e,t)=>{const{description:n,disabled:i,error:a,label:l,name:o,placeholder:r,value:s}=e;return _e(qe,{children:[ke(Ta,{description:n,error:a,label:l,name:o}),ke(Ue,{autoComplete:"off",autoFocus:!0,defaultValue:s,disabled:i,id:o,name:o,placeholder:r,ref:t})]})})),Ya=ht(((e,t)=>{const{description:n,disabled:i,error:a,label:l,name:o,placeholder:r,rows:s,value:d}=e;return _e(qe,{children:[ke(Ta,{description:n,error:a,label:l,name:o}),ke($e,{autoComplete:"off",defaultValue:d,disabled:i,id:o,name:o,placeholder:r,ref:t,rows:s})]})})),$a=e=>{const{disabled:t,isValid:n,lastUpdated:i,onClick:a}=e;let l;return l=n?i?_e(Se,{children:["Last updated",ke("br",{})," ",gn(new Date(i),"PPp")]}):"No unpublished changes":"There are validation errors that need to be fixed before this document can be published",ke(Qe,{content:ke(qe,{padding:3,style:{maxWidth:"185px"},children:ke(Fe,{muted:!0,size:1,children:l})}),disabled:"ontouchstart"in window,placement:"top",children:ke(qe,{children:ke(Ee,{disabled:t,fontSize:1,onClick:a,text:"Save and close",tone:"primary"})})})},Wa=Jt.img(x||(x=H(["\n --checkerboard-color: ",";\n\n display: block;\n width: 100%;\n height: 100%;\n object-fit: contain;\n\n ","\n"])),Gt.gray[900].hex,(e=>e.showCheckerboard&&en(C||(C=H(["\n background-image: linear-gradient(45deg, var(--checkerboard-color) 25%, transparent 25%),\n linear-gradient(-45deg, var(--checkerboard-color) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, var(--checkerboard-color) 75%),\n linear-gradient(-45deg, transparent 75%, var(--checkerboard-color) 75%);\n background-size: 20px 20px;\n background-position: 0 0, 0 10px, 10px -10px, -10px 0;\n "]))))),Ga=hn.object().shape({originalFilename:hn.string().required("Filename cannot be empty")}),Ka=e=>{var t,n;const i=null==(t=null==e?void 0:e.originalFilename)?void 0:t.toLowerCase().lastIndexOf(".".concat(e.extension));return null==(n=null==e?void 0:e.originalFilename)?void 0:n.slice(0,i)},Za=e=>{var t,n,i;const{children:a,dialog:{assetId:l,id:o,lastCreatedTag:r,lastRemovedTagIds:s}}=e,d=qn(),c=xt(),u=mi((e=>ai(e,String(l)))),p=mi(Xn),h=st(!1),[g,m]=pt(null==u?void 0:u.asset),[y,f]=pt("details"),v=u?null==u?void 0:u.asset:g,b=Mn(p),x=mi((C=v,e=>{var t,n,i;const a=null==(i=null==(n=null==(t=null==C?void 0:C.opt)?void 0:t.media)?void 0:n.tags)?void 0:i.reduce(((t,n)=>{const i=e.tags.byIds[n._ref];return(null==i?void 0:i.tag)&&t.push(i),t}),[]);return a&&(null==a?void 0:a.length)>0?Mn(a):null}));var C;const I=e=>({altText:(null==e?void 0:e.altText)||"",description:(null==e?void 0:e.description)||"",originalFilename:e?Ka(e):void 0,opt:{media:{tags:x}},title:(null==e?void 0:e.title)||""}),T=null==x?void 0:x.map((e=>e.label)).join(","),{control:k,formState:{errors:_,isDirty:S,isValid:R},getValues:E,handleSubmit:z,register:A,reset:O,setValue:D}=pn({defaultValues:I(null==u?void 0:u.asset),mode:"onChange",resolver:cn(Ga)}),q=!u||(null==u?void 0:u.updating),j=()=>{(null==u?void 0:u.asset)&&c(fi.showConfirmDeleteAssets({assets:[u],closeDialogId:null==u?void 0:u.asset._id}))},L=e=>{const{result:t,transition:n}=e;t&&"update"===n&&(m(t),O(I(t)))},F=async e=>{var t;if(!(null==u?void 0:u.asset))return;const n=da(e);c(di.updateRequest({asset:null==u?void 0:u.asset,closeDialogId:null==u?void 0:u.asset._id,formData:B(B({},n),{},{opt:{media:B(B({},n.opt.media),{},{tags:(null==(t=n.opt.media.tags)?void 0:t.map((e=>({_ref:e.value,_type:"reference",_weak:!0}))))||null})},originalFilename:"".concat(n.originalFilename,".").concat(null==u?void 0:u.asset.extension)})}))};dt((()=>{if(!(null==u?void 0:u.asset))return;const e=d.listen(vt(w||(w=H(["*[_id == $id]"]))),{id:null==u?void 0:u.asset._id}).subscribe(L);return()=>{null==e||e.unsubscribe()}}),[]),dt((()=>{h.current&&O({opt:{media:{tags:x}}},{errors:!0,dirtyFields:!0,isDirty:!0}),h.current=!0}),[T]),dt((()=>{if(r){const e=(E("opt.media.tags")||[]).concat([r]);D("opt.media.tags",e,{shouldDirty:!0})}}),[r]),dt((()=>{if(s){const e=(E("opt.media.tags")||[]).filter((e=>!s.includes(e.value)));D("opt.media.tags",e,{shouldDirty:!0})}}),[s]);return v?_e(ya,{footer:ke((()=>ke(qe,{padding:3,children:_e(je,{justify:"space-between",children:[ke(Ee,{disabled:q,fontSize:1,mode:"bleed",onClick:j,text:"Delete",tone:"critical"}),ke($a,{disabled:q||!S||!R,isValid:R,lastUpdated:v._updatedAt,onClick:z(F)})]})})),{}),header:"Asset details",id:o,onClose:()=>{c(fi.remove({id:o}))},width:3,children:[_e(je,{direction:["column-reverse","column-reverse","row-reverse"],children:[_e(qe,{flex:1,marginTop:[5,5,0],padding:4,children:[_e(We,{space:2,children:[ke(Ge,{"aria-controls":"details-panel",disabled:q,id:"details-tab",label:"Details",onClick:()=>f("details"),selected:"details"===y,size:2}),ke(Ge,{"aria-controls":"references-panel",disabled:q,id:"references-tab",label:"References",onClick:()=>f("references"),selected:"references"===y,size:2})]}),_e(qe,{as:"form",marginTop:4,onSubmit:z(F),children:[!u&&ke(Me,{marginBottom:3,padding:3,radius:2,shadow:1,tone:"critical",children:ke(Fe,{size:1,children:"This file cannot be found – it may have been deleted."})}),ke("button",{style:{display:"none"},tabIndex:-1,type:"submit"}),ke(Ke,{"aria-labelledby":"details",hidden:"details"!==y,id:"details-panel",children:_e(He,{space:3,children:[ke(Xa,{control:k,disabled:q,error:null==(n=null==(t=null==_?void 0:_.opt)?void 0:t.media)?void 0:n.tags,label:"Tags",name:"opt.media.tags",onCreateTag:e=>{c(Yn.createRequest({assetId:null==v?void 0:v._id,name:e}))},options:b,placeholder:"Select or create...",value:x}),ke(ka,{disabled:q,error:null==_?void 0:_.originalFilename,extension:(null==v?void 0:v.extension)||"",label:"Filename",name:"originalFilename",ref:A,value:Ka(v)}),ke(Ha,{disabled:q,error:null==_?void 0:_.title,label:"Title",name:"title",ref:A,value:null==v?void 0:v.title}),ke(Ha,{disabled:q,error:null==_?void 0:_.altText,label:"Alt Text",name:"altText",ref:A,value:null==v?void 0:v.altText}),ke(Ya,{disabled:q,error:null==_?void 0:_.description,label:"Description",name:"description",ref:A,rows:3,value:null==v?void 0:v.description})]})}),ke(Ke,{"aria-labelledby":"references",hidden:"references"!==y,id:"references-panel",children:ke(qe,{marginTop:5,children:(null==u?void 0:u.asset)&&ke(fa,{assetId:null==u?void 0:u.asset._id})})})]})]}),_e(qe,{flex:1,padding:4,children:[_e(qe,{style:{aspectRatio:"1"},children:[ca(v)&&ke(wa,{asset:v}),ua(v)&&ke(Wa,{draggable:!1,showCheckerboard:!(null==(i=null==v?void 0:v.metadata)?void 0:i.isOpaque),src:sa(v,{height:600,width:600})})]}),v&&ke(qe,{marginTop:4,children:ke(ma,{asset:v,item:u})})]})]}),a]}):null},Ja=e=>{const{children:t,dialog:n}=e,i=xt(),a=()=>{i(fi.remove({id:null==n?void 0:n.id}))},l=()=>{(null==n?void 0:n.closeDialogId)&&i(fi.remove({id:null==n?void 0:n.closeDialogId})),(null==n?void 0:n.confirmCallbackAction)&&i(n.confirmCallbackAction),a()},o=()=>_e(je,{align:"center",children:[ke(qe,{paddingX:1,children:ke(he,{})}),ke(qe,{marginLeft:2,children:null==n?void 0:n.headerTitle})]});return _e(ya,{footer:ke((()=>ke(qe,{padding:3,children:_e(je,{justify:"space-between",children:[ke(Ee,{fontSize:1,mode:"bleed",onClick:a,text:"Cancel"}),ke(Ee,{fontSize:1,onClick:l,text:null==n?void 0:n.confirmText,tone:null==n?void 0:n.tone})]})})),{}),header:ke(o,{}),id:"confirm",onClose:a,width:1,children:[ke(qe,{paddingX:4,paddingY:4,children:_e(He,{space:3,children:[(null==n?void 0:n.title)&&ke(Fe,{size:1,children:n.title}),(null==n?void 0:n.description)&&ke(Fe,{muted:!0,size:1,children:ke("em",{children:n.description})})]})}),t]})},el=e=>{const{children:t,dialog:{id:n}}=e,i=xt(),a=gt((()=>{i(fi.clear())}),[]);return _e(ya,{header:"Filters",id:n,onClose:a,width:1,children:[_e(qe,{padding:3,children:[ke(Ji,{layout:"stack"}),ke(ea,{})]}),t]})},tl=hn.object().shape({name:hn.string().required("Name cannot be empty")}),nl=e=>{const{children:t,dialog:{id:n}}=e,i=xt(),a=mi((e=>e.tags.creating)),l=mi((e=>e.tags.creatingError)),{formState:{errors:o,isDirty:r,isValid:s},handleSubmit:d,register:c,setError:u}=pn({defaultValues:{name:""},mode:"onChange",resolver:cn(tl)}),p=a,h=async e=>{const t=da(e);i(Yn.createRequest({name:t.name}))};dt((()=>{l&&u("name",{message:null==l?void 0:l.message})}),[l]);return _e(ya,{footer:ke((()=>ke(qe,{padding:3,children:ke(je,{justify:"flex-end",children:ke($a,{disabled:p||!r||!s,isValid:s,onClick:d(h)})})})),{}),header:"Create Tag",id:n,onClose:()=>{i(fi.clear())},width:1,children:[_e(qe,{as:"form",padding:4,onSubmit:d(h),children:[ke("button",{style:{display:"none"},tabIndex:-1,type:"submit"}),ke(Ha,{disabled:p,error:null==o?void 0:o.name,label:"Name",name:"name",ref:c})]}),t]})},il=hn.object().shape({name:hn.string().required("Name cannot be empty")}),al=e=>{const{children:t,dialog:{id:n,tagId:i}}=e,a=qn(),l=xt(),o=mi((e=>Hn(e,String(i)))),[r,s]=pt(null==o?void 0:o.tag),d=o?null==o?void 0:o.tag:r,c=e=>{var t;return{name:(null==(t=null==e?void 0:e.name)?void 0:t.current)||""}},{formState:{errors:u,isDirty:p,isValid:h},handleSubmit:g,register:m,reset:y,setError:f}=pn({defaultValues:c(null==o?void 0:o.tag),mode:"onChange",resolver:cn(il)}),v=!o||(null==o?void 0:o.updating),b=async e=>{var t;if(!(null==o?void 0:o.tag))return;const n=da(e);l(Yn.updateRequest({closeDialogId:null==(t=null==o?void 0:o.tag)?void 0:t._id,formData:{name:{_type:"slug",current:n.name}},tag:null==o?void 0:o.tag}))},x=()=>{var e;(null==o?void 0:o.tag)&&l(fi.showConfirmDeleteTag({closeDialogId:null==(e=null==o?void 0:o.tag)?void 0:e._id,tag:null==o?void 0:o.tag}))},C=e=>{const{result:t,transition:n}=e;t&&"update"===n&&(s(t),y(c(t)))};dt((()=>{var e;(null==o?void 0:o.error)&&f("name",{message:null==(e=o.error)?void 0:e.message})}),[null==o?void 0:o.error]),dt((()=>{if(!(null==o?void 0:o.tag))return;const e=a.listen(vt(I||(I=H(["*[_id == $id]"]))),{id:null==o?void 0:o.tag._id}).subscribe(C);return()=>{null==e||e.unsubscribe()}}),[]);const w=()=>{var e;return ke(qe,{padding:3,children:_e(je,{justify:"space-between",children:[ke(Ee,{disabled:v,fontSize:1,mode:"bleed",onClick:x,text:"Delete",tone:"critical"}),ke($a,{disabled:v||!p||!h,isValid:h,lastUpdated:null==(e=null==o?void 0:o.tag)?void 0:e._updatedAt,onClick:g(b)})]})})};return d?_e(ya,{footer:ke(w,{}),header:"Edit Tag",id:n,onClose:()=>{l(fi.remove({id:n}))},width:1,children:[_e(qe,{as:"form",padding:4,onSubmit:g(b),children:[!o&&ke(Me,{marginBottom:3,padding:3,radius:2,shadow:1,tone:"critical",children:ke(Fe,{size:1,children:"This tag cannot be found – it may have been deleted."})}),ke("button",{style:{display:"none"},tabIndex:-1,type:"submit"}),ke(Ha,{disabled:v,error:null==u?void 0:u.name,label:"Name",name:"name",ref:m})]}),t]}):null},ll=Jt(je)(T||(T=H(["\n height: ","px;\n"])),32),ol=Jt(je)(k||(k=H(["\n @media (pointer: fine) {\n visibility: hidden;\n }\n\n @media (hover: hover) and (pointer: fine) {\n ",":hover & {\n visibility: visible;\n }\n }\n"])),ll),rl=e=>{const{disabled:t,icon:n,onClick:i,tone:a,tooltip:l}=e;return ke(Qe,{content:ke(Ze,{padding:2,width:0,children:ke(Fe,{muted:!0,size:1,children:l})}),disabled:"ontouchstart"in window,placement:"top",children:ke(Ee,{disabled:t,fontSize:1,icon:n,mode:"bleed",onClick:i,padding:2,tone:a})})},sl=e=>{var t,n;const{actions:i,tag:a}=e,l=xt(),o=mi(ri),r=mi(Gn),s=mi((e=>{var t;return Kn(e,null==(t=null==a?void 0:a.tag)?void 0:t._id)}));return _e(ll,{align:"center",flex:1,justify:"space-between",paddingLeft:3,children:[ke(qe,{flex:1,children:ke(Fe,{size:1,style:{color:(null==a?void 0:a.updating)?Gt.gray[800].hex:Gt.gray[500].hex,userSelect:"none"},textOverflow:"ellipsis",children:null==(n=null==(t=null==a?void 0:a.tag)?void 0:t.name)?void 0:n.current})}),_e(ol,{align:"center",style:{flexShrink:0},children:[(null==i?void 0:i.includes("search"))&&ke(rl,{disabled:null==a?void 0:a.updating,icon:ke(s?ae:oe,{}),onClick:s?()=>{l(Zn.facetsRemove({facetName:"tag"}))}:()=>{var e,t,n;const i=B(B({},kn.tag),{},{value:{label:null==(t=null==(e=null==a?void 0:a.tag)?void 0:e.name)?void 0:t.current,value:null==(n=null==a?void 0:a.tag)?void 0:n._id}});l(r?Zn.facetsUpdate({name:"tag",operatorType:"references",value:i.value}):Zn.facetsAdd({facet:i}))},tooltip:s?"Remove filter":"Filter by tag"}),(null==i?void 0:i.includes("edit"))&&ke(rl,{disabled:null==a?void 0:a.updating,icon:ke(ge,{}),onClick:()=>{var e;l(Vn.showTagEdit({tagId:null==(e=null==a?void 0:a.tag)?void 0:e._id}))},tone:"primary",tooltip:"Edit tag"}),(null==i?void 0:i.includes("applyAll"))&&ke(rl,{disabled:null==a?void 0:a.updating,icon:ke(me,{}),onClick:()=>{l(fi.showConfirmAssetsTagAdd({assetsPicked:o,tag:a.tag}))},tone:"primary",tooltip:"Add tag to selected assets"}),(null==i?void 0:i.includes("removeAll"))&&ke(rl,{disabled:null==a?void 0:a.updating,icon:ke(ye,{}),onClick:()=>{l(fi.showConfirmAssetsTagRemove({assetsPicked:o,tag:a.tag}))},tone:"critical",tooltip:"Remove tag from selected assets"}),(null==i?void 0:i.includes("delete"))&&ke(rl,{disabled:null==a?void 0:a.updating,icon:ke(fe,{}),onClick:()=>{l(fi.showConfirmDeleteTag({tag:a.tag}))},tone:"critical",tooltip:"Delete tag"})]})]})},dl=mt((e=>{let{isScrolling:t,item:n}=e;var i;return"string"==typeof n?ke(je,{align:"center",justify:"space-between",paddingX:3,style:{height:"".concat(32,"px")},children:ke(Le,{size:0,children:n})},n):ke(sl,{actions:t?void 0:n.actions,tag:n},null==(i=n.tag)?void 0:i._id)})),cl=()=>{const e=mi(ri),t=mi(Xn),[n,i]=pt(!1),a=null==e?void 0:e.reduce(((e,t)=>{var n,i,a,l;const o=(null==(l=null==(a=null==(i=null==(n=null==t?void 0:t.asset)?void 0:n.opt)?void 0:i.media)?void 0:a.tags)?void 0:l.map((e=>e._ref)))||[];return e=e.concat(o)}),[]),l=[...new Set(a)],o=l.reduce(((t,n)=>{const i=e.every((e=>{var t,i,a,l;return(null!=(l=null==(a=null==(i=null==(t=e.asset.opt)?void 0:t.media)?void 0:i.tags)?void 0:a.findIndex((e=>e._ref===n)))?l:-1)>=0}));return i?t.appliedToAll.push(n):t.appliedToSome.push(n),t}),{appliedToAll:[],appliedToSome:[]}),r=t.filter((e=>o.appliedToAll.includes(e.tag._id))).map((e=>B(B({},e),{},{actions:["delete","edit","removeAll","search"]}))),s=t.filter((e=>o.appliedToSome.includes(e.tag._id))).map((e=>B(B({},e),{},{actions:["applyAll","delete","edit","removeAll","search"]}))),d=t.filter((e=>!l.includes(e.tag._id))).map((e=>B(B({},e),{},{actions:["applyAll","delete","edit","search"]})));let c=[];return 0===e.length?c=t.map((e=>B(B({},e),{},{actions:["delete","edit","search"]}))):((null==r?void 0:r.length)>0&&(c=[...c,1===e.length?"Used":"Used by all",...r]),(null==s?void 0:s.length)>0&&(c=[...c,"Used by some",...s]),(null==d?void 0:d.length)>0&&(c=[...c,"Unused",...d])),ke(rn,{className:"media__custom-scrollbar",computeItemKey:e=>{const t=c[e];return"string"==typeof t?t:t.tag._id},isScrolling:i,itemContent:e=>ke(dl,{isScrolling:n,item:c[e]}),style:{flex:1,overflowX:"hidden"},totalCount:c.length})},ul=e=>{var t,n;const{allowCreate:i,light:a,title:l}=e,o=xt(),r=mi((e=>e.tags.creating)),s=mi((e=>e.tags.fetching));return ke(Se,{children:_e(je,{align:"center",justify:"space-between",paddingLeft:3,style:{background:a?null==(t=Gt.gray)?void 0:t[900].hex:Zt.hex,borderBottom:"1px solid ".concat(null==(n=Gt.gray)?void 0:n[900].hex),height:"".concat(32,"px")},children:[_e(Re,{space:2,children:[ke(Le,{size:0,children:l}),s&&ke(Le,{size:0,style:{opacity:.3},children:"Loading..."})]}),i&&ke(qe,{marginRight:1,children:ke(Ee,{disabled:r,fontSize:1,icon:ve,mode:"bleed",onClick:()=>{o(Vn.showTagCreate())},style:{background:"transparent",boxShadow:"none"}})})]})})},pl=()=>{const e=mi(si),t=mi(Xn),n=mi((e=>e.tags.fetching)),i=-1!==mi((e=>e.tags.fetchCount)),a=!n&&(null==t?void 0:t.length)>0,l=!!(e>0);return _e(je,{direction:"column",flex:1,style:{background:Zt.hex,height:"100%"},children:[ke(ul,{allowCreate:!0,light:l,title:l?"Tags (in selection)":"Tags"}),i&&!a&&ke(qe,{padding:3,children:ke(Fe,{size:1,style:{color:Gt.gray[700].hex},children:ke("em",{children:"No tags"})})}),a&&ke(cl,{})]})},hl=e=>{const{children:t,dialog:{id:n}}=e,i=xt(),a=gt((()=>{i(fi.clear())}),[]);return _e(ya,{header:"All Tags",id:n,onClose:a,width:1,children:[ke(qe,{style:{height:"100%",minHeight:"420px"},children:ke(pl,{})}),t]})},gl=()=>{const e=mi((e=>e.dialog.items)),t=(e,n)=>{if(0===e.length||n>=e.length)return null;const i=e[n],a=t(e,n+1);return"assetEdit"===i.type?ke(Za,{dialog:i,children:a},n):"confirm"===i.type?ke(Ja,{dialog:i,children:a},n):"searchFacets"===i.type?ke(el,{dialog:i,children:a},n):"tagCreate"===i.type?ke(nl,{dialog:i,children:a},n):"tagEdit"===i.type?ke(al,{dialog:i,children:a},n):"tags"===i.type?ke(hl,{dialog:i,children:a},n):null};return t(e,0)},ml=ct(void 0),yl=e=>{const{children:t,open:n}=e,i={open:n};return ke(ml.Provider,{value:i,children:t})},fl=e=>{const{onClose:t}=e,{open:n}=(()=>{const e=ut(ml);if(void 0===e)throw new Error("useDropzoneActions must be used within an DropzoneDispatchProvider");return e})(),{onSelect:i}=Dn(),a=mi((e=>e.assets.assetTypes)),l=mi((e=>e.selected.document));return ke(qe,{paddingY:2,children:_e(je,{align:"center",justify:"space-between",children:[ke(qe,{flex:1,marginX:3,children:_e(Re,{style:{whiteSpace:"nowrap"},children:[ke(Fe,{textOverflow:"ellipsis",weight:"semibold",children:ke("span",{children:i?"Insert ".concat(a.join(" or ")):"Browse Assets"})}),l&&ke(qe,{display:["none","none","block"],children:_e(Fe,{children:[ke("span",{style:{margin:"0 0.5em"},children:ke(be,{symbol:"arrow-right"})}),ke("span",{style:{textTransform:"capitalize"},children:l._type})]})})]})}),_e(je,{marginX:2,children:[ke(Ee,{fontSize:1,icon:xe,mode:"bleed",onClick:n,text:"Upload ".concat(1===a.length?nn(a[0]):"assets"),tone:"primary"}),t&&ke(qe,{style:{flexShrink:0},children:ke(Ee,{disabled:!t,icon:ae,mode:"bleed",onClick:t,radius:2})})]})]})})},vl=Tt([e=>e.assets.allIds,e=>e.uploads.allIds],((e,t)=>{const n=e.map((e=>({id:e,type:"asset"})));return[...t.map((e=>({id:e,type:"upload"}))),...n]})),bl=Jt(je)(_||(_=H(["\n box-sizing: border-box;\n height: 100%;\n overflow: hidden;\n padding: 2px;\n position: relative;\n width: 100%;\n"]))),xl=Jt(je)(S||(S=H(["\n border: 1px solid transparent;\n height: 100%;\n pointer-events: ",";\n position: relative;\n transition: all 300ms;\n user-select: none;\n width: 100%;\n\n border: ",";\n\n ","\n"])),(e=>e.updating?"none":"auto"),(e=>e.picked?"1px solid ".concat(e.theme.sanity.color.spot.orange," !important"):"1px solid inherit"),(e=>!e.updating&&en(R||(R=H(["\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n border: 1px solid ",";\n }\n }\n "])),Gt.gray[500].hex))),Cl=Jt(je)(E||(E=H(["\n cursor: ",";\n height: ","px;\n transition: all 300ms;\n\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n background: ",";\n }\n }\n"])),(e=>e.selected?"default":"pointer"),32,Gt.gray[950].hex),wl=Jt(Ce)((e=>{let{theme:t}=e;return{color:t.sanity.color.spot.red}}));var Il=mt((e=>{var t,n;const{id:i,selected:a}=e,l=In("shift"),o=xt(),r=mi((e=>e.assets.lastPicked)),s=mi((e=>ai(e,i))),d=null==s?void 0:s.asset,c=null==s?void 0:s.error,u=null==(n=null==(t=null==s?void 0:s.asset)?void 0:t.metadata)?void 0:n.isOpaque,p=null==s?void 0:s.picked,h=null==s?void 0:s.updating,{onSelect:g}=Dn();if(!d)return null;const m=h?.5:1,y=a||h?.25:1;return ke(bl,{children:_e(xl,{direction:"column",picked:p,updating:s.updating,children:[_e(qe,{flex:1,style:{cursor:a?"default":"pointer",position:"relative"},children:[_e("div",{onClick:e=>{e.stopPropagation(),g?g([{kind:"assetDocumentId",value:d._id}]):l.current?o(p?di.pick({assetId:d._id,picked:!p}):di.pickRange({startId:r||d._id,endId:d._id})):o(fi.showAssetEdit({assetId:d._id}))},style:{height:"100%",opacity:y},children:[ca(d)&&ke(Ca,{extension:d.extension,width:"80px"}),ua(d)&&ke(Wa,{draggable:!1,showCheckerboard:!u,src:sa(d,{height:250,width:250}),style:{draggable:!1,transition:"opacity 1000ms"}})]}),a&&!h&&ke(je,{align:"center",justify:"center",style:{height:"100%",left:0,opacity:m,position:"absolute",top:0,width:"100%"},children:ke(Fe,{size:2,children:ke(we,{})})}),h&&ke(je,{align:"center",justify:"center",style:{height:"100%",left:0,position:"absolute",top:0,width:"100%"},children:ke(Je,{})})]}),_e(Cl,{align:"center",onClick:e=>{e.stopPropagation(),g?o(fi.showAssetEdit({assetId:d._id})):l.current&&!p?o(di.pickRange({startId:r||d._id,endId:d._id})):o(di.pick({assetId:d._id,picked:!p}))},paddingX:1,style:{opacity:m},children:[g?ke(ge,{style:{flexShrink:0,opacity:.5}}):ke(et,{checked:p,readOnly:!0,style:{flexShrink:0,pointerEvents:"none",transform:"scale(0.8)"}}),ke(qe,{marginLeft:2,children:ke(Fe,{muted:!0,size:0,textOverflow:"ellipsis",children:d.originalFilename})})]}),c&&ke(qe,{padding:3,style:{position:"absolute",right:0,top:0},children:ke(Qe,{content:ke(Ze,{padding:2,width:0,children:ke(Fe,{size:1,children:c})}),placement:"left",portal:!0,children:ke(Fe,{size:1,children:ke(wl,{color:"critical"})})})})]})})}));const Tl=async e=>{const t=await(e=>new Promise((t=>{const n=window.URL.createObjectURL(e),i=new Image;i.onload=()=>{window.URL.revokeObjectURL(n),t(i)},i.src=n})))(e),n=await(i=t,new Promise((e=>{const t=i.width/i.height,n=document.createElement("canvas");n.width=180,n.height=Math.max(180/t,1);try{const a=n.getContext("2d");null==a||a.drawImage(i,0,0,180,180/t),n.toBlob(e,"image/jpeg")}catch(e){console.warn("Unable to generate preview image:",e)}})));var i;if(!n)throw Error("Unable to generate file Blob");return window.URL.createObjectURL(n)};function kl(e,t){const n=e.indexOf(t);return n>-1&&e.splice(n,1),e}const _l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:4;const t=[],n=[],i=new Lt;function a(o){return new Ft((r=>{if(t.length>=e)return l(o).pipe(Mt(a)).subscribe(r);const s=o.subscribe(r);return t.push(s),()=>{for(kl(t,s),kl(n,o),s.unsubscribe();n.length>0&&t.length<e;)i.next(n.shift())}}))}function l(e){return n.push(e),i.asObservable().pipe(Yt((t=>t===e)))}return a},Sl=e=>Array.prototype.map.call(new Uint8Array(e),(e=>"00".concat(e.toString(16)).slice(-2))).join(""),Rl=e=>window.crypto&&window.crypto.subtle&&window.FileReader?(e=>new Ft((t=>{const n=new FileReader;return n.onload=()=>{t.next(n.result),t.complete()},n.onerror=e=>{t.error(e)},n.readAsArrayBuffer(e),()=>{n.abort()}})))(e).pipe(Mt((e=>window.crypto.subtle.digest("SHA-1",e))),$t(Sl)):Ot({message:"Unable to generate hash: uploads are only allowed in secure contexts",statusCode:500}),El=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const n=_l(t);return function(){return qt(n(e(...arguments)))}}(((e,t,n,i)=>Dt(null).pipe(Mt((()=>((e,t,n)=>e.observable.fetch("*[_type == $documentType && sha1hash == $hash][0]",{documentType:t,hash:n}))(e,"sanity.".concat(t,"Asset"),i))),Mt((e=>e?Ot({message:"Asset already exists",statusCode:409}):Dt(null))),Mt((()=>e.observable.assets.upload(t,n,{extract:["blurhash","exif","location","lqip","palette"],preserveFilename:!0}).pipe($t((e=>"response"===e.type?{asset:e.body.document,id:e.body.document._id,type:"complete"}:e)))))))),zl=It({name:"uploads",initialState:{allIds:[],byIds:{}},extraReducers:e=>{e.addCase(ei.uploadComplete,((e,t)=>{const{asset:n}=t.payload;e.byIds[n.sha1hash]&&(e.byIds[n.sha1hash].status="complete")}))},reducers:{checkRequest(e,t){},checkComplete(e,t){const{results:n}=t.payload;Object.keys(n).forEach((t=>{const n=e.allIds.indexOf(t);if(n>=0&&e.allIds.splice(n,1),e.byIds[t]){const n=e.byIds[t].objectUrl;n&&window.URL.revokeObjectURL(n),delete e.byIds[t]}}))},previewReady(e,t){const{blobUrl:n,hash:i}=t.payload;e.byIds[i]&&(e.byIds[i].objectUrl=n)},uploadCancel(e,t){const{hash:n}=t.payload,i=e.allIds.indexOf(n);i>=0&&e.allIds.splice(i,1),e.byIds[n]&&delete e.byIds[n]},uploadError(e,t){const{hash:n}=t.payload,i=e.allIds.indexOf(n);i>=0&&e.allIds.splice(i,1),delete e.byIds[n]},uploadRequest(e,t){},uploadProgress(e,t){const{event:n,uploadHash:i}=t.payload;e.byIds[i].percent=n.percent,e.byIds[i].status="uploading"},uploadStart(e,t){const{uploadItem:n}=t.payload;e.allIds.includes(n.hash)||e.allIds.push(n.hash),e.byIds[n.hash]=n}}}),Al=Tt([e=>e.uploads.byIds,(e,t)=>t],((e,t)=>e[t]));Tt([e=>e.uploads.byIds,e=>e.uploads.allIds],((e,t)=>t.map((t=>e[t]))));const Ol=zl.actions;var Dl=zl.reducer;const ql=Jt(je)(A||(A=H(["\n box-sizing: border-box;\n height: 100%;\n overflow: hidden;\n padding: 2px;\n position: relative;\n width: 100%;\n"]))),jl=e=>{const{id:t}=e,n=xt(),i=mi((e=>Al(e,t)));if(!i)return null;const a=mn(i.size,{base:10,round:0}),l=Math.round(i.percent||0),o="complete"===i.status,r="uploading"===i.status,s="queued"===i.status;let d;o&&(d="Verifying"),r&&(d="".concat(l,"%")),s&&(d="Queued");return ke(ql,{children:_e(je,{direction:"column",flex:1,style:{background:Gt.gray[950].hex,border:"1px solid transparent",height:"100%",position:"relative"},children:[ke("div",{style:{background:Gt.gray[600].hex,bottom:0,height:"1px",left:0,position:"absolute",width:"100%",transform:"scaleX(".concat(.01*l,")"),transformOrigin:"bottom left",transition:"all 1000ms ease-out"}}),_e(qe,{flex:1,style:{position:"relative"},children:["image"===i.assetType&&(null==i?void 0:i.objectUrl)&&ke(Wa,{draggable:!1,src:i.objectUrl,style:{opacity:.4}}),"file"===i.assetType&&ke("div",{style:{height:"100%",opacity:.1},children:ke(Ca,{width:"80px"})}),!o&&100!==l&&ke(je,{align:"center",direction:"column",justify:"center",style:{height:"100%",left:0,position:"absolute",top:0,width:"100%"},children:ke(Qe,{content:ke(qe,{padding:2,children:ke(Fe,{muted:!0,size:1,children:"Cancel"})}),disabled:"ontouchstart"in window,placement:"top",children:ke(Ee,{fontSize:4,icon:ae,mode:"bleed",onClick:()=>{n(Ol.uploadCancel({hash:i.hash}))},padding:2,style:{background:"none",boxShadow:"none"},tone:"critical"})})})]}),_e(je,{align:"center",justify:"space-between",paddingX:2,style:{height:"".concat(32,"px")},children:[ke(qe,{flex:1,marginRight:1,children:_e(Fe,{size:0,textOverflow:"ellipsis",children:[i.name," (",a,")"]})}),ke(Fe,{size:0,style:{flexShrink:0},weight:"semibold",children:d})]})]})})},Ll=mt((e=>{let{item:t,selected:n}=e;return"asset"===(null==t?void 0:t.type)?ke(Il,{id:t.id,selected:n}):"upload"===(null==t?void 0:t.type)?ke(jl,{id:t.id}):null})),Fl=Jt.div(O||(O=H(["\n height: ","px;\n width: ","px;\n"])),220,240),Ul=Jt.div(D||(D=H(["\n display: grid;\n grid-template-columns: repeat(auto-fill, ","px);\n justify-content: center;\n margin: 0 auto;\n"])),240),Pl=e=>{const{items:t,onLoadMore:n}=e,i=mi((e=>e.selected.assets)),a=i&&i.map((e=>e._id))||[],l=null==t?void 0:t.length;return 0===l?null:ke(sn,{className:"media__custom-scrollbar",computeItemKey:e=>{const n=t[e];return null==n?void 0:n.id},components:{Item:Fl,List:Ul},endReached:n,itemContent:e=>{const n=t[e],i=a.includes(null==n?void 0:n.id);return ke(Ll,{item:n,selected:i})},overscan:48,style:{overflowX:"hidden"},totalCount:l})},Ml=e=>{const{field:t,title:n}=e,i=xt(),a=mi((e=>e.assets.order)),l=a.field===t;return ke(Le,{muted:!t,size:0,children:_e(qe,{onClick:t?()=>{if(t&&n)if(l){const e="asc"===a.direction?"desc":"asc";i(di.orderSet({order:{field:t,direction:e}}))}else i(di.orderSet({order:{field:t,direction:"asc"}}))}:void 0,style:{cursor:t?"pointer":"default",display:"inline",whiteSpace:"nowrap"},children:[ke("span",{style:{marginRight:"0.4em"},children:n}),l&&"asc"===(null==a?void 0:a.direction)&&ke(Ie,{}),l&&"desc"===(null==a?void 0:a.direction)&&ke(ue,{})]})})};var Nl;const Vl=Jt(je)(q||(q=H(["\n cursor: pointer;\n\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n background: ",";\n }\n }\n"])),null==(Nl=Gt.gray)?void 0:Nl[900].hex),Ql=()=>{var e;const t=xt(),n=mi((e=>e.assets.fetching)),i=mi(oi),a=mi(si),l=Ve(),{onSelect:o}=Dn(),r=a===i;return _e(tt,{style:{alignItems:"center",background:Zt.hex,borderBottom:"1px solid ".concat(null==(e=Gt.gray)?void 0:e[900].hex),gridColumnGap:l<3?0:"16px",gridTemplateColumns:zn,height:l<3?0:"".concat(32,"px"),letterSpacing:"0.025em",position:"sticky",textTransform:"uppercase",top:0,visibility:l<3?"hidden":"visible",width:"100%",zIndex:1},children:[o?ke(Ml,{}):ke(Vl,{align:"center",justify:"center",onClick:e=>{e.stopPropagation(),t(r?di.pickClear():di.pickAll())},style:{height:"100%",position:"relative"},children:ke(et,{checked:!n&&r,readOnly:!0,style:{pointerEvents:"none",transform:"scale(0.8)"}})}),ke(Ml,{}),ke(Ml,{field:"originalFilename",title:"Filename"}),ke(Ml,{title:"Resolution"}),ke(Ml,{field:"mimeType",title:"MIME type"}),ke(Ml,{field:"size",title:"Size"}),ke(Ml,{field:"_updatedAt",title:"Last updated"}),ke(Ml,{})]})};var Bl;const Xl=Jt(tt)(j||(j=H(["\n align-items: center;\n cursor: ",";\n height: 100%;\n pointer-events: ",";\n user-select: none;\n white-space: nowrap;\n\n ","\n"])),(e=>e.selected?"default":"pointer"),(e=>e.updating?"none":"auto"),(e=>{var t;return!e.updating&&en(L||(L=H(["\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n background: ",";\n }\n }\n "])),null==(t=Gt.gray)?void 0:t[950].hex)})),Hl=Jt(je)(F||(F=H(["\n cursor: pointer;\n\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n background: ",";\n }\n }\n"])),null==(Bl=Gt.gray)?void 0:Bl[900].hex),Yl=Jt(Ce)((e=>{let{theme:t}=e;return{color:t.sanity.color.spot.red}}));var $l=mt((e=>{var t,n;const{id:i,selected:a}=e,l=In("shift"),o=xt(),r=mi((e=>e.assets.lastPicked)),s=mi((e=>ai(e,i))),d=Ve(),c=null==s?void 0:s.asset,u=null==s?void 0:s.error,p=null==(n=null==(t=null==s?void 0:s.asset)?void 0:t.metadata)?void 0:n.isOpaque,h=null==s?void 0:s.picked,g=null==s?void 0:s.updating,{onSelect:m}=Dn();if(!c)return null;const y=g?.5:1,f=a||g?.1:1;return _e(Xl,{onClick:a?void 0:e=>{e.stopPropagation(),m?m([{kind:"assetDocumentId",value:c._id}]):l.current?o(h?di.pick({assetId:c._id,picked:!h}):di.pickRange({startId:r||c._id,endId:c._id})):o(fi.showAssetEdit({assetId:c._id}))},selected:a,style:{gridColumnGap:d<3?0:"16px",gridRowGap:0,gridTemplateColumns:d<3?En:zn,gridTemplateRows:d<3?"auto":"1fr"},updating:s.updating,children:[ke(Hl,{onClick:e=>{e.stopPropagation(),m?o(fi.showAssetEdit({assetId:c._id})):l.current&&!h?o(di.pickRange({startId:r||c._id,endId:c._id})):o(di.pick({assetId:c._id,picked:!h}))},style:{alignItems:"center",gridColumn:1,gridRowStart:1,gridRowEnd:"span 5",height:"100%",justifyContent:"center",opacity:y,position:"relative"},children:m?ke(ge,{style:{flexShrink:0,opacity:.5}}):ke(et,{checked:h,readOnly:!0,style:{pointerEvents:"none",transform:"scale(0.8)"}})}),ke(qe,{style:{gridColumn:2,gridRowStart:1,gridRowEnd:"span 5",height:"90px",width:"100px"},children:_e(je,{align:"center",justify:"center",style:{height:"100%",position:"relative"},children:[_e(qe,{style:{height:"100%",opacity:f,position:"relative"},children:[ca(c)&&ke(Ca,{extension:c.extension,width:"40px"}),ua(c)&&ke(Wa,{draggable:!1,showCheckerboard:!p,src:sa(c,{height:100,width:100})})]}),g&&ke(je,{align:"center",justify:"center",style:{height:"100%",left:0,position:"absolute",top:0,width:"100%"},children:ke(Je,{})}),a&&!g&&ke(je,{align:"center",justify:"center",style:{height:"100%",left:0,position:"absolute",top:0,width:"100%"},children:ke(Fe,{size:2,children:ke(we,{})})})]})}),ke(qe,{marginLeft:d<3?3:0,style:{gridColumn:3,gridRow:d<3?2:"auto",opacity:y},children:ke(Fe,{muted:!0,size:1,style:{lineHeight:"2em"},textOverflow:"ellipsis",children:c.originalFilename})}),ke(qe,{marginLeft:d<3?3:0,style:{gridColumn:d<3?3:4,gridRow:d<3?3:"auto",opacity:y},children:ke(Fe,{muted:!0,size:1,style:{lineHeight:"2em"},textOverflow:"ellipsis",children:ua(c)&&pa(c)})}),ke(qe,{style:{display:d<3?"none":"block",gridColumn:5,gridRow:"auto",opacity:y},children:ke(Fe,{muted:!0,size:1,style:{lineHeight:"2em"},textOverflow:"ellipsis",children:c.mimeType})}),ke(qe,{style:{display:d<3?"none":"block",gridColumn:6,gridRow:"auto",opacity:y},children:ke(Fe,{muted:!0,size:1,style:{lineHeight:"2em"},textOverflow:"ellipsis",children:mn(c.size,{base:10,round:0})})}),ke(qe,{marginLeft:d<3?3:0,style:{gridColumn:d<3?3:7,gridRow:d<3?4:"auto",opacity:y},children:ke(Fe,{muted:!0,size:1,style:{lineHeight:"2em"},textOverflow:"ellipsis",children:Cn(new Date(c._updatedAt),new Date)})}),ke(je,{align:"center",justify:"center",style:{gridColumn:d<3?4:8,gridRowStart:"1",gridRowEnd:d<3?"span 5":"auto",opacity:y},children:u&&ke(qe,{padding:2,children:ke(Qe,{content:ke(Ze,{padding:2,width:0,children:ke(Fe,{size:1,children:u})}),placement:"left",portal:!0,children:ke(Fe,{size:1,children:ke(Yl,{color:"critical"})})})})})]})}));const Wl=e=>{const{id:t}=e,n=xt(),i=mi((e=>Al(e,t))),a=Ve();if(!i)return null;const l=mn(i.size,{base:10,round:0}),o=Math.round(i.percent||0),r="complete"===i.status,s="uploading"===i.status,d="queued"===i.status;let c;r&&(c="Verifying"),s&&(c="".concat(o,"%")),d&&(c="Queued");return _e(tt,{style:{alignItems:"center",background:Gt.gray[950].hex,gridColumnGap:a<3?0:"16px",gridRowGap:0,gridTemplateColumns:a<3?En:zn,gridTemplateRows:a<3?"auto":"1fr",height:"100%",position:"relative"},children:[ke("div",{style:{background:Gt.gray[600].hex,bottom:0,height:"1px",left:0,position:"absolute",width:"100%",transform:"scaleX(".concat(.01*o,")"),transformOrigin:"bottom left",transition:"all 1000ms ease-out"}}),ke(qe,{style:{gridColumn:2,gridRowStart:a<3?1:"auto",gridRowEnd:a<3?"span 4":"auto",height:"90px",width:"100px"},children:_e(qe,{style:{height:"100%",position:"relative"},children:["image"===i.assetType&&(null==i?void 0:i.objectUrl)&&ke(Wa,{draggable:!1,src:i.objectUrl,style:{opacity:.25}}),"file"===i.assetType&&ke("div",{style:{height:"100%",opacity:.1},children:ke(Ca,{width:"40px"})}),!r&&100!==o&&ke(je,{align:"center",justify:"center",style:{position:"absolute",height:"100%",left:0,top:0,width:"100%"},children:ke(Qe,{content:ke(qe,{padding:2,children:ke(Fe,{muted:!0,size:1,children:"Cancel"})}),disabled:"ontouchstart"in window,placement:"top",children:ke(Ee,{fontSize:3,icon:ae,mode:"bleed",onClick:()=>{n(Ol.uploadCancel({hash:i.hash}))},padding:2,style:{background:"none",boxShadow:"none"},tone:"critical"})})})]})}),ke(qe,{style:{gridColumn:a<3?3:"3/8",gridRow:a<3?"2/4":"auto",marginLeft:a<3?3:0},children:_e(He,{space:3,children:[_e(Fe,{muted:!0,size:1,textOverflow:"ellipsis",children:[i.name," (",l,")"]}),ke(Fe,{size:1,textOverflow:"ellipsis",weight:"semibold",children:c})]})})]})},Gl=mt((e=>{let{item:t,selected:n}=e;return"asset"===(null==t?void 0:t.type)?ke(qe,{style:{height:"100px"},children:ke($l,{id:t.id,selected:n})}):"upload"===(null==t?void 0:t.type)?ke(qe,{style:{height:"100px"},children:ke(Wl,{id:t.id})}):null})),Kl=e=>{const{items:t,onLoadMore:n}=e,i=mi((e=>e.selected.assets)),a=i&&i.map((e=>e._id))||[],l=null==t?void 0:t.length;return 0===l?null:ke(dn,{className:"media__custom-scrollbar",computeItemKey:e=>{const n=t[e];return(null==n?void 0:n.id)||e},endReached:n,groupCounts:Array(1).fill(l),groupContent:()=>ke(Ql,{}),itemContent:e=>{const n=t[e],i=a.includes(null==n?void 0:n.id);return ke(Gl,{item:n,selected:i})},style:{overflowX:"hidden"}})},Zl=()=>{const e=xt(),t=mi((e=>e.assets.fetchCount)),n=mi((e=>e.assets.fetching)),i=mi((e=>e.tags.panelVisible)),a=mi((e=>e.assets.view)),l=mi(vl),o=(()=>{var e,t;const n=null==(t=null==(e=Pe)?void 0:e.container)?void 0:t.map((e=>window.matchMedia("(max-width: ".concat(e,"px)")))),i=()=>n.findIndex((e=>e.matches)),[a,l]=pt(i());return dt((()=>{const e=()=>{l(i)};return n.forEach((t=>{try{t.addEventListener("change",e)}catch(n){try{t.addListener(e)}catch(e){}}})),()=>{try{n.forEach((t=>t.removeEventListener("change",e)))}catch(t){try{n.forEach((t=>t.removeListener(e)))}catch(e){}}}}),[]),a})(),r=t>=0,s=l.length>0,d=()=>{n||e(di.loadNextPage())};dt((()=>{o<=1&&i&&e(Yn.panelVisibleSet({panelVisible:!1}))}),[o]);return ke(qe,{flex:1,style:{width:"100%"},children:!s&&r&&!n?ke(qe,{padding:4,children:ke(Fe,{size:1,weight:"semibold",children:"No results for the current query"})}):_e(Se,{children:["grid"===a&&ke(Pl,{items:l,onLoadMore:d}),"table"===a&&ke(Kl,{items:l,onLoadMore:d})]})})},Jl=()=>{const e=mi((e=>e.notifications.items)),t=nt();return dt((()=>{if(e.length>0){const n=e[e.length-1];t.push({closable:!0,status:n.status,title:n.title})}}),[e.length]),null},eo=()=>{var e,t;const n=xt(),i=mi(ri);return 0===i.length?null:ke(je,{align:"center",justify:"flex-start",style:{background:null==(e=Gt.gray)?void 0:e[900].hex,borderBottom:"1px solid ".concat(null==(t=Gt.gray)?void 0:t[900].hex),height:"".concat(32,"px"),position:"relative",width:"100%"},children:_e(je,{align:"center",paddingX:3,children:[ke(qe,{paddingRight:2,children:_e(Le,{size:0,style:{color:"inherit"},children:[i.length," ",nn("asset",i.length)," selected"]})}),ke(Ee,{mode:"bleed",onClick:()=>{n(di.pickClear())},padding:2,style:{background:"none",boxShadow:"none"},tone:"default",children:ke(Le,{size:0,children:"Deselect"})}),ke(Ee,{mode:"bleed",onClick:()=>{n(fi.showConfirmDeleteAssets({assets:i}))},padding:2,style:{background:"none",boxShadow:"none"},tone:"critical",children:ke(Le,{size:0,children:"Delete"})})]})})};var to=It({name:"selected",initialState:{assets:[],document:void 0,documentAssetIds:[]},reducers:{}}).reducer;const no=It({name:"notifications",initialState:{items:[]},reducers:{add(e,t){const{asset:n,status:i,title:a}=t.payload;e.items.push({asset:n,status:i,title:a})}}}),io=no.actions;var ao=no.reducer;const lo=Et(((e,t,n)=>{let{client:i}=n;return e.pipe(Nt(di.deleteRequest.match),Mt((e=>{const{assets:t}=e.payload,n=t.map((e=>e._id));return Dt(t).pipe(Mt((()=>i.observable.delete({query:vt(p||(p=H(["*[_id in ","]"])),JSON.stringify(n))}))),Mt((()=>Dt(di.deleteComplete({assetIds:n})))),Qt((e=>Dt(di.deleteError({assetIds:n,error:e})))))})))}),((e,t,n)=>{let{client:i}=n;return e.pipe(Nt(di.fetchRequest.match),Vt(t),Bt((e=>{let[t,n]=e;var a,l;const o=null==(a=t.payload)?void 0:a.params,r=null==(l=t.payload)?void 0:l.query;return Dt(t).pipe(Fn(n.debug.badConnection),Mt((()=>i.observable.fetch(r,o))),Mt((e=>{const{items:t}=e;return Dt(di.fetchComplete({assets:t}))})),Qt((e=>Dt(di.fetchError({message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500})))))})))}),((e,t)=>e.pipe(Nt(di.deleteComplete.match),Vt(t),Bt((e=>{let[t,n]=e;if(0===n.assets.allIds.length){const e=Math.floor(n.assets.allIds.length/n.assets.pageSize);return Dt(di.loadPageIndex({pageIndex:e}))}return jt()})))),((e,t)=>e.pipe(Nt(di.loadNextPage.match),Vt(t),Bt((e=>{let[t,n]=e;return Dt(di.loadPageIndex({pageIndex:n.assets.pageIndex+1}))})))),((e,t)=>e.pipe(Nt(di.loadPageIndex.match),Vt(t),Bt((e=>{let[t,n]=e;var i,a,l,o,r,s;const d=n.assets.pageSize,c=t.payload.pageIndex*d,u=c+d,p=null==(i=null==n?void 0:n.selected.document)?void 0:i._id,m=null==(a=null==n?void 0:n.selected)?void 0:a.documentAssetIds,y=Un({assetTypes:n.assets.assetTypes,searchFacets:n.search.facets,searchQuery:n.search.query}),f=B(B({},p?{documentId:p}:{}),{},{documentAssetIds:m});return Dt(di.fetchRequest({params:f,queryFilter:y,selector:vt(h||(h=H(["[","...","]"])),c,u),sort:vt(g||(g=H(["order("," ",")"])),null==(o=null==(l=n.assets)?void 0:l.order)?void 0:o.field,null==(s=null==(r=n.assets)?void 0:r.order)?void 0:s.direction)}))})))),(e=>e.pipe(Nt(di.listenerCreateQueue.match),Xt(2e3),Nt((e=>e.length>0)),Mt((e=>{const t=null==e?void 0:e.map((e=>e.payload.asset));return Dt(di.listenerCreateQueueComplete({assets:t}))})))),(e=>e.pipe(Nt(di.listenerDeleteQueue.match),Xt(2e3),Nt((e=>e.length>0)),Mt((e=>{const t=null==e?void 0:e.map((e=>e.payload.assetId));return Dt(di.listenerDeleteQueueComplete({assetIds:t}))})))),(e=>e.pipe(Nt(di.listenerUpdateQueue.match),Xt(2e3),Nt((e=>e.length>0)),Mt((e=>{const t=null==e?void 0:e.map((e=>e.payload.asset));return Dt(di.listenerUpdateQueueComplete({assets:t}))})))),(e=>e.pipe(Nt(di.orderSet.match),Mt((()=>Dt(di.clear(),di.loadPageIndex({pageIndex:0})))))),(e=>e.pipe(Rt(Zn.facetsAdd.type,Zn.facetsClear.type,Zn.facetsRemove.type,Zn.facetsUpdate.type,Zn.querySet.type),Ht(400),Mt((()=>Dt(di.clear(),di.loadPageIndex({pageIndex:0})))))),(e=>e.pipe(Rt(di.insertUploads.type,di.listenerUpdateQueueComplete.type,di.updateComplete.type),Mt((()=>Dt(di.sort()))))),((e,t,n)=>{let{client:i}=n;return e.pipe(Nt(Nn.tagsAddRequest.match),Vt(t),Mt((e=>{let[t,n]=e;const{assets:a,tag:l}=t.payload;return Dt(t).pipe(Fn(n.debug.badConnection),Mt((()=>{const e=ri(n),t=null==e?void 0:e.filter((e=>t=>{var n,i,a,l,o;return(null!=(o=null==(l=null==(a=null==(i=null==(n=null==t?void 0:t.asset)?void 0:n.opt)?void 0:i.media)?void 0:a.tags)?void 0:l.findIndex((t=>t._ref===(null==e?void 0:e._id))))?o:-1)<0})(l)),a=t.reduce(((e,t)=>{var n;return e.patch(null==(n=null==t?void 0:t.asset)?void 0:n._id,(e=>{let{tag:t}=e;return e=>e.setIfMissing({opt:{}}).setIfMissing({"opt.media":{}}).setIfMissing({"opt.media.tags":[]}).append("opt.media.tags",[{_key:St(),_ref:null==t?void 0:t._id,_type:"reference",_weak:!0}])})({tag:l}))}),i.transaction());return qt(a.commit())})),Mt((()=>Dt(Nn.tagsAddComplete({assets:a,tag:l})))),Qt((e=>Dt(Nn.tagsAddError({assets:a,error:{message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500},tag:l})))))})))}),((e,t,n)=>{let{client:i}=n;return e.pipe(Nt(Nn.tagsRemoveRequest.match),Vt(t),Mt((e=>{let[t,n]=e;const{assets:a,tag:l}=t.payload;return Dt(t).pipe(Fn(n.debug.badConnection),Mt((()=>{const e=ri(n).reduce(((e,t)=>{var n;return e.patch(null==(n=null==t?void 0:t.asset)?void 0:n._id,(e=>{let{asset:t,tag:n}=e;return e=>{var i;return e.ifRevisionId(null==(i=null==t?void 0:t.asset)?void 0:i._rev).unset(['opt.media.tags[_ref == "'.concat(n._id,'"]')])}})({asset:t,tag:l}))}),i.transaction());return qt(e.commit())})),Mt((()=>Dt(Nn.tagsRemoveComplete({assets:a,tag:l})))),Qt((e=>Dt(Nn.tagsRemoveError({assets:a,error:{message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500},tag:l})))))})))}),(e=>e.pipe(Rt(di.orderSet.type,di.viewSet.type,Zn.facetsAdd.type,Zn.facetsClear.type,Zn.facetsRemove.type,Zn.facetsUpdate.type,Zn.querySet.type),Mt((()=>Dt(di.pickClear()))))),((e,t,n)=>{let{client:i}=n;return e.pipe(Nt(di.updateRequest.match),Vt(t),Mt((e=>{let[t,n]=e;const{asset:a,closeDialogId:l,formData:o}=t.payload;return Dt(t).pipe(Fn(n.debug.badConnection),Mt((()=>qt(i.patch(a._id).setIfMissing({opt:{}}).setIfMissing({"opt.media":{}}).set(o).commit()))),Mt((e=>Dt(di.updateComplete({asset:e,closeDialogId:l})))),Qt((e=>Dt(di.updateError({asset:a,error:{message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500}})))))})))}),(e=>e.pipe(Rt(di.deleteComplete.type,di.updateComplete.type,Yn.deleteComplete.type,Yn.updateComplete.type),Nt((e=>{var t;return!!(null==(t=null==e?void 0:e.payload)?void 0:t.closeDialogId)})),Mt((e=>{var t;const n=null==(t=null==e?void 0:e.payload)?void 0:t.closeDialogId;return n?Dt(yi.actions.remove({id:n})):jt()})))),(e=>e.pipe(Nt(Yn.createComplete.match),Mt((e=>{const{assetId:t,tag:n}=null==e?void 0:e.payload;return t?Dt(yi.actions.inlineTagCreate({tag:n,assetId:t})):n._id?Dt(yi.actions.remove({id:"tagCreate"})):jt()})))),(e=>e.pipe(Nt(Yn.listenerDeleteQueueComplete.match),Mt((e=>{const{tagIds:t}=null==e?void 0:e.payload;return Dt(yi.actions.inlineTagRemove({tagIds:t}))})))),(e=>e.pipe(Nt(di.deleteError.match),Mt((e=>{const{assetIds:t}=e.payload,n=t.length;return Dt(no.actions.add({status:"error",title:"Unable to delete ".concat(n," ").concat(nn("asset",n),". Please review any asset errors and try again.")}))})))),(e=>e.pipe(Nt(di.deleteComplete.match),Mt((e=>{const{assetIds:t}=e.payload,n=t.length;return Dt(no.actions.add({status:"info",title:"".concat(n," ").concat(nn("asset",n)," deleted")}))})))),(e=>e.pipe(Nt(Nn.tagsAddComplete.match),Mt((e=>{var t,n;const i=null==(n=null==(t=null==e?void 0:e.payload)?void 0:t.assets)?void 0:n.length;return Dt(no.actions.add({status:"info",title:"Tag added to ".concat(i," ").concat(nn("asset",i))}))})))),(e=>e.pipe(Nt(Nn.tagsRemoveComplete.match),Mt((e=>{var t,n;const i=null==(n=null==(t=null==e?void 0:e.payload)?void 0:t.assets)?void 0:n.length;return Dt(no.actions.add({status:"info",title:"Tag removed from ".concat(i," ").concat(nn("asset",i))}))})))),(e=>e.pipe(Nt(di.updateComplete.match),Xt(2e3),Nt((e=>e.length>0)),Mt((e=>{const t=e.length;return Dt(no.actions.add({status:"info",title:"".concat(t," ").concat(nn("asset",t)," updated")}))})))),(e=>e.pipe(Rt(di.fetchError.type,di.updateError.type,Yn.createError.type,Yn.deleteError.type,Yn.fetchError.type,Yn.updateError.type,Ol.uploadError.type),Mt((e=>{var t;const n=null==(t=e.payload)?void 0:t.error;return Dt(no.actions.add({status:"error",title:"An error occured: ".concat(n.message)}))})))),(e=>e.pipe(Nt(Yn.createComplete.match),Mt((()=>Dt(no.actions.add({status:"info",title:"Tag created"})))))),(e=>e.pipe(Nt(Yn.deleteComplete.match),Mt((()=>Dt(no.actions.add({status:"info",title:"Tag deleted"})))))),(e=>e.pipe(Nt(Yn.updateComplete.match),Mt((()=>Dt(no.actions.add({status:"info",title:"Tag updated"})))))),((e,t)=>e.pipe(Nt(Yn.updateComplete.match),Vt(t),Mt((e=>{let[t,n]=e;var i,a,l,o,r;const{tag:s}=t.payload,d=null==(i=n.search.facets)?void 0:i.find((e=>"tag"===e.name)),c=n.tags.byIds[s._id];return"searchable"===(null==d?void 0:d.type)&&(null==(a=d.value)?void 0:a.value)===s._id?Dt(Wn.actions.facetsUpdate({name:"tag",value:{label:null==(o=null==(l=null==c?void 0:c.tag)?void 0:l.name)?void 0:o.current,value:null==(r=null==c?void 0:c.tag)?void 0:r._id}})):jt()})))),((e,t,n)=>{let{client:i}=n;return e.pipe(Nt(Qn.actions.createRequest.match),Vt(t),Mt((e=>{let[t,n]=e;const{assetId:a,name:l}=t.payload;return Dt(t).pipe(Fn(n.debug.badConnection),Pn(i,l),Mt((()=>i.observable.create({_type:"media.tag",name:{_type:"slug",current:l}}))),Mt((e=>Dt(Qn.actions.createComplete({assetId:a,tag:e})))),Qt((e=>Dt(Qn.actions.createError({error:{message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500},name:l})))))})))}),((e,t,n)=>{let{client:i}=n;return e.pipe(Nt(Qn.actions.deleteRequest.match),Vt(t),Mt((e=>{let[t,n]=e;const{tag:a}=t.payload;return Dt(t).pipe(Fn(n.debug.badConnection),Mt((()=>i.observable.fetch(vt(d||(d=H(['*[\n _type in ["sanity.fileAsset", "sanity.imageAsset"]\n && references(*[_type == "media.tag" && name.current == $tagName]._id)\n ] {\n _id,\n _rev,\n opt\n }']))),{tagName:a.name.current}))),Mt((e=>{const t=e.map((e=>({id:e._id,patch:{ifRevisionID:e._rev,unset:['opt.media.tags[_ref == "'.concat(a._id,'"]')]}}))).reduce(((e,t)=>e.patch(t.id,t.patch)),i.transaction());return t.delete(a._id),qt(t.commit())})),Mt((()=>Dt(Qn.actions.deleteComplete({tagId:a._id})))),Qt((e=>Dt(Qn.actions.deleteError({error:{message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500},tag:a})))))})))}),((e,t,n)=>{let{client:i}=n;return e.pipe(Nt(Qn.actions.fetchRequest.match),Vt(t),Bt((e=>{let[t,n]=e;const{query:a}=t.payload;return Dt(t).pipe(Fn(n.debug.badConnection),Mt((()=>i.observable.fetch(a))),Mt((e=>{const{items:t}=e;return Dt(Qn.actions.fetchComplete({tags:t}))})),Qt((e=>Dt(Qn.actions.fetchError({error:{message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500}})))))})))}),(e=>e.pipe(Nt(Qn.actions.listenerCreateQueue.match),Xt(2e3),Nt((e=>e.length>0)),Mt((e=>{const t=null==e?void 0:e.map((e=>e.payload.tag));return Dt(Qn.actions.listenerCreateQueueComplete({tags:t}))})))),(e=>e.pipe(Nt(Qn.actions.listenerDeleteQueue.match),Xt(2e3),Nt((e=>e.length>0)),Mt((e=>{const t=null==e?void 0:e.map((e=>e.payload.tagId));return Dt(Qn.actions.listenerDeleteQueueComplete({tagIds:t}))})))),(e=>e.pipe(Nt(Qn.actions.listenerUpdateQueue.match),Xt(2e3),Nt((e=>e.length>0)),Mt((e=>{const t=null==e?void 0:e.map((e=>e.payload.tag));return Dt(Qn.actions.listenerUpdateQueueComplete({tags:t}))})))),(e=>e.pipe(Rt(Qn.actions.listenerCreateQueueComplete.type,Qn.actions.listenerUpdateQueueComplete.type),Xt(1e3),Nt((e=>e.length>0)),Mt((()=>Dt(Qn.actions.sort()))))),((e,t,n)=>{let{client:i}=n;return e.pipe(Nt(Qn.actions.updateRequest.match),Vt(t),Mt((e=>{let[t,n]=e;var a;const{closeDialogId:l,formData:o,tag:r}=t.payload;return Dt(t).pipe(Fn(n.debug.badConnection),Pn(i,null==(a=null==o?void 0:o.name)?void 0:a.current),Mt((()=>qt(i.patch(r._id).set({name:{_type:"slug",current:null==o?void 0:o.name.current}}).commit()))),Mt((e=>Dt(Qn.actions.updateComplete({closeDialogId:l,tag:e})))),Qt((e=>Dt(Qn.actions.updateError({error:{message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500},tag:r})))))})))}),((e,t,n)=>{let{client:i}=n;return e.pipe(Nt(Ol.uploadStart.match),Mt((t=>{const{file:n,uploadItem:a}=t.payload;return Ut(Dt(null).pipe(Mt((()=>(e=>Dt(null).pipe(Mt((()=>qt(Tl(e))))))(n))),Mt((e=>Dt(Ol.previewReady({blobUrl:e,hash:a.hash}))))),Dt(null).pipe(Mt((()=>El(i,a.assetType,n,a.hash))),Wt(e.pipe(Nt(Ol.uploadCancel.match),Nt((e=>e.payload.hash===a.hash)))),Mt((e=>"complete"===(null==e?void 0:e.type)?Dt(ei.uploadComplete({asset:e.asset})):"progress"===(null==e?void 0:e.type)&&"upload"===(null==e?void 0:e.stage)?Dt(Ol.uploadProgress({event:e,uploadHash:a.hash})):jt())),Qt((e=>Dt(Ol.uploadError({error:{message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500},hash:a.hash}))))))})))}),((e,t)=>e.pipe(Nt(Ol.uploadRequest.match),Vt(t),Mt((e=>{let[t,n]=e;const{file:i,forceAsAssetType:a}=t.payload;return Dt(t).pipe(Mt((()=>Rl(i))),Nt((e=>!!!n.uploads.byIds[e])),Mt((e=>{const t={_type:"upload",assetType:a||(i.type.indexOf("image")>=0?"image":"file"),hash:e,name:i.name,size:i.size,status:"queued"};return Dt(Ol.uploadStart({file:i,uploadItem:t}))})))})))),((e,t,n)=>{let{client:i}=n;return e.pipe(Nt(Ol.checkRequest.match),Vt(t),Mt((e=>{let[t,n]=e;const{assets:a}=t.payload,l=a.map((e=>e._id)),o=Un({assetTypes:n.assets.assetTypes,searchFacets:n.search.facets,searchQuery:n.search.query}),r=vt(z||(z=H(["\n *["," && _id in $documentIds].sha1hash\n "])),o);return Dt(t).pipe(Pt(1e3),Mt((()=>i.observable.fetch(r,{documentIds:l}))),Mt((e=>{const t=a.reduce(((t,n)=>(t[n.sha1hash]=e.includes(n.sha1hash)?n._id:null,t)),{});return Dt(Ol.checkComplete({results:t}),di.insertUploads({results:t}))})))})))}),(e=>e.pipe(Nt(ei.uploadComplete.match),Mt((e=>Dt(Ol.checkRequest({assets:[e.payload.asset]}))))))),oo=kt({assets:pi,debug:oa,dialog:vi,notifications:ao,search:Jn,selected:to,tags:$n,uploads:Dl}),ro=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),so=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];var n,i;return Array.isArray(e)&&e.forEach((e=>{so(e,t)})),ro(e)&&("reference"===(null==(n=null==e?void 0:e.asset)?void 0:n._type)&&(null==(i=null==e?void 0:e.asset)?void 0:i._ref)&&t.push(e.asset._ref),Object.values(e).forEach((e=>{so(e,t)}))),t},co=e=>{const t=so(e);return[...new Set(t.sort())]};class uo extends yt{constructor(e){super(e);const t=zt({dependencies:{client:e.client}});this.store=_t({reducer:oo,middleware:e=>e({serializableCheck:!1,thunk:!1}).prepend(t),devTools:!0,preloadedState:{assets:B(B({},ni),{},{assetTypes:(null==e?void 0:e.assetType)?[e.assetType]:["file","image"]}),selected:{assets:e.selectedAssets||[],document:e.document,documentAssetIds:e.document?co(e.document):[]}}}),t.run(lo)}render(){return ke(Ct,{store:this.store,children:this.props.children})}}const po=()=>{var e;return mi((e=>e.tags.panelVisible))?ke(qe,{style:{position:"relative",width:250},children:ke(qe,{className:"media__custom-scrollbar",style:{borderLeft:"1px solid ".concat(null==(e=Gt.gray)?void 0:e[900].hex),height:"100%",overflowX:"hidden",overflowY:"auto",position:"absolute",right:0,top:0,width:"100%"},children:ke(pl,{})})}):null},ho=Jt.div(U||(U=H(["\n color: white;\n height: 100%;\n min-height: 100%;\n right: 0;\n top: 0;\n width: 100%;\n\n &:focus {\n outline: none;\n }\n"]))),go=Jt.div(P||(P=H(["\n align-items: center;\n background: rgba(0, 0, 0, 0.75);\n display: flex;\n height: 100%;\n justify-content: center;\n position: absolute;\n right: 0;\n top: 0;\n width: 100%;\n z-index: 3;\n"])));const mo=e=>{const{children:t}=e,{onSelect:n}=Dn(),i=xt(),a=mi((e=>e.assets.assetTypes)),l=1===a.length&&"image"===a[0],{getRootProps:o,getInputProps:r,isDragActive:s,open:d}=wn({accept:l?"image/*":"",getFilesFromEvent:async e=>{var t;let n;if("drop"===e.type&&"dataTransfer"in e&&(n=null==(t=null==e?void 0:e.dataTransfer)?void 0:t.files),"change"===e.type){const t=null==e?void 0:e.target;(null==t?void 0:t.files)&&(n=t.files)}if(!n)return[];const a=await async function(e){const t=Array.from(e),n=[];for(const e of t)try{await e.slice(0,1).arrayBuffer(),n.push(e)}catch(e){}return n}(n);return(null==n?void 0:n.length)!==a.length&&i(io.add({status:"error",title:"Unable to upload some items (folders and packages aren't supported)"})),a},noClick:!0,noDrag:!!n,onDrop:async e=>{e.forEach((e=>i(Ol.uploadRequest({file:e,forceAsAssetType:1===a.length?a[0]:void 0}))))}});return ke(yl,{open:d,children:_e(ho,B(B({},o()),{},{children:[ke("input",B({},r())),s&&ke(go,{children:ke(je,{direction:"column",justify:"center",style:{color:Kt.hex},children:ke(Fe,{size:3,style:{color:"inherit"},children:"Drop files to upload"})})}),t]}))})},yo=e=>{let{onClose:t}=e;const n=qn(),i=xt(),a=e=>{const{documentId:t,result:n,transition:a}=e;"appear"===a&&i(di.listenerCreateQueue({asset:n})),"disappear"===a&&i(di.listenerDeleteQueue({assetId:t})),"update"===a&&i(di.listenerUpdateQueue({asset:n}))},l=e=>{const{documentId:t,result:n,transition:a}=e;"appear"===a&&i(Yn.listenerCreateQueue({tag:n})),"disappear"===a&&i(Yn.listenerDeleteQueue({tagId:t})),"update"===a&&i(Yn.listenerUpdateQueue({tag:n}))};return dt((()=>{i(di.loadPageIndex({pageIndex:0})),i(Yn.fetchRequest());const e=n.listen(vt(M||(M=H(['*[_type in ["sanity.fileAsset", "sanity.imageAsset"] && !(_id in path("drafts.**"))]'])))).subscribe(a),t=n.listen(vt(N||(N=H(['*[_type == "','" && !(_id in path("drafts.**"))]'])),"media.tag")).subscribe(l);return()=>{null==e||e.unsubscribe(),null==t||t.unsubscribe()}}),[]),_e(mo,{children:[ke(gl,{}),ke(Jl,{}),ke(Me,{display:"flex",height:"fill",children:_e(je,{direction:"column",flex:1,children:[ke(fl,{onClose:t}),ke(ia,{}),_e(je,{flex:1,children:[_e(je,{align:"flex-end",direction:"column",flex:1,style:{position:"relative"},children:[ke(eo,{}),ke(Zl,{})]}),ke(po,{})]}),ke(ra,{})]})})]})},fo=e=>{const t=qn();return ke(uo,{assetType:null==e?void 0:e.assetType,client:t,document:null==e?void 0:e.document,selectedAssets:null==e?void 0:e.selectedAssets,children:ke(it,{scheme:"dark",theme:Pe,children:ke(at,{children:_e(On,{onSelect:null==e?void 0:e.onSelect,children:[ke(gi,{}),ke(yo,{onClose:null==e?void 0:e.onClose})]})})})})},vo=()=>{const[e]=pt((()=>document.createElement("div")));return dt((()=>(e.classList.add("media-portal"),document.body.appendChild(e),()=>{document.body.removeChild(e)})),[]),e};var bo={title:"Media Tag",icon:ta,name:"media.tag",type:"document",fields:[{title:"Name",name:"name",type:"slug"}],preview:{select:{name:"name"},prepare(e){const{name:t}=e;return{media:ta,title:null==t?void 0:t.current}}}};const xo={icon:Te,name:"media",title:"Media"},Co=B(B({},xo),{},{component:e=>{const{onClose:t}=e,n=vo(),i=Z([]);In("escape",t);const a=e=>{e.nativeEvent.stopImmediatePropagation(),e.stopPropagation()},{zIndex:l}=lt();return ke(ot,{element:n,children:ke(rt,{children:ke(qe,{onDragEnter:a,onDragLeave:a,onDragOver:a,onDrop:a,onMouseUp:a,style:{bottom:0,height:"auto",left:0,position:"fixed",top:0,width:"100%",zIndex:l},children:ke(fo,B({document:i},e))})})})}}),wo=B(B({},xo),{},{component:()=>ke(je,{direction:"column",height:"fill",flex:1,children:ke(fo,{})})}),Io=J({name:"media",form:{file:{assetSources:e=>[...e,Co]},image:{assetSources:e=>[...e,Co]}},schema:{types:[bo]},tools:e=>[...e,wo]});export{Io as media,Co as mediaAssetSource};
|
|
2
|
-
//# sourceMappingURL=index.esm.js.map
|
|
1
|
+
var e,t,n,o,r,i,l,a,s,d,c,u,h,p,g,m,f,w,v,C,y,k,L,M,x,b,H,V,I,j,Z,T,W,B,_,R,S,z,E,A,q;function D(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}import{useClient as O,useDocumentStore as F,WithReferringDocuments as U,useSchema as P,Preview as N,useFormValue as Q,definePlugin as X}from"sanity";import{forwardRef as G,createElement as Y,useRef as $,useCallback as K,useEffect as J,createContext as ee,useContext as te,useState as ne,memo as oe,Component as re}from"react";import{jsx as ie,jsxs as le,Fragment as ae}from"react/jsx-runtime";import{Inline as se,Button as de,usePortal as ce,MenuButton as ue,Menu as he,MenuItem as pe,MenuDivider as ge,Box as me,Flex as fe,Label as we,Text as ve,TextInput as Ce,studioTheme as ye,Card as ke,MenuGroup as Le,useMediaIndex as Me,Tooltip as xe,Switch as be,Popover as He,Stack as Ve,Dialog as Ie,TextArea as je,TabList as Ze,Tab as Te,TabPanel as We,Container as Be,Spinner as _e,Checkbox as Re,Grid as Se,useToast as ze,ThemeProvider as Ee,ToastProvider as Ae,PortalProvider as qe,useLayer as De,Portal as Oe}from"@sanity/ui";import Fe from"is-hotkey";import Ue from"groq";import{useSelector as Pe,useDispatch as Ne,Provider as Qe}from"react-redux";import{createAction as Xe,createSlice as Ge,createSelector as Ye,combineReducers as $e,configureStore as Ke}from"@reduxjs/toolkit";import{nanoid as Je}from"nanoid";import{ofType as et,combineEpics as tt,createEpicMiddleware as nt}from"redux-observable";import{iif as ot,throwError as rt,of as it,from as lt,empty as at,Subject as st,Observable as dt,merge as ct}from"rxjs";import{delay as ut,mergeMap as ht,filter as pt,withLatestFrom as gt,catchError as mt,switchMap as ft,bufferTime as wt,debounceTime as vt,first as Ct,map as yt,takeUntil as kt}from"rxjs/operators";import Lt,{css as Mt,createGlobalStyle as xt}from"styled-components";import bt from"pluralize";import{useNProgress as Ht}from"@tanem/react-nprogress";import Vt,{components as It}from"react-select";import{Virtuoso as jt,VirtuosoGrid as Zt,GroupedVirtuoso as Tt}from"react-virtuoso";import{yupResolver as Wt}from"@hookform/resolvers/yup";import{Controller as Bt,useForm as _t}from"react-hook-form";import*as Rt from"yup";import St from"date-fns/format";import zt from"filesize";import Et from"copy-to-clipboard";import{useIntentLink as At}from"sanity/router";import{FileIcon as qt,defaultStyles as Dt}from"react-file-icon";import Ot from"react-select/creatable";import Ft from"date-fns/formatRelative";import{useDropzone as Ut}from"react-dropzone";const Pt=G((function(e,t){return ie("svg",{"data-sanity-icon":"access-denied",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M18.1568 6.84315C21.281 9.96734 21.281 15.0327 18.1568 18.1569C15.0326 21.281 9.96733 21.281 6.84313 18.1569C3.71894 15.0327 3.71894 9.96734 6.84313 6.84315C9.96733 3.71895 15.0326 3.71895 18.1568 6.84315ZM18.1568 6.84315L6.844 18.156",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Nt=G((function(e,t){return ie("svg",{"data-sanity-icon":"activity",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M21 15H19L15.5 7L11 18L8 12L6 15H4",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Qt=G((function(e,t){return ie("svg",{"data-sanity-icon":"add-circle",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M8 12.4H17M12.5 8V17M20.5 12.5C20.5 16.9183 16.9183 20.5 12.5 20.5C8.08172 20.5 4.5 16.9183 4.5 12.5C4.5 8.08172 8.08172 4.5 12.5 4.5C16.9183 4.5 20.5 8.08172 20.5 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Xt=G((function(e,t){return ie("svg",{"data-sanity-icon":"add",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M12.5 5V20M5 12.5H20",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Gt=G((function(e,t){return le("svg",{"data-sanity-icon":"api",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M5.93047 13.2107L6.66782 10.3728H6.73089L7.45854 13.2107H5.93047ZM8.17164 16H9.66089L7.56041 9H5.93047L3.82999 16H5.20767L5.65396 14.2876H7.73505L8.17164 16Z",fill:"currentColor"}),ie("path",{d:"M10.5389 9V16H11.9166V13.7782H13.0323C14.541 13.7782 15.5015 12.8517 15.5015 11.3964C15.5015 9.92654 14.5701 9 13.1003 9H10.5389ZM11.9166 10.1303H12.751C13.6533 10.1303 14.1044 10.5475 14.1044 11.3867C14.1044 12.2308 13.6533 12.6431 12.751 12.6431H11.9166V10.1303Z",fill:"currentColor"}),ie("path",{d:"M21.1675 16V14.8164H19.717V10.1836H21.1675V9H16.8889V10.1836H18.3393V14.8164H16.8889V16H21.1675Z",fill:"currentColor"})]})})),Yt=G((function(e,t){return le("svg",{"data-sanity-icon":"archive",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M12.5 10.5V17M20.5 7.5V20.5H4.5V7.5L7.5 4.5H17.5L20.5 7.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M4.5 7.5H20.5M16 14L12.5 17.5L9 14",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),$t=G((function(e,t){return le("svg",{"data-sanity-icon":"arrow-down",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M12.5 19.5V5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M18 14L12.5 19.5L7 14",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Kt=G((function(e,t){return le("svg",{"data-sanity-icon":"arrow-left",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M5.5 12.5H20",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M11 18L5.5 12.5L11 7",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Jt=G((function(e,t){return le("svg",{"data-sanity-icon":"arrow-right",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M19.5 12.5H5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M14 7L19.5 12.5L14 18",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),en=G((function(e,t){return le("svg",{"data-sanity-icon":"arrow-top-right",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M16.5 8.5L7 18",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M9 8.5H16.5V16",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),tn=G((function(e,t){return le("svg",{"data-sanity-icon":"arrow-up",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M7 11L12.5 5.5L18 11",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M12.5 5.5V20",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),nn=G((function(e,t){return ie("svg",{"data-sanity-icon":"bar-chart",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M5.5 5V19.5H20M8.5 18V13M11.5 18V9M14.5 18V11M17.5 18V7",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),on=G((function(e,t){return ie("svg",{"data-sanity-icon":"basket",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M8.5 10.5H5L6.5 19.5H18.5L20 10.5H16.5M8.5 10.5L10.2721 5.18377C10.4082 4.77543 10.7903 4.5 11.2208 4.5H13.7792C14.2097 4.5 14.5918 4.77543 14.7279 5.18377L16.5 10.5M8.5 10.5H16.5M8.5 10.5L9.5 19.5M16.5 10.5L15.5 19.5M12.5 10.5V19.5M19.5 13.5H5.5M19 16.5H6",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),rn=G((function(e,t){return ie("svg",{"data-sanity-icon":"bell",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M10.5 17.5V18.5C10.5 20 11.5 20.5 12.5 20.5C13.5 20.5 14.5 20 14.5 18.5V17.5M5.5 17.5C6.5 16 6.5 15 6.5 12C6.5 8 8.5 5.5 12.5 5.5C16.5 5.5 18.5 8 18.5 12C18.5 15 18.5 16 19.5 17.5H5.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),ln=G((function(e,t){return ie("svg",{"data-sanity-icon":"bill",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M6.50001 5.5C8.50003 5.5 8.50003 8 8.50003 8V9.5M6.50001 5.5C4.5 5.5 4.5 8 4.5 8L4.50001 9.5H8.50003M6.50001 5.5C6.50001 5.5 15.8333 5.5 17.6667 5.5C19.5 5.5 19.5 8.5 19.5 8.5V20L17.6667 19L15.8333 20L14 19L12.1667 20L10.3334 19L8.50003 20V9.5M11 12.5H15M11 9.5H16M11 15.5H16",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),an=G((function(e,t){return le("svg",{"data-sanity-icon":"binary-document",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M11.5 4.5V9.5H6.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M9.5 12.5V17.5M11.5 4.5H18.5V20.5H6.5V9.5L11.5 4.5ZM12.5 12.5V17.5H15.5V12.5H12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"square",strokeLinejoin:"round"})]})})),sn=G((function(e,t){return le("svg",{"data-sanity-icon":"block-content",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 7.60002L11 7.60003V6.40003L21 6.40002V7.60002Z",fill:"currentColor"}),ie("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 11.2667L12.4833 11.2667V10.0667L21 10.0667V11.2667Z",fill:"currentColor"}),ie("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 14.9334H13.9254V13.7334L21 13.7334V14.9334Z",fill:"currentColor"}),ie("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 18.6002H4V17.4002H21V18.6002Z",fill:"currentColor"}),ie("path",{d:"M9.86438 15.6H11.2L8.27623 7.60003H6.92377L4 15.6H5.29072L6.0371 13.4767H9.12362L9.86438 15.6ZM7.53546 9.05255H7.63086L8.80374 12.4344H6.35698L7.53546 9.05255Z",fill:"currentColor"})]})})),dn=G((function(e,t){return ie("svg",{"data-sanity-icon":"block-element",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M5 19.5H20M5 5.5H20M6.5 8.5H18.5V16.5H6.5V8.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),cn=G((function(e,t){return ie("svg",{"data-sanity-icon":"blockquote",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M10 17.5H19M6 7.5H19M10 12.5H17M6.5 12V18",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),un=G((function(e,t){return ie("svg",{"data-sanity-icon":"bold",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M13.2087 18C15.5322 18 16.9731 16.793 16.9731 14.8844C16.9731 13.4812 15.9245 12.3949 14.4836 12.2892V12.1534C15.6001 11.9875 16.4526 10.9841 16.4526 9.82991C16.4526 8.14761 15.1927 7.11409 13.0804 7.11409H8.32019V18H13.2087ZM10.5985 8.85674H12.4995C13.5859 8.85674 14.212 9.37727 14.212 10.2448C14.212 11.1199 13.5406 11.6254 12.3109 11.6254H10.5985V8.85674ZM10.5985 16.2574V13.1643H12.575C13.9178 13.1643 14.6496 13.6924 14.6496 14.6882C14.6496 15.7066 13.9404 16.2574 12.6278 16.2574H10.5985Z",fill:"currentColor"})})})),hn=G((function(e,t){return ie("svg",{"data-sanity-icon":"book",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M20.5 17.5V5.5L12.5 6.5M20.5 17.5L12.5 18.5M20.5 17.5V18.5M4.5 17.5V5.5L12.5 6.5M4.5 17.5L12.5 18.5M4.5 17.5V18.5M12.5 18.5L4.5 19.5V18.5M12.5 18.5L20.5 19.5V18.5M12.5 18.5V6.5M12.5 18.5H4.5M12.5 18.5H20.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),pn=G((function(e,t){return ie("svg",{"data-sanity-icon":"bottle",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M7.5 17.5L17.5 17.5M17.5 13C17.5 12.087 17.5 11.3518 17.5 11C17.5 8.5 14.5 9 14.5 7.37494L14.5 5.5M17.5 13C17.5 15.1229 17.5 18.7543 17.5 20.5022C17.5 21.0545 17.0523 21.5 16.5 21.5L8.5 21.5C7.94772 21.5 7.5 21.0547 7.5 20.5024C7.5 18.8157 7.5 15.3546 7.5 13M17.5 13L7.5 13M7.5 13C7.5 12.2538 7.5 11.5648 7.5 11C7.5 8.5 10.5 9 10.5 7.37494L10.5 5.5M10.5 5.5L10.5 3.99999C10.5 3.72385 10.7239 3.49999 11 3.49999L14 3.49999C14.2761 3.49999 14.5 3.72385 14.5 3.99999L14.5 5.5M10.5 5.5L14.5 5.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),gn=G((function(e,t){return le("svg",{"data-sanity-icon":"bulb-filled",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.4272 14.3368C15.8273 15.1773 15.5 16.1794 15.5 17.212V18.5C15.5 19.0523 15.0523 19.5 14.5 19.5H14V20.5C14 21.0523 13.5523 21.5 13 21.5H12C11.4477 21.5 11 21.0523 11 20.5V19.5H10.5C9.94772 19.5 9.5 19.0523 9.5 18.5V17.212C9.5 16.1794 9.17266 15.1773 8.57284 14.3368C7.60216 12.9767 7 11.94 7 10C7 7 9.5 4.5 12.5 4.5C15.5 4.5 18 7 18 10C18 11.94 17.3978 12.9767 16.4272 14.3368Z",fill:"currentColor"}),ie("path",{d:"M16.4272 14.3368L15.9388 13.9883L16.4272 14.3368ZM14 19.5V18.9H13.4V19.5H14ZM11 19.5H11.6V18.9H11V19.5ZM8.57284 14.3368L9.06122 13.9883H9.06122L8.57284 14.3368ZM16.1 17.212C16.1 16.3069 16.3868 15.4261 16.9155 14.6853L15.9388 13.9883C15.2678 14.9284 14.9 16.0519 14.9 17.212H16.1ZM16.1 18.5V17.212H14.9V18.5H16.1ZM14.5 20.1C15.3837 20.1 16.1 19.3837 16.1 18.5H14.9C14.9 18.7209 14.7209 18.9 14.5 18.9V20.1ZM14 20.1H14.5V18.9H14V20.1ZM13.4 19.5V20.5H14.6V19.5H13.4ZM13.4 20.5C13.4 20.7209 13.2209 20.9 13 20.9V22.1C13.8837 22.1 14.6 21.3837 14.6 20.5H13.4ZM13 20.9H12V22.1H13V20.9ZM12 20.9C11.7791 20.9 11.6 20.7209 11.6 20.5H10.4C10.4 21.3837 11.1163 22.1 12 22.1V20.9ZM11.6 20.5V19.5H10.4V20.5H11.6ZM10.5 20.1H11V18.9H10.5V20.1ZM8.9 18.5C8.9 19.3837 9.61634 20.1 10.5 20.1V18.9C10.2791 18.9 10.1 18.7209 10.1 18.5H8.9ZM8.9 17.212V18.5H10.1V17.212H8.9ZM8.08446 14.6853C8.61315 15.4261 8.9 16.3069 8.9 17.212H10.1C10.1 16.0519 9.73217 14.9284 9.06122 13.9883L8.08446 14.6853ZM6.4 10C6.4 11.0377 6.56208 11.8595 6.86624 12.611C7.16624 13.3521 7.59495 13.9995 8.08446 14.6853L9.06122 13.9883C8.58004 13.314 8.22233 12.7629 7.97858 12.1607C7.739 11.5688 7.6 10.9023 7.6 10H6.4ZM12.5 3.9C9.16863 3.9 6.4 6.66863 6.4 10H7.6C7.6 7.33137 9.83137 5.1 12.5 5.1V3.9ZM18.6 10C18.6 6.66863 15.8314 3.9 12.5 3.9V5.1C15.1686 5.1 17.4 7.33137 17.4 10H18.6ZM16.9155 14.6853C17.4051 13.9995 17.8338 13.3521 18.1338 12.611C18.4379 11.8595 18.6 11.0377 18.6 10H17.4C17.4 10.9023 17.261 11.5688 17.0214 12.1607C16.7777 12.7629 16.42 13.314 15.9388 13.9883L16.9155 14.6853Z",fill:"currentColor"})]})})),mn=G((function(e,t){return ie("svg",{"data-sanity-icon":"bulb-outline",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M9.5 16.5H15.5M11 20V20.5C11 21.0523 11.4477 21.5 12 21.5H13C13.5523 21.5 14 21.0523 14 20.5V20M18 10C18 11.94 17.3978 12.9767 16.4272 14.3368C15.8273 15.1773 15.5 16.1794 15.5 17.212V18.5C15.5 19.0523 15.0523 19.5 14.5 19.5H10.5C9.94772 19.5 9.5 19.0523 9.5 18.5V17.212C9.5 16.1794 9.17266 15.1773 8.57284 14.3368C7.60216 12.9767 7 11.94 7 10C7 7 9.5 4.5 12.5 4.5C15.5 4.5 18 7 18 10Z",stroke:"currentColor",strokeWidth:1.2})})})),fn=G((function(e,t){return ie("svg",{"data-sanity-icon":"calendar",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M4.5 10.5V19.5H20.5V10.5M4.5 10.5V5.5H20.5V10.5M4.5 10.5H12.5H20.5M20.5 13.5H16.5M16.5 13.5H12.5M16.5 13.5V10.5M16.5 13.5V16.5M12.5 13.5H8.5M12.5 13.5V16.5M12.5 13.5V10.5M8.5 13.5H4.5M8.5 13.5V10.5M8.5 13.5V16.5M20.5 16.5H16.5M16.5 16.5H12.5M16.5 16.5V19.5M12.5 16.5H8.5M12.5 16.5V19.5M8.5 16.5H4.5M8.5 16.5V19.5M17.5 8V3M7.5 8V3",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),wn=G((function(e,t){return ie("svg",{"data-sanity-icon":"case",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M9 8.5122V6C9 5.44772 9.44772 5 10 5H15C15.5523 5 16 5.44772 16 6V8.5122M4.5 12V18.5C4.5 19.0523 4.94772 19.5 5.5 19.5H19.5C20.0523 19.5 20.5 19.0523 20.5 18.5V12M4.5 12V9.5122C4.5 8.95991 4.94772 8.5122 5.5 8.5122H19.5C20.0523 8.5122 20.5 8.95991 20.5 9.5122V12M4.5 12L11.7978 14.7367C12.2505 14.9064 12.7495 14.9064 13.2022 14.7367L20.5 12",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),vn=G((function(e,t){return ie("svg",{"data-sanity-icon":"chart-upward",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M5.5 5V19.5H20M7.5 16L11.5 11.5L15.5 14L19.5 8.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Cn=G((function(e,t){return ie("svg",{"data-sanity-icon":"checkmark-circle",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M9.5 12.1316L11.7414 14.5L16 10M20.5 12.5C20.5 16.9183 16.9183 20.5 12.5 20.5C8.08172 20.5 4.5 16.9183 4.5 12.5C4.5 8.08172 8.08172 4.5 12.5 4.5C16.9183 4.5 20.5 8.08172 20.5 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),yn=G((function(e,t){return ie("svg",{"data-sanity-icon":"checkmark",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M5.5 11.5L10.5 16.5L19.5 7.60001",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),kn=G((function(e,t){return ie("svg",{"data-sanity-icon":"chevron-down",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M17 10.5L12.5 15L8 10.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Ln=G((function(e,t){return ie("svg",{"data-sanity-icon":"chevron-left",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M14.5 17L10 12.5L14.5 8",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Mn=G((function(e,t){return ie("svg",{"data-sanity-icon":"chevron-right",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M10.5 8L15 12.5L10.5 17",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),xn=G((function(e,t){return ie("svg",{"data-sanity-icon":"chevron-up",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M8 14.5L12.5 10L17 14.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),bn=G((function(e,t){return ie("svg",{"data-sanity-icon":"circle",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("circle",{cx:12.5,cy:12.5,r:8,stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Hn=G((function(e,t){return ie("svg",{"data-sanity-icon":"clipboard",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M8 5.5H6.5V19.5H18.5V5.5H17M12.5 3C11.5 3 11.5 4.5 11 4.5C10 4.5 9.5 5 9.5 6.5H15.6C15.6 5 15 4.5 14 4.5C13.5 4.5 13.5 3 12.5 3Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Vn=G((function(e,t){return ie("svg",{"data-sanity-icon":"clipboard-image",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M8 5.5H6.5V19.5H10.5M17 5.5H18.5V11.5M10.5 18.5L12.73 15.8983C13.1327 15.4285 13.8613 15.4335 14.2575 15.909L15.299 17.1588C15.6754 17.6105 16.3585 17.6415 16.7743 17.2257L16.9903 17.0097C17.2947 16.7053 17.7597 16.6298 18.1447 16.8223L20.5 18M10.5 11.5H20.5V21.5H10.5V11.5ZM12.5 3C11.5 3 11.5 4.5 11 4.5C10 4.5 9.5 5 9.5 6.5H15.6C15.6 5 15 4.5 14 4.5C13.5 4.5 13.5 3 12.5 3Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),In=G((function(e,t){return ie("svg",{"data-sanity-icon":"clock",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M12.5 8V12.5L15.5 15.5M20.5 12.5C20.5 16.9183 16.9183 20.5 12.5 20.5C8.08172 20.5 4.5 16.9183 4.5 12.5C4.5 8.08172 8.08172 4.5 12.5 4.5C16.9183 4.5 20.5 8.08172 20.5 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),jn=G((function(e,t){return ie("svg",{"data-sanity-icon":"close-circle",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M9.5 15.5L12.5 12.5M12.5 12.5L15.5 9.5M12.5 12.5L9.5 9.5M12.5 12.5L15.5 15.5M20.5 12.5C20.5 16.9183 16.9183 20.5 12.5 20.5C8.08172 20.5 4.5 16.9183 4.5 12.5C4.5 8.08172 8.08172 4.5 12.5 4.5C16.9183 4.5 20.5 8.08172 20.5 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Zn=G((function(e,t){return ie("svg",{"data-sanity-icon":"close",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M18 7L7 18M7 7L18 18",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Tn=G((function(e,t){return ie("svg",{"data-sanity-icon":"code-block",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M11 15L8.5 12.5L11 10M14 10L16.5 12.5L14 15M5.5 6.5H19.5V18.5H5.5V6.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Wn=G((function(e,t){return ie("svg",{"data-sanity-icon":"code",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M11 16L7.5 12.5L11 9M14 9L17.5 12.5L14 16",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Bn=G((function(e,t){return le("svg",{"data-sanity-icon":"cog",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M14.2624 5.40607L13.8714 4.42848C13.6471 3.86771 13.104 3.5 12.5 3.5C11.896 3.5 11.3529 3.86771 11.1286 4.42848L10.7376 5.40607C10.5857 5.78585 10.2869 6.08826 9.90901 6.2448C9.53111 6.40133 9.10603 6.39874 8.73006 6.23761L7.76229 5.82285C7.20716 5.58494 6.56311 5.70897 6.13604 6.13604C5.70897 6.56311 5.58494 7.20716 5.82285 7.76229L6.23761 8.73006C6.39874 9.10602 6.40133 9.53111 6.2448 9.90901C6.08826 10.2869 5.78585 10.5857 5.40607 10.7376L4.42848 11.1286C3.86771 11.3529 3.5 11.896 3.5 12.5C3.5 13.104 3.86771 13.6471 4.42848 13.8714L5.40607 14.2624C5.78585 14.4143 6.08826 14.7131 6.2448 15.091C6.40133 15.4689 6.39874 15.894 6.23761 16.2699L5.82285 17.2377C5.58494 17.7928 5.70897 18.4369 6.13604 18.864C6.56311 19.291 7.20716 19.4151 7.76229 19.1772L8.73006 18.7624C9.10603 18.6013 9.53111 18.5987 9.90901 18.7552C10.2869 18.9117 10.5857 19.2141 10.7376 19.5939L11.1286 20.5715C11.3529 21.1323 11.896 21.5 12.5 21.5C13.104 21.5 13.6471 21.1323 13.8714 20.5715L14.2624 19.5939C14.4143 19.2141 14.7131 18.9117 15.091 18.7552C15.4689 18.5987 15.894 18.6013 16.2699 18.7624L17.2377 19.1771C17.7928 19.4151 18.4369 19.291 18.864 18.864C19.291 18.4369 19.4151 17.7928 19.1771 17.2377L18.7624 16.2699C18.6013 15.894 18.5987 15.4689 18.7552 15.091C18.9117 14.7131 19.2141 14.4143 19.5939 14.2624L20.5715 13.8714C21.1323 13.6471 21.5 13.104 21.5 12.5C21.5 11.896 21.1323 11.3529 20.5715 11.1286L19.5939 10.7376C19.2141 10.5857 18.9117 10.2869 18.7552 9.90901C18.5987 9.53111 18.6013 9.10602 18.7624 8.73006L19.1772 7.76229C19.4151 7.20716 19.291 6.56311 18.864 6.13604C18.4369 5.70897 17.7928 5.58494 17.2377 5.82285L16.2699 6.23761C15.894 6.39874 15.4689 6.40133 15.091 6.2448C14.7131 6.08826 14.4143 5.78585 14.2624 5.40607Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M16.5 12.5C16.5 14.7091 14.7091 16.5 12.5 16.5C10.2909 16.5 8.5 14.7091 8.5 12.5C8.5 10.2909 10.2909 8.5 12.5 8.5C14.7091 8.5 16.5 10.2909 16.5 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),_n=G((function(e,t){return le("svg",{"data-sanity-icon":"collapse",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M6 14.5L10.5 14.5V19M19 10.5H14.5L14.5 6",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M10.5 14.5L6 19M14.5 10.5L19 6",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Rn=G((function(e,t){return ie("svg",{"data-sanity-icon":"color-wheel",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M9.43853 5.10896L11.1606 9.26642M13.8394 15.7336L15.5615 19.891M15.7336 11.1606L19.891 9.43853M9.26642 13.8394L5.10896 15.5615M5.3139 9.52342L9.23359 11.147M15.7664 13.853L19.6861 15.4766M13.853 9.23359L15.4766 5.3139M9.52342 19.6861L11.147 15.7664M20.5 12.5C20.5 16.9183 16.9183 20.5 12.5 20.5C8.08172 20.5 4.5 16.9183 4.5 12.5C4.5 8.08172 8.08172 4.5 12.5 4.5C16.9183 4.5 20.5 8.08172 20.5 12.5ZM16 12.5C16 14.433 14.433 16 12.5 16C10.567 16 9 14.433 9 12.5C9 10.567 10.567 9 12.5 9C14.433 9 16 10.567 16 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Sn=G((function(e,t){return ie("svg",{"data-sanity-icon":"comment",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M7.5 16.5H9.5V20.5L13.5 16.5H17.5C18.6046 16.5 19.5 15.6046 19.5 14.5V8.5C19.5 7.39543 18.6046 6.5 17.5 6.5H7.5C6.39543 6.5 5.5 7.39543 5.5 8.5V14.5C5.5 15.6046 6.39543 16.5 7.5 16.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),zn=G((function(e,t){return ie("svg",{"data-sanity-icon":"component",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M8.5 8.5L12.5 12.5M12.5 12.5L16.5 16.5M12.5 12.5L16.5 8.5M12.5 12.5L8.5 16.5M12.5 4L21 12.5L12.5 21L4 12.5L12.5 4Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),En=G((function(e,t){return ie("svg",{"data-sanity-icon":"compose",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M17 6L19 8M14 5.5H5.5V19.5H19.5V11M9 16L9.5 13.5L19 4L21 6L11.5 15.5L9 16Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),An=G((function(e,t){return ie("svg",{"data-sanity-icon":"controls",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M6.5 5V7.5M6.5 7.5C5.39543 7.5 4.5 8.39543 4.5 9.5C4.5 10.6046 5.39543 11.5 6.5 11.5M6.5 7.5C7.60457 7.5 8.5 8.39543 8.5 9.5C8.5 10.6046 7.60457 11.5 6.5 11.5M6.5 11.5V20M12.5 5V13.5M12.5 13.5C11.3954 13.5 10.5 14.3954 10.5 15.5C10.5 16.6046 11.3954 17.5 12.5 17.5M12.5 13.5C13.6046 13.5 14.5 14.3954 14.5 15.5C14.5 16.6046 13.6046 17.5 12.5 17.5M12.5 17.5V20M18.5 5V7.5M18.5 7.5C17.3954 7.5 16.5 8.39543 16.5 9.5C16.5 10.6046 17.3954 11.5 18.5 11.5M18.5 7.5C19.6046 7.5 20.5 8.39543 20.5 9.5C20.5 10.6046 19.6046 11.5 18.5 11.5M18.5 11.5V20",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),qn=G((function(e,t){return ie("svg",{"data-sanity-icon":"copy",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M8.5 8.5H5.5V20.5H16.5V16.5M19.5 4.5H8.5V16.5H19.5V4.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Dn=G((function(e,t){return le("svg",{"data-sanity-icon":"credit-card",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M20.5 9.5H4.5V11.5H20.5V9.5Z",fill:"currentColor",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M7 15.5H14M5.5 18.5H19.5C20.0523 18.5 20.5 18.0523 20.5 17.5V7.5C20.5 6.94772 20.0523 6.5 19.5 6.5H5.5C4.94772 6.5 4.5 6.94772 4.5 7.5V17.5C4.5 18.0523 4.94772 18.5 5.5 18.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),On=G((function(e,t){return ie("svg",{"data-sanity-icon":"crop",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M9.5 5V15.5H20M5 9.5H15.5V20",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Fn=G((function(e,t){return ie("svg",{"data-sanity-icon":"dashboard",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M14.5 19.5V12.5M10.5 12.5V5.5M5.5 12.5H19.5M5.5 19.5H19.5V5.5H5.5V19.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Un=G((function(e,t){return ie("svg",{"data-sanity-icon":"database",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M18.5 7V17.5C18.5 19.0594 16.0504 20.5 12.5 20.5C8.9496 20.5 6.5 19.0594 6.5 17.5V7M18.5 7C18.5 8.45543 15.8137 9.5 12.5 9.5C9.18629 9.5 6.5 8.45543 6.5 7C6.5 5.54457 9.18629 4.5 12.5 4.5C15.8137 4.5 18.5 5.54457 18.5 7Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Pn=G((function(e,t){return ie("svg",{"data-sanity-icon":"desktop",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M4.5 13.5V15.5C4.5 16.0523 4.94772 16.5 5.5 16.5H12.5M4.5 13.5V6.5C4.5 5.94772 4.94772 5.5 5.5 5.5H19.5C20.0523 5.5 20.5 5.94772 20.5 6.5V13.5M4.5 13.5H20.5M20.5 13.5V15.5C20.5 16.0523 20.0523 16.5 19.5 16.5H12.5M12.5 16.5V19.5M12.5 19.5H8M12.5 19.5H17",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Nn=G((function(e,t){return le("svg",{"data-sanity-icon":"document",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M11.5 4.5V9.5H6.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M11.5 4.5H18.5V20.5H6.5L6.5 9.5M11.5 4.5L6.5 9.5M11.5 4.5V9.5H6.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Qn=G((function(e,t){return le("svg",{"data-sanity-icon":"document-pdf",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M12.7127 13.8012L12.7193 13.77C12.8488 13.2366 13.0117 12.5716 12.8845 11.969C12.7997 11.4937 12.4493 11.3084 12.1503 11.295C11.7977 11.2794 11.483 11.4803 11.4049 11.7726C11.2576 12.3082 11.3893 13.0402 11.6303 13.973C11.3268 14.6961 10.8425 15.7472 10.4877 16.3721C9.8271 16.7135 8.94113 17.2402 8.80946 17.9053C8.78268 18.028 8.81392 18.1842 8.88757 18.3248C8.97014 18.481 9.10181 18.6015 9.25579 18.6596C9.32274 18.6841 9.40308 18.7042 9.49681 18.7042C9.88959 18.7042 10.5256 18.3873 11.3736 16.9322C11.5031 16.8898 11.637 16.8452 11.7664 16.8006C12.3734 16.5953 13.0028 16.381 13.5718 16.2851C14.2012 16.622 14.9175 16.8385 15.404 16.8385C15.8861 16.8385 16.0758 16.5529 16.1472 16.381C16.2722 16.0797 16.2119 15.7004 16.0088 15.4973C15.7143 15.2072 14.9979 15.1313 13.882 15.2696C13.3331 14.9349 12.9738 14.4796 12.7127 13.8012ZM10.2645 17.1911C9.95431 17.6419 9.71998 17.8673 9.59278 17.9655C9.7423 17.691 10.0346 17.4009 10.2645 17.1911ZM12.2195 11.9355C12.3355 12.1341 12.3199 12.7345 12.2306 13.038C12.1213 12.5939 12.1056 11.9645 12.1704 11.8909L12.2195 11.9355ZM12.1837 14.6247C12.4225 15.0376 12.7238 15.3924 13.0563 15.6557C12.5743 15.7651 12.1346 15.9458 11.7419 16.1065C11.6481 16.1445 11.5566 16.1824 11.4674 16.2181C11.7642 15.6803 12.0119 15.071 12.1837 14.6247ZM15.6562 16.0864L15.6428 16.1065C15.6428 16.1065 15.4375 16.2315 14.6497 15.9213C15.5558 15.8789 15.6562 16.0864 15.6562 16.0864Z",fill:"currentColor"}),ie("path",{d:"M11.5 4.5V9.5H6.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M11.5 4.5H18.5V20.5H6.5V9.5L11.5 4.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Xn=G((function(e,t){return le("svg",{"data-sanity-icon":"document-remove",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M11.5 4.5V9.5H6.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M6.5 14V20.5H18.5V14M6.5 11V9.5L11.5 4.5H18.5V11M3 12.5H22",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Gn=G((function(e,t){return le("svg",{"data-sanity-icon":"document-sheet",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M11.5 4.5V9.5H6.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M10.4 19V16.4M10.4 16.4L10.4 13.4M10.4 16.4H8M10.4 16.4H14.4M10.4 13.4V11M10.4 13.4H8M10.4 13.4H14.4M14.4 19V16.4M14.4 16.4V13.4M14.4 16.4H17M14.4 13.4V11M14.4 13.4H17M11.5 4.5H18.5V20.5H6.5V9.5L11.5 4.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Yn=G((function(e,t){return le("svg",{"data-sanity-icon":"document-text",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M11.5 4.5V9.5H6.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M16 13H9M14 16H9M11.5 4.5H18.5V20.5H6.5V9.5L11.5 4.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),$n=G((function(e,t){return le("svg",{"data-sanity-icon":"document-video",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M11.5 16.5V13.5L14 15L11.5 16.5Z",fill:"currentColor",stroke:"currentColor",strokeWidth:1.2}),ie("path",{d:"M11.5 4.5V9.5H6.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M11.5 4.5H18.5V20.5H6.5V9.5L11.5 4.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Kn=G((function(e,t){return le("svg",{"data-sanity-icon":"document-word",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M12.4699 13.4588H12.5263L13.6328 17H14.5435L16 12H14.9952L14.0656 15.7214H14.0129L12.929 12H12.0672L10.9984 15.7214H10.9419L10.0124 12H9L10.4565 17H11.371L12.4699 13.4588Z",fill:"currentColor"}),ie("path",{d:"M11.5 4.5V9.5H6.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M11.5 4.5H18.5V20.5H6.5V9.5L11.5 4.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Jn=G((function(e,t){return le("svg",{"data-sanity-icon":"document-zip",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M11.5 4.5V9.5H6.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M15 4.5L13.5 5L15.5 6L13.5 7L15.5 8L13.5 9L15.5 10L13.5 11L14.5 11.5V13M11.5 4.5H18.5V20.5H6.5V9.5L11.5 4.5ZM13.5 13H15.5L16 17H13L13.5 13Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),eo=G((function(e,t){return le("svg",{"data-sanity-icon":"documents",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M10.5 4.5V9.5H5.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M16.5 7.5H19.5V21.5H8.5V18.5M10.5 4.5H16.5V18.5H5.5V9.5L10.5 4.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),to=G((function(e,t){return ie("svg",{"data-sanity-icon":"dot",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("circle",{cx:12.5,cy:12.5,r:1.5,fill:"currentColor",stroke:"currentColor",strokeWidth:1.2})})})),no=G((function(e,t){return ie("svg",{"data-sanity-icon":"double-chevron-down",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M17 8.5L12.5 13L8 8.5M17 12.5L12.5 17L8 12.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),oo=G((function(e,t){return ie("svg",{"data-sanity-icon":"double-chevron-left",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M12.5 17L8 12.5L12.5 8M16.5 17L12 12.5L16.5 8",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),ro=G((function(e,t){return ie("svg",{"data-sanity-icon":"double-chevron-right",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M12.5 8L17 12.5L12.5 17M8.5 8L13 12.5L8.5 17",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),io=G((function(e,t){return ie("svg",{"data-sanity-icon":"double-chevron-up",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M8 12.5L12.5 8L17 12.5M8 16.5L12.5 12L17 16.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),lo=G((function(e,t){return le("svg",{"data-sanity-icon":"download",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M19.5 17V19.5H5.5V17M12.5 16L12.5 5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M17.5 11L12.5 16L7.5 11",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),ao=G((function(e,t){return le("svg",{"data-sanity-icon":"drag-handle",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M9.5 8C10.3284 8 11 7.32843 11 6.5C11 5.67157 10.3284 5 9.5 5C8.67157 5 8 5.67157 8 6.5C8 7.32843 8.67157 8 9.5 8Z",fill:"currentColor"}),ie("path",{d:"M9.5 14C10.3284 14 11 13.3284 11 12.5C11 11.6716 10.3284 11 9.5 11C8.67157 11 8 11.6716 8 12.5C8 13.3284 8.67157 14 9.5 14Z",fill:"currentColor"}),ie("path",{d:"M11 18.5C11 19.3284 10.3284 20 9.5 20C8.67157 20 8 19.3284 8 18.5C8 17.6716 8.67157 17 9.5 17C10.3284 17 11 17.6716 11 18.5Z",fill:"currentColor"}),ie("path",{d:"M15.5 8C16.3284 8 17 7.32843 17 6.5C17 5.67157 16.3284 5 15.5 5C14.6716 5 14 5.67157 14 6.5C14 7.32843 14.6716 8 15.5 8Z",fill:"currentColor"}),ie("path",{d:"M17 12.5C17 13.3284 16.3284 14 15.5 14C14.6716 14 14 13.3284 14 12.5C14 11.6716 14.6716 11 15.5 11C16.3284 11 17 11.6716 17 12.5Z",fill:"currentColor"}),ie("path",{d:"M15.5 20C16.3284 20 17 19.3284 17 18.5C17 17.6716 16.3284 17 15.5 17C14.6716 17 14 17.6716 14 18.5C14 19.3284 14.6716 20 15.5 20Z",fill:"currentColor"})]})})),so=G((function(e,t){return ie("svg",{"data-sanity-icon":"drop",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M18.5 14.5C18.5 18 16 20.5 12.5 20.5C9 20.5 6.5 18 6.5 14.5C6.5 11 9.5 7.50001 12.5 4.5C15.5 7.5 18.5 11 18.5 14.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),co=G((function(e,t){return le("svg",{"data-sanity-icon":"earth-americas",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M7 13L5.5 9L10 5H15V10L14 9H11L9.5 11L10.5 12H12V13L13 14.5H15.5L18.5 17L15.5 19.5L10.5 20V17L12.5 15L9 13L7 10.5V13Z",fill:"currentColor",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("circle",{cx:12.5,cy:12.5,r:8,stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),uo=G((function(e,t){return ie("svg",{"data-sanity-icon":"earth-globe",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M5.5 16.5H19.5M5.5 8.5H19.5M4.5 12.5H20.5M12.5 20.5C12.5 20.5 8 18.5 8 12.5C8 6.5 12.5 4.5 12.5 4.5M12.5 4.5C12.5 4.5 17 6.5 17 12.5C17 18.5 12.5 20.5 12.5 20.5M12.5 4.5V20.5M20.5 12.5C20.5 16.9183 16.9183 20.5 12.5 20.5C8.08172 20.5 4.5 16.9183 4.5 12.5C4.5 8.08172 8.08172 4.5 12.5 4.5C16.9183 4.5 20.5 8.08172 20.5 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),ho=G((function(e,t){return ie("svg",{"data-sanity-icon":"edit",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M15 7L18 10M6 19L7 15L17 5L20 8L10 18L6 19Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),po=G((function(e,t){return le("svg",{"data-sanity-icon":"ellipsis-horizontal",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M6.5 11C7.32843 11 8 11.6716 8 12.5C8 13.3284 7.32843 14 6.5 14C5.67157 14 5 13.3284 5 12.5C5 11.6716 5.67157 11 6.5 11Z",fill:"currentColor"}),ie("path",{d:"M12.5 11C13.3284 11 14 11.6716 14 12.5C14 13.3284 13.3284 14 12.5 14C11.6716 14 11 13.3284 11 12.5C11 11.6716 11.6716 11 12.5 11Z",fill:"currentColor"}),ie("path",{d:"M18.5 11C19.3284 11 20 11.6716 20 12.5C20 13.3284 19.3284 14 18.5 14C17.6716 14 17 13.3284 17 12.5C17 11.6716 17.6716 11 18.5 11Z",fill:"currentColor"})]})})),go=G((function(e,t){return le("svg",{"data-sanity-icon":"ellipsis-vertical",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M14 6.5C14 7.32843 13.3284 8 12.5 8C11.6716 8 11 7.32843 11 6.5C11 5.67157 11.6716 5 12.5 5C13.3284 5 14 5.67157 14 6.5Z",fill:"currentColor"}),ie("path",{d:"M14 12.5C14 13.3284 13.3284 14 12.5 14C11.6716 14 11 13.3284 11 12.5C11 11.6716 11.6716 11 12.5 11C13.3284 11 14 11.6716 14 12.5Z",fill:"currentColor"}),ie("path",{d:"M14 18.5C14 19.3284 13.3284 20 12.5 20C11.6716 20 11 19.3284 11 18.5C11 17.6716 11.6716 17 12.5 17C13.3284 17 14 17.6716 14 18.5Z",fill:"currentColor"})]})})),mo=G((function(e,t){return le("svg",{"data-sanity-icon":"enter",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M6 14.5H19.5V7",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M10 18.5L6 14.5L10 10.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),fo=G((function(e,t){return le("svg",{"data-sanity-icon":"enter-right",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M19 14.5H5.5V7",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M15 18.5L19 14.5L15 10.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),wo=G((function(e,t){return le("svg",{"data-sanity-icon":"envelope",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M20.5 18.5H4.5V6.5H20.5V18.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M20.5 18.5L17.75 15.5L15 12.5M4.5 18.5L10 12.5M20.5 6.5L12.5 15L4.5 6.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),vo=G((function(e,t){return le("svg",{"data-sanity-icon":"equal",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M7.5 4.5H3.5V20.5H7.5",stroke:"currentColor",strokeWidth:1.2}),ie("path",{d:"M17.5 20.5L21.5 20.5L21.5 4.5L17.5 4.5",stroke:"currentColor",strokeWidth:1.2}),ie("path",{d:"M9 10.5H16",stroke:"currentColor",strokeWidth:1.2}),ie("path",{d:"M9 14.5H16",stroke:"currentColor",strokeWidth:1.2})]})})),Co=G((function(e,t){return ie("svg",{"data-sanity-icon":"error-filled",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 12.5C4 7.80558 7.80558 4 12.5 4C17.1944 4 21 7.80558 21 12.5C21 17.1944 17.1944 21 12.5 21C7.80558 21 4 17.1944 4 12.5ZM13 14.5V16H12V14.5H13ZM12 9V13H13V9H12Z",fill:"currentColor"})})})),yo=G((function(e,t){return ie("svg",{"data-sanity-icon":"error-outline",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M12.5 16V14.5M12.5 9V13M20.5 12.5C20.5 16.9183 16.9183 20.5 12.5 20.5C8.08172 20.5 4.5 16.9183 4.5 12.5C4.5 8.08172 8.08172 4.5 12.5 4.5C16.9183 4.5 20.5 8.08172 20.5 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),ko=G((function(e,t){return le("svg",{"data-sanity-icon":"expand",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M14 6.5H18.5V11M11 18.5H6.5V14",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M18.5 6.5L14 11M6.5 18.5L11 14",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Lo=G((function(e,t){return ie("svg",{"data-sanity-icon":"eye-closed",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M7 15.5L5.5 17.5M20.5 12.5C19.8612 13.5647 19.041 14.6294 18.0008 15.501M18.0008 15.501C16.5985 16.676 14.7965 17.5 12.5 17.5M18.0008 15.501L18 15.5M18.0008 15.501L19.5 17.5M12.5 17.5C8.5 17.5 6 15 4.5 12.5M12.5 17.5V20M15.5 17L16.5 19.5M9.5 17L8.5 19.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Mo=G((function(e,t){return le("svg",{"data-sanity-icon":"eye-open",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.39999 12.5C9.39999 10.7879 10.7879 9.39999 12.5 9.39999C14.2121 9.39999 15.6 10.7879 15.6 12.5C15.6 14.2121 14.2121 15.6 12.5 15.6C10.7879 15.6 9.39999 14.2121 9.39999 12.5Z",fill:"currentColor"}),ie("path",{d:"M12.5 7.5C8.5 7.5 6 10 4.5 12.5C6 15 8.5 17.5 12.5 17.5C16.5 17.5 19 15 20.5 12.5C19 10 16.5 7.5 12.5 7.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),xo=G((function(e,t){return ie("svg",{"data-sanity-icon":"filter",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M11 12L6 7V6L19 6L19 7L14 12V17L11 19V12Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"square",strokeLinejoin:"round"})})})),bo=G((function(e,t){return ie("svg",{"data-sanity-icon":"folder",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M11.5 8.5H19.5V18.5H5.5V5.5H10.5L11.5 8.5ZM11.5 8.5H5.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Ho=G((function(e,t){return le("svg",{"data-sanity-icon":"generate",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M9 5.30423C6.33576 6.60253 4.5 9.33688 4.5 12.5C4.5 16.9183 8.08172 20.5 12.5 20.5C16.9183 20.5 20.5 16.9183 20.5 12.5C20.5 8.08172 16.9183 4.5 12.5 4.5V14.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M16 11L12.5 14.5L9 11",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Vo=G((function(e,t){return le("svg",{"data-sanity-icon":"groq",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M13 13H21L13 21L13 13Z",fill:"currentColor"}),ie("path",{d:"M12 12V4L4 12H12Z",fill:"currentColor"}),ie("path",{d:"M12 13H4L12 21V13Z",fill:"currentColor"})]})})),Io=G((function(e,t){return ie("svg",{"data-sanity-icon":"heart-filled",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M17 16C15.8 17.3235 12.5 20.5 12.5 20.5C12.5 20.5 9.2 17.3235 8 16C5.2 12.9118 4.5 11.7059 4.5 9.5C4.5 7.29412 6.1 5.5 8.5 5.5C10.5 5.5 11.7 6.82353 12.5 8.14706C13.3 6.82353 14.5 5.5 16.5 5.5C18.9 5.5 20.5 7.29412 20.5 9.5C20.5 11.7059 19.8 12.9118 17 16Z",fill:"currentColor",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),jo=G((function(e,t){return ie("svg",{"data-sanity-icon":"heart",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M17 16C15.8 17.3235 12.5 20.5 12.5 20.5C12.5 20.5 9.2 17.3235 8 16C5.2 12.9118 4.5 11.7059 4.5 9.5C4.5 7.29412 6.1 5.5 8.5 5.5C10.5 5.5 11.7 6.82353 12.5 8.14706C13.3 6.82353 14.5 5.5 16.5 5.5C18.9 5.5 20.5 7.29412 20.5 9.5C20.5 11.7059 19.8 12.9118 17 16Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Zo=G((function(e,t){return ie("svg",{"data-sanity-icon":"help-circle",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M12.5 13C12.5 11 14 11.5 14 10C14 9.34375 13.5 8.5 12.5 8.5C11.5 8.5 11 9 10.5 9.5M12.5 16V14.5M20.5 12.5C20.5 16.9183 16.9183 20.5 12.5 20.5C8.08172 20.5 4.5 16.9183 4.5 12.5C4.5 8.08172 8.08172 4.5 12.5 4.5C16.9183 4.5 20.5 8.08172 20.5 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),To=G((function(e,t){return ie("svg",{"data-sanity-icon":"home",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M6.5 8.75V18.5H18.5V8.75M4.5 10L12.5 5L20.5 10M14.5 18.5V11.5H10.5V18.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Wo=G((function(e,t){return ie("svg",{"data-sanity-icon":"ice-cream",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M9.5 13.5L12.5 20.5L15.5 13.5M12.5 8.26389C11.9692 7.78885 11.2684 7.5 10.5 7.5C8.84315 7.5 7.5 8.84315 7.5 10.5C7.5 12.1569 8.84315 13.5 10.5 13.5C11.2684 13.5 11.9692 13.2111 12.5 12.7361M9.5 7.5C9.5 5.84315 10.8431 4.5 12.5 4.5C14.1569 4.5 15.5 5.84315 15.5 7.5M17.5 10.5C17.5 12.1569 16.1569 13.5 14.5 13.5C12.8431 13.5 11.5 12.1569 11.5 10.5C11.5 8.84315 12.8431 7.5 14.5 7.5C16.1569 7.5 17.5 8.84315 17.5 10.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Bo=G((function(e,t){return ie("svg",{"data-sanity-icon":"image",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M5.5 15.5L8.79289 12.2071C9.18342 11.8166 9.81658 11.8166 10.2071 12.2071L12.8867 14.8867C13.2386 15.2386 13.7957 15.2782 14.1938 14.9796L15.1192 14.2856C15.3601 14.1049 15.6696 14.0424 15.9618 14.1154L19.5 15M5.5 6.5H19.5V18.5H5.5V6.5ZM15.5 10.5C15.5 11.0523 15.0523 11.5 14.5 11.5C13.9477 11.5 13.5 11.0523 13.5 10.5C13.5 9.94772 13.9477 9.5 14.5 9.5C15.0523 9.5 15.5 9.94772 15.5 10.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),_o=G((function(e,t){return ie("svg",{"data-sanity-icon":"image-remove",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M5.5 11V6.5H19.5V11M5.5 14V18.5H19.5V14M3 12.5H22",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Ro=G((function(e,t){return ie("svg",{"data-sanity-icon":"images",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M18.5 7.5H20.5V19.5H6.5V17.5M4.5 14.5L7.79289 11.2071C8.18342 10.8166 8.81658 10.8166 9.20711 11.2071L11.8867 13.8867C12.2386 14.2386 12.7957 14.2782 13.1938 13.9796L14.1192 13.2856C14.3601 13.1049 14.6696 13.0424 14.9618 13.1154L18.5 14M4.5 5.5H18.5V17.5H4.5V5.5ZM14.5 9.5C14.5 10.0523 14.0523 10.5 13.5 10.5C12.9477 10.5 12.5 10.0523 12.5 9.5C12.5 8.94772 12.9477 8.5 13.5 8.5C14.0523 8.5 14.5 8.94772 14.5 9.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),So=G((function(e,t){return ie("svg",{"data-sanity-icon":"info-filled",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 12.5C21 17.1944 17.1944 21 12.5 21C7.80558 21 4 17.1944 4 12.5C4 7.80558 7.80558 4 12.5 4C17.1944 4 21 7.80558 21 12.5ZM12 10.5V9H13V10.5H12ZM13 16V12H12V16H13Z",fill:"currentColor"})})})),zo=G((function(e,t){return ie("svg",{"data-sanity-icon":"info-outline",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M12.5 10.5V9M12.5 12V16M20.5 12.5C20.5 16.9183 16.9183 20.5 12.5 20.5C8.08172 20.5 4.5 16.9183 4.5 12.5C4.5 8.08172 8.08172 4.5 12.5 4.5C16.9183 4.5 20.5 8.08172 20.5 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Eo=G((function(e,t){return ie("svg",{"data-sanity-icon":"inline-element",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M5.5 5V20M19.5 5V20M8.5 6.5H16.5V18.5H8.5V6.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Ao=G((function(e,t){return ie("svg",{"data-sanity-icon":"inline",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M12.5 6.5H19.5V18.5H12.5M12.5 6.5H5.5V18.5H12.5M12.5 6.5V18.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),qo=G((function(e,t){return ie("svg",{"data-sanity-icon":"insert-above",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M14.5 10.5556L10.5 10.5556M12.5 12.5L12.5 8.5M18.5 5.5L6.5 5.5M18.5 19.5L6.5 19.5L6.5 15.5L18.5 15.5L18.5 19.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"square",strokeLinejoin:"round"})})})),Do=G((function(e,t){return ie("svg",{"data-sanity-icon":"insert-below",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M10.5 14.5H14.5M12.5 12.5V16.5M6.5 19.5H18.5M6.5 5.5H18.5V9.5H6.5V5.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"square",strokeLinejoin:"round"})})})),Oo=G((function(e,t){return ie("svg",{"data-sanity-icon":"italic",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M10.43 18H11.7276L13.4551 9.86763H12.1576L10.43 18ZM13.3043 8.29849C13.8022 8.29849 14.2095 7.89112 14.2095 7.39322C14.2095 6.89532 13.8022 6.48795 13.3043 6.48795C12.8064 6.48795 12.399 6.89532 12.399 7.39322C12.399 7.89112 12.8064 8.29849 13.3043 8.29849Z",fill:"currentColor"})})})),Fo=G((function(e,t){return ie("svg",{"data-sanity-icon":"joystick",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M9.5 16V14.5H15.5V16M13.5 10.5V14.5M11.5 10.5V14.5M15.5 7.5C15.5 9.15685 14.1569 10.5 12.5 10.5C10.8431 10.5 9.5 9.15685 9.5 7.5C9.5 5.84315 10.8431 4.5 12.5 4.5C14.1569 4.5 15.5 5.84315 15.5 7.5ZM18.5 19.5H6.5C5.94772 19.5 5.5 19.0523 5.5 18.5V17.5C5.5 16.9477 5.94772 16.5 6.5 16.5H18.5C19.0523 16.5 19.5 16.9477 19.5 17.5V18.5C19.5 19.0523 19.0523 19.5 18.5 19.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Uo=G((function(e,t){return le("svg",{"data-sanity-icon":"launch",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M14 6.5H5.5V19.5H18.5V11M20.5 4.5L10.5 14.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M16 4.5H20.5V9",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Po=G((function(e,t){return le("svg",{"data-sanity-icon":"leave",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M15.5 15V18.5H5.5V6.5H15.5V10M9 12.5H21.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M18.5 9.5L21.5 12.5L18.5 15.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),No=G((function(e,t){return ie("svg",{"data-sanity-icon":"lemon",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M10.6569 10.3431L6.41422 14.5858C7.58579 15.7574 9.12132 16.3431 10.6569 16.3431M10.6569 10.3431L14.8995 6.1005C16.0711 7.27208 16.6569 8.80761 16.6569 10.3431M10.6569 10.3431L10.6569 16.3431M10.6569 10.3431L16.6569 10.3431M10.6569 10.3431L14.8995 14.5858M14.8995 14.5858C13.7279 15.7574 12.1924 16.3431 10.6569 16.3431M14.8995 14.5858C16.0711 13.4142 16.6569 11.8787 16.6569 10.3431M16.3137 4.68629C19.4379 7.81049 19.4379 12.8758 16.3137 16C13.1895 19.1242 8.12419 19.1242 5 16L16.3137 4.68629Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Qo=G((function(e,t){return ie("svg",{"data-sanity-icon":"link",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M11 12.5L12.5 14C13.281 14.781 14.719 14.781 15.5 14L18.5 11C19.281 10.219 19.281 8.78105 18.5 8L18 7.5C17.2189 6.71895 15.781 6.71895 15 7.5L13 9.5M12 15.5L10 17.5C9.21895 18.281 7.78105 18.281 7 17.5L6.5 17C5.71895 16.219 5.71896 14.781 6.5 14L9.50001 11C10.2811 10.219 11.719 10.2189 12.5 11L14 12.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Xo=G((function(e,t){return ie("svg",{"data-sanity-icon":"link-removed",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M18.5 11C19.281 10.219 19.281 8.78108 18.5 8.00003L18 7.50003C17.2189 6.71898 15.781 6.71898 15 7.50003L13 9.50003M15.5 14C14.7189 14.7811 13.281 14.7811 12.5 14M6.5 14C5.71895 14.7811 5.71894 16.219 6.49999 17L6.99999 17.5C7.78104 18.2811 9.21894 18.2811 9.99999 17.5L12 15.5M12.5 11C11.719 10.219 10.281 10.219 9.5 11M3 12.5H22",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Go=G((function(e,t){return ie("svg",{"data-sanity-icon":"lock",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M15.5 11.5V8.5C15.5 6.5 14 5.5 12.5 5.5C11 5.5 9.5 6.5 9.5 8.5V11.5M7.5 11.5H17.5V19.5H7.5V11.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Yo=G((function(e,t){return ie("svg",{"data-sanity-icon":"logo-js",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 5H5V20H20V5ZM12.5254 16.1572C12.5254 17.4189 11.7742 18.1536 10.4792 18.1536C9.24243 18.1536 8.49121 17.4189 8.45801 16.2942V16.261H9.67407V16.2859C9.69897 16.7466 9.9729 17.0703 10.4626 17.0703C10.9939 17.0703 11.272 16.7507 11.272 16.1489V12.011H12.5254V16.1572ZM18.2893 16.2153C18.2893 17.4023 17.3679 18.1536 15.8738 18.1536C14.4419 18.1536 13.5371 17.4688 13.4666 16.4062L13.4624 16.3398H14.6702L14.6743 16.3813C14.72 16.8296 15.2056 17.1326 15.907 17.1326C16.5752 17.1326 17.0359 16.813 17.0359 16.3523V16.3481C17.0359 15.9539 16.7412 15.7339 15.9983 15.5803L15.3674 15.4517C14.1223 15.1985 13.5869 14.6174 13.5869 13.7085V13.7043C13.5869 12.592 14.5415 11.8574 15.8696 11.8574C17.2683 11.8574 18.0901 12.5962 18.1689 13.5964L18.1731 13.6504H16.9944L16.9861 13.6006C16.9155 13.1731 16.5005 12.8743 15.8696 12.8743C15.2512 12.8784 14.8403 13.1606 14.8403 13.6089V13.613C14.8403 14.0032 15.1309 14.2356 15.8364 14.3809L16.4714 14.5095C17.7373 14.771 18.2893 15.2773 18.2893 16.2112V16.2153Z",fill:"currentColor"})})})),$o=G((function(e,t){return ie("svg",{"data-sanity-icon":"logo-ts",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 5H5V20H20V5ZM11.0769 18H9.82349V13.0444H8.02637V12.011H12.874V13.0444H11.0769V18ZM18.2893 16.2153C18.2893 17.4023 17.3679 18.1536 15.8738 18.1536C14.4419 18.1536 13.5371 17.4688 13.4666 16.4062L13.4624 16.3398H14.6702L14.6743 16.3813C14.72 16.8296 15.2056 17.1326 15.907 17.1326C16.5752 17.1326 17.0359 16.813 17.0359 16.3523V16.3481C17.0359 15.9539 16.7412 15.7339 15.9983 15.5803L15.3674 15.4517C14.1223 15.1985 13.5869 14.6174 13.5869 13.7085V13.7043C13.5869 12.592 14.5415 11.8574 15.8696 11.8574C17.2683 11.8574 18.0901 12.5962 18.1689 13.5964L18.1731 13.6504H16.9944L16.9861 13.6006C16.9155 13.1731 16.5005 12.8743 15.8696 12.8743C15.2512 12.8784 14.8403 13.1606 14.8403 13.6089V13.613C14.8403 14.0032 15.1309 14.2356 15.8364 14.3809L16.4714 14.5095C17.7373 14.771 18.2893 15.2773 18.2893 16.2112V16.2153Z",fill:"currentColor"})})})),Ko=G((function(e,t){return ie("svg",{"data-sanity-icon":"master-detail",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M7 9.5H10M11.5 6.5V18.5M7 12.5H10M13 9.5H18M7 15.5H10M5.5 6.5H19.5V18.5H5.5V6.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Jo=G((function(e,t){return ie("svg",{"data-sanity-icon":"menu",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M6 7.5H19M6 17.5H19M6 12.5H19",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),er=G((function(e,t){return le("svg",{"data-sanity-icon":"mobile-device",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M7.5 6.5C7.5 5.39543 8.39543 4.5 9.5 4.5H15.5C16.6046 4.5 17.5 5.39543 17.5 6.5V18.5C17.5 19.6046 16.6046 20.5 15.5 20.5H9.5C8.39543 20.5 7.5 19.6046 7.5 18.5V6.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M13.5 17.5C13.5 18.0523 13.0523 18.5 12.5 18.5C11.9477 18.5 11.5 18.0523 11.5 17.5C11.5 16.9477 11.9477 16.5 12.5 16.5C13.0523 16.5 13.5 16.9477 13.5 17.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),tr=G((function(e,t){return ie("svg",{"data-sanity-icon":"moon",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M19.6065 16.1775C18.9417 16.387 18.234 16.5 17.5 16.5C13.634 16.5 10.5 13.366 10.5 9.5C10.5 7.54163 11.3042 5.77109 12.6004 4.50062C12.567 4.50021 12.5335 4.5 12.5 4.5C8.08172 4.5 4.5 8.08172 4.5 12.5C4.5 16.9183 8.08172 20.5 12.5 20.5C15.5924 20.5 18.275 18.7454 19.6065 16.1775Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),nr=G((function(e,t){return le("svg",{"data-sanity-icon":"number",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.0165 17.6336H3.83636V16.4336H21.0165V17.6336Z",fill:"currentColor"}),ie("path",{d:"M7.09808 13.3967V7.508H5.74066L3.83636 8.78241V10.091L5.65277 8.88495H5.74066V13.3967H3.84125V14.5539H8.89984V13.3967H7.09808Z",fill:"currentColor"}),ie("path",{d:"M9.81781 9.63202V9.66132H11.1069V9.62714C11.1069 8.95331 11.5756 8.49432 12.2739 8.49432C12.9575 8.49432 13.4018 8.89471 13.4018 9.50507C13.4018 9.9787 13.1528 10.3498 12.1909 11.3117L9.89594 13.5822V14.5539H14.8618V13.3869H11.7807V13.299L13.1577 11.9855C14.3491 10.843 14.7543 10.1838 14.7543 9.41229C14.7543 8.19159 13.7729 7.36639 12.3178 7.36639C10.8383 7.36639 9.81781 8.28436 9.81781 9.63202Z",fill:"currentColor"}),ie("path",{d:"M17.6694 11.4631H18.5092C19.3198 11.4631 19.8422 11.8683 19.8422 12.4982C19.8422 13.1183 19.3295 13.5139 18.5239 13.5139C17.767 13.5139 17.2592 13.133 17.2104 12.5324H15.9262C15.9897 13.8508 17.0248 14.6955 18.5629 14.6955C20.1401 14.6955 21.2192 13.841 21.2192 12.591C21.2192 11.6584 20.6528 11.0334 19.7006 10.9211V10.8332C20.4721 10.6769 20.9457 10.0666 20.9457 9.23651C20.9457 8.12323 19.9741 7.36639 18.5434 7.36639C17.0541 7.36639 16.1118 8.17694 16.0629 9.50018H17.2983C17.3422 8.88007 17.8061 8.48456 18.4995 8.48456C19.2075 8.48456 19.6567 8.85565 19.6567 9.44159C19.6567 10.0324 19.1977 10.4182 18.4946 10.4182H17.6694V11.4631Z",fill:"currentColor"})]})})),or=G((function(e,t){return ie("svg",{"data-sanity-icon":"ok-hand",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M15.9957 11.5C14.8197 10.912 11.9957 9 10.4957 9C8.9957 9 5.17825 11.7674 6 13C7 14.5 9.15134 11.7256 10.4957 12C11.8401 12.2744 13 13.5 13 14.5C13 15.5 11.8401 16.939 10.4957 16.5C9.15134 16.061 8.58665 14.3415 7.4957 14C6.21272 13.5984 5.05843 14.6168 5.5 15.5C5.94157 16.3832 7.10688 17.6006 8.4957 19C9.74229 20.2561 11.9957 21.5 14.9957 20C17.9957 18.5 18.5 16.2498 18.5 13C18.5 11.5 13.7332 5.36875 11.9957 4.5C10.9957 4 10 5 10.9957 6.5C11.614 7.43149 13.5 9.27705 14 10.3751M15.5 8C15.5 8 15.3707 7.5 14.9957 6C14.4957 4 15.9957 3.5 16.4957 4.5C17.1281 5.76491 18.2872 10.9147 18.4957 13",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),rr=G((function(e,t){return ie("svg",{"data-sanity-icon":"olist",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M10 7.5H19M10 12.5H19M10 17.5H19M5 18.5H7.5L7 17.5L7.5 16.5H5M5 6.5H6.5V8.5M5 8.5H6.5M6.5 8.5H8M8 13.5H6L7 11.5H5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),ir=G((function(e,t){return le("svg",{"data-sanity-icon":"overage",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M18.5 11V6.5H14",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M6.5 18.5L9 16L12 13L18.5 6.5M3 13.5H22",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),lr=G((function(e,t){return ie("svg",{"data-sanity-icon":"package",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M12.5 13V22M12.5 13L4.5 8M12.5 13L20.5 8M8.5 5.5L16.5 10.5M4.5 8L12.5 3L20.5 8V17L12.5 22L4.5 17V8Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),ar=G((function(e,t){return le("svg",{"data-sanity-icon":"pause",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M10.5 7.5H8.5V17.5H10.5V7.5Z",fill:"currentColor"}),ie("path",{d:"M16.5 7.5H14.5V17.5H16.5V7.5Z",fill:"currentColor"}),ie("path",{d:"M10.5 7.5H8.5V17.5H10.5V7.5Z",stroke:"currentColor",strokeWidth:1.2}),ie("path",{d:"M16.5 7.5H14.5V17.5H16.5V7.5Z",stroke:"currentColor",strokeWidth:1.2})]})})),sr=G((function(e,t){return le("svg",{"data-sanity-icon":"pin",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M6.5 10.5C6.5 7 9 4.5 12.5 4.5C16 4.5 18.5 7 18.5 10.5C18.5 14 15.5 17.5 12.5 20.5C9.5 17.5 6.5 14 6.5 10.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M14 10.5C14 11.3284 13.3284 12 12.5 12C11.6716 12 11 11.3284 11 10.5C11 9.67157 11.6716 9 12.5 9C13.3284 9 14 9.67157 14 10.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),dr=G((function(e,t){return ie("svg",{"data-sanity-icon":"pin-removed",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M7.39787 14C8.51075 16.2897 10.5054 18.5054 12.5 20.5C14.4946 18.5054 16.4892 16.2897 17.6021 14M6.52009 11C6.50681 10.8334 6.5 10.6667 6.5 10.5C6.5 7 9 4.5 12.5 4.5C16 4.5 18.5 7 18.5 10.5C18.5 10.6667 18.4932 10.8334 18.4799 11M3 12.5H22",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),cr=G((function(e,t){return ie("svg",{"data-sanity-icon":"play",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M7.5 18.5V6.5L17.5 12.5L7.5 18.5Z",fill:"currentColor",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),ur=G((function(e,t){return ie("svg",{"data-sanity-icon":"plug",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M13.25 8.5L16.75 5M16.25 11.5L19.75 8M9.25 15.5L5.25 19.5M7.75 14L9.75 12C8.25 10 8.75 9 9.75 8C10.15 7.6 11.25 6.5 11.25 6.5L18.25 13.5C18.25 13.5 17.3825 14.3675 16.75 15C15.75 16 14.75 16.5 12.75 15L10.75 17L7.75 14Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),hr=G((function(e,t){return ie("svg",{"data-sanity-icon":"presentation",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M10.5 18H5.5V8.5H19.5V18H14.5M10.5 18L9 22M10.5 18H14.5M14.5 18L16 22M4.5 8.5H20.5V6.5H4.5V8.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),pr=G((function(e,t){return le("svg",{"data-sanity-icon":"publish",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M4.99997 5.50006H20M12.5 9.00005V20",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M7.5 14L12.5 9.00006L17.5 14",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),gr=G((function(e,t){return ie("svg",{"data-sanity-icon":"read-only",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M15 7L18 10M10 12L7 15L6 19L10 18L13 15M12 10L17 5L20 8L15 13M19 19L5 5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),mr=G((function(e,t){return ie("svg",{"data-sanity-icon":"remove-circle",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M8 12.4H17M20.5 12.5C20.5 16.9183 16.9183 20.5 12.5 20.5C8.08172 20.5 4.5 16.9183 4.5 12.5C4.5 8.08172 8.08172 4.5 12.5 4.5C16.9183 4.5 20.5 8.08172 20.5 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),fr=G((function(e,t){return ie("svg",{"data-sanity-icon":"remove",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M5 12.5H20",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),wr=G((function(e,t){return ie("svg",{"data-sanity-icon":"reset",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M4.56189 13.5L4.14285 13.9294C4.25676 14.0406 4.41017 14.1019 4.56932 14.1C4.72847 14.098 4.88032 14.0329 4.99144 13.9189L4.56189 13.5ZM9.92427 15.9243L15.9243 9.92427L15.0757 9.07574L9.07574 15.0757L9.92427 15.9243ZM9.07574 9.92426L15.0757 15.9243L15.9243 15.0757L9.92426 9.07574L9.07574 9.92426ZM19.9 12.5C19.9 16.5869 16.5869 19.9 12.5 19.9V21.1C17.2496 21.1 21.1 17.2496 21.1 12.5H19.9ZM5.1 12.5C5.1 8.41309 8.41309 5.1 12.5 5.1V3.9C7.75035 3.9 3.9 7.75035 3.9 12.5H5.1ZM12.5 5.1C16.5869 5.1 19.9 8.41309 19.9 12.5H21.1C21.1 7.75035 17.2496 3.9 12.5 3.9V5.1ZM5.15728 13.4258C5.1195 13.1227 5.1 12.8138 5.1 12.5H3.9C3.9 12.8635 3.92259 13.2221 3.9665 13.5742L5.15728 13.4258ZM12.5 19.9C9.9571 19.9 7.71347 18.6179 6.38048 16.6621L5.38888 17.3379C6.93584 19.6076 9.54355 21.1 12.5 21.1V19.9ZM4.99144 13.9189L7.42955 11.4189L6.57045 10.5811L4.13235 13.0811L4.99144 13.9189ZM4.98094 13.0706L2.41905 10.5706L1.58095 11.4294L4.14285 13.9294L4.98094 13.0706Z",fill:"currentColor"})})})),vr=G((function(e,t){return le("svg",{"data-sanity-icon":"restore",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M5.88468 17C7.32466 19.1128 9.75033 20.5 12.5 20.5C16.9183 20.5 20.5 16.9183 20.5 12.5C20.5 8.08172 16.9183 4.5 12.5 4.5C8.08172 4.5 4.5 8.08172 4.5 12.5V13.5M12.5 8V12.5L15.5 15.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M7 11L4.5 13.5L2 11",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Cr=G((function(e,t){return le("svg",{"data-sanity-icon":"retrieve",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M16 14L12.5 10.5L9 14M5.5 7.5H19.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M12.5 10.5L12.5 17.5M19.5 7.5V19.5H5.5V7.5L7.5 5.5H17.5L19.5 7.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),yr=G((function(e,t){return le("svg",{"data-sanity-icon":"retry",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M20 9L10 9C7.51472 9 5.5 11.0147 5.5 13.5C5.5 15.9853 7.51472 18 10 18H20",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M16 13L20 9L16 5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),kr=G((function(e,t){return le("svg",{"data-sanity-icon":"revert",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M5 9L15 9C17.4853 9 19.5 11.0147 19.5 13.5C19.5 15.9853 17.4853 18 15 18H5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M9 13L5 9L9 5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Lr=G((function(e,t){return ie("svg",{"data-sanity-icon":"robot",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M12.5 15.5V17.5M12.5 8.5V6.5M12.5 6.5C13.3284 6.5 14 5.82843 14 5C14 4.17157 13.3284 3.5 12.5 3.5C11.6716 3.5 11 4.17157 11 5C11 5.82843 11.6716 6.5 12.5 6.5ZM20.5 20.5V19.5C20.5 18.3954 19.6046 17.5 18.5 17.5H6.5C5.39543 17.5 4.5 18.3954 4.5 19.5V20.5H20.5ZM11.5 12C11.5 12.5523 11.0523 13 10.5 13C9.94772 13 9.5 12.5523 9.5 12C9.5 11.4477 9.94772 11 10.5 11C11.0523 11 11.5 11.4477 11.5 12ZM15.5 12C15.5 12.5523 15.0523 13 14.5 13C13.9477 13 13.5 12.5523 13.5 12C13.5 11.4477 13.9477 11 14.5 11C15.0523 11 15.5 11.4477 15.5 12ZM8.5 15.5H16.5C17.6046 15.5 18.5 14.6046 18.5 13.5V10.5C18.5 9.39543 17.6046 8.5 16.5 8.5H8.5C7.39543 8.5 6.5 9.39543 6.5 10.5V13.5C6.5 14.6046 7.39543 15.5 8.5 15.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Mr=G((function(e,t){return ie("svg",{"data-sanity-icon":"rocket",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M12.5 20.5L15.5 14M11 9.49999L4.5 12.5M9 14C9 14 7.54688 14.9531 6.5 16C5.5 17 4.5 20.5 4.5 20.5C4.5 20.5 8 19.5 9 18.5C10 17.5 11 16 11 16M9 14C9 14 10.1 9.9 12.5 7.5C15.5 4.5 20.5 4.5 20.5 4.5C20.5 4.5 20.5 9.5 17.5 12.5C15.7492 14.2508 11 16 11 16L9 14ZM16.5 9.99999C16.5 10.8284 15.8284 11.5 15 11.5C14.1716 11.5 13.5 10.8284 13.5 9.99999C13.5 9.17157 14.1716 8.49999 15 8.49999C15.8284 8.49999 16.5 9.17157 16.5 9.99999Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),xr=G((function(e,t){return ie("svg",{"data-sanity-icon":"schema",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M12.5 9.5V12.5M12.5 12.5H8.5V15.5M12.5 12.5H16.5V15.5M10.5 5.5H14.5V9.5H10.5V5.5ZM6.5 15.5H10.5V19.5H6.5V15.5ZM14.5 15.5H18.5V19.5H14.5V15.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),br=G((function(e,t){return ie("svg",{"data-sanity-icon":"search",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M15.0355 15.0355L19 19M16.5 11.5C16.5 14.2614 14.2614 16.5 11.5 16.5C8.73858 16.5 6.5 14.2614 6.5 11.5C6.5 8.73858 8.73858 6.5 11.5 6.5C14.2614 6.5 16.5 8.73858 16.5 11.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Hr=G((function(e,t){return ie("svg",{"data-sanity-icon":"select",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M16.5 15.5L12.5 19.5L8.5 15.5M8.5 9.5L12.5 5.5L16.5 9.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Vr=G((function(e,t){return le("svg",{"data-sanity-icon":"share",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M15 9.5H18.5V19.5H6.5L6.5 9.5H10M12.5 16V3.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M9.5 6.5L12.5 3.5L15.5 6.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Ir=G((function(e,t){return ie("svg",{"data-sanity-icon":"sort",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M8.5 18.5V6M16.5 19V6.5M12 15L8.5 18.5L5 15M13 10L16.5 6.5L20 10",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),jr=G((function(e,t){return ie("svg",{"data-sanity-icon":"sparkle",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M10.5 10.5C8.5 12.5 5 12.5 5 12.5C5 12.5 8.5 12.5 10.5 14.5C12.5 16.5 12.5 20 12.5 20C12.5 20 12.5 16.5 14.5 14.5C16.5 12.5 20 12.5 20 12.5C20 12.5 16.5 12.5 14.5 10.5C12.5 8.5 12.5 5 12.5 5C12.5 5 12.5 8.5 10.5 10.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Zr=G((function(e,t){return ie("svg",{"data-sanity-icon":"sparkles",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M11 3.5V5M11 5V6.5M11 5H12.5M11 5H9.5M9.5 15C9.5 15 12.2308 14.7692 13.5 13.5C14.7692 12.2308 15 9.5 15 9.5C15 9.5 15.2308 12.2308 16.5 13.5C17.7692 14.7692 20.5 15 20.5 15C20.5 15 17.7692 15.2308 16.5 16.5C15.2308 17.7692 15 20.5 15 20.5C15 20.5 14.7692 17.7692 13.5 16.5C12.2308 15.2308 9.5 15 9.5 15ZM4.5 10C4.5 10 5.72308 9.87692 6.3 9.3C6.87692 8.72308 7 7.5 7 7.5C7 7.5 7.12308 8.72308 7.7 9.3C8.27692 9.87692 9.5 10 9.5 10C9.5 10 8.27692 10.1231 7.7 10.7C7.12308 11.2769 7 12.5 7 12.5C7 12.5 6.87692 11.2769 6.3 10.7C5.72308 10.1231 4.5 10 4.5 10Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})})})),Tr=G((function(e,t){return ie("svg",{"data-sanity-icon":"spinner",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M4.5 12.5C4.5 16.9183 8.08172 20.5 12.5 20.5C16.9183 20.5 20.5 16.9183 20.5 12.5C20.5 8.08172 16.9183 4.5 12.5 4.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Wr=G((function(e,t){return ie("svg",{"data-sanity-icon":"split-horizontal",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M19.5 10.5V20.5H5.5V10.5M19.5 10.5H5.5M19.5 10.5V4.5H5.5V10.5M12.5 13V15.5M12.5 18V15.5M12.5 15.5H15M12.5 15.5H10",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Br=G((function(e,t){return ie("svg",{"data-sanity-icon":"split-vertical",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M10.5 5.5V19.5M13 12.5H15.5M18 12.5H15.5M15.5 12.5V15M15.5 12.5V10M4.5 5.5H20.5V19.5H4.5V5.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),_r=G((function(e,t){return ie("svg",{"data-sanity-icon":"square",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("rect",{x:5.5,y:5.5,width:14,height:14,stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Rr=G((function(e,t){return ie("svg",{"data-sanity-icon":"stack-compact",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M5.5 15.5V18.5H19.5V15.5M5.5 15.5H19.5M5.5 15.5V9.5M19.5 15.5V9.5M5.5 9.5V6.5H19.5V9.5M5.5 9.5H19.5M5.5 12.5H19.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Sr=G((function(e,t){return ie("svg",{"data-sanity-icon":"stack",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M5.5 12.5H19.5M5.5 18.5H19.5V6.5H5.5V18.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),zr=G((function(e,t){return ie("svg",{"data-sanity-icon":"star",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M13 4L15.2747 9.8691L21.5595 10.2188L16.6806 14.1959L18.2901 20.2812L13 16.87L7.70993 20.2812L9.31941 14.1959L4.44049 10.2188L10.7253 9.8691L13 4Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Er=G((function(e,t){return ie("svg",{"data-sanity-icon":"stop",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("rect",{x:7.5,y:7.5,width:10,height:10,fill:"currentColor",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Ar=G((function(e,t){return le("svg",{"data-sanity-icon":"strikethrough",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M12.5656 7.73438C11.0656 7.73438 10.0734 8.48438 10.0734 9.625C10.0734 10.2317 10.3649 10.6613 11.0519 11H8.90358C8.71703 10.6199 8.62813 10.1801 8.62813 9.67188C8.62813 7.75781 10.2297 6.46094 12.6125 6.46094C14.7922 6.46094 16.4172 7.75781 16.5344 9.57812H15.1203C14.925 8.42188 13.9719 7.73438 12.5656 7.73438Z",fill:"currentColor"}),ie("path",{d:"M12.4875 18.2656C10.0969 18.2656 8.44844 17 8.3 15.0547H9.72188C9.89375 16.2344 11.0188 16.9844 12.6203 16.9844C14.1359 16.9844 15.2531 16.1641 15.2531 15.0469C15.2531 14.6375 15.1255 14.292 14.8589 14H16.5912C16.6638 14.266 16.6984 14.5566 16.6984 14.875C16.6984 16.9453 15.0656 18.2656 12.4875 18.2656Z",fill:"currentColor"}),ie("path",{d:"M7 13.1H18V11.9H7V13.1Z",fill:"currentColor"})]})})),qr=G((function(e,t){return le("svg",{"data-sanity-icon":"string",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M11.6748 15.5227H13.1855L9.87842 6.36304H8.34863L5.0415 15.5227H6.50146L7.3457 13.0916H10.8369L11.6748 15.5227ZM9.04053 8.02612H9.14844L10.4751 11.8982H7.70752L9.04053 8.02612Z",fill:"currentColor"}),ie("path",{d:"M16.8101 14.488C16.0674 14.488 15.5278 14.1262 15.5278 13.5042C15.5278 12.8948 15.9595 12.571 16.9116 12.5076L18.6001 12.3997V12.9773C18.6001 13.8342 17.8384 14.488 16.8101 14.488ZM16.4609 15.637C17.3687 15.637 18.124 15.2434 18.5366 14.5515H18.6445V15.5227H19.9585V10.8C19.9585 9.34009 18.981 8.47681 17.248 8.47681C15.6802 8.47681 14.563 9.23853 14.4233 10.4255H15.7437C15.896 9.93677 16.4229 9.65747 17.1846 9.65747C18.1177 9.65747 18.6001 10.0701 18.6001 10.8V11.3967L16.7275 11.5046C15.0835 11.6062 14.1567 12.3235 14.1567 13.5676C14.1567 14.8308 15.1279 15.637 16.4609 15.637Z",fill:"currentColor"}),ie("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.9585 18.637L5.0415 18.637V17.437L19.9585 17.437V18.637Z",fill:"currentColor"})]})})),Dr=G((function(e,t){return ie("svg",{"data-sanity-icon":"sun",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M19 12.5H22M3 12.5H6M12.5 6V3M12.5 22V19M17.3891 7.61091L19.5104 5.48959M5.48959 19.5104L7.61091 17.3891M7.61091 7.61091L5.48959 5.48959M19.5104 19.5104L17.3891 17.3891M16 12.5C16 14.433 14.433 16 12.5 16C10.567 16 9 14.433 9 12.5C9 10.567 10.567 9 12.5 9C14.433 9 16 10.567 16 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Or=G((function(e,t){return le("svg",{"data-sanity-icon":"sync",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M13.5 4.5H12.5C8.08172 4.5 4.5 8.08172 4.5 12.5C4.5 15.6631 6.33576 18.3975 9 19.6958M11.5 20.5H12.5C16.9183 20.5 20.5 16.9183 20.5 12.5C20.5 9.33688 18.6642 6.60253 16 5.30423",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M14 17.5619L11.5 20.5L14.5 23.0619M11 7.43811L13.5 4.50001L10.5 1.93811",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Fr=G((function(e,t){return le("svg",{"data-sanity-icon":"tag",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M12.5 20L5 20L5 12.5L12.5 5L20 12.5L12.5 20Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M11 15.5C11 16.3284 10.3284 17 9.5 17C8.67157 17 8 16.3284 8 15.5C8 14.6716 8.67157 14 9.5 14C10.3284 14 11 14.6716 11 15.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Ur=G((function(e,t){return ie("svg",{"data-sanity-icon":"tags",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M12.1562 7.93179L13.9717 6.11633L20.3553 12.5L13.9717 18.8836L10.6855 18.8836M11.0283 18.8836L17.4119 12.5L11.0283 6.11633L4.64462 12.5L4.64462 18.8836L11.0283 18.8836ZM9.75153 15.0534C9.75153 15.7585 9.17992 16.3302 8.47481 16.3302C7.76969 16.3302 7.19808 15.7585 7.19808 15.0534C7.19808 14.3483 7.76969 13.7767 8.47481 13.7767C9.17992 13.7767 9.75153 14.3483 9.75153 15.0534Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Pr=G((function(e,t){return ie("svg",{"data-sanity-icon":"terminal",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M8.5 9.5L11.5 12.5L8.5 15.5M13 15.5H17M5.5 6.5H19.5V18.5H5.5V6.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Nr=G((function(e,t){return ie("svg",{"data-sanity-icon":"th-large",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M12.5 6.5V12.5M12.5 12.5V18.5M12.5 12.5H20.5M12.5 12.5H4.5M4.5 6.5H20.5V18.5H4.5V6.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Qr=G((function(e,t){return ie("svg",{"data-sanity-icon":"th-list",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M9.5 6.5V10.5M9.5 10.5V14.5M9.5 10.5H20.5M9.5 10.5H4.5M9.5 14.5V18.5M9.5 14.5H20.5M9.5 14.5H4.5M4.5 6.5H20.5V18.5H4.5V6.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Xr=G((function(e,t){return ie("svg",{"data-sanity-icon":"tiers",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M16.5 14.5L20.5 16.5L12.5 20.5L4.5 16.5L8.5 14.5M16.5 10.5L20.5 12.5L12.5 16.5L4.5 12.5L8.5 10.5M12.5 12.5L20.5 8.5L12.5 4.5L4.5 8.5L12.5 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),Gr=G((function(e,t){return ie("svg",{"data-sanity-icon":"toggle-arrow-right",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M10 16.5V8.5L16 12.5L10 16.5Z",fill:"currentColor",stroke:"currentColor",strokeLinejoin:"round"})})})),Yr=G((function(e,t){return ie("svg",{"data-sanity-icon":"token",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M17.5711 12.5C17.5711 15.2614 15.3325 17.5 12.5711 17.5M7.57107 12.5C7.57107 9.73858 9.80964 7.5 12.5711 7.5M20.5 12.5C20.5 16.9183 16.9183 20.5 12.5 20.5C8.08172 20.5 4.5 16.9183 4.5 12.5C4.5 8.08172 8.08172 4.5 12.5 4.5C16.9183 4.5 20.5 8.08172 20.5 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),$r=G((function(e,t){return le("svg",{"data-sanity-icon":"transfer",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M19.5 16.5H6M5.5 8.5L19 8.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M16 13L19.5 16.5L16 20M9 12L5.5 8.5L9 5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),Kr=G((function(e,t){return ie("svg",{"data-sanity-icon":"translate",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.4 5.4H4V6.6H13.2189C13.1612 6.78478 13.0895 6.99578 13.0025 7.22211C12.7032 8.00031 12.2402 8.91125 11.5757 9.57574L10 11.1515L9.42426 10.5757C8.72102 9.8725 8.25297 9.16987 7.96199 8.64611C7.81668 8.38455 7.71617 8.16874 7.65305 8.02146C7.62151 7.94787 7.59937 7.89154 7.5857 7.85534C7.57886 7.83725 7.57415 7.8242 7.57144 7.81657L7.56886 7.80922C7.56886 7.80922 7.56921 7.81026 7 8C6.43079 8.18974 6.43091 8.19009 6.43091 8.19009L6.43133 8.19135L6.43206 8.19351L6.4341 8.19948L6.44052 8.21786C6.44587 8.23292 6.45336 8.25357 6.46313 8.27942C6.48266 8.33112 6.5113 8.40369 6.55008 8.49416C6.62758 8.67501 6.74582 8.92795 6.91301 9.22889C7.24703 9.83013 7.77898 10.6275 8.57574 11.4243L9.15147 12L4.57964 16.5718L4.57655 16.5749L4.57577 16.5757L5.4243 17.4242L5.42688 17.4216L10.0368 12.8117L12.6159 14.9609L13.3841 14.0391L10.8888 11.9597L12.4243 10.4243C13.2598 9.58875 13.7968 8.49969 14.1225 7.65289C14.2818 7.23863 14.395 6.87072 14.4696 6.6H16V5.4H10.6V4H9.4V5.4ZM17.4405 10L21.553 19.7672H20.2509L19.1279 17.1H14.8721L13.7491 19.7672H12.447L16.5595 10H17.4405ZM15.3773 15.9H18.6227L17 12.0462L15.3773 15.9Z",fill:"currentColor"})})})),Jr=G((function(e,t){return ie("svg",{"data-sanity-icon":"trash",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M5 6.5H20M10 6.5V4.5C10 3.94772 10.4477 3.5 11 3.5H14C14.5523 3.5 15 3.94772 15 4.5V6.5M12.5 9V17M15.5 9L15 17M9.5 9L10 17M18.5 6.5L17.571 18.5767C17.5309 19.0977 17.0965 19.5 16.574 19.5H8.42603C7.90349 19.5 7.46905 19.0977 7.42898 18.5767L6.5 6.5H18.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),ei=G((function(e,t){return le("svg",{"data-sanity-icon":"trend-upward",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M4.5 18.5L11.5 10.5L13.5 14.5L20.5 6.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M20.5 11V6.5H16",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),ti=G((function(e,t){return ie("svg",{"data-sanity-icon":"triangle-outline",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M20.5 18.5H4.5L12.5 5.5L20.5 18.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),ni=G((function(e,t){return ie("svg",{"data-sanity-icon":"trolley",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M8 17.5L5.81763 6.26772C5.71013 5.81757 5.30779 5.5 4.84498 5.5H3M8 17.5H17M8 17.5C8.82843 17.5 9.5 18.1716 9.5 19C9.5 19.8284 8.82843 20.5 8 20.5C7.17157 20.5 6.5 19.8284 6.5 19C6.5 18.1716 7.17157 17.5 8 17.5ZM17 17.5C17.8284 17.5 18.5 18.1716 18.5 19C18.5 19.8284 17.8284 20.5 17 20.5C16.1716 20.5 15.5 19.8284 15.5 19C15.5 18.1716 16.1716 17.5 17 17.5ZM7.78357 14.5H17.5L19 7.5H6",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),oi=G((function(e,t){return ie("svg",{"data-sanity-icon":"truncate",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M5 12.5H20M8.5 19.5L12.5 15.5L16.5 19.5M16.5 5.5L12.5 9.5L8.5 5.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),ri=G((function(e,t){return ie("svg",{"data-sanity-icon":"twitter",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M18.8738 6.65751C18.1994 5.9447 17.2445 5.5 16.1857 5.5C14.1423 5.5 12.4857 7.15655 12.4857 9.2C12.4857 9.55263 12.535 9.89374 12.6272 10.2168C7.0826 9.56422 4.55703 6.02857 4.55703 6.02857C4.55703 6.02857 4.02846 9.2 6.14274 11.3143C5.08571 11.3143 4.55703 10.7857 4.55703 10.7857C4.55703 10.7857 4.55703 13.4286 7.19989 14.4857C6.67143 15.0143 5.61417 14.4857 5.61417 14.4857C5.97533 15.9303 7.45606 16.8562 8.82133 17.1358C6.67298 19.1676 3.5 18.7143 3.5 18.7143C5.14562 19.771 7.21334 20.3 9.31429 20.3C16.1214 20.3 19.8162 15.6315 19.8848 9.37762C20.8722 8.58943 22 7.08571 22 7.08571C22 7.08571 21.277 7.45458 19.6913 7.98315C21.277 6.92601 21.4714 5.5 21.4714 5.5C21.4714 5.5 20.4135 6.55789 18.8738 6.65751Z",fill:"currentColor"})})})),ii=G((function(e,t){return le("svg",{"data-sanity-icon":"ulist",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M7.10153 17.5001C7.10153 17.8323 6.83221 18.1016 6.5 18.1016C6.16778 18.1016 5.89847 17.8323 5.89847 17.5001C5.89847 17.1678 6.16778 16.8985 6.5 16.8985C6.83221 16.8985 7.10153 17.1678 7.10153 17.5001Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M7.10153 7.5C7.10153 7.83221 6.83221 8.10153 6.5 8.10153C6.16778 8.10153 5.89847 7.83221 5.89847 7.5C5.89847 7.16778 6.16778 6.89847 6.5 6.89847C6.83221 6.89847 7.10153 7.16778 7.10153 7.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M7.10153 12.5C7.10153 12.8322 6.83221 13.1015 6.5 13.1015C6.16778 13.1015 5.89847 12.8322 5.89847 12.5C5.89847 12.1678 6.16778 11.8985 6.5 11.8985C6.83221 11.8985 7.10153 12.1678 7.10153 12.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M10 7.5H19M10 17.5H19M10 12.5H19",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),li=G((function(e,t){return le("svg",{"data-sanity-icon":"underline",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M9.52791 7.11407H8.17V14.2582C8.17 16.5817 9.79195 18.2565 12.4927 18.2565C15.1934 18.2565 16.8154 16.5817 16.8154 14.2582V7.11407H15.4574V14.1677C15.4574 15.8122 14.3787 17.0042 12.4927 17.0042C10.6067 17.0042 9.52791 15.8122 9.52791 14.1677V7.11407Z",fill:"currentColor"}),ie("path",{d:"M7 20.5H18",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),ai=G((function(e,t){return le("svg",{"data-sanity-icon":"undo",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M5.88468 17C7.32466 19.1128 9.75033 20.5 12.5 20.5C16.9183 20.5 20.5 16.9183 20.5 12.5C20.5 8.08172 16.9183 4.5 12.5 4.5C8.08172 4.5 4.5 8.08172 4.5 12.5V13.5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M7 11L4.5 13.5L2 11",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),si=G((function(e,t){return ie("svg",{"data-sanity-icon":"unknown",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M12.5 13C12.5 11 14 11.5 14 10C14 9.34375 13.5 8.5 12.5 8.5C11.5 8.5 11 9 10.5 9.5M12.5 16V14.5M5.5 5.5H19.5V19.5H5.5V5.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),di=G((function(e,t){return ie("svg",{"data-sanity-icon":"unlock",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M9.5 11.5V8.5C9.5 6.5 8 5.5 6.5 5.5C5 5.5 3.5 6.5 3.5 8.5V11.5M7.5 11.5H17.5V19.5H7.5V11.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),ci=G((function(e,t){return le("svg",{"data-sanity-icon":"unpublish",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M5 19.5H20M12.5 16V5",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M17.5 11L12.5 16L7.5 11",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),ui=G((function(e,t){return le("svg",{"data-sanity-icon":"upload",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:[ie("path",{d:"M12.5 6.00003V15.5M5.5 15.5H19.5V19.5H5.5V15.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"}),ie("path",{d:"M7.5 11L12.5 6.00003L17.5 11",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})]})})),hi=G((function(e,t){return ie("svg",{"data-sanity-icon":"user",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M8 14.5C7 15 5.5 16 5.5 19.5H19.5C19.5 16 18.3416 15.1708 17 14.5C16 14 14 14 14 12.5C14 11 15 10.25 15 8.25C15 6.25 14 5.25 12.5 5.25C11 5.25 10 6.25 10 8.25C10 10.25 11 11 11 12.5C11 14 9 14 8 14.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),pi=G((function(e,t){return ie("svg",{"data-sanity-icon":"users",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M17.5 18.5H21.5C21.5 15 20.8416 14.1708 19.5 13.5C18.5 13 16.5 12.5 16.5 11C16.5 9.5 17.5 9 17.5 7C17.5 5 16.5 4 15 4C13.6628 4 12.723 4.79472 12.5347 6.38415M4.5 20.5C4.5 17 5.5 16 6.5 15.5C7.5 15 9.5 14.5 9.5 13C9.5 11.5 8.5 11 8.5 9C8.5 7 9.5 6 11 6C12.5 6 13.5 7 13.5 9C13.5 11 12.5 11.5 12.5 13C12.5 14.5 14.5 15 15.5 15.5C16.8416 16.1708 17.5 17 17.5 20.5H4.5Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),gi=G((function(e,t){return ie("svg",{"data-sanity-icon":"warning-filled",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.741 5.12637C13.7357 3.41737 11.2643 3.41737 10.259 5.12637L3.7558 16.1818C2.73624 17.915 3.98595 20.1 5.99683 20.1H19.0032C21.014 20.1 22.2637 17.915 21.2442 16.1818L14.741 5.12637ZM11.9 9V13H13.1V9H11.9ZM13.1 16V14.5H11.9V16H13.1Z",fill:"currentColor"})})})),mi=G((function(e,t){return ie("svg",{"data-sanity-icon":"warning-outline",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M12.5 9V13M12.5 16V14.5M14.2239 5.43058L20.727 16.486C21.5113 17.8192 20.55 19.5 19.0032 19.5H5.99683C4.45 19.5 3.48869 17.8192 4.27297 16.486L10.7761 5.43058C11.5494 4.11596 13.4506 4.11596 14.2239 5.43058Z",stroke:"currentColor",strokeWidth:1.2,strokeLinejoin:"round"})})})),fi=G((function(e,t){return ie("svg",{"data-sanity-icon":"wrench",width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:ie("path",{d:"M17.0407 5.14624L17.4649 5.57051C17.6166 5.41887 17.6757 5.19783 17.6202 4.99071C17.5646 4.78359 17.4027 4.62189 17.1955 4.56656L17.0407 5.14624ZM14.4013 7.7856L13.977 7.36134C13.8288 7.50959 13.7687 7.72447 13.8185 7.92813L14.4013 7.7856ZM12.8778 6.26211L12.4535 5.83784V5.83784L12.8778 6.26211ZM11.8309 10.6568L12.2552 11.0811C12.4152 10.9211 12.4716 10.6847 12.401 10.4697L11.8309 10.6568ZM5.63925 16.8485L5.21498 16.4242H5.21498L5.63925 16.8485ZM5.63925 19.935L6.06351 19.5108H6.06351L5.63925 19.935ZM8.72581 19.935L9.15007 20.3593L8.72581 19.935ZM15.1184 13.5425L15.2301 12.953C15.0351 12.916 14.8344 12.9779 14.6941 13.1182L15.1184 13.5425ZM18.9718 12.3561L19.3961 12.7804L18.9718 12.3561ZM20.0877 8.19324L20.6674 8.03843C20.612 7.83125 20.4503 7.66934 20.2432 7.61375C20.0361 7.55816 19.815 7.61734 19.6634 7.76898L20.0877 8.19324ZM17.4483 10.8326L17.3058 11.4154C17.5094 11.4652 17.7243 11.4051 17.8726 11.2569L17.4483 10.8326ZM15 10.2339L14.4172 10.3764C14.4704 10.5938 14.6401 10.7635 14.8575 10.8167L15 10.2339ZM16.6164 4.72198L13.977 7.36134L14.8256 8.20986L17.4649 5.57051L16.6164 4.72198ZM13.3021 6.68637C14.2723 5.71612 15.6467 5.39501 16.8859 5.72593L17.1955 4.56656C15.5595 4.12966 13.7389 4.55245 12.4535 5.83784L13.3021 6.68637ZM12.401 10.4697C11.9779 9.18109 12.2794 7.70907 13.3021 6.68637L12.4535 5.83784C11.0985 7.19284 10.7021 9.14218 11.2608 10.844L12.401 10.4697ZM11.4066 10.2326L5.21498 16.4242L6.06351 17.2727L12.2552 11.0811L11.4066 10.2326ZM5.21498 16.4242C4.12834 17.5109 4.12834 19.2727 5.21498 20.3593L6.06351 19.5108C5.4455 18.8928 5.4455 17.8908 6.06351 17.2727L5.21498 16.4242ZM5.21498 20.3593C6.30163 21.446 8.06343 21.446 9.15007 20.3593L8.30155 19.5108C7.68353 20.1288 6.68153 20.1288 6.06351 19.5108L5.21498 20.3593ZM9.15007 20.3593L15.5426 13.9668L14.6941 13.1182L8.30155 19.5108L9.15007 20.3593ZM18.5475 11.9318C17.6463 12.8331 16.3968 13.1742 15.2301 12.953L15.0066 14.132C16.5466 14.4239 18.2023 13.9741 19.3961 12.7804L18.5475 11.9318ZM19.508 8.34804C19.8389 9.58721 19.5178 10.9616 18.5475 11.9318L19.3961 12.7804C20.6815 11.495 21.1043 9.67445 20.6674 8.03843L19.508 8.34804ZM17.8726 11.2569L20.5119 8.6175L19.6634 7.76898L17.024 10.4083L17.8726 11.2569ZM14.8575 10.8167L17.3058 11.4154L17.5908 10.2498L15.1426 9.65106L14.8575 10.8167ZM13.8185 7.92813L14.4172 10.3764L15.5829 10.0914L14.9841 7.64307L13.8185 7.92813Z",fill:"currentColor"})})})),wi={"access-denied":Pt,activity:Nt,"add-circle":Qt,add:Xt,api:Gt,archive:Yt,"arrow-down":$t,"arrow-left":Kt,"arrow-right":Jt,"arrow-top-right":en,"arrow-up":tn,"bar-chart":nn,basket:on,bell:rn,bill:ln,"binary-document":an,"block-content":sn,"block-element":dn,blockquote:cn,bold:un,book:hn,bottle:pn,"bulb-filled":gn,"bulb-outline":mn,calendar:fn,case:wn,"chart-upward":vn,"checkmark-circle":Cn,checkmark:yn,"chevron-down":kn,"chevron-left":Ln,"chevron-right":Mn,"chevron-up":xn,circle:bn,clipboard:Hn,"clipboard-image":Vn,clock:In,"close-circle":jn,close:Zn,"code-block":Tn,code:Wn,cog:Bn,collapse:_n,"color-wheel":Rn,comment:Sn,component:zn,compose:En,controls:An,copy:qn,"credit-card":Dn,crop:On,dashboard:Fn,database:Un,desktop:Pn,document:Nn,"document-pdf":Qn,"document-remove":Xn,"document-sheet":Gn,"document-text":Yn,"document-video":$n,"document-word":Kn,"document-zip":Jn,documents:eo,dot:to,"double-chevron-down":no,"double-chevron-left":oo,"double-chevron-right":ro,"double-chevron-up":io,download:lo,"drag-handle":ao,drop:so,"earth-americas":co,"earth-globe":uo,edit:ho,"ellipsis-horizontal":po,"ellipsis-vertical":go,enter:mo,"enter-right":fo,envelope:wo,equal:vo,"error-filled":Co,"error-outline":yo,expand:ko,"eye-closed":Lo,"eye-open":Mo,filter:xo,folder:bo,generate:Ho,groq:Vo,"heart-filled":Io,heart:jo,"help-circle":Zo,home:To,"ice-cream":Wo,image:Bo,"image-remove":_o,images:Ro,"info-filled":So,"info-outline":zo,"inline-element":Eo,inline:Ao,"insert-above":qo,"insert-below":Do,italic:Oo,joystick:Fo,launch:Uo,leave:Po,lemon:No,link:Qo,"link-removed":Xo,lock:Go,"logo-js":Yo,"logo-ts":$o,"master-detail":Ko,menu:Jo,"mobile-device":er,moon:tr,number:nr,"ok-hand":or,olist:rr,overage:ir,package:lr,pause:ar,pin:sr,"pin-removed":dr,play:cr,plug:ur,presentation:hr,publish:pr,"read-only":gr,"remove-circle":mr,remove:fr,reset:wr,restore:vr,retrieve:Cr,retry:yr,revert:kr,robot:Lr,rocket:Mr,schema:xr,search:br,select:Hr,share:Vr,sort:Ir,sparkle:jr,sparkles:Zr,spinner:Tr,"split-horizontal":Wr,"split-vertical":Br,square:_r,"stack-compact":Rr,stack:Sr,star:zr,stop:Er,strikethrough:Ar,string:qr,sun:Dr,sync:Or,tag:Fr,tags:Ur,terminal:Pr,"th-large":Nr,"th-list":Qr,tiers:Xr,"toggle-arrow-right":Gr,token:Yr,transfer:$r,translate:Kr,trash:Jr,"trend-upward":ei,"triangle-outline":ti,trolley:ni,truncate:oi,twitter:ri,ulist:ii,underline:li,undo:ai,unknown:si,unlock:di,unpublish:ci,upload:ui,user:hi,users:pi,"warning-filled":gi,"warning-outline":mi,wrench:fi},vi=G((function(e,t){const{symbol:n,...o}=e,r=wi[n];return r?Y(r,{...o,ref:t}):null})),Ci=(e,t)=>{const n=$(!1),o=K((o=>{Fe(e,o)&&(n.current=!0,t&&t())}),[e,t]),r=K((()=>{n.current=!1}),[]);return J((()=>(window.addEventListener("keydown",o),window.addEventListener("keyup",r),()=>{window.removeEventListener("keydown",o),window.removeEventListener("keyup",r)})),[o,r]),n},yi={type:"divider"},ki={altText:{assetTypes:["file","image"],field:"altText",name:"altText",operatorType:"empty",operatorTypes:["empty","notEmpty",null,"includes","doesNotInclude"],title:"Alt text",type:"string",value:""},description:{assetTypes:["file","image"],field:"description",name:"description",operatorType:"empty",operatorTypes:["empty","notEmpty",null,"includes","doesNotInclude"],title:"Description",type:"string",value:""},fileName:{assetTypes:["file","image"],field:"originalFilename",name:"filename",operatorType:"includes",operatorTypes:["includes","doesNotInclude"],title:"File name",type:"string",value:""},height:{assetTypes:["image"],field:"metadata.dimensions.height",name:"height",operatorType:"greaterThan",operatorTypes:["greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo",null,"equalTo"],title:"Height",type:"number",value:400},inCurrentDocument:{assetTypes:["file","image"],name:"inCurrentDocument",operatorType:"is",options:[{name:"true",title:"True",value:Ue(e||(e=D(["_id in $documentAssetIds"])))},{name:"false",title:"False",value:Ue(t||(t=D(["!(_id in $documentAssetIds)"])))}],selectOnly:!0,title:"In use in current document",type:"select",value:"true"},inUse:{assetTypes:["file","image"],name:"inUse",operatorType:"is",options:[{name:"true",title:"True",value:Ue(n||(n=D(["count(*[references(^._id)]) > 0"])))},{name:"false",title:"False",value:Ue(o||(o=D(["count(*[references(^._id)]) == 0"])))}],title:"In use",type:"select",value:"true"},isOpaque:{assetTypes:["image"],field:"metadata.isOpaque",name:"isOpaque",operatorType:"equalTo",options:[{name:"true",title:"True",value:"false"},{name:"false",title:"False",value:"true"}],title:"Has transparency",type:"select",value:"true"},orientation:{assetTypes:["image"],name:"orientation",operatorType:"is",operatorTypes:["is","isNot"],options:[{name:"portrait",title:"Portrait",value:"metadata.dimensions.aspectRatio < 1"},{name:"landscape",title:"Landscape",value:"metadata.dimensions.aspectRatio > 1"},{name:"square",title:"Square",value:"metadata.dimensions.aspectRatio == 1"}],title:"Orientation",type:"select",value:"portrait"},size:{assetTypes:["file","image"],field:"size",modifier:"kb",modifiers:[{name:"kb",title:"KB",fieldModifier:e=>"round(".concat(e," / 1000)")},{name:"mb",title:"MB",fieldModifier:e=>"round(".concat(e," / 1000000)")}],name:"size",operatorType:"greaterThan",operatorTypes:["greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo",null,"equalTo"],title:"File size",type:"number",value:0},tag:{assetTypes:["file","image"],field:"opt.media.tags",name:"tag",operatorType:"references",operatorTypes:["references","doesNotReference",null,"empty","notEmpty"],title:"Tags",type:"searchable"},title:{assetTypes:["file","image"],field:"title",name:"title",operatorType:"empty",operatorTypes:["empty","notEmpty",null,"includes","doesNotInclude"],title:"Title",type:"string",value:""},type:{assetTypes:["file","image"],name:"type",operatorType:"is",operatorTypes:["is","isNot"],options:[{name:"image",title:"Image",value:'mimeType match "image*"'},{name:"video",title:"Video",value:'mimeType match "video*"'},{name:"audio",title:"Audio",value:'mimeType match "audio*"'},{name:"pdf",title:"PDF",value:'mimeType == "application/pdf"'}],title:"File type",type:"select",value:"image"},width:{assetTypes:["image"],field:"metadata.dimensions.width",name:"width",operatorType:"greaterThan",operatorTypes:["greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo",null,"equalTo"],title:"Width",type:"number",value:400}},Li={doesNotInclude:{fn:(e,t)=>e?"!(".concat(t," match '*").concat(e,"*')"):void 0,label:"does not include"},doesNotReference:{fn:(e,t)=>e?"!references('".concat(e,"')"):void 0,label:"does not include"},empty:{fn:(e,t)=>"!defined(".concat(t,")"),hideInput:!0,label:"is empty"},equalTo:{fn:(e,t)=>e?"".concat(t," == ").concat(e):void 0,label:"is equal to"},greaterThan:{fn:(e,t)=>e?"".concat(t," > ").concat(e):void 0,label:"is greater than"},greaterThanOrEqualTo:{fn:(e,t)=>e?"".concat(t," >= ").concat(e):void 0,label:"is greater than or equal to"},includes:{fn:(e,t)=>e?"".concat(t," match '*").concat(e,"*'"):void 0,label:"includes"},is:{fn:(e,t)=>"".concat(e),label:"is"},isNot:{fn:(e,t)=>"!(".concat(e,")"),label:"is not"},lessThan:{fn:(e,t)=>e?"".concat(t," < ").concat(e):void 0,label:"is less than"},lessThanOrEqualTo:{fn:(e,t)=>e?"".concat(t," <= ").concat(e):void 0,label:"is less than or equal to"},notEmpty:{fn:(e,t)=>"defined(".concat(t,")"),hideInput:!0,label:"is not empty"},references:{fn:(e,t)=>e?"references('".concat(e,"')"):void 0,label:"includes"}},Mi=[{direction:"desc",field:"_createdAt"},{direction:"asc",field:"_createdAt"},null,{direction:"desc",field:"_updatedAt"},{direction:"asc",field:"_updatedAt"},null,{direction:"asc",field:"originalFilename"},{direction:"desc",field:"originalFilename"},null,{direction:"desc",field:"size"},{direction:"asc",field:"size"}],xi=[ki.tag,yi,ki.inUse,ki.inCurrentDocument,yi,ki.title,ki.altText,ki.description,yi,ki.isOpaque,yi,ki.fileName,ki.size,ki.type,yi,ki.orientation,ki.width,ki.height],bi="3rem 100px auto 1.5rem",Hi="3rem 100px auto 5.5rem 5.5rem 3.5rem 8.5rem 2rem",Vi=ee(void 0),Ii=e=>{const{children:t,onSelect:n}=e,o={onSelect:n};return ie(Vi.Provider,{value:o,children:t})},ji=()=>{const e=te(Vi);if(void 0===e)throw new Error("useAssetSourceActions must be used within an AssetSourceDispatchProvider");return e},Zi=()=>O({apiVersion:"2022-10-01"}),Ti={_createdAt:{asc:"Last created: Oldest first",desc:"Last created: Newest first"},_updatedAt:{asc:"Last updated: Oldest first",desc:"Last updated: Newest first"},mimeType:{asc:"MIME type: A to Z",desc:"MIME type: Z to A"},originalFilename:{asc:"File name: A to Z",desc:"File name: Z to A"},size:{asc:"File size: Smallest first",desc:"File size: Largest first"}},Wi=(e,t)=>Ti[e][t],Bi=e=>function(t){return ot((()=>!!e),t.pipe(ut(3e3),ht((e=>Math.random()>.5?rt({message:"Test error",statusCode:500}):it(e)))),t)},_i=e=>{let{assetTypes:t,searchFacets:n,searchQuery:o}=e;const l=t.map((e=>"sanity.".concat(e,"Asset"))),a=Ue(r||(r=D(["\n _type in ",' && !(_id in path("drafts.**"))\n '])),JSON.stringify(l)),s=n.reduce(((e,t)=>{var n;if("number"===t.type){const{field:n,modifier:o,modifiers:r,operatorType:i,value:l}=t,a=Li[i],s=null==r?void 0:r.find((e=>e.name===o)),d=(null==s?void 0:s.fieldModifier)?s.fieldModifier(n):n,c=a.fn(l,d);c&&e.push(c)}if("searchable"===t.type){const{field:n,operatorType:o,value:r}=t,i=Li[o].fn(null==r?void 0:r.value,n);i&&e.push(i)}if("select"===t.type){const{field:o,operatorType:r,options:i,value:l}=t,a=Li[r],s=null==(n=null==i?void 0:i.find((e=>e.name===l)))?void 0:n.value,d=a.fn(s,o);d&&e.push(d)}if("string"===t.type){const{field:n,operatorType:o,value:r}=t,i=Li[o].fn(r,n);i&&e.push(i)}return e}),[]);return[a,...o?[Ue(i||(i=D(["[_id, altText, assetId, description, originalFilename, title, url] match '*","*'"])),o.trim())]:[],...s].join(" && ")},Ri=(e,t)=>function(n){return n.pipe(ht((()=>lt(e.fetch(Ue(l||(l=D(['count(*[_type == "','" && name.current == $name])'])),"media.tag"),{name:t})))),ht((e=>e>0?rt({message:"Tag already exists",statusCode:409}):it(!0))))},Si=e=>e.reduce(((e,t)=>{var n;const o=null==t?void 0:t.tag;return o&&e.push({label:null==(n=null==o?void 0:o.name)?void 0:n.current,value:null==o?void 0:o._id}),e}),[]),zi={tagsAddComplete:Xe("actions/tagsAddComplete",(function(e){let{assets:t,tag:n}=e;return{payload:{assets:t,tag:n}}})),tagsAddError:Xe("actions/tagsAddError",(function(e){let{assets:t,error:n,tag:o}=e;return{payload:{assets:t,error:n,tag:o}}})),tagsAddRequest:Xe("actions/tagsAddRequest",(function(e){let{assets:t,tag:n}=e;return{payload:{assets:t,tag:n}}})),tagsRemoveComplete:Xe("actions/tagsRemoveComplete",(function(e){let{assets:t,tag:n}=e;return{payload:{assets:t,tag:n}}})),tagsRemoveError:Xe("actions/tagsRemoveError",(function(e){let{assets:t,error:n,tag:o}=e;return{payload:{assets:t,error:n,tag:o}}})),tagsRemoveRequest:Xe("actions/tagsRemoveRequest",(function(e){let{assets:t,tag:n}=e;return{payload:{assets:t,tag:n}}}))},Ei={showTagCreate:Xe("dialog/showTagCreate"),showTagEdit:Xe("dialog/showTagEdit",(function(e){let{tagId:t}=e;return{payload:{tagId:t}}}))},Ai=Ge({name:"tags",initialState:{allIds:[],byIds:{},creating:!1,creatingError:void 0,fetchCount:-1,fetching:!1,fetchingError:void 0,panelVisible:!0},extraReducers:e=>{e.addCase(Ei.showTagCreate,(e=>{delete e.creatingError})).addCase(Ei.showTagEdit,((e,t)=>{const{tagId:n}=t.payload;delete e.byIds[n].error})).addMatcher((e=>[zi.tagsAddComplete.type,zi.tagsAddError.type,zi.tagsRemoveComplete.type,zi.tagsRemoveError.type].includes(e.type)),((e,t)=>{const{tag:n}=t.payload;e.byIds[n._id].updating=!1})).addMatcher((e=>[zi.tagsAddRequest.type,zi.tagsRemoveRequest.type].includes(e.type)),((e,t)=>{const{tag:n}=t.payload;e.byIds[n._id].updating=!0}))},reducers:{createComplete(e,t){const{tag:n}=t.payload;e.creating=!1,e.allIds.includes(n._id)||e.allIds.push(n._id),e.byIds[n._id]={_type:"tag",picked:!1,tag:n,updating:!1}},createError(e,t){e.creating=!1,e.creatingError=t.payload.error},createRequest(e,t){e.creating=!0,delete e.creatingError},deleteComplete(e,t){const{tagId:n}=t.payload,o=e.allIds.indexOf(n);o>=0&&e.allIds.splice(o,1),delete e.byIds[n]},deleteError(e,t){const{error:n,tag:o}=t.payload,r=null==o?void 0:o._id;e.byIds[r].error=n,e.byIds[r].updating=!1},deleteRequest(e,t){var n,o;const r=null==(o=null==(n=t.payload)?void 0:n.tag)?void 0:o._id;e.byIds[r].picked=!1,e.byIds[r].updating=!0,Object.keys(e.byIds).forEach((t=>{delete e.byIds[t].error}))},fetchComplete(e,t){const{tags:n}=t.payload;null==n||n.forEach((t=>{e.allIds.push(t._id),e.byIds[t._id]={_type:"tag",picked:!1,tag:t,updating:!1}})),e.fetching=!1,e.fetchCount=n.length||0,delete e.fetchingError},fetchError(e,t){const{error:n}=t.payload;e.fetching=!1,e.fetchingError=n},fetchRequest:{reducer:(e,t)=>{e.fetching=!0,delete e.fetchingError},prepare:()=>({payload:{query:Ue(a||(a=D(['\n {\n "items": *[\n _type == "','"\n && !(_id in path("drafts.**"))\n ] {\n _createdAt,\n _updatedAt,\n _id,\n _rev,\n _type,\n name\n } | order(name.current asc),\n }\n '])),"media.tag")}})},listenerCreateQueue(e,t){},listenerCreateQueueComplete(e,t){const{tags:n}=t.payload;null==n||n.forEach((t=>{e.byIds[t._id]={_type:"tag",picked:!1,tag:t,updating:!1},e.allIds.includes(t._id)||e.allIds.push(t._id)}))},listenerDeleteQueue(e,t){},listenerDeleteQueueComplete(e,t){const{tagIds:n}=t.payload;null==n||n.forEach((t=>{const n=e.allIds.indexOf(t);n>=0&&e.allIds.splice(n,1),delete e.byIds[t]}))},listenerUpdateQueue(e,t){},listenerUpdateQueueComplete(e,t){const{tags:n}=t.payload;null==n||n.forEach((t=>{e.byIds[t._id]&&(e.byIds[t._id].tag=t)}))},panelVisibleSet(e,t){const{panelVisible:n}=t.payload;e.panelVisible=n},sort(e){e.allIds.sort(((t,n)=>{const o=e.byIds[t].tag.name.current,r=e.byIds[n].tag.name.current;return o<r?-1:o>r?1:0}))},updateComplete(e,t){const{tag:n}=t.payload;e.byIds[n._id].tag=n,e.byIds[n._id].updating=!1},updateError(e,t){const{error:n,tag:o}=t.payload,r=null==o?void 0:o._id;e.byIds[r].error=n,e.byIds[r].updating=!1},updateRequest(e,t){const{tag:n}=t.payload;e.byIds[null==n?void 0:n._id].updating=!0}}}),qi=e=>e.tags.byIds,Di=Ye([qi,e=>e.tags.allIds],((e,t)=>t.map((t=>e[t])))),Oi=Ye([qi,(e,t)=>t],((e,t)=>e[t])),Fi=Ai.actions;var Ui=Ai.reducer;const Pi=Ge({name:"search",initialState:{facets:[],query:""},reducers:{facetsAdd(e,t){e.facets.push(t.payload.facet)},facetsClear(e){e.facets=[]},facetsRemove(e,t){e.facets=e.facets.filter((e=>e.name!==t.payload.facetName))},facetsUpdate(e,t){const{modifier:n,name:o,operatorType:r,value:i}=t.payload;e.facets.forEach(((t,l)=>{t.name===o&&("number"===t.type&&n&&(t.modifier=n),r&&(t.operatorType=r),void 0!==i&&(e.facets[l].value=i))}))},querySet(e,t){var n;e.query=null==(n=t.payload)?void 0:n.searchQuery}}}),Ni=Ye((e=>e.search.facets),(e=>!!(null==e?void 0:e.find((e=>"tag"===e.name))))),Qi=Ye([e=>e.tags.byIds,e=>e.search.facets,(e,t)=>t],((e,t,n)=>{var o,r,i;const l=null==t?void 0:t.find((e=>"tag"===e.name));if("searchable"===(null==l?void 0:l.type)){const t=null==(o=l.value)?void 0:o.value;if(t)return(null==(i=null==(r=e[t])?void 0:r.tag)?void 0:i._id)===n&&"references"===(null==l?void 0:l.operatorType)}return!1})),Xi=Pi.actions;var Gi=Pi.reducer;const Yi={uploadComplete:Xe("uploads/uploadComplete",(function(e){let{asset:t}=e;return{payload:{asset:t}}}))},$i=Mi[0],Ki={allIds:[],assetTypes:[],byIds:{},fetchCount:-1,fetching:!1,fetchingError:void 0,lastPicked:void 0,order:{direction:$i.direction,field:$i.field,title:Wi($i.field,$i.direction)},pageIndex:0,pageSize:50,view:"grid"},Ji=Ge({name:"assets",initialState:Ki,extraReducers:e=>{e.addCase(Yi.uploadComplete,((e,t)=>{const{asset:n}=t.payload;e.byIds[n._id]={_type:"asset",asset:n,picked:!1,updating:!1}})).addCase(zi.tagsAddComplete,((e,t)=>{const{assets:n}=t.payload;n.forEach((t=>{e.byIds[t.asset._id].updating=!1}))})).addCase(zi.tagsAddError,((e,t)=>{const{assets:n}=t.payload;n.forEach((t=>{e.byIds[t.asset._id].updating=!1}))})).addCase(zi.tagsAddRequest,((e,t)=>{const{assets:n}=t.payload;n.forEach((t=>{e.byIds[t.asset._id].updating=!0}))})).addCase(zi.tagsRemoveComplete,((e,t)=>{const{assets:n}=t.payload;n.forEach((t=>{e.byIds[t.asset._id].updating=!1}))})).addCase(zi.tagsRemoveError,((e,t)=>{const{assets:n}=t.payload;n.forEach((t=>{e.byIds[t.asset._id].updating=!1}))})).addCase(zi.tagsRemoveRequest,((e,t)=>{const{assets:n}=t.payload;n.forEach((t=>{e.byIds[t.asset._id].updating=!0}))}))},reducers:{clear(e){e.allIds=[]},deleteComplete(e,t){const{assetIds:n}=t.payload;null==n||n.forEach((t=>{const n=e.allIds.indexOf(t);n>=0&&e.allIds.splice(n,1),delete e.byIds[t]})),e.pageIndex=Math.floor(e.allIds.length/e.pageSize)-1},deleteError(e,t){var n,o,r,i;const{assetIds:l,error:a}=t.payload,s=null==(i=null==(r=null==(o=null==(n=null==a?void 0:a.response)?void 0:n.body)?void 0:o.error)?void 0:r.items)?void 0:i.map((e=>e.error));null==l||l.forEach((t=>{e.byIds[t].updating=!1})),null==s||s.forEach((t=>{e.byIds[t.id].error=t.description}))},deleteRequest(e,t){const{assets:n}=t.payload;n.forEach((t=>{e.byIds[null==t?void 0:t._id].updating=!0})),Object.keys(e.byIds).forEach((t=>{delete e.byIds[t].error}))},fetchComplete(e,t){var n;const o=(null==(n=t.payload)?void 0:n.assets)||[];o&&o.forEach((t=>{e.allIds.includes(t._id)||e.allIds.push(t._id),e.byIds[t._id]={_type:"asset",asset:t,picked:!1,updating:!1}})),e.fetching=!1,e.fetchCount=o.length||0,delete e.fetchingError},fetchError(e,t){const n=t.payload;e.fetching=!1,e.fetchingError=n},fetchRequest:{reducer:(e,t)=>{e.fetching=!0,delete e.fetchingError},prepare:e=>{let{params:t={},queryFilter:n,selector:o="",sort:r=Ue(d||(d=D(["order(_updatedAt desc)"])))}=e;const i=r||o?"|":"";return{payload:{params:t,query:Ue(c||(c=D(['\n {\n "items": *[',"] {\n _id,\n _type,\n _createdAt,\n _updatedAt,\n altText,\n description,\n extension,\n metadata {\n dimensions,\n exif,\n isOpaque,\n },\n mimeType,\n opt {\n media\n },\n originalFilename,\n size,\n title,\n url\n } "," "," ",",\n }\n "])),n,i,r,o)}}}},insertUploads(e,t){const{results:n}=t.payload;Object.entries(n).forEach((t=>{let[n,o]=t;o&&!e.allIds.includes(n)&&e.allIds.push(o)}))},listenerCreateQueue(e,t){},listenerCreateQueueComplete(e,t){const{assets:n}=t.payload;null==n||n.forEach((t=>{var n;(null==(n=e.byIds[null==t?void 0:t._id])?void 0:n.asset)&&(e.byIds[t._id].asset=t)}))},listenerDeleteQueue(e,t){},listenerDeleteQueueComplete(e,t){const{assetIds:n}=t.payload;null==n||n.forEach((t=>{const n=e.allIds.indexOf(t);n>=0&&e.allIds.splice(n,1),delete e.byIds[t]}))},listenerUpdateQueue(e,t){},listenerUpdateQueueComplete(e,t){const{assets:n}=t.payload;null==n||n.forEach((t=>{var n;(null==(n=e.byIds[null==t?void 0:t._id])?void 0:n.asset)&&(e.byIds[t._id].asset=t)}))},loadNextPage(){},loadPageIndex(e,t){e.pageIndex=t.payload.pageIndex},orderSet(e,t){var n;e.order=null==(n=t.payload)?void 0:n.order,e.pageIndex=0},pick(e,t){const{assetId:n,picked:o}=t.payload;e.byIds[n].picked=o,e.lastPicked=o?n:void 0},pickAll(e){e.allIds.forEach((t=>{e.byIds[t].picked=!0}))},pickClear(e){e.lastPicked=void 0,Object.values(e.byIds).forEach((t=>{e.byIds[t.asset._id].picked=!1}))},pickRange(e,t){const n=e.allIds.findIndex((e=>e===t.payload.startId)),o=e.allIds.findIndex((e=>e===t.payload.endId)),r=[n,o].sort(((e,t)=>e-t));e.allIds.slice(r[0],r[1]+1).forEach((t=>{e.byIds[t].picked=!0})),e.lastPicked=e.allIds[o]},sort(e){e.allIds.sort(((t,n)=>{const o=e.byIds[t].asset[e.order.field],r=e.byIds[n].asset[e.order.field];return o<r?"asc"===e.order.direction?-1:1:o>r?"asc"===e.order.direction?1:-1:0}))},updateComplete(e,t){const{asset:n}=t.payload;e.byIds[n._id].updating=!1,e.byIds[n._id].asset=n},updateError(e,t){const{asset:n,error:o}=t.payload,r=null==n?void 0:n._id;e.byIds[r].error=o.message,e.byIds[r].updating=!1},updateRequest(e,t){var n,o;const r=null==(o=null==(n=t.payload)?void 0:n.asset)?void 0:o._id;e.byIds[r].updating=!0},viewSet(e,t){var n;e.view=null==(n=t.payload)?void 0:n.view}}}),el=Ye([e=>e.assets.byIds,(e,t)=>t],((e,t)=>e[t])),tl=Ye([e=>e.assets.byIds,e=>e.assets.allIds],((e,t)=>t.map((t=>e[t])))),nl=Ye([tl],(e=>e.length)),ol=Ye([tl],(e=>e.filter((e=>null==e?void 0:e.picked)))),rl=Ye([ol],(e=>e.length)),il=Ji.actions;var ll=Ji.reducer;const al={50:{title:"Gray 50",hex:"#f2f3f5"},100:{title:"Gray 100",hex:"#e6e8ec"},200:{title:"Gray 200",hex:"#ced2d9"},300:{title:"Gray 300",hex:"#b6bcc6"},400:{title:"Gray 400",hex:"#9ea6b3"},500:{title:"Gray 500",hex:"#8690a0"},600:{title:"Gray 600",hex:"#6e7683"},700:{title:"Gray 700",hex:"#565d67"},800:{title:"Gray 800",hex:"#3f434a"},900:{title:"Gray 900",hex:"#272a2e"},950:{title:"Gray 950",hex:"#1b1d20"}},sl="#101112",dl="#fff";var cl,ul;const hl=Mt(g||(g=D(["\n ::-webkit-scrollbar {\n width: 14px;\n }\n\n ::-webkit-scrollbar-thumb {\n border-radius: 10px;\n border: 4px solid rgba(0, 0, 0, 0);\n background: ",";\n background-clip: padding-box;\n\n &:hover {\n background: ",";\n background-clip: padding-box;\n }\n }\n"])),null==(cl=al)?void 0:cl[800].hex,null==(ul=al)?void 0:ul[400].hex),pl=xt(m||(m=D(["\n .media__custom-scrollbar {\n ",'\n }\n\n // @sanity/ui overrides\n\n // Custom scrollbar on Box (used in Dialogs)\n div[data-ui="Box"] {\n ','\n }\n\n // Dialog background color\n div[data-ui="Dialog"] {\n background-color: rgba(15, 17, 18, 0.9);\n }\n\n'])),hl,hl),gl=Pe,ml=Ge({name:"dialog",initialState:{items:[]},extraReducers:e=>{e.addCase(Ei.showTagCreate,(e=>{e.items.push({id:"tagCreate",type:"tagCreate"})})),e.addCase(Ei.showTagEdit,((e,t)=>{const{tagId:n}=t.payload;e.items.push({id:n,tagId:n,type:"tagEdit"})}))},reducers:{clear(e){e.items=[]},inlineTagCreate(e,t){const{assetId:n,tag:o}=t.payload;e.items.forEach((e=>{"assetEdit"===e.type&&e.assetId===n&&(e.lastCreatedTag={label:o.name.current,value:o._id})}))},inlineTagRemove(e,t){const{tagIds:n}=t.payload;e.items.forEach((e=>{"assetEdit"===e.type&&(e.lastRemovedTagIds=n)}))},remove(e,t){var n;const o=null==(n=t.payload)?void 0:n.id;e.items=e.items.filter((e=>e.id!==o))},showConfirmAssetsTagAdd(e,t){const{assetsPicked:n,closeDialogId:o,tag:r}=t.payload,i="".concat(n.length," ").concat(bt("asset",n.length));e.items.push({closeDialogId:o,confirmCallbackAction:zi.tagsAddRequest({assets:n,tag:r}),confirmText:"Yes, add tag to ".concat(i),title:"Add tag ".concat(r.name.current," to ").concat(i,"?"),id:"confirm",headerTitle:"Confirm tag addition",tone:"primary",type:"confirm"})},showConfirmAssetsTagRemove(e,t){const{assetsPicked:n,closeDialogId:o,tag:r}=t.payload,i="".concat(n.length," ").concat(bt("asset",n.length));e.items.push({closeDialogId:o,confirmCallbackAction:zi.tagsRemoveRequest({assets:n,tag:r}),confirmText:"Yes, remove tag from ".concat(i),headerTitle:"Confirm tag removal",id:"confirm",title:"Remove tag ".concat(r.name.current," from ").concat(i,"?"),tone:"critical",type:"confirm"})},showConfirmDeleteAssets(e,t){const{assets:n,closeDialogId:o}=t.payload,r="".concat(n.length," ").concat(bt("asset",n.length));e.items.push({closeDialogId:o,confirmCallbackAction:il.deleteRequest({assets:n.map((e=>e.asset))}),confirmText:"Yes, delete ".concat(r),description:"This operation cannot be reversed. Are you sure you want to continue?",title:"Permanently delete ".concat(r,"?"),id:"confirm",headerTitle:"Confirm deletion",tone:"critical",type:"confirm"})},showConfirmDeleteTag(e,t){const{closeDialogId:n,tag:o}=t.payload;e.items.push({closeDialogId:n,confirmCallbackAction:Fi.deleteRequest({tag:o}),confirmText:"Yes, delete ".concat("tag"),description:"This operation cannot be reversed. Are you sure you want to continue?",title:"Permanently delete ".concat("tag","?"),id:"confirm",headerTitle:"Confirm deletion",tone:"critical",type:"confirm"})},showAssetEdit(e,t){const{assetId:n}=t.payload;e.items.push({assetId:n,id:n,type:"assetEdit"})},showSearchFacets(e){e.items.push({id:"searchFacets",type:"searchFacets"})},showTags(e){e.items.push({id:"tags",type:"tags"})}}}),fl=ml.actions;var wl=ml.reducer;const vl=()=>{const e=Ne(),t=gl((e=>e.assets.view));return le(se,{space:0,style:{whiteSpace:"nowrap"},children:[ie(de,{fontSize:1,icon:Nr,mode:"grid"===t?"default":"ghost",onClick:()=>e(il.viewSet({view:"grid"})),style:{borderBottomRightRadius:0,borderTopRightRadius:0}}),ie(de,{fontSize:1,icon:Qr,mode:"table"===t?"default":"ghost",onClick:()=>e(il.viewSet({view:"table"})),style:{borderBottomLeftRadius:0,borderTopLeftRadius:0}})]})};function Cl(){const e=ce();return{constrainSize:!0,floatingBoundary:e.element,portal:!0,referenceBoundary:e.element}}const yl=()=>{var e;const t=Ne(),n=gl((e=>e.assets.order)),o=Cl();return ie(ue,{button:ie(de,{fontSize:1,icon:Ir,iconRight:Hr,mode:"ghost",padding:3,text:Wi(n.field,n.direction)}),id:"order",menu:ie(he,{children:null==(e=Mi)?void 0:e.map(((e,o)=>e?ie(pe,{disabled:n.field===e.field&&n.direction===e.direction,fontSize:1,onClick:()=>t(il.orderSet({order:{direction:e.direction,field:e.field}})),padding:2,text:Wi(e.field,e.direction)},o):ie(ge,{},o)))}),popover:o})},kl=e=>{const{loading:t}=e,{animationDuration:n,isFinished:o,progress:r}=Ht({animationDuration:300,isAnimating:t});return ie(me,{style:{opacity:o?0:1,transition:"opacity ".concat(n,"ms linear")},children:ie(me,{style:{height:"1px",background:"rgba(255, 255, 255, 0.5)",position:"absolute",left:0,top:0,transition:"width ".concat(n,"ms linear"),width:"".concat(100*r,"%")}})})},Ll=Lt(me)(f||(f=D(["\n background: rgba(255, 255, 255, 0.05);\n border-radius: ","px;\n"])),(e=>e.theme.sanity.radius[2])),Ml=e=>{const{children:t,facet:n}=e,o=Ne();return ie(Ll,{padding:[2,2,1],children:le(fe,{align:["flex-start","flex-start","center"],direction:["column","column","row"],children:[ie(me,{paddingBottom:[3,3,0],paddingLeft:1,paddingRight:2,paddingTop:[1,1,0],children:ie(we,{size:0,style:{whiteSpace:"nowrap"},children:n.title})}),le(fe,{align:"center",children:[t,ie(me,{marginLeft:1,paddingX:2,children:ie(ve,{muted:!0,size:0,children:ie(Zn,{onClick:()=>{o(Xi.facetsRemove({facetName:n.name}))}})})})]})]})})},xl=e=>{const{onValueChange:t,value:n,...o}=e;return ie(Ce,{...o,onChange:e=>{const n=e.target.value;(""===n||/^[0-9\b]+$/.test(n))&&t(parseInt(n,10)||"")},value:null!=n?n:""})},bl=e=>{let{facet:t}=e;var n;const o=Ne(),r=Cl(),i=null==t?void 0:t.modifiers,l=(null==t?void 0:t.modifier)?null==i?void 0:i.find((e=>e.name===(null==t?void 0:t.modifier))):null==i?void 0:i[0],a=null!=(n=t.operatorType)?n:"greaterThan";return le(Ml,{facet:t,children:[(null==t?void 0:t.operatorTypes)&&ie(ue,{button:ie(de,{fontSize:1,iconRight:Hr,padding:2,text:Li[a].label}),id:"operators",menu:ie(he,{children:t.operatorTypes.map(((e,n)=>e?ie(pe,{disabled:e===a,fontSize:1,onClick:()=>(e=>{o(Xi.facetsUpdate({name:t.name,operatorType:e}))})(e),padding:2,text:Li[e].label},e):ie(ge,{},n)))}),popover:r}),ie(me,{marginX:1,style:{maxWidth:"50px"},children:ie(xl,{fontSize:1,onValueChange:e=>{o(Xi.facetsUpdate({name:t.name,value:e}))},padding:2,radius:2,width:2,value:null==t?void 0:t.value})}),i&&ie(ue,{button:ie(de,{fontSize:1,iconRight:Hr,padding:2,text:null==l?void 0:l.title}),id:"modifier",menu:ie(he,{children:i.map((e=>ie(pe,{disabled:e.name===t.modifier,fontSize:1,onClick:()=>(e=>{o(Xi.facetsUpdate({name:t.name,modifier:e.name}))})(e),padding:2,text:e.title},e.name)))}),popover:r})]})},Hl=e=>{let{facet:t}=e;var n;const o=Ne(),r=Cl(),i=null==t?void 0:t.options,l=null==i?void 0:i.find((e=>e.name===(null==t?void 0:t.value))),a=null!=(n=null==t?void 0:t.operatorType)?n:"is";return le(Ml,{facet:t,children:[(null==t?void 0:t.operatorTypes)&&ie(ue,{button:ie(de,{fontSize:1,iconRight:Hr,padding:2,style:{marginRight:"4px"},text:Li[a].label}),id:"operators",menu:ie(he,{children:t.operatorTypes.map(((e,n)=>e?ie(pe,{disabled:e===a,fontSize:1,onClick:()=>(e=>{o(Xi.facetsUpdate({name:t.name,operatorType:e}))})(e),padding:2,text:Li[e].label},e):ie(ge,{},n)))}),popover:r}),ie(ue,{button:ie(de,{fontSize:1,iconRight:Hr,padding:2,text:null==l?void 0:l.title}),id:"list",menu:ie(he,{children:null==i?void 0:i.map(((e,n)=>ie(pe,{disabled:e.name===(null==l?void 0:l.name),fontSize:1,onClick:()=>{return e=i[n],void o(Xi.facetsUpdate({name:t.name,value:e.name}));var e},padding:2,text:e.title},e.name)))}),popover:r})]})},Vl=e=>{let{facet:t}=e;const n=Ne(),o=Cl(),r=t.operatorType;return le(Ml,{facet:t,children:[(null==t?void 0:t.operatorTypes)&&ie(ue,{button:ie(de,{fontSize:1,iconRight:Hr,padding:2,text:Li[r].label}),id:"operators",menu:ie(he,{children:t.operatorTypes.map(((e,o)=>e?ie(pe,{disabled:e===r,fontSize:1,onClick:()=>(e=>{n(Xi.facetsUpdate({name:t.name,operatorType:e}))})(e),padding:2,text:Li[e].label},e):ie(ge,{},o)))}),popover:o}),!Li[r].hideInput&&ie(me,{marginLeft:1,style:{maxWidth:"125px"},children:ie(Ce,{fontSize:1,onChange:e=>{n(Xi.facetsUpdate({name:t.name,value:e.target.value}))},padding:2,radius:2,width:2,value:null==t?void 0:t.value})})]})};var Il,jl,Zl,Tl,Wl,Bl,_l,Rl,Sl,zl,El,Al,ql,Dl,Ol;const Fl=null==(Wl=null==(Tl=null==(Zl=null==(jl=null==(Il=ye)?void 0:Il.color)?void 0:jl.dark)?void 0:Zl.primary)?void 0:Tl.spot)?void 0:Wl.blue,Ul=null==(zl=null==(Sl=null==(Rl=null==(_l=null==(Bl=ye)?void 0:Bl.color)?void 0:_l.dark)?void 0:Rl.default)?void 0:Sl.base)?void 0:zl.bg,Pl=null==(El=ye)?void 0:El.radius,Nl=null==(Al=ye)?void 0:Al.space,Ql=null==(Ol=null==(Dl=null==(ql=ye)?void 0:ql.fonts)?void 0:Dl.text)?void 0:Ol.sizes,Xl={control:(e,t)=>{let{isDisabled:n,isFocused:o}=t,r="inset 0 0 0 1px ".concat(al[900].hex);return o&&(r="inset 0 0 0 1px ".concat(al[900].hex,", 0 0 0 1px var(--card-bg-color), 0 0 0 3px var(--card-focus-ring-color) !important")),{...e,backgroundColor:Ul,color:dl,border:"none",borderRadius:Pl[2],boxShadow:r,fontSize:Ql[1].fontSize,minHeight:"25px",opacity:n?.5:"inherit",outline:"none",transition:"none","&:hover":{boxShadow:"inset 0 0 0 1px ".concat(ye.color.dark.default.input.default.hovered.border)}}},input:e=>({...e,color:dl,fontFamily:ye.fonts.text.family,marginLeft:Nl[2]}),menuList:e=>({...e,padding:0}),noOptionsMessage:e=>({...e,fontFamily:ye.fonts.text.family,fontSize:Ql[1].fontSize,lineHeight:"1em"}),option:(e,t)=>{let{isFocused:n}=t;return{...e,backgroundColor:n?Fl:"transparent",borderRadius:Pl[2],color:n?sl:"inherit",fontSize:Ql[1].fontSize,lineHeight:"1em",padding:"4px 6px","&:hover":{backgroundColor:Fl,color:sl}}},placeholder:e=>({...e,fontFamily:ye.fonts.text.family,marginLeft:Nl[2],paddingBottom:"2px"}),singleValue:e=>({...e,color:dl,lineHeight:"1em",paddingBottom:"1px"}),valueContainer:e=>({...e,margin:0,padding:0})},Gl=e=>ie(me,{padding:1,children:ie(It.Option,{...e,children:ie(me,{paddingY:1,children:ie(ve,{size:1,style:{color:"inherit"},textOverflow:"ellipsis",children:e.children})})})}),Yl={ClearIndicator:e=>ie(It.ClearIndicator,{...e,children:ie(me,{paddingRight:1,style:{transform:"scale(0.85)"},children:ie(ve,{muted:!0,size:0,children:ie(Zn,{})})})}),DropdownIndicator:null,IndicatorSeparator:null,Menu:e=>ie(It.Menu,{...e,children:ie(ke,{radius:1,shadow:2,children:e.children})}),MenuList:e=>{const{children:t}=e;if(Array.isArray(t)){const e=t.length>5?165:33*t.length;return ie(jt,{className:"media__custom-scrollbar",itemContent:e=>{const n=t[e];return ie(Gl,{...n.props})},style:{height:e},totalCount:t.length})}return ie(It.MenuList,{...e,children:t})},NoOptionsMessage:e=>ie(It.NoOptionsMessage,{...e,children:e.children}),Option:Gl,SingleValue:e=>ie(It.SingleValue,{...e,children:ie(me,{paddingLeft:2,children:ie(ve,{size:1,style:{color:"inherit",lineHeight:"2em"},textOverflow:"ellipsis",children:e.children})})})},$l=e=>{let{facet:t}=e;const n=Ne(),o=gl((e=>Di(e))),r=gl((e=>e.tags.fetching)),i=Si(o),l=Cl(),a=t.operatorType;return le(Ml,{facet:t,children:[(null==t?void 0:t.operatorTypes)&&ie(ue,{button:ie(de,{fontSize:1,iconRight:Hr,padding:2,text:Li[a].label}),id:"operators",menu:ie(he,{children:t.operatorTypes.map(((e,o)=>e?ie(pe,{disabled:e===a,fontSize:1,onClick:()=>(e=>{n(Xi.facetsUpdate({name:t.name,operatorType:e}))})(e),padding:2,text:Li[e].label},e):ie(ge,{},o)))}),popover:l}),!Li[a].hideInput&&ie(me,{marginX:1,style:{width:"160px"},children:ie(Vt,{components:Yl,instanceId:"facet-searchable",isClearable:!0,isDisabled:r,isSearchable:!0,name:"tags",noOptionsMessage:()=>"No tags",onChange:e=>{return o=e,void n(Xi.facetsUpdate({name:t.name,value:o}));var o},options:i,placeholder:r?"Loading...":"Select...",styles:Xl,value:null==t?void 0:t.value})})]})},Kl=Lt(fe)(w||(w=D(["\n > * {\n margin-bottom: ","px;\n }\n"])),(e=>e.theme.sanity.space[2])),Jl=e=>{const{layout:t="inline"}=e,n=gl((e=>e.search.facets)),o=n.map((e=>"number"===e.type?ie(bl,{facet:e},e.name):"searchable"===e.type?ie($l,{facet:e},e.name):"select"===e.type?ie(Hl,{facet:e},e.name):"string"===e.type?ie(Vl,{facet:e},e.name):null));if("inline"===t)return 0===n.length?null:ie(me,{marginBottom:2,children:ie(se,{space:2,children:o})});if("stack"===t)return ie(Kl,{align:"flex-start",direction:"column",children:o});throw Error("Invalid layout")},ea=()=>{const e=Ne(),t=gl((e=>e.assets.assetTypes)),n=gl((e=>e.search.facets)),o=gl((e=>e.selected.document)),r=Cl(),i=!o,l=xi.filter((e=>{if("group"===e.type||"divider"===e.type)return!0;if(i)return!(null==e?void 0:e.selectOnly);return e.assetTypes.filter((e=>t.includes(e))).length>0})).filter(((e,t,n)=>{const o=n[t-1];return("divider"!==e.type||0!==t&&t!==n.length-1)&&("divider"!==e.type||"divider"!==(null==o?void 0:o.type))})),a=l.filter((e=>e)).length-n.length>0,s=function(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return ie(ae,{children:null==t?void 0:t.map(((t,r)=>{if("divider"===t.type)return ie(ge,{},r);if("group"===t.type)return ie(Le,{text:t.title,title:t.title,children:s(t.facets,o+1)},"group-".concat(o,"-").concat(r));if(t){const o=!!n.find((e=>e.name===t.name));return ie(pe,{disabled:o,fontSize:1,onClick:()=>e(Xi.facetsAdd({facet:t})),padding:2,text:t.title},t.name)}return null}))})};return le(fe,{children:[ie(ue,{button:ie(de,{disabled:!a,fontSize:1,icon:Qt,mode:"bleed",text:"Add filter",tone:"primary"}),id:"facets",menu:ie(he,{children:s(l)}),popover:{...r,placement:"right-start"}}),n.length>0&&ie(de,{fontSize:1,mode:"bleed",onClick:()=>e(Xi.facetsClear()),text:"Clear"})]})},ta=()=>le("svg",{"data-sanity-icon":"media__tag",fill:"currentColor",height:"1em",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",width:"1em",children:[ie("path",{d:"M435.25 48h-122.9a14.46 14.46 0 00-10.2 4.2L56.45 297.9a28.85 28.85 0 000 40.7l117 117a28.85 28.85 0 0040.7 0L459.75 210a14.46 14.46 0 004.2-10.2v-123a28.66 28.66 0 00-28.7-28.8z",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"}),ie("path",{d:"M384 160a32 32 0 1132-32 32 32 0 01-32 32z"})]}),na=()=>{const e=gl((e=>e.search.query)),t=Ne();return le(me,{style:{position:"relative"},children:[ie(Ce,{fontSize:1,icon:br,onChange:e=>{t(Xi.querySet({searchQuery:e.currentTarget.value}))},placeholder:"Search",radius:2,value:e}),e.length>0&&ie(fe,{align:"center",justify:"center",onClick:()=>{t(Xi.querySet({searchQuery:""}))},style:{cursor:"pointer",height:"100%",opacity:.75,position:"absolute",right:0,top:0,width:"2em",zIndex:1},children:ie(Zn,{})})]})},oa=()=>{var e;const t=Ne(),n=gl((e=>e.assets.fetching)),o=gl((e=>e.assets.pageIndex)),r=gl((e=>e.search.facets)),i=gl((e=>e.tags.panelVisible)),l=Me();return le(me,{paddingY:2,style:{borderBottom:"1px solid ".concat(null==(e=al)?void 0:e[900].hex),zIndex:2},children:[ie(me,{marginBottom:2,children:ie(fe,{align:"flex-start",direction:["column","column","column","column","row"],justify:"space-between",children:le(fe,{flex:1,style:{alignItems:"flex-start",flex:1,height:"100%",justifyContent:l<2?"space-between":"flex-start",position:"relative",width:"100%"},children:[ie(me,{marginX:2,style:{minWidth:"200px"},children:ie(na,{})}),le(me,{display:["none","none","block"],children:[ie(Jl,{}),ie(ea,{})]}),ie(me,{display:["block","block","none"],marginX:2,children:le(se,{space:2,style:{whiteSpace:"nowrap"},children:[ie(de,{fontSize:1,mode:"ghost",onClick:()=>{t(fl.showSearchFacets())},text:"Filters".concat(r.length>0?" (".concat(r.length,")"):""),tone:"primary"}),ie(de,{fontSize:1,mode:"ghost",onClick:()=>{t(fl.showTags())},text:"Tags",tone:"primary"})]})})]})})}),ie(me,{children:le(fe,{align:"center",justify:["space-between"],children:[ie(me,{marginX:2,children:ie(vl,{})}),le(fe,{marginX:2,children:[ie(yl,{}),ie(me,{display:["none","none","block"],marginLeft:2,children:ie(de,{fontSize:1,icon:ie(me,{style:{transform:"scale(0.75)"},children:ie(ta,{})}),onClick:()=>{t(Fi.panelVisibleSet({panelVisible:!i}))},mode:i?"default":"ghost",text:i?"Tags":""})})]})]})}),ie(kl,{loading:n},o)]})},ra=Ge({name:"debug",initialState:{badConnection:!1,enabled:!1},reducers:{setBadConnection(e,t){e.badConnection=t.payload},toggleEnabled(e){e.enabled=!e.enabled}}}),ia=ra.actions;var la=ra.reducer;const aa=()=>{const e=Ne(),t=gl((e=>e.debug.badConnection)),n=gl((e=>e.debug.enabled));return Ci("alt+ctrl+shift+/",(()=>{e(ia.toggleEnabled())})),n?ie(me,{padding:4,style:{bottom:0,left:0,pointerEvents:"none",position:"fixed",width:"100%"},children:le(fe,{align:"center",children:[ie(me,{marginRight:3,children:ie(ve,{muted:!0,size:1,children:ie(ur,{})})}),ie(xe,{content:ie(me,{padding:2,children:ie(ve,{muted:!0,size:1,children:t?"Bad connection: +3000ms & 50% chance to fail":"No connection throttling"})}),fallbackPlacements:["right","left"],placement:"bottom",portal:!0,children:ie(be,{checked:t,onChange:t=>{const n=t.target.checked;e(ia.setBadConnection(n))},style:{pointerEvents:"auto"}})})]})}):null},sa=(e,t)=>{const n="undefined"!=typeof window&&window.devicePixelRatio?Math.round(window.devicePixelRatio):1,o=(null==t?void 0:t.height)?(null==t?void 0:t.height)*Math.max(1,n):void 0,r=t.width*Math.max(1,n),i=new URLSearchParams;return i.append("fit","max"),i.append("w",r.toString()),o&&i.append("h",o.toString()),"".concat(e.url,"?").concat(i.toString())},da=e=>Object.keys(e).reduce(((t,n)=>{const o=e[n];return"object"==typeof o&&null!==o&&o.constructor!==Array?t[n]=da(o):""===o||void 0===o||0===(null==o?void 0:o.length)?t[n]=null:t[n]="string"==typeof o&&o?e[n].trim():e[n],t}),{}),ca=e=>"sanity.fileAsset"===e._type,ua=e=>"sanity.imageAsset"===e._type,ha=e=>"".concat(e.metadata.dimensions.width,"x").concat(e.metadata.dimensions.height,"px"),pa=e=>{let{disabled:t,url:n}=e;const o=Cl(),r=$(),[i,l]=ne(!1);return J((()=>()=>{r.current&&clearTimeout(r.current)}),[]),ie(He,{content:ie(ve,{muted:!0,size:1,children:"Copied!"}),open:i,padding:2,placement:"top",radius:1,...o,children:ie(de,{disabled:t,fontSize:1,icon:Hn,mode:"ghost",onClick:()=>{r.current&&clearTimeout(r.current),l(!0),Et(n),r.current=setTimeout((()=>{l(!1)}),1250)},text:"Copy URL"})})},ga=e=>{let{label:t,value:n}=e;return le(fe,{justify:"space-between",children:[ie(ve,{size:1,style:{opacity:.8,width:"40%"},textOverflow:"ellipsis",children:t}),ie(ve,{size:1,style:{opacity:.4,textAlign:"right",width:"60%"},textOverflow:"ellipsis",children:n})]})},ma=e=>{var t;const{asset:n,item:o}=e,r=null==(t=null==n?void 0:n.metadata)?void 0:t.exif;return le(me,{marginTop:3,children:[ie(me,{children:le(Ve,{space:3,children:[ie(ga,{label:"Size",value:zt(null==n?void 0:n.size,{base:10,round:0})}),ie(ga,{label:"MIME type",value:null==n?void 0:n.mimeType}),ie(ga,{label:"Extension",value:(null==n?void 0:n.extension).toUpperCase()}),ua(n)&&ie(ga,{label:"Dimensions",value:ha(n)})]})}),r&&le(ae,{children:[ie(me,{marginY:4,style:{background:"#222",height:"1px",width:"100%"}}),ie(me,{children:le(Ve,{space:3,children:[r.ISO&&ie(ga,{label:"ISO",value:r.ISO}),r.FNumber&&ie(ga,{label:"Aperture",value:"ƒ/".concat(r.FNumber)}),r.FocalLength&&ie(ga,{label:"Focal length",value:"".concat(r.FocalLength,"mm")}),r.ExposureTime&&ie(ga,{label:"Exposure time",value:"1/".concat(1/r.ExposureTime)}),r.DateTimeOriginal&&ie(ga,{label:"Original date",value:St(new Date(r.DateTimeOriginal),"PPp")})]})})]}),ie(me,{marginTop:5,children:le(se,{space:2,children:[ie(de,{disabled:!o||(null==o?void 0:o.updating),fontSize:1,icon:lo,mode:"ghost",onClick:()=>{window.location.href="".concat(n.url,"?dl=").concat(n.originalFilename)},text:"Download"}),ie(pa,{disabled:!o||(null==o?void 0:o.updating),url:n.url})]})})]})},fa=e=>ie(Ie,{...e,style:{position:"fixed"}}),wa=e=>{const{assetId:t}=e,n=F();return ie(U,{documentStore:n,id:t,children:e=>{let{isLoading:t,referringDocuments:n}=e;return ie(va,{isLoading:t,referringDocuments:n})}})},va=e=>{const{isLoading:t,referringDocuments:n}=e,o=P(),r=n.reduce(((e,t)=>t._id.startsWith("drafts.")?e.concat(t._id.slice(7)):e),[]),i=n.filter((e=>!r.includes(e._id)));return t?ie(ve,{size:1,children:"Loading..."}):0===i.length?ie(ve,{size:1,children:"No documents are referencing this asset"}):ie(ke,{flex:1,marginBottom:2,padding:2,radius:2,shadow:1,children:ie(Ve,{space:2,children:null==i?void 0:i.map((e=>ie(Ca,{doc:e,schemaType:o.get(e._type)},e._id)))})})},Ca=e=>{const{doc:t,schemaType:n}=e,{onClick:o}=At({intent:"edit",params:{id:t._id}});return n?ie(de,{mode:"bleed",onClick:o,padding:2,style:{width:"100%"},children:ie(N,{layout:"default",schemaType:n,value:t})},t._id):ie(me,{padding:2,children:le(ve,{size:1,children:["A document of the unknown type ",ie("em",{children:t._type})]})})},ya=Lt(me)(v||(v=D(["\n text {\n font-family: "," !important;\n font-size: 8px !important;\n font-weight: 500 !important;\n }\n"])),(e=>e.theme.sanity.fonts.text.family)),ka=e=>{const{extension:t,onClick:n,width:o}=e;return ie(fe,{align:"center",justify:"center",onClick:n,style:{height:"100%"},children:ie(ya,{style:{width:o},children:ie(qt,t?{extension:t,...Dt[t]}:{})})})},La=e=>{const{asset:t}=e;return 0===t.mimeType.search("audio")?ie(fe,{align:"center",justify:"center",style:{height:"100%"},children:ie("audio",{controls:!0,src:t.url,style:{width:"100%"}})}):0===t.mimeType.search("video")?ie("video",{controls:!0,src:t.url,style:{height:"100%",width:"100%"}}):ie(ka,{extension:t.extension,width:"50%"})};var Ma,xa,ba,Ha,Va,Ia,ja,Za,Ta,Wa,Ba,_a;const Ra=null==(Va=null==(Ha=null==(ba=null==(xa=null==(Ma=ye)?void 0:Ma.color)?void 0:xa.dark)?void 0:ba.primary)?void 0:Ha.spot)?void 0:Va.blue,Sa=null==(Wa=null==(Ta=null==(Za=null==(ja=null==(Ia=ye)?void 0:Ia.color)?void 0:ja.dark)?void 0:Za.primary)?void 0:Ta.spot)?void 0:Wa.gray,za=null==(Ba=ye)?void 0:Ba.radius,Ea=null==(_a=ye)?void 0:_a.space,Aa={control:(e,t)=>{let{isDisabled:n,isFocused:o}=t,r="inset 0 0 0 1px ".concat(al[900].hex);return o&&(r="inset 0 0 0 1px ".concat(al[900].hex,", 0 0 0 1px var(--card-bg-color), 0 0 0 3px var(--card-focus-ring-color) !important")),{...e,background:n?ye.color.dark.default.input.default.disabled.bg:"transparent",color:dl,border:"none",borderRadius:za[1],boxShadow:r,minHeight:"35px",outline:"none",transition:"none","&:hover":{boxShadow:"inset 0 0 0 1px ".concat(ye.color.dark.default.input.default.hovered.border)}}},indicatorsContainer:(e,t)=>{let{isDisabled:n}=t;return{...e,opacity:n?.25:1}},input:e=>({...e,color:dl,fontFamily:ye.fonts.text.family,marginLeft:Ea[2]}),menuList:e=>({...e}),multiValue:(e,t)=>{let{isDisabled:n}=t;return{...e,backgroundColor:Sa,borderRadius:za[2],opacity:n?.5:1}},multiValueRemove:e=>({...e,paddingLeft:0,"&:hover":{background:"transparent",color:"inherit"}}),noOptionsMessage:e=>({...e,fontFamily:ye.fonts.text.family,lineHeight:"1em"}),option:(e,t)=>{let{isFocused:n}=t;return{...e,backgroundColor:n?Ra:"transparent",borderRadius:za[2],color:n?sl:"inherit",fontFamily:ye.fonts.text.family,padding:"4px 8px","&:hover":{backgroundColor:Ra,color:sl}}},placeholder:e=>({...e,fontFamily:ye.fonts.text.family,marginLeft:Ea[2]}),valueContainer:e=>({...e,marginBottom:Ea[0],marginLeft:Ea[1],marginTop:Ea[0],padding:0})},qa=e=>ie(me,{paddingX:1,paddingY:1,children:ie(It.Option,{...e,children:le(fe,{align:"center",children:[e.data.__isNew__&&ie(Xt,{style:{marginRight:"3px"}}),e.children]})})}),Da={DropdownIndicator:e=>ie(It.DropdownIndicator,{...e,children:ie(me,{paddingX:2,children:ie(ve,{size:1,children:ie(kn,{})})})}),IndicatorSeparator:null,Menu:e=>ie(It.Menu,{...e,children:ie(ke,{radius:1,shadow:2,children:e.children})}),MenuList:e=>{const{children:t}=e;if(Array.isArray(t)){const e=t.length>5?185:37*t.length;return ie(jt,{className:"media__custom-scrollbar",itemContent:e=>{const n=t[e];return ie(qa,{...n.props})},style:{height:e},totalCount:t.length})}return ie(It.MenuList,{...e,children:t})},MultiValueLabel:e=>ie(me,{paddingLeft:1,paddingRight:0,paddingY:1,children:ie(ve,{size:2,weight:"medium",children:ie(It.MultiValueLabel,{...e})})}),MultiValueRemove:e=>ie(It.MultiValueRemove,{...e,children:ie(Zn,{color:"#1f2123"})}),Option:qa},Oa=Lt(yo)((e=>{let{theme:t}=e;return{color:t.sanity.color.spot.red}})),Fa=e=>{const{description:t,error:n,label:o,name:r}=e;return le(ae,{children:[ie(me,{marginY:3,children:le(se,{space:2,children:[ie(ve,{as:"label",htmlFor:r,size:1,weight:"semibold",children:o}),n&&ie(ve,{size:1,children:ie(xe,{content:ie(me,{padding:2,children:le(ve,{muted:!0,size:1,children:[ie(Oa,{style:{marginRight:"0.1em"}}),n.message]})}),fallbackPlacements:["top","left"],placement:"right",portal:!0,children:ie(Oa,{})})})]})}),t&&ie(me,{marginY:3,children:ie(ve,{htmlFor:r,muted:!0,size:1,children:t})})]})},Ua=e=>{const{control:t,description:n,disabled:o,error:r,label:i,name:l,onCreateTag:a,options:s,placeholder:d,value:c}=e,u=gl((e=>e.tags.creating)),h=gl((e=>e.tags.fetching));return le(me,{style:{zIndex:2},children:[ie(Fa,{description:n,error:r,label:i,name:l}),ie(Bt,{control:t,defaultValue:c,name:l,render:e=>{let{onBlur:t,onChange:n,value:r}=e;return ie(Ot,{components:Da,instanceId:"tags",isClearable:!1,isDisabled:u||o||h,isLoading:u,isMulti:!0,name:l,noOptionsMessage:()=>"No tags",onBlur:t,onChange:n,onCreateOption:a,options:s,placeholder:h?"Loading...":d,styles:Aa,value:r})}})]})},Pa=G(((e,t)=>{const{description:n,disabled:o,error:r,label:i,name:l,placeholder:a,value:s}=e;return le(me,{children:[ie(Fa,{description:n,error:r,label:i,name:l}),ie(Ce,{autoComplete:"off",autoFocus:!0,defaultValue:s,disabled:o,id:l,name:l,placeholder:a,ref:t})]})})),Na=G(((e,t)=>{const{description:n,disabled:o,error:r,label:i,name:l,placeholder:a,rows:s,value:d}=e;return le(me,{children:[ie(Fa,{description:n,error:r,label:i,name:l}),ie(je,{autoComplete:"off",defaultValue:d,disabled:o,id:l,name:l,placeholder:a,ref:t,rows:s})]})})),Qa=e=>{const{disabled:t,isValid:n,lastUpdated:o,onClick:r}=e;let i;return i=n?o?le(ae,{children:["Last updated",ie("br",{})," ",St(new Date(o),"PPp")]}):"No unpublished changes":"There are validation errors that need to be fixed before this document can be published",ie(xe,{content:ie(me,{padding:3,style:{maxWidth:"185px"},children:ie(ve,{muted:!0,size:1,children:i})}),disabled:"ontouchstart"in window,placement:"top",portal:!0,children:ie(me,{children:ie(de,{disabled:t,fontSize:1,onClick:r,text:"Save and close",tone:"primary"})})})},Xa=Lt.img(C||(C=D(["\n --checkerboard-color: ",";\n\n display: block;\n width: 100%;\n height: 100%;\n object-fit: contain;\n\n ","\n"])),al[900].hex,(e=>e.showCheckerboard&&Mt(y||(y=D(["\n background-image: linear-gradient(45deg, var(--checkerboard-color) 25%, transparent 25%),\n linear-gradient(-45deg, var(--checkerboard-color) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, var(--checkerboard-color) 75%),\n linear-gradient(-45deg, transparent 75%, var(--checkerboard-color) 75%);\n background-size: 20px 20px;\n background-position: 0 0, 0 10px, 10px -10px, -10px 0;\n "]))))),Ga=Rt.object().shape({originalFilename:Rt.string().trim().required("Filename cannot be empty")}),Ya=e=>{var t,n,o;const{children:r,dialog:{assetId:i,id:l,lastCreatedTag:a,lastRemovedTagIds:s}}=e,d=Zi(),c=Ne(),u=gl((e=>el(e,String(i)))),h=gl(Di),p=$(!1),[g,m]=ne(null==u?void 0:u.asset),[f,w]=ne("details"),v=u?null==u?void 0:u.asset:g,C=Si(h),y=gl((L=v,e=>{var t,n,o;const r=null==(o=null==(n=null==(t=null==L?void 0:L.opt)?void 0:t.media)?void 0:n.tags)?void 0:o.reduce(((t,n)=>{const o=e.tags.byIds[n._ref];return(null==o?void 0:o.tag)&&t.push(o),t}),[]);return r&&(null==r?void 0:r.length)>0?Si(r):null}));var L;const M=e=>({altText:(null==e?void 0:e.altText)||"",description:(null==e?void 0:e.description)||"",originalFilename:(null==e?void 0:e.originalFilename)||"",opt:{media:{tags:y}},title:(null==e?void 0:e.title)||""}),x=null==y?void 0:y.map((e=>e.label)).join(","),{control:b,formState:{errors:H,isDirty:V,isValid:I},getValues:j,handleSubmit:Z,register:T,reset:W,setValue:B}=_t({defaultValues:M(null==u?void 0:u.asset),mode:"onChange",resolver:Wt(Ga)}),_=!u||(null==u?void 0:u.updating),R=()=>{(null==u?void 0:u.asset)&&c(fl.showConfirmDeleteAssets({assets:[u],closeDialogId:null==u?void 0:u.asset._id}))},S=e=>{const{result:t,transition:n}=e;t&&"update"===n&&(m(t),W(M(t)))},z=async e=>{var t;if(!(null==u?void 0:u.asset))return;const n=da(e);c(il.updateRequest({asset:null==u?void 0:u.asset,closeDialogId:null==u?void 0:u.asset._id,formData:{...n,opt:{media:{...n.opt.media,tags:(null==(t=n.opt.media.tags)?void 0:t.map((e=>({_ref:e.value,_type:"reference",_weak:!0}))))||null}}}}))};J((()=>{if(!(null==u?void 0:u.asset))return;const e=d.listen(Ue(k||(k=D(["*[_id == $id]"]))),{id:null==u?void 0:u.asset._id}).subscribe(S);return()=>{null==e||e.unsubscribe()}}),[]),J((()=>{p.current&&W({opt:{media:{tags:y}}},{errors:!0,dirtyFields:!0,isDirty:!0}),p.current=!0}),[x]),J((()=>{if(a){const e=(j("opt.media.tags")||[]).concat([a]);B("opt.media.tags",e,{shouldDirty:!0})}}),[a]),J((()=>{if(s){const e=(j("opt.media.tags")||[]).filter((e=>!s.includes(e.value)));B("opt.media.tags",e,{shouldDirty:!0})}}),[s]);return v?le(fa,{footer:ie((()=>ie(me,{padding:3,children:le(fe,{justify:"space-between",children:[ie(de,{disabled:_,fontSize:1,mode:"bleed",onClick:R,text:"Delete",tone:"critical"}),ie(Qa,{disabled:_||!V||!I,isValid:I,lastUpdated:v._updatedAt,onClick:Z(z)})]})})),{}),header:"Asset details",id:l,onClose:()=>{c(fl.remove({id:l}))},width:3,children:[le(fe,{direction:["column-reverse","column-reverse","row-reverse"],children:[le(me,{flex:1,marginTop:[5,5,0],padding:4,children:[le(Ze,{space:2,children:[ie(Te,{"aria-controls":"details-panel",disabled:_,id:"details-tab",label:"Details",onClick:()=>w("details"),selected:"details"===f,size:2}),ie(Te,{"aria-controls":"references-panel",disabled:_,id:"references-tab",label:"References",onClick:()=>w("references"),selected:"references"===f,size:2})]}),le(me,{as:"form",marginTop:4,onSubmit:Z(z),children:[!u&&ie(ke,{marginBottom:3,padding:3,radius:2,shadow:1,tone:"critical",children:ie(ve,{size:1,children:"This file cannot be found – it may have been deleted."})}),ie("button",{style:{display:"none"},tabIndex:-1,type:"submit"}),ie(We,{"aria-labelledby":"details",hidden:"details"!==f,id:"details-panel",children:le(Ve,{space:3,children:[ie(Ua,{control:b,disabled:_,error:null==(n=null==(t=null==H?void 0:H.opt)?void 0:t.media)?void 0:n.tags,label:"Tags",name:"opt.media.tags",onCreateTag:e=>{c(Fi.createRequest({assetId:null==v?void 0:v._id,name:e}))},options:C,placeholder:"Select or create...",value:y}),ie(Pa,{disabled:_,error:null==H?void 0:H.originalFilename,label:"Filename",name:"originalFilename",ref:T,value:null==v?void 0:v.originalFilename}),ie(Pa,{disabled:_,error:null==H?void 0:H.title,label:"Title",name:"title",ref:T,value:null==v?void 0:v.title}),ie(Pa,{disabled:_,error:null==H?void 0:H.altText,label:"Alt Text",name:"altText",ref:T,value:null==v?void 0:v.altText}),ie(Na,{disabled:_,error:null==H?void 0:H.description,label:"Description",name:"description",ref:T,rows:3,value:null==v?void 0:v.description})]})}),ie(We,{"aria-labelledby":"references",hidden:"references"!==f,id:"references-panel",children:ie(me,{marginTop:5,children:(null==u?void 0:u.asset)&&ie(wa,{assetId:null==u?void 0:u.asset._id})})})]})]}),le(me,{flex:1,padding:4,children:[le(me,{style:{aspectRatio:"1"},children:[ca(v)&&ie(La,{asset:v}),ua(v)&&ie(Xa,{draggable:!1,showCheckerboard:!(null==(o=null==v?void 0:v.metadata)?void 0:o.isOpaque),src:sa(v,{height:600,width:600})})]}),v&&ie(me,{marginTop:4,children:ie(ma,{asset:v,item:u})})]})]}),r]}):null},$a=e=>{const{children:t,dialog:n}=e,o=Ne(),r=()=>{o(fl.remove({id:null==n?void 0:n.id}))},i=()=>{(null==n?void 0:n.closeDialogId)&&o(fl.remove({id:null==n?void 0:n.closeDialogId})),(null==n?void 0:n.confirmCallbackAction)&&o(n.confirmCallbackAction),r()},l=()=>le(fe,{align:"center",children:[ie(me,{paddingX:1,children:ie(mi,{})}),ie(me,{marginLeft:2,children:null==n?void 0:n.headerTitle})]});return le(fa,{footer:ie((()=>ie(me,{padding:3,children:le(fe,{justify:"space-between",children:[ie(de,{fontSize:1,mode:"bleed",onClick:r,text:"Cancel"}),ie(de,{fontSize:1,onClick:i,text:null==n?void 0:n.confirmText,tone:null==n?void 0:n.tone})]})})),{}),header:ie(l,{}),id:"confirm",onClose:r,width:1,children:[ie(me,{paddingX:4,paddingY:4,children:le(Ve,{space:3,children:[(null==n?void 0:n.title)&&ie(ve,{size:1,children:n.title}),(null==n?void 0:n.description)&&ie(ve,{muted:!0,size:1,children:ie("em",{children:n.description})})]})}),t]})},Ka=e=>{const{children:t,dialog:{id:n}}=e,o=Ne(),r=K((()=>{o(fl.clear())}),[]);return le(fa,{header:"Filters",id:n,onClose:r,width:1,children:[le(me,{padding:3,children:[ie(Jl,{layout:"stack"}),ie(ea,{})]}),t]})},Ja=Rt.object().shape({name:Rt.string().required("Name cannot be empty")}),es=e=>{const{children:t,dialog:{id:n}}=e,o=Ne(),r=gl((e=>e.tags.creating)),i=gl((e=>e.tags.creatingError)),{formState:{errors:l,isDirty:a,isValid:s},handleSubmit:d,register:c,setError:u}=_t({defaultValues:{name:""},mode:"onChange",resolver:Wt(Ja)}),h=r,p=async e=>{const t=da(e);o(Fi.createRequest({name:t.name}))};J((()=>{i&&u("name",{message:null==i?void 0:i.message})}),[i]);return le(fa,{footer:ie((()=>ie(me,{padding:3,children:ie(fe,{justify:"flex-end",children:ie(Qa,{disabled:h||!a||!s,isValid:s,onClick:d(p)})})})),{}),header:"Create Tag",id:n,onClose:()=>{o(fl.clear())},width:1,children:[le(me,{as:"form",padding:4,onSubmit:d(p),children:[ie("button",{style:{display:"none"},tabIndex:-1,type:"submit"}),ie(Pa,{disabled:h,error:null==l?void 0:l.name,label:"Name",name:"name",ref:c})]}),t]})},ts=Rt.object().shape({name:Rt.string().required("Name cannot be empty")}),ns=e=>{const{children:t,dialog:{id:n,tagId:o}}=e,r=Zi(),i=Ne(),l=gl((e=>Oi(e,String(o)))),[a,s]=ne(null==l?void 0:l.tag),d=l?null==l?void 0:l.tag:a,c=e=>{var t;return{name:(null==(t=null==e?void 0:e.name)?void 0:t.current)||""}},{formState:{errors:u,isDirty:h,isValid:p},handleSubmit:g,register:m,reset:f,setError:w}=_t({defaultValues:c(null==l?void 0:l.tag),mode:"onChange",resolver:Wt(ts)}),v=!l||(null==l?void 0:l.updating),C=async e=>{var t;if(!(null==l?void 0:l.tag))return;const n=da(e);i(Fi.updateRequest({closeDialogId:null==(t=null==l?void 0:l.tag)?void 0:t._id,formData:{name:{_type:"slug",current:n.name}},tag:null==l?void 0:l.tag}))},y=()=>{var e;(null==l?void 0:l.tag)&&i(fl.showConfirmDeleteTag({closeDialogId:null==(e=null==l?void 0:l.tag)?void 0:e._id,tag:null==l?void 0:l.tag}))},k=e=>{const{result:t,transition:n}=e;t&&"update"===n&&(s(t),f(c(t)))};J((()=>{var e;(null==l?void 0:l.error)&&w("name",{message:null==(e=l.error)?void 0:e.message})}),[null==l?void 0:l.error]),J((()=>{if(!(null==l?void 0:l.tag))return;const e=r.listen(Ue(L||(L=D(["*[_id == $id]"]))),{id:null==l?void 0:l.tag._id}).subscribe(k);return()=>{null==e||e.unsubscribe()}}),[]);const M=()=>{var e;return ie(me,{padding:3,children:le(fe,{justify:"space-between",children:[ie(de,{disabled:v,fontSize:1,mode:"bleed",onClick:y,text:"Delete",tone:"critical"}),ie(Qa,{disabled:v||!h||!p,isValid:p,lastUpdated:null==(e=null==l?void 0:l.tag)?void 0:e._updatedAt,onClick:g(C)})]})})};return d?le(fa,{footer:ie(M,{}),header:"Edit Tag",id:n,onClose:()=>{i(fl.remove({id:n}))},width:1,children:[le(me,{as:"form",padding:4,onSubmit:g(C),children:[!l&&ie(ke,{marginBottom:3,padding:3,radius:2,shadow:1,tone:"critical",children:ie(ve,{size:1,children:"This tag cannot be found – it may have been deleted."})}),ie("button",{style:{display:"none"},tabIndex:-1,type:"submit"}),ie(Pa,{disabled:v,error:null==u?void 0:u.name,label:"Name",name:"name",ref:m})]}),t]}):null},os=Lt(fe)(M||(M=D(["\n height: ","px;\n"])),32),rs=Lt(fe)(x||(x=D(["\n @media (pointer: fine) {\n visibility: hidden;\n }\n\n @media (hover: hover) and (pointer: fine) {\n ",":hover & {\n visibility: visible;\n }\n }\n"])),os),is=e=>{const{disabled:t,icon:n,onClick:o,tone:r,tooltip:i}=e;return ie(xe,{content:ie(Be,{padding:2,width:0,children:ie(ve,{muted:!0,size:1,children:i})}),disabled:"ontouchstart"in window,placement:"top",portal:!0,children:ie(de,{disabled:t,fontSize:1,icon:n,mode:"bleed",onClick:o,padding:2,tone:r})})},ls=e=>{var t,n;const{actions:o,tag:r}=e,i=Ne(),l=gl(ol),a=gl(Ni),s=gl((e=>{var t;return Qi(e,null==(t=null==r?void 0:r.tag)?void 0:t._id)}));return le(os,{align:"center",flex:1,justify:"space-between",paddingLeft:3,children:[ie(me,{flex:1,children:ie(ve,{size:1,style:{color:(null==r?void 0:r.updating)?al[800].hex:al[500].hex,userSelect:"none"},textOverflow:"ellipsis",children:null==(n=null==(t=null==r?void 0:r.tag)?void 0:t.name)?void 0:n.current})}),le(rs,{align:"center",style:{flexShrink:0},children:[(null==o?void 0:o.includes("search"))&&ie(is,{disabled:null==r?void 0:r.updating,icon:ie(s?Zn:br,{}),onClick:s?()=>{i(Xi.facetsRemove({facetName:"tag"}))}:()=>{var e,t,n;const o={...ki.tag,value:{label:null==(t=null==(e=null==r?void 0:r.tag)?void 0:e.name)?void 0:t.current,value:null==(n=null==r?void 0:r.tag)?void 0:n._id}};i(a?Xi.facetsUpdate({name:"tag",operatorType:"references",value:o.value}):Xi.facetsAdd({facet:o}))},tooltip:s?"Remove filter":"Filter by tag"}),(null==o?void 0:o.includes("edit"))&&ie(is,{disabled:null==r?void 0:r.updating,icon:ie(ho,{}),onClick:()=>{var e;i(Ei.showTagEdit({tagId:null==(e=null==r?void 0:r.tag)?void 0:e._id}))},tone:"primary",tooltip:"Edit tag"}),(null==o?void 0:o.includes("applyAll"))&&ie(is,{disabled:null==r?void 0:r.updating,icon:ie(tn,{}),onClick:()=>{i(fl.showConfirmAssetsTagAdd({assetsPicked:l,tag:r.tag}))},tone:"primary",tooltip:"Add tag to selected assets"}),(null==o?void 0:o.includes("removeAll"))&&ie(is,{disabled:null==r?void 0:r.updating,icon:ie($t,{}),onClick:()=>{i(fl.showConfirmAssetsTagRemove({assetsPicked:l,tag:r.tag}))},tone:"critical",tooltip:"Remove tag from selected assets"}),(null==o?void 0:o.includes("delete"))&&ie(is,{disabled:null==r?void 0:r.updating,icon:ie(Jr,{}),onClick:()=>{i(fl.showConfirmDeleteTag({tag:r.tag}))},tone:"critical",tooltip:"Delete tag"})]})]})},as=oe((e=>{let{isScrolling:t,item:n}=e;var o;return"string"==typeof n?ie(fe,{align:"center",justify:"space-between",paddingX:3,style:{height:"".concat(32,"px")},children:ie(we,{size:0,children:n})},n):ie(ls,{actions:t?void 0:n.actions,tag:n},null==(o=n.tag)?void 0:o._id)})),ss=()=>{const e=gl(ol),t=gl(Di),[n,o]=ne(!1),r=null==e?void 0:e.reduce(((e,t)=>{var n,o,r,i;const l=(null==(i=null==(r=null==(o=null==(n=null==t?void 0:t.asset)?void 0:n.opt)?void 0:o.media)?void 0:r.tags)?void 0:i.map((e=>e._ref)))||[];return e=e.concat(l)}),[]),i=[...new Set(r)],l=i.reduce(((t,n)=>{const o=e.every((e=>{var t,o,r,i;return(null!=(i=null==(r=null==(o=null==(t=e.asset.opt)?void 0:t.media)?void 0:o.tags)?void 0:r.findIndex((e=>e._ref===n)))?i:-1)>=0}));return o?t.appliedToAll.push(n):t.appliedToSome.push(n),t}),{appliedToAll:[],appliedToSome:[]}),a=t.filter((e=>l.appliedToAll.includes(e.tag._id))).map((e=>({...e,actions:["delete","edit","removeAll","search"]}))),s=t.filter((e=>l.appliedToSome.includes(e.tag._id))).map((e=>({...e,actions:["applyAll","delete","edit","removeAll","search"]}))),d=t.filter((e=>!i.includes(e.tag._id))).map((e=>({...e,actions:["applyAll","delete","edit","search"]})));let c=[];return 0===e.length?c=t.map((e=>({...e,actions:["delete","edit","search"]}))):((null==a?void 0:a.length)>0&&(c=[...c,1===e.length?"Used":"Used by all",...a]),(null==s?void 0:s.length)>0&&(c=[...c,"Used by some",...s]),(null==d?void 0:d.length)>0&&(c=[...c,"Unused",...d])),ie(jt,{className:"media__custom-scrollbar",computeItemKey:e=>{const t=c[e];return"string"==typeof t?t:t.tag._id},isScrolling:o,itemContent:e=>ie(as,{isScrolling:n,item:c[e]}),style:{flex:1,overflowX:"hidden"},totalCount:c.length})},ds=e=>{let{allowCreate:t,light:n,title:o}=e;var r,i;const l=Ne(),a=gl((e=>e.tags.creating)),s=gl((e=>e.tags.fetching));return ie(ae,{children:le(fe,{align:"center",justify:"space-between",paddingLeft:3,style:{background:n?null==(r=al)?void 0:r[900].hex:sl,borderBottom:"1px solid ".concat(null==(i=al)?void 0:i[900].hex),flexShrink:0,height:"".concat(32,"px")},children:[le(se,{space:2,children:[ie(we,{size:0,children:o}),s&&ie(we,{size:0,style:{opacity:.3},children:"Loading..."})]}),t&&ie(me,{marginRight:1,children:ie(de,{disabled:a,fontSize:1,icon:En,mode:"bleed",onClick:()=>{l(Ei.showTagCreate())},style:{background:"transparent",boxShadow:"none"}})})]})})},cs=()=>{const e=gl(rl),t=gl(Di),n=gl((e=>e.tags.fetching)),o=-1!==gl((e=>e.tags.fetchCount)),r=!n&&(null==t?void 0:t.length)>0,i=!!(e>0);return le(fe,{direction:"column",flex:1,style:{background:sl,height:"100%"},children:[ie(ds,{allowCreate:!0,light:i,title:i?"Tags (in selection)":"Tags"}),o&&!r&&ie(me,{padding:3,children:ie(ve,{size:1,style:{color:al[700].hex},children:ie("em",{children:"No tags"})})}),r&&ie(ss,{})]})},us=e=>{const{children:t,dialog:{id:n}}=e,o=Ne(),r=K((()=>{o(fl.clear())}),[]);return le(fa,{header:"All Tags",id:n,onClose:r,width:1,children:[ie(me,{style:{height:"100%",minHeight:"420px"},children:ie(cs,{})}),t]})},hs=()=>{const e=gl((e=>e.dialog.items)),t=(e,n)=>{if(0===e.length||n>=e.length)return null;const o=e[n],r=t(e,n+1);return"assetEdit"===o.type?ie(Ya,{dialog:o,children:r},n):"confirm"===o.type?ie($a,{dialog:o,children:r},n):"searchFacets"===o.type?ie(Ka,{dialog:o,children:r},n):"tagCreate"===o.type?ie(es,{dialog:o,children:r},n):"tagEdit"===o.type?ie(ns,{dialog:o,children:r},n):"tags"===o.type?ie(us,{dialog:o,children:r},n):null};return t(e,0)},ps=ee(void 0),gs=e=>{const{children:t,open:n}=e,o={open:n};return ie(ps.Provider,{value:o,children:t})},ms=e=>{const{onClose:t}=e,{open:n}=(()=>{const e=te(ps);if(void 0===e)throw new Error("useDropzoneActions must be used within an DropzoneDispatchProvider");return e})(),{onSelect:o}=ji(),r=gl((e=>e.assets.assetTypes)),i=gl((e=>e.selected.document));return ie(me,{paddingY:2,children:le(fe,{align:"center",justify:"space-between",children:[ie(me,{flex:1,marginX:3,children:le(se,{style:{whiteSpace:"nowrap"},children:[ie(ve,{textOverflow:"ellipsis",weight:"semibold",children:ie("span",{children:o?"Insert ".concat(r.join(" or ")):"Browse Assets"})}),i&&ie(me,{display:["none","none","block"],children:le(ve,{children:[ie("span",{style:{margin:"0 0.5em"},children:ie(vi,{symbol:"arrow-right"})}),ie("span",{style:{textTransform:"capitalize"},children:i._type})]})})]})}),le(fe,{marginX:2,children:[ie(de,{fontSize:1,icon:ui,mode:"bleed",onClick:n,text:"Upload ".concat(1===r.length?bt(r[0]):"assets"),tone:"primary"}),t&&ie(me,{style:{flexShrink:0},children:ie(de,{disabled:!t,icon:Zn,mode:"bleed",onClick:t,radius:2})})]})]})})},fs=Ye([e=>e.assets.allIds,e=>e.uploads.allIds],((e,t)=>{const n=e.map((e=>({id:e,type:"asset"})));return[...t.map((e=>({id:e,type:"upload"}))),...n]})),ws=Lt(fe)(b||(b=D(["\n box-sizing: border-box;\n height: 100%;\n overflow: hidden;\n padding: 2px;\n position: relative;\n width: 100%;\n"]))),vs=Lt(fe)(H||(H=D(["\n border: 1px solid transparent;\n height: 100%;\n pointer-events: ",";\n position: relative;\n transition: all 300ms;\n user-select: none;\n width: 100%;\n\n border: ",";\n\n ","\n"])),(e=>e.updating?"none":"auto"),(e=>e.picked?"1px solid ".concat(e.theme.sanity.color.spot.orange," !important"):"1px solid inherit"),(e=>!e.updating&&Mt(V||(V=D(["\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n border: 1px solid ",";\n }\n }\n "])),al[500].hex))),Cs=Lt(fe)(I||(I=D(["\n cursor: ",";\n height: ","px;\n transition: all 300ms;\n\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n background: ",";\n }\n }\n"])),(e=>e.selected?"default":"pointer"),32,al[950].hex),ys=Lt(gi)((e=>{let{theme:t}=e;return{color:t.sanity.color.spot.red}}));var ks=oe((e=>{var t,n;const{id:o,selected:r}=e,i=Ci("shift"),l=Ne(),a=gl((e=>e.assets.lastPicked)),s=gl((e=>el(e,o))),d=null==s?void 0:s.asset,c=null==s?void 0:s.error,u=null==(n=null==(t=null==s?void 0:s.asset)?void 0:t.metadata)?void 0:n.isOpaque,h=null==s?void 0:s.picked,p=null==s?void 0:s.updating,{onSelect:g}=ji();if(!d)return null;const m=p?.5:1,f=r||p?.25:1;return ie(ws,{children:le(vs,{direction:"column",picked:h,updating:s.updating,children:[le(me,{flex:1,style:{cursor:r?"default":"pointer",position:"relative"},children:[le("div",{onClick:e=>{e.stopPropagation(),g?g([{kind:"assetDocumentId",value:d._id}]):i.current?l(h?il.pick({assetId:d._id,picked:!h}):il.pickRange({startId:a||d._id,endId:d._id})):l(fl.showAssetEdit({assetId:d._id}))},style:{height:"100%",opacity:f},children:[ca(d)&&ie(ka,{extension:d.extension,width:"80px"}),ua(d)&&ie(Xa,{draggable:!1,showCheckerboard:!u,src:sa(d,{height:250,width:250}),style:{draggable:!1,transition:"opacity 1000ms"}})]}),r&&!p&&ie(fe,{align:"center",justify:"center",style:{height:"100%",left:0,opacity:m,position:"absolute",top:0,width:"100%"},children:ie(ve,{size:2,children:ie(Cn,{})})}),p&&ie(fe,{align:"center",justify:"center",style:{height:"100%",left:0,position:"absolute",top:0,width:"100%"},children:ie(_e,{})})]}),le(Cs,{align:"center",onClick:e=>{e.stopPropagation(),g?l(fl.showAssetEdit({assetId:d._id})):i.current&&!h?l(il.pickRange({startId:a||d._id,endId:d._id})):l(il.pick({assetId:d._id,picked:!h}))},paddingX:1,style:{opacity:m},children:[g?ie(ho,{style:{flexShrink:0,opacity:.5}}):ie(Re,{checked:h,readOnly:!0,style:{flexShrink:0,pointerEvents:"none",transform:"scale(0.8)"}}),ie(me,{marginLeft:2,children:ie(ve,{muted:!0,size:0,textOverflow:"ellipsis",children:d.originalFilename})})]}),c&&ie(me,{padding:3,style:{position:"absolute",right:0,top:0},children:ie(xe,{content:ie(Be,{padding:2,width:0,children:ie(ve,{size:1,children:c})}),placement:"left",portal:!0,children:ie(ve,{size:1,children:ie(ys,{color:"critical"})})})})]})})}));const Ls=async e=>{const t=await(e=>new Promise((t=>{const n=window.URL.createObjectURL(e),o=new Image;o.onload=()=>{window.URL.revokeObjectURL(n),t(o)},o.src=n})))(e),n=await(o=t,new Promise((e=>{const t=o.width/o.height,n=document.createElement("canvas");n.width=180,n.height=Math.max(180/t,1);try{const r=n.getContext("2d");null==r||r.drawImage(o,0,0,180,180/t),n.toBlob(e,"image/jpeg")}catch(e){console.warn("Unable to generate preview image:",e)}})));var o;if(!n)throw Error("Unable to generate file Blob");return window.URL.createObjectURL(n)};function Ms(e,t){const n=e.indexOf(t);return n>-1&&e.splice(n,1),e}const xs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:4;const t=[],n=[],o=new st;function r(l){return new dt((a=>{if(t.length>=e)return i(l).pipe(ht(r)).subscribe(a);const s=l.subscribe(a);return t.push(s),()=>{for(Ms(t,s),Ms(n,l),s.unsubscribe();n.length>0&&t.length<e;)o.next(n.shift())}}))}function i(e){return n.push(e),o.asObservable().pipe(Ct((t=>t===e)))}return r},bs=e=>Array.prototype.map.call(new Uint8Array(e),(e=>"00".concat(e.toString(16)).slice(-2))).join(""),Hs=e=>window.crypto&&window.crypto.subtle&&window.FileReader?(e=>new dt((t=>{const n=new FileReader;return n.onload=()=>{t.next(n.result),t.complete()},n.onerror=e=>{t.error(e)},n.readAsArrayBuffer(e),()=>{n.abort()}})))(e).pipe(ht((e=>window.crypto.subtle.digest("SHA-1",e))),yt(bs)):rt({message:"Unable to generate hash: uploads are only allowed in secure contexts",statusCode:500}),Vs=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const n=xs(t);return function(){return lt(n(e(...arguments)))}}(((e,t,n,o)=>it(null).pipe(ht((()=>((e,t,n)=>e.observable.fetch("*[_type == $documentType && sha1hash == $hash][0]",{documentType:t,hash:n}))(e,"sanity.".concat(t,"Asset"),o))),ht((e=>e?rt({message:"Asset already exists",statusCode:409}):it(null))),ht((()=>e.observable.assets.upload(t,n,{extract:["blurhash","exif","location","lqip","palette"],preserveFilename:!0}).pipe(yt((e=>"response"===e.type?{asset:e.body.document,id:e.body.document._id,type:"complete"}:e)))))))),Is=Ge({name:"uploads",initialState:{allIds:[],byIds:{}},extraReducers:e=>{e.addCase(Yi.uploadComplete,((e,t)=>{const{asset:n}=t.payload;e.byIds[n.sha1hash]&&(e.byIds[n.sha1hash].status="complete")}))},reducers:{checkRequest(e,t){},checkComplete(e,t){const{results:n}=t.payload;Object.keys(n).forEach((t=>{const n=e.allIds.indexOf(t);if(n>=0&&e.allIds.splice(n,1),e.byIds[t]){const n=e.byIds[t].objectUrl;n&&window.URL.revokeObjectURL(n),delete e.byIds[t]}}))},previewReady(e,t){const{blobUrl:n,hash:o}=t.payload;e.byIds[o]&&(e.byIds[o].objectUrl=n)},uploadCancel(e,t){const{hash:n}=t.payload,o=e.allIds.indexOf(n);o>=0&&e.allIds.splice(o,1),e.byIds[n]&&delete e.byIds[n]},uploadError(e,t){const{hash:n}=t.payload,o=e.allIds.indexOf(n);o>=0&&e.allIds.splice(o,1),delete e.byIds[n]},uploadRequest(e,t){},uploadProgress(e,t){const{event:n,uploadHash:o}=t.payload;e.byIds[o].percent=n.percent,e.byIds[o].status="uploading"},uploadStart(e,t){const{uploadItem:n}=t.payload;e.allIds.includes(n.hash)||e.allIds.push(n.hash),e.byIds[n.hash]=n}}}),js=Ye([e=>e.uploads.byIds,(e,t)=>t],((e,t)=>e[t]));Ye([e=>e.uploads.byIds,e=>e.uploads.allIds],((e,t)=>t.map((t=>e[t]))));const Zs=Is.actions;var Ts=Is.reducer;const Ws=Lt(fe)(Z||(Z=D(["\n box-sizing: border-box;\n height: 100%;\n overflow: hidden;\n padding: 2px;\n position: relative;\n width: 100%;\n"]))),Bs=e=>{const{id:t}=e,n=Ne(),o=gl((e=>js(e,t)));if(!o)return null;const r=zt(o.size,{base:10,round:0}),i=Math.round(o.percent||0),l="complete"===o.status,a="uploading"===o.status,s="queued"===o.status;let d;l&&(d="Verifying"),a&&(d="".concat(i,"%")),s&&(d="Queued");return ie(Ws,{children:le(fe,{direction:"column",flex:1,style:{background:al[950].hex,border:"1px solid transparent",height:"100%",position:"relative"},children:[ie("div",{style:{background:al[600].hex,bottom:0,height:"1px",left:0,position:"absolute",width:"100%",transform:"scaleX(".concat(.01*i,")"),transformOrigin:"bottom left",transition:"all 1000ms ease-out"}}),le(me,{flex:1,style:{position:"relative"},children:["image"===o.assetType&&(null==o?void 0:o.objectUrl)&&ie(Xa,{draggable:!1,src:o.objectUrl,style:{opacity:.4}}),"file"===o.assetType&&ie("div",{style:{height:"100%",opacity:.1},children:ie(ka,{width:"80px"})}),!l&&100!==i&&ie(fe,{align:"center",direction:"column",justify:"center",style:{height:"100%",left:0,position:"absolute",top:0,width:"100%"},children:ie(de,{fontSize:4,icon:Zn,mode:"bleed",onClick:()=>{n(Zs.uploadCancel({hash:o.hash}))},padding:2,style:{background:"none",boxShadow:"none"},tone:"critical"})})]}),le(fe,{align:"center",justify:"space-between",paddingX:2,style:{height:"".concat(32,"px")},children:[ie(me,{flex:1,marginRight:1,children:le(ve,{size:0,textOverflow:"ellipsis",children:[o.name," (",r,")"]})}),ie(ve,{size:0,style:{flexShrink:0},weight:"semibold",children:d})]})]})})},_s=oe((e=>{let{item:t,selected:n}=e;return"asset"===(null==t?void 0:t.type)?ie(ks,{id:t.id,selected:n}):"upload"===(null==t?void 0:t.type)?ie(Bs,{id:t.id}):null})),Rs=Lt.div(T||(T=D(["\n height: ","px;\n width: ","px;\n"])),220,240),Ss=Lt.div(W||(W=D(["\n display: grid;\n grid-template-columns: repeat(auto-fill, ","px);\n grid-template-rows: repeat(auto-fill, ","px);\n justify-content: center;\n margin: 0 auto;\n"])),240,220),zs=e=>{const{items:t,onLoadMore:n}=e,o=gl((e=>e.selected.assets)),r=o&&o.map((e=>e._id))||[],i=null==t?void 0:t.length;return 0===i?null:ie(Zt,{className:"media__custom-scrollbar",computeItemKey:e=>{const n=t[e];return null==n?void 0:n.id},components:{Item:Rs,List:Ss},endReached:n,itemContent:e=>{const n=t[e],o=r.includes(null==n?void 0:n.id);return ie(_s,{item:n,selected:o})},overscan:48,style:{overflowX:"hidden",overflowY:"scroll"},totalCount:i})},Es=e=>{const{field:t,title:n}=e,o=Ne(),r=gl((e=>e.assets.order)),i=r.field===t;return ie(we,{muted:!t,size:0,children:le(me,{onClick:t?()=>{if(t&&n)if(i){const e="asc"===r.direction?"desc":"asc";o(il.orderSet({order:{field:t,direction:e}}))}else o(il.orderSet({order:{field:t,direction:"asc"}}))}:void 0,style:{cursor:t?"pointer":"default",display:"inline",whiteSpace:"nowrap"},children:[ie("span",{style:{marginRight:"0.4em"},children:n}),i&&"asc"===(null==r?void 0:r.direction)&&ie(xn,{}),i&&"desc"===(null==r?void 0:r.direction)&&ie(kn,{})]})})};var As;const qs=Lt(fe)(B||(B=D(["\n cursor: pointer;\n\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n background: ",";\n }\n }\n"])),null==(As=al)?void 0:As[900].hex),Ds=()=>{var e;const t=Ne(),n=gl((e=>e.assets.fetching)),o=gl(nl),r=gl(rl),i=Me(),{onSelect:l}=ji(),a=r===o;return le(Se,{style:{alignItems:"center",background:sl,borderBottom:"1px solid ".concat(null==(e=al)?void 0:e[900].hex),gridColumnGap:i<3?0:"16px",gridTemplateColumns:Hi,height:i<3?0:"".concat(32,"px"),letterSpacing:"0.025em",position:"sticky",textTransform:"uppercase",top:0,visibility:i<3?"hidden":"visible",width:"100%",zIndex:1},children:[l?ie(Es,{}):ie(qs,{align:"center",justify:"center",onClick:e=>{e.stopPropagation(),t(a?il.pickClear():il.pickAll())},style:{height:"100%",position:"relative"},children:ie(Re,{checked:!n&&a,readOnly:!0,style:{pointerEvents:"none",transform:"scale(0.8)"}})}),ie(Es,{}),ie(Es,{field:"originalFilename",title:"Filename"}),ie(Es,{title:"Resolution"}),ie(Es,{field:"mimeType",title:"MIME type"}),ie(Es,{field:"size",title:"Size"}),ie(Es,{field:"_updatedAt",title:"Last updated"}),ie(Es,{})]})};var Os;const Fs=Lt(Se)(_||(_=D(["\n align-items: center;\n cursor: ",";\n height: 100%;\n pointer-events: ",";\n user-select: none;\n white-space: nowrap;\n\n ","\n"])),(e=>e.selected?"default":"pointer"),(e=>e.updating?"none":"auto"),(e=>{var t;return!e.updating&&Mt(R||(R=D(["\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n background: ",";\n }\n }\n "])),null==(t=al)?void 0:t[950].hex)})),Us=Lt(fe)(S||(S=D(["\n cursor: pointer;\n\n @media (hover: hover) and (pointer: fine) {\n &:hover {\n background: ",";\n }\n }\n"])),null==(Os=al)?void 0:Os[900].hex),Ps=Lt(gi)((e=>{let{theme:t}=e;return{color:t.sanity.color.spot.red}}));var Ns=oe((e=>{var t,n;const{id:o,selected:r}=e,i=Ci("shift"),l=Ne(),a=gl((e=>e.assets.lastPicked)),s=gl((e=>el(e,o))),d=Me(),c=null==s?void 0:s.asset,u=null==s?void 0:s.error,h=null==(n=null==(t=null==s?void 0:s.asset)?void 0:t.metadata)?void 0:n.isOpaque,p=null==s?void 0:s.picked,g=null==s?void 0:s.updating,{onSelect:m}=ji();if(!c)return null;const f=g?.5:1,w=r||g?.1:1;return le(Fs,{onClick:r?void 0:e=>{e.stopPropagation(),m?m([{kind:"assetDocumentId",value:c._id}]):i.current?l(p?il.pick({assetId:c._id,picked:!p}):il.pickRange({startId:a||c._id,endId:c._id})):l(fl.showAssetEdit({assetId:c._id}))},selected:r,style:{gridColumnGap:d<3?0:"16px",gridRowGap:0,gridTemplateColumns:d<3?bi:Hi,gridTemplateRows:d<3?"auto":"1fr"},updating:s.updating,children:[ie(Us,{onClick:e=>{e.stopPropagation(),m?l(fl.showAssetEdit({assetId:c._id})):i.current&&!p?l(il.pickRange({startId:a||c._id,endId:c._id})):l(il.pick({assetId:c._id,picked:!p}))},style:{alignItems:"center",gridColumn:1,gridRowStart:1,gridRowEnd:"span 5",height:"100%",justifyContent:"center",opacity:f,position:"relative"},children:m?ie(ho,{style:{flexShrink:0,opacity:.5}}):ie(Re,{checked:p,readOnly:!0,style:{pointerEvents:"none",transform:"scale(0.8)"}})}),ie(me,{style:{gridColumn:2,gridRowStart:1,gridRowEnd:"span 5",height:"90px",width:"100px"},children:le(fe,{align:"center",justify:"center",style:{height:"100%",position:"relative"},children:[le(me,{style:{height:"100%",opacity:w,position:"relative"},children:[ca(c)&&ie(ka,{extension:c.extension,width:"40px"}),ua(c)&&ie(Xa,{draggable:!1,showCheckerboard:!h,src:sa(c,{height:100,width:100})})]}),g&&ie(fe,{align:"center",justify:"center",style:{height:"100%",left:0,position:"absolute",top:0,width:"100%"},children:ie(_e,{})}),r&&!g&&ie(fe,{align:"center",justify:"center",style:{height:"100%",left:0,position:"absolute",top:0,width:"100%"},children:ie(ve,{size:2,children:ie(Cn,{})})})]})}),ie(me,{marginLeft:d<3?3:0,style:{gridColumn:3,gridRow:d<3?2:"auto",opacity:f},children:ie(ve,{muted:!0,size:1,style:{lineHeight:"2em"},textOverflow:"ellipsis",children:c.originalFilename})}),ie(me,{marginLeft:d<3?3:0,style:{gridColumn:d<3?3:4,gridRow:d<3?3:"auto",opacity:f},children:ie(ve,{muted:!0,size:1,style:{lineHeight:"2em"},textOverflow:"ellipsis",children:ua(c)&&ha(c)})}),ie(me,{style:{display:d<3?"none":"block",gridColumn:5,gridRow:"auto",opacity:f},children:ie(ve,{muted:!0,size:1,style:{lineHeight:"2em"},textOverflow:"ellipsis",children:c.mimeType})}),ie(me,{style:{display:d<3?"none":"block",gridColumn:6,gridRow:"auto",opacity:f},children:ie(ve,{muted:!0,size:1,style:{lineHeight:"2em"},textOverflow:"ellipsis",children:zt(c.size,{base:10,round:0})})}),ie(me,{marginLeft:d<3?3:0,style:{gridColumn:d<3?3:7,gridRow:d<3?4:"auto",opacity:f},children:ie(ve,{muted:!0,size:1,style:{lineHeight:"2em"},textOverflow:"ellipsis",children:Ft(new Date(c._updatedAt),new Date)})}),ie(fe,{align:"center",justify:"center",style:{gridColumn:d<3?4:8,gridRowStart:"1",gridRowEnd:d<3?"span 5":"auto",opacity:f},children:u&&ie(me,{padding:2,children:ie(xe,{content:ie(Be,{padding:2,width:0,children:ie(ve,{size:1,children:u})}),placement:"left",portal:!0,children:ie(ve,{size:1,children:ie(Ps,{color:"critical"})})})})})]})}));const Qs=e=>{const{id:t}=e,n=Ne(),o=gl((e=>js(e,t))),r=Me();if(!o)return null;const i=zt(o.size,{base:10,round:0}),l=Math.round(o.percent||0),a="complete"===o.status,s="uploading"===o.status,d="queued"===o.status;let c;a&&(c="Verifying"),s&&(c="".concat(l,"%")),d&&(c="Queued");return le(Se,{style:{alignItems:"center",background:al[950].hex,gridColumnGap:r<3?0:"16px",gridRowGap:0,gridTemplateColumns:r<3?bi:Hi,gridTemplateRows:r<3?"auto":"1fr",height:"100%",position:"relative"},children:[ie("div",{style:{background:al[600].hex,bottom:0,height:"1px",left:0,position:"absolute",width:"100%",transform:"scaleX(".concat(.01*l,")"),transformOrigin:"bottom left",transition:"all 1000ms ease-out"}}),ie(me,{style:{gridColumn:2,gridRowStart:r<3?1:"auto",gridRowEnd:r<3?"span 4":"auto",height:"90px",width:"100px"},children:le(me,{style:{height:"100%",position:"relative"},children:["image"===o.assetType&&(null==o?void 0:o.objectUrl)&&ie(Xa,{draggable:!1,src:o.objectUrl,style:{opacity:.25}}),"file"===o.assetType&&ie("div",{style:{height:"100%",opacity:.1},children:ie(ka,{width:"40px"})}),!a&&100!==l&&ie(fe,{align:"center",justify:"center",style:{position:"absolute",height:"100%",left:0,top:0,width:"100%"},children:ie(de,{fontSize:3,icon:Zn,mode:"bleed",onClick:()=>{n(Zs.uploadCancel({hash:o.hash}))},padding:2,style:{background:"none",boxShadow:"none"},tone:"critical"})})]})}),ie(me,{style:{gridColumn:r<3?3:"3/8",gridRow:r<3?"2/4":"auto",marginLeft:r<3?3:0},children:le(Ve,{space:3,children:[le(ve,{muted:!0,size:1,textOverflow:"ellipsis",children:[o.name," (",i,")"]}),ie(ve,{size:1,textOverflow:"ellipsis",weight:"semibold",children:c})]})})]})},Xs=oe((e=>{let{item:t,selected:n}=e;return"asset"===(null==t?void 0:t.type)?ie(me,{style:{height:"100px"},children:ie(Ns,{id:t.id,selected:n})}):"upload"===(null==t?void 0:t.type)?ie(me,{style:{height:"100px"},children:ie(Qs,{id:t.id})}):null})),Gs=e=>{const{items:t,onLoadMore:n}=e,o=gl((e=>e.selected.assets)),r=o&&o.map((e=>e._id))||[],i=null==t?void 0:t.length;return 0===i?null:ie(Tt,{className:"media__custom-scrollbar",computeItemKey:e=>{const n=t[e];return(null==n?void 0:n.id)||e},endReached:n,groupCounts:Array(1).fill(i),groupContent:()=>ie(Ds,{}),itemContent:e=>{const n=t[e],o=r.includes(null==n?void 0:n.id);return ie(Xs,{item:n,selected:o})},style:{overflowX:"hidden"}})},Ys=()=>{const e=Ne(),t=gl((e=>e.assets.fetchCount)),n=gl((e=>e.assets.fetching)),o=gl((e=>e.tags.panelVisible)),r=gl((e=>e.assets.view)),i=gl(fs),l=(()=>{var e,t;const n=null==(t=null==(e=ye)?void 0:e.container)?void 0:t.map((e=>window.matchMedia("(max-width: ".concat(e,"px)")))),o=()=>n.findIndex((e=>e.matches)),[r,i]=ne(o());return J((()=>{const e=()=>{i(o)};return n.forEach((t=>{try{t.addEventListener("change",e)}catch(n){try{t.addListener(e)}catch(e){}}})),()=>{try{n.forEach((t=>t.removeEventListener("change",e)))}catch(t){try{n.forEach((t=>t.removeListener(e)))}catch(e){}}}}),[]),r})(),a=t>=0,s=i.length>0,d=()=>{n||e(il.loadNextPage())};J((()=>{l<=1&&o&&e(Fi.panelVisibleSet({panelVisible:!1}))}),[l]);return ie(me,{flex:1,style:{width:"100%"},children:!s&&a&&!n?ie(me,{padding:4,children:ie(ve,{size:1,weight:"semibold",children:"No results for the current query"})}):le(ae,{children:["grid"===r&&ie(zs,{items:i,onLoadMore:d}),"table"===r&&ie(Gs,{items:i,onLoadMore:d})]})})},$s=()=>{const e=gl((e=>e.notifications.items)),t=ze();return J((()=>{if(e.length>0){const n=e[e.length-1];t.push({closable:!0,status:n.status,title:n.title})}}),[e.length]),null},Ks=()=>{var e,t;const n=Ne(),o=gl(ol);return 0===o.length?null:ie(fe,{align:"center",justify:"flex-start",style:{background:null==(e=al)?void 0:e[900].hex,borderBottom:"1px solid ".concat(null==(t=al)?void 0:t[900].hex),height:"".concat(32,"px"),position:"relative",width:"100%"},children:le(fe,{align:"center",paddingX:3,children:[ie(me,{paddingRight:2,children:le(we,{size:0,style:{color:"inherit"},children:[o.length," ",bt("asset",o.length)," selected"]})}),ie(de,{mode:"bleed",onClick:()=>{n(il.pickClear())},padding:2,style:{background:"none",boxShadow:"none"},tone:"default",children:ie(we,{size:0,children:"Deselect"})}),ie(de,{mode:"bleed",onClick:()=>{n(fl.showConfirmDeleteAssets({assets:o}))},padding:2,style:{background:"none",boxShadow:"none"},tone:"critical",children:ie(we,{size:0,children:"Delete"})})]})})};var Js=Ge({name:"selected",initialState:{assets:[],document:void 0,documentAssetIds:[]},reducers:{}}).reducer;const ed=Ge({name:"notifications",initialState:{items:[]},reducers:{add(e,t){const{asset:n,status:o,title:r}=t.payload;e.items.push({asset:n,status:o,title:r})}}}),td=ed.actions;var nd=ed.reducer;const od=tt(((e,t,n)=>{let{client:o}=n;return e.pipe(pt(il.deleteRequest.match),ht((e=>{const{assets:t}=e.payload,n=t.map((e=>e._id));return it(t).pipe(ht((()=>o.observable.delete({query:Ue(u||(u=D(["*[_id in ","]"])),JSON.stringify(n))}))),ht((()=>it(il.deleteComplete({assetIds:n})))),mt((e=>it(il.deleteError({assetIds:n,error:e})))))})))}),((e,t,n)=>{let{client:o}=n;return e.pipe(pt(il.fetchRequest.match),gt(t),ft((e=>{let[t,n]=e;var r,i;const l=null==(r=t.payload)?void 0:r.params,a=null==(i=t.payload)?void 0:i.query;return it(t).pipe(Bi(n.debug.badConnection),ht((()=>o.observable.fetch(a,l))),ht((e=>{const{items:t}=e;return it(il.fetchComplete({assets:t}))})),mt((e=>it(il.fetchError({message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500})))))})))}),((e,t)=>e.pipe(pt(il.deleteComplete.match),gt(t),ft((e=>{let[t,n]=e;if(0===n.assets.allIds.length){const e=Math.floor(n.assets.allIds.length/n.assets.pageSize);return it(il.loadPageIndex({pageIndex:e}))}return at()})))),((e,t)=>e.pipe(pt(il.loadNextPage.match),gt(t),ft((e=>{let[t,n]=e;return it(il.loadPageIndex({pageIndex:n.assets.pageIndex+1}))})))),((e,t)=>e.pipe(pt(il.loadPageIndex.match),gt(t),ft((e=>{let[t,n]=e;var o,r,i,l,a,s;const d=n.assets.pageSize,c=t.payload.pageIndex*d,u=c+d,g=null==(o=null==n?void 0:n.selected.document)?void 0:o._id,m=null==(r=null==n?void 0:n.selected)?void 0:r.documentAssetIds,f=_i({assetTypes:n.assets.assetTypes,searchFacets:n.search.facets,searchQuery:n.search.query}),w={...g?{documentId:g}:{},documentAssetIds:m};return it(il.fetchRequest({params:w,queryFilter:f,selector:Ue(h||(h=D(["[","...","]"])),c,u),sort:Ue(p||(p=D(["order("," ",")"])),null==(l=null==(i=n.assets)?void 0:i.order)?void 0:l.field,null==(s=null==(a=n.assets)?void 0:a.order)?void 0:s.direction)}))})))),(e=>e.pipe(pt(il.listenerCreateQueue.match),wt(2e3),pt((e=>e.length>0)),ht((e=>{const t=null==e?void 0:e.map((e=>e.payload.asset));return it(il.listenerCreateQueueComplete({assets:t}))})))),(e=>e.pipe(pt(il.listenerDeleteQueue.match),wt(2e3),pt((e=>e.length>0)),ht((e=>{const t=null==e?void 0:e.map((e=>e.payload.assetId));return it(il.listenerDeleteQueueComplete({assetIds:t}))})))),(e=>e.pipe(pt(il.listenerUpdateQueue.match),wt(2e3),pt((e=>e.length>0)),ht((e=>{const t=null==e?void 0:e.map((e=>e.payload.asset));return it(il.listenerUpdateQueueComplete({assets:t}))})))),(e=>e.pipe(pt(il.orderSet.match),ht((()=>it(il.clear(),il.loadPageIndex({pageIndex:0})))))),(e=>e.pipe(et(Xi.facetsAdd.type,Xi.facetsClear.type,Xi.facetsRemove.type,Xi.facetsUpdate.type,Xi.querySet.type),vt(400),ht((()=>it(il.clear(),il.loadPageIndex({pageIndex:0})))))),(e=>e.pipe(et(il.insertUploads.type,il.listenerUpdateQueueComplete.type,il.updateComplete.type),ht((()=>it(il.sort()))))),((e,t,n)=>{let{client:o}=n;return e.pipe(pt(zi.tagsAddRequest.match),gt(t),ht((e=>{let[t,n]=e;const{assets:r,tag:i}=t.payload;return it(t).pipe(Bi(n.debug.badConnection),ht((()=>{const e=ol(n),t=null==e?void 0:e.filter((e=>t=>{var n,o,r,i,l;return(null!=(l=null==(i=null==(r=null==(o=null==(n=null==t?void 0:t.asset)?void 0:n.opt)?void 0:o.media)?void 0:r.tags)?void 0:i.findIndex((t=>t._ref===(null==e?void 0:e._id))))?l:-1)<0})(i)),r=t.reduce(((e,t)=>{var n;return e.patch(null==(n=null==t?void 0:t.asset)?void 0:n._id,(e=>{let{tag:t}=e;return e=>e.setIfMissing({opt:{}}).setIfMissing({"opt.media":{}}).setIfMissing({"opt.media.tags":[]}).append("opt.media.tags",[{_key:Je(),_ref:null==t?void 0:t._id,_type:"reference",_weak:!0}])})({tag:i}))}),o.transaction());return lt(r.commit())})),ht((()=>it(zi.tagsAddComplete({assets:r,tag:i})))),mt((e=>it(zi.tagsAddError({assets:r,error:{message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500},tag:i})))))})))}),((e,t,n)=>{let{client:o}=n;return e.pipe(pt(zi.tagsRemoveRequest.match),gt(t),ht((e=>{let[t,n]=e;const{assets:r,tag:i}=t.payload;return it(t).pipe(Bi(n.debug.badConnection),ht((()=>{const e=ol(n).reduce(((e,t)=>{var n;return e.patch(null==(n=null==t?void 0:t.asset)?void 0:n._id,(e=>{let{asset:t,tag:n}=e;return e=>{var o;return e.ifRevisionId(null==(o=null==t?void 0:t.asset)?void 0:o._rev).unset(['opt.media.tags[_ref == "'.concat(n._id,'"]')])}})({asset:t,tag:i}))}),o.transaction());return lt(e.commit())})),ht((()=>it(zi.tagsRemoveComplete({assets:r,tag:i})))),mt((e=>it(zi.tagsRemoveError({assets:r,error:{message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500},tag:i})))))})))}),(e=>e.pipe(et(il.orderSet.type,il.viewSet.type,Xi.facetsAdd.type,Xi.facetsClear.type,Xi.facetsRemove.type,Xi.facetsUpdate.type,Xi.querySet.type),ht((()=>it(il.pickClear()))))),((e,t,n)=>{let{client:o}=n;return e.pipe(pt(il.updateRequest.match),gt(t),ht((e=>{let[t,n]=e;const{asset:r,closeDialogId:i,formData:l}=t.payload;return it(t).pipe(Bi(n.debug.badConnection),ht((()=>lt(o.patch(r._id).setIfMissing({opt:{}}).setIfMissing({"opt.media":{}}).set(l).commit()))),ht((e=>it(il.updateComplete({asset:e,closeDialogId:i})))),mt((e=>it(il.updateError({asset:r,error:{message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500}})))))})))}),(e=>e.pipe(et(il.deleteComplete.type,il.updateComplete.type,Fi.deleteComplete.type,Fi.updateComplete.type),pt((e=>{var t;return!!(null==(t=null==e?void 0:e.payload)?void 0:t.closeDialogId)})),ht((e=>{var t;const n=null==(t=null==e?void 0:e.payload)?void 0:t.closeDialogId;return n?it(ml.actions.remove({id:n})):at()})))),(e=>e.pipe(pt(Fi.createComplete.match),ht((e=>{const{assetId:t,tag:n}=null==e?void 0:e.payload;return t?it(ml.actions.inlineTagCreate({tag:n,assetId:t})):n._id?it(ml.actions.remove({id:"tagCreate"})):at()})))),(e=>e.pipe(pt(Fi.listenerDeleteQueueComplete.match),ht((e=>{const{tagIds:t}=null==e?void 0:e.payload;return it(ml.actions.inlineTagRemove({tagIds:t}))})))),(e=>e.pipe(pt(il.deleteError.match),ht((e=>{const{assetIds:t}=e.payload,n=t.length;return it(ed.actions.add({status:"error",title:"Unable to delete ".concat(n," ").concat(bt("asset",n),". Please review any asset errors and try again.")}))})))),(e=>e.pipe(pt(il.deleteComplete.match),ht((e=>{const{assetIds:t}=e.payload,n=t.length;return it(ed.actions.add({status:"info",title:"".concat(n," ").concat(bt("asset",n)," deleted")}))})))),(e=>e.pipe(pt(zi.tagsAddComplete.match),ht((e=>{var t,n;const o=null==(n=null==(t=null==e?void 0:e.payload)?void 0:t.assets)?void 0:n.length;return it(ed.actions.add({status:"info",title:"Tag added to ".concat(o," ").concat(bt("asset",o))}))})))),(e=>e.pipe(pt(zi.tagsRemoveComplete.match),ht((e=>{var t,n;const o=null==(n=null==(t=null==e?void 0:e.payload)?void 0:t.assets)?void 0:n.length;return it(ed.actions.add({status:"info",title:"Tag removed from ".concat(o," ").concat(bt("asset",o))}))})))),(e=>e.pipe(pt(il.updateComplete.match),wt(2e3),pt((e=>e.length>0)),ht((e=>{const t=e.length;return it(ed.actions.add({status:"info",title:"".concat(t," ").concat(bt("asset",t)," updated")}))})))),(e=>e.pipe(et(il.fetchError.type,il.updateError.type,Fi.createError.type,Fi.deleteError.type,Fi.fetchError.type,Fi.updateError.type,Zs.uploadError.type),ht((e=>{var t;const n=null==(t=e.payload)?void 0:t.error;return it(ed.actions.add({status:"error",title:"An error occured: ".concat(n.message)}))})))),(e=>e.pipe(pt(Fi.createComplete.match),ht((()=>it(ed.actions.add({status:"info",title:"Tag created"})))))),(e=>e.pipe(pt(Fi.deleteComplete.match),ht((()=>it(ed.actions.add({status:"info",title:"Tag deleted"})))))),(e=>e.pipe(pt(Fi.updateComplete.match),ht((()=>it(ed.actions.add({status:"info",title:"Tag updated"})))))),((e,t)=>e.pipe(pt(Fi.updateComplete.match),gt(t),ht((e=>{let[t,n]=e;var o,r,i,l,a;const{tag:s}=t.payload,d=null==(o=n.search.facets)?void 0:o.find((e=>"tag"===e.name)),c=n.tags.byIds[s._id];return"searchable"===(null==d?void 0:d.type)&&(null==(r=d.value)?void 0:r.value)===s._id?it(Pi.actions.facetsUpdate({name:"tag",value:{label:null==(l=null==(i=null==c?void 0:c.tag)?void 0:i.name)?void 0:l.current,value:null==(a=null==c?void 0:c.tag)?void 0:a._id}})):at()})))),((e,t,n)=>{let{client:o}=n;return e.pipe(pt(Ai.actions.createRequest.match),gt(t),ht((e=>{let[t,n]=e;const{assetId:r,name:i}=t.payload;return it(t).pipe(Bi(n.debug.badConnection),Ri(o,i),ht((()=>o.observable.create({_type:"media.tag",name:{_type:"slug",current:i}}))),ht((e=>it(Ai.actions.createComplete({assetId:r,tag:e})))),mt((e=>it(Ai.actions.createError({error:{message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500},name:i})))))})))}),((e,t,n)=>{let{client:o}=n;return e.pipe(pt(Ai.actions.deleteRequest.match),gt(t),ht((e=>{let[t,n]=e;const{tag:r}=t.payload;return it(t).pipe(Bi(n.debug.badConnection),ht((()=>o.observable.fetch(Ue(s||(s=D(['*[\n _type in ["sanity.fileAsset", "sanity.imageAsset"]\n && references(*[_type == "media.tag" && name.current == $tagName]._id)\n ] {\n _id,\n _rev,\n opt\n }']))),{tagName:r.name.current}))),ht((e=>{const t=e.map((e=>({id:e._id,patch:{ifRevisionID:e._rev,unset:['opt.media.tags[_ref == "'.concat(r._id,'"]')]}}))).reduce(((e,t)=>e.patch(t.id,t.patch)),o.transaction());return t.delete(r._id),lt(t.commit())})),ht((()=>it(Ai.actions.deleteComplete({tagId:r._id})))),mt((e=>it(Ai.actions.deleteError({error:{message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500},tag:r})))))})))}),((e,t,n)=>{let{client:o}=n;return e.pipe(pt(Ai.actions.fetchRequest.match),gt(t),ft((e=>{let[t,n]=e;const{query:r}=t.payload;return it(t).pipe(Bi(n.debug.badConnection),ht((()=>o.observable.fetch(r))),ht((e=>{const{items:t}=e;return it(Ai.actions.fetchComplete({tags:t}))})),mt((e=>it(Ai.actions.fetchError({error:{message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500}})))))})))}),(e=>e.pipe(pt(Ai.actions.listenerCreateQueue.match),wt(2e3),pt((e=>e.length>0)),ht((e=>{const t=null==e?void 0:e.map((e=>e.payload.tag));return it(Ai.actions.listenerCreateQueueComplete({tags:t}))})))),(e=>e.pipe(pt(Ai.actions.listenerDeleteQueue.match),wt(2e3),pt((e=>e.length>0)),ht((e=>{const t=null==e?void 0:e.map((e=>e.payload.tagId));return it(Ai.actions.listenerDeleteQueueComplete({tagIds:t}))})))),(e=>e.pipe(pt(Ai.actions.listenerUpdateQueue.match),wt(2e3),pt((e=>e.length>0)),ht((e=>{const t=null==e?void 0:e.map((e=>e.payload.tag));return it(Ai.actions.listenerUpdateQueueComplete({tags:t}))})))),(e=>e.pipe(et(Ai.actions.listenerCreateQueueComplete.type,Ai.actions.listenerUpdateQueueComplete.type),wt(1e3),pt((e=>e.length>0)),ht((()=>it(Ai.actions.sort()))))),((e,t,n)=>{let{client:o}=n;return e.pipe(pt(Ai.actions.updateRequest.match),gt(t),ht((e=>{let[t,n]=e;var r;const{closeDialogId:i,formData:l,tag:a}=t.payload;return it(t).pipe(Bi(n.debug.badConnection),Ri(o,null==(r=null==l?void 0:l.name)?void 0:r.current),ht((()=>lt(o.patch(a._id).set({name:{_type:"slug",current:null==l?void 0:l.name.current}}).commit()))),ht((e=>it(Ai.actions.updateComplete({closeDialogId:i,tag:e})))),mt((e=>it(Ai.actions.updateError({error:{message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500},tag:a})))))})))}),((e,t,n)=>{let{client:o}=n;return e.pipe(pt(Zs.uploadStart.match),ht((t=>{const{file:n,uploadItem:r}=t.payload;return ct(it(null).pipe(ht((()=>(e=>it(null).pipe(ht((()=>lt(Ls(e))))))(n))),ht((e=>it(Zs.previewReady({blobUrl:e,hash:r.hash}))))),it(null).pipe(ht((()=>Vs(o,r.assetType,n,r.hash))),kt(e.pipe(pt(Zs.uploadCancel.match),pt((e=>e.payload.hash===r.hash)))),ht((e=>"complete"===(null==e?void 0:e.type)?it(Yi.uploadComplete({asset:e.asset})):"progress"===(null==e?void 0:e.type)&&"upload"===(null==e?void 0:e.stage)?it(Zs.uploadProgress({event:e,uploadHash:r.hash})):at())),mt((e=>it(Zs.uploadError({error:{message:(null==e?void 0:e.message)||"Internal error",statusCode:(null==e?void 0:e.statusCode)||500},hash:r.hash}))))))})))}),((e,t)=>e.pipe(pt(Zs.uploadRequest.match),gt(t),ht((e=>{let[t,n]=e;const{file:o,forceAsAssetType:r}=t.payload;return it(t).pipe(ht((()=>Hs(o))),pt((e=>!!!n.uploads.byIds[e])),ht((e=>{const t={_type:"upload",assetType:r||(o.type.indexOf("image")>=0?"image":"file"),hash:e,name:o.name,size:o.size,status:"queued"};return it(Zs.uploadStart({file:o,uploadItem:t}))})))})))),((e,t,n)=>{let{client:o}=n;return e.pipe(pt(Zs.checkRequest.match),gt(t),ht((e=>{let[t,n]=e;const{assets:r}=t.payload,i=r.map((e=>e._id)),l=_i({assetTypes:n.assets.assetTypes,searchFacets:n.search.facets,searchQuery:n.search.query}),a=Ue(j||(j=D(["\n *["," && _id in $documentIds].sha1hash\n "])),l);return it(t).pipe(ut(1e3),ht((()=>o.observable.fetch(a,{documentIds:i}))),ht((e=>{const t=r.reduce(((t,n)=>(t[n.sha1hash]=e.includes(n.sha1hash)?n._id:null,t)),{});return it(Zs.checkComplete({results:t}),il.insertUploads({results:t}))})))})))}),(e=>e.pipe(pt(Yi.uploadComplete.match),ht((e=>it(Zs.checkRequest({assets:[e.payload.asset]}))))))),rd=$e({assets:ll,debug:la,dialog:wl,notifications:nd,search:Gi,selected:Js,tags:Ui,uploads:Ts}),id=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),ld=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];var n,o;return Array.isArray(e)&&e.forEach((e=>{ld(e,t)})),id(e)&&("reference"===(null==(n=null==e?void 0:e.asset)?void 0:n._type)&&(null==(o=null==e?void 0:e.asset)?void 0:o._ref)&&t.push(e.asset._ref),Object.values(e).forEach((e=>{ld(e,t)}))),t},ad=e=>{const t=ld(e);return[...new Set(t.sort())]};class sd extends re{constructor(e){super(e);const t=nt({dependencies:{client:e.client}});this.store=Ke({reducer:rd,middleware:e=>e({serializableCheck:!1,thunk:!1}).prepend(t),devTools:!0,preloadedState:{assets:{...Ki,assetTypes:(null==e?void 0:e.assetType)?[e.assetType]:["file","image"]},selected:{assets:e.selectedAssets||[],document:e.document,documentAssetIds:e.document?ad(e.document):[]}}}),t.run(od)}render(){return ie(Qe,{store:this.store,children:this.props.children})}}const dd=()=>{var e;return gl((e=>e.tags.panelVisible))?ie(me,{style:{position:"relative",width:250},children:ie(me,{className:"media__custom-scrollbar",style:{borderLeft:"1px solid ".concat(null==(e=al)?void 0:e[900].hex),height:"100%",overflowX:"hidden",overflowY:"auto",position:"absolute",right:0,top:0,width:"100%"},children:ie(cs,{})})}):null},cd=Lt.div(z||(z=D(["\n color: white;\n height: 100%;\n min-height: 100%;\n right: 0;\n top: 0;\n width: 100%;\n\n &:focus {\n outline: none;\n }\n"]))),ud=Lt.div(E||(E=D(["\n align-items: center;\n background: rgba(0, 0, 0, 0.75);\n display: flex;\n height: 100%;\n justify-content: center;\n position: absolute;\n right: 0;\n top: 0;\n width: 100%;\n z-index: 3;\n"])));const hd=e=>{const{children:t}=e,{onSelect:n}=ji(),o=Ne(),r=gl((e=>e.assets.assetTypes)),i=1===r.length&&"image"===r[0],{getRootProps:l,getInputProps:a,isDragActive:s,open:d}=Ut({accept:i?"image/*":"",getFilesFromEvent:async e=>{var t;let n;if("drop"===e.type&&"dataTransfer"in e&&(n=null==(t=null==e?void 0:e.dataTransfer)?void 0:t.files),"change"===e.type){const t=null==e?void 0:e.target;(null==t?void 0:t.files)&&(n=t.files)}if(!n)return[];const r=await async function(e){const t=Array.from(e),n=[];for(const e of t)try{await e.slice(0,1).arrayBuffer(),n.push(e)}catch(e){}return n}(n);return(null==n?void 0:n.length)!==r.length&&o(td.add({status:"error",title:"Unable to upload some items (folders and packages aren't supported)"})),r},noClick:!0,noDrag:!!n,onDrop:async e=>{e.forEach((e=>o(Zs.uploadRequest({file:e,forceAsAssetType:1===r.length?r[0]:void 0}))))}});return ie(gs,{open:d,children:le(cd,{...l(),children:[ie("input",{...a()}),s&&ie(ud,{children:ie(fe,{direction:"column",justify:"center",style:{color:dl},children:ie(ve,{size:3,style:{color:"inherit"},children:"Drop files to upload"})})}),t]})})},pd=e=>{let{onClose:t}=e;const n=Zi(),[o,r]=ne(null),i=Ne(),l=e=>{const{documentId:t,result:n,transition:o}=e;"appear"===o&&i(il.listenerCreateQueue({asset:n})),"disappear"===o&&i(il.listenerDeleteQueue({assetId:t})),"update"===o&&i(il.listenerUpdateQueue({asset:n}))},a=e=>{const{documentId:t,result:n,transition:o}=e;"appear"===o&&i(Fi.listenerCreateQueue({tag:n})),"disappear"===o&&i(Fi.listenerDeleteQueue({tagId:t})),"update"===o&&i(Fi.listenerUpdateQueue({tag:n}))};return J((()=>{i(il.loadPageIndex({pageIndex:0})),i(Fi.fetchRequest());const e=n.listen(Ue(A||(A=D(['*[_type in ["sanity.fileAsset", "sanity.imageAsset"] && !(_id in path("drafts.**"))]'])))).subscribe(l),t=n.listen(Ue(q||(q=D(['*[_type == "','" && !(_id in path("drafts.**"))]'])),"media.tag")).subscribe(a);return()=>{null==e||e.unsubscribe(),null==t||t.unsubscribe()}}),[]),ie(qe,{element:o,children:le(hd,{children:[ie(hs,{}),ie($s,{}),ie(ke,{display:"flex",height:"fill",ref:r,children:le(fe,{direction:"column",flex:1,children:[ie(ms,{onClose:t}),ie(oa,{}),le(fe,{flex:1,children:[le(fe,{align:"flex-end",direction:"column",flex:1,style:{position:"relative"},children:[ie(Ks,{}),ie(Ys,{})]}),ie(dd,{})]}),ie(aa,{})]})})]})})},gd=e=>{const t=Zi();return ie(sd,{assetType:null==e?void 0:e.assetType,client:t,document:null==e?void 0:e.document,selectedAssets:null==e?void 0:e.selectedAssets,children:ie(Ee,{scheme:"dark",theme:ye,children:ie(Ae,{children:le(Ii,{onSelect:null==e?void 0:e.onSelect,children:[ie(pl,{}),ie(pd,{onClose:null==e?void 0:e.onClose})]})})})})},md=()=>{const[e]=ne((()=>document.createElement("div")));return J((()=>(e.classList.add("media-portal"),document.body.appendChild(e),()=>{document.body.removeChild(e)})),[e]),e};var fd={title:"Media Tag",icon:ta,name:"media.tag",type:"document",fields:[{title:"Name",name:"name",type:"slug"}],preview:{select:{name:"name"},prepare(e){const{name:t}=e;return{media:ta,title:null==t?void 0:t.current}}}};const wd={icon:Bo,name:"media",title:"Media"},vd={...wd,component:e=>{const{onClose:t}=e,n=md(),o=Q([]);Ci("escape",t);const r=e=>{e.nativeEvent.stopImmediatePropagation(),e.stopPropagation()},{zIndex:i}=De();return ie(qe,{element:n,children:ie(Oe,{children:ie(me,{onDragEnter:r,onDragLeave:r,onDragOver:r,onDrop:r,onMouseUp:r,style:{bottom:0,height:"auto",left:0,position:"fixed",top:0,width:"100%",zIndex:i},children:ie(gd,{document:o,...e})})})})}},Cd={...wd,component:()=>ie(fe,{direction:"column",height:"fill",flex:1,children:ie(gd,{})})},yd=X({name:"media",form:{file:{assetSources:e=>[...e,vd]},image:{assetSources:e=>[...e,vd]}},schema:{types:[fd]},tools:e=>[...e,Cd]});export{yd as media,vd as mediaAssetSource};//# sourceMappingURL=index.esm.js.map
|