PageSourceSearch

https://www.stoppropaganda.net/_assets/chatSidebarModeButton-26444853c09a6c48.js

js stoppropaganda.net collected 2026-09-28 08:34:42 UTC 79,950 bytes, 1 lines download raw bytes

1"use strict";(globalThis.rspackChunknotion_next=globalThis.rspackChunknotion_next||[]).push([[24307],{476743(e,t,i){function r(){return(0,i(579993).O$)(i(728372).AppStoreSidebarSpaceViewStore)}i.d(t,{a:()=>r})},527391(e,t,i){var r=()=>i(546605);class a extends r().Store{getInitialState(){return{loaded:!1}}USEWITHCAUTION_markStatsigUserFetched(e){let{userId:t,spaceId:i,fetched:r}=e;this.setState({loaded:r,userId:t,spaceId:i})}USEWITHCAUTION_isFetchedForSpaceAndUserId(e){let{spaceId:t,userId:i}=e;return this.state.loaded&&this.state.spaceId===t&&this.state.userId===i}}let n=new a;(0,i(202146).exposeDebugValue)("statsigUserLoadingStatusStore",n),i.d(t,{},{t:n})},635508(e,t,i){i.d(t,{bH:()=>s,Ky:()=>o});let r=i(764657).object({required:{fpmnFeatures:i(764657).array(i(764657).string())},optional:{}}),a=Object.freeze({fpmnFeatures:Object.freeze([])});function n(){if("u">typeof window){var e=window.__meetingNoteClientCapabilities;let t=(0,i(788145).Qq)(r,e);return t?Object.freeze({fpmnFeatures:Object.freeze([...t.fpmnFeatures])}):void 0}}function s(e){if(e.isMobileNative)return n()??a}function o(e){var t;return(null==(t=n())?void 0:t.fpmnFeatures.includes(e))??!1}},13717(e,t,i){function r(e){let{spaceStore:t,groupId:r}=e;return i(398652).C.createChildStore(t,(0,i(659341).S4)({spacePermissionGroupId:r,spaceId:t.id}))}function a(e){let{spaceStore:t,groupId:r,userId:a}=e;return i(291886).m.createChildStore(t,(0,i(867863).BZ)({spacePermissionGroupId:r,spaceId:t.id,userId:a}))}i.d(t,{A:()=>a,E:()=>r})},529927(e,t,i){function r(e){let{active:t,shape:r,size:a="default"}=e;return(0,i(960253).I)(()=>{let e="tall"===a,n=e?40:28,s=e?i(104509).lD.default:i(104509).Ev.default;return{iconButton:{width:n,height:n,..."pill"===r?{borderRadius:50}:{}},iconButtonIcon:{width:s,height:s,fill:t?i(632079).Tj.blue.icon.accentPrimary:i(632079).Tj.icon.primary}}},[t,r,a])}i.d(t,{a:()=>r})},517215(e,t,i){let r=new(i(246382)).R({key:"spacedScopedUserChatPreference",namespace:i(274919).Bq,important:!0,trackingType:"necessary"});function a(e,t){let i=r.getState();r.setState({...i,[e]:{...null==i?void 0:i[e],...t}})}i.d(t,{O:()=>a},{C:r})},158131(e,t,i){function r(e){(0,i(104310).u)({event:{eventName:"agent_chat_history_item_clicked",eventProperties:{ai_session_id:e.threadId,from:e.from,model:e.model,chat_mode:i(562733).zI.state.chatPanelMode}}})}i.d(t,{T:()=>r})},203462(e,t,i){let r;i(499468),i(586042),i(169187),i(726090),i(132457),i(219390),i(73168),i(730330),i(976614),i(159952),i(1310);var a=()=>i(546605);let n=!0;async function s(e){if(e<=0)return;let t=Math.random()*e*1e3;await new Promise(e=>setTimeout(e,t))}function o(e){return(null==e?void 0:e.trim())||void 0}function l(e){let{environment:t,spaceId:r,agentIds:a,mostRecentTranscripts:n}=e;return{agents:a.map(e=>new(i(360851)).N(t,{table:i(832375).C0E,id:e,spaceId:r})),mostRecentThreads:n.reduce((e,a)=>(e[a.parent_id]=new(i(174148)).E(t,{table:"thread",id:a.id,spaceId:r}),e),{}),activityScores:e.activityScores.reduce((e,t)=>(e[t.parent_id]=t.activity_score,e),{})}}async function c(e){let{environment:t,spaceId:r,searchQuery:a}=e,n=await t.api.callApi({eventName:"search",environment:t,data:{type:i(821603).Vz.BlocksInSpace,query:a,spaceId:r,filters:{...i(821603).N2({}),blockTypes:["agent"]},sort:{field:"relevance"},limit:50,source:"agent_search"}});if("success"===n.type)return{agentIds:n.data.results.map(e=>e.id),mostRecentTranscripts:[],activityScores:[]}}async function d(e){let{environment:t,spaceId:r,searchQuery:a,includeSlackChannelAgents:l}=e,d=o(a);if(d&&!l)return c({environment:t,spaceId:r,searchQuery:d});let{loading_jitter_config:u}=i(218744).default.getConfig({configName:"custom_agent_sub_features"}),p=n?(null==u?void 0:u.initial)??0:(null==u?void 0:u.refetch)??10;await s(p),n=!1;let h=await t.api.callApi({eventName:"getCustomAgents",environment:t,data:{spaceId:r,filter:"all",searchQuery:d,includeDeleted:!0,includeSlackChannelAgents:l}});if("success"===h.type)return h.data}async function u(e){let t=await d(e);if(t)return l({environment:e.environment,spaceId:e.spaceId,agentIds:t.agentIds,mostRecentTranscripts:t.mostRecentTranscripts,activityScores:t.activityScores})}class p extends a().Store{getInitialState(){return{promiseMap:{},storeMap:{},requestKeyToArgs:{}}}static getKey(e,t){let i=o(t.searchQuery);return`${e.currentUser.id}:${t.spaceId}:${i??"no-search-query"}
1:${t.includeSlackChannelAgents?"with-slack":"without-slack"}`}getStore(e){let t=this.state.storeMap[e];if(t)return t;let i=a().Store.createValue(void 0);return this.state.storeMap[e]=i,i}async fetchAndStore(e){let{environment:t,requestArgs:i,shouldUpdateStore:r=!0}=e,a=await u({environment:t,spaceId:i.spaceId,searchQuery:i.searchQuery,includeSlackChannelAgents:i.includeSlackChannelAgents});if(a&&r){let e=p.getKey(t,i);this.getStore(e).setState(a),this.state.promiseMap[e]=Promise.resolve(a)}return a}getData(e,t,i=!1){let r=p.getKey(e,t);this.state.requestKeyToArgs[r]=t,i&&(this.state.promiseMap[r]=void 0);let a=this.getStore(r);return this.state.promiseMap[r]||(this.state.promiseMap[r]=this.fetchAndStore({environment:e,requestArgs:t})),a.state}awaitData(e,t,i=!1){let r=p.getKey(e,t);return this.state.requestKeyToArgs[r]=t,i&&(this.state.promiseMap[r]=void 0),this.getStore(r),this.state.promiseMap[r]||(this.state.promiseMap[r]=this.fetchAndStore({environment:e,requestArgs:t})),this.state.promiseMap[r]??Promise.resolve(void 0)}resetData(e,t,i=!0){let r=p.getKey(e,t),a=this.state.storeMap[r];if(a&&a.listenerCount()>0||i){let i=this.fetchAndStore({environment:e,requestArgs:t});return this.state.promiseMap[r]=i,i.then(()=>void 0)}return this.state.promiseMap[r]=void 0,Promise.resolve(void 0)}async refetchAllForSpace(e){let{environment:t,spaceId:r}=e,a=Object.entries(this.state.requestKeyToArgs).filter(([,e])=>e.spaceId===r);await (0,i(326904).lX)(a,5,async([,e])=>{let i=this.fetchAndStore({environment:t,requestArgs:e});this.state.promiseMap[p.getKey(t,e)]=i,await i})}addWorkflowIds(e){let t,{environment:r,spaceId:a,workflowIds:n}=e;if(0===n.length)return;let s=Object.entries(this.state.requestKeyToArgs).filter(([,e])=>e.spaceId===a&&!e.searchQuery),o=l({environment:r,spaceId:a,agentIds:n,mostRecentTranscripts:[],activityScores:[]});for(let[e]of s){let r=this.getStore(e),a=r.state,n=a?function(e){let{existing:t,incoming:r}=e,a=new Set(t.agents.map(e=>e.id)),n=r.agents.filter(e=>!a.has(e.id));return{agents:(0,i(960408).hS)([...n,...t.agents],e=>e.id),mostRecentThreads:{...t.mostRecentThreads,...r.mostRecentThreads},activityScores:{...t.activityScores,...r.activityScores}}}({existing:a,incoming:o}):o;r.setState(n),this.state.promiseMap[e]=Promise.resolve(n),t=n.agents}return t}}let h=new p;function f(e){let{efficient_all_agents_store_listener:t=!1}=i(218744).default.getConfig({configName:"custom_agent_sub_features"});return t?h:r??=new(i(227586)).n((e,{spaceId:t,searchQuery:i,includeSlackChannelAgents:r})=>{let a=o(i);return`${e.currentUser.id}:${t}:${a??"no-search-query"}:${r?"with-slack":"without-slack"}`},async(e,t)=>{let r=await d({environment:e,spaceId:t.spaceId,searchQuery:t.searchQuery,includeSlackChannelAgents:t.includeSlackChannelAgents});if(r){let a=l({environment:e,spaceId:t.spaceId,agentIds:r.agentIds,mostRecentTranscripts:r.mostRecentTranscripts,activityScores:r.activityScores}),n=[{key:(0,i(838304).o1)(t),version:-1}];return{value:a,dependencies:r.dependencies??n}}})}i.d(t,{zf:()=>f},{g_:h})},318329(e,t,i){var r=()=>i(546605);function a(){return{currentScreen:"none",status:"not_started",isBackendConnected:!1,externalSourceName:void 0,emailAddresses:[],sessionId:i(92513).JW(),analyticsFrom:"unknown",isConnected:!1,isPersonalAuthComplete:!1,isDisconnecting:!1,isLoaded:!1,isNotionMailProhibited:!1}}class n extends r().Store{getInitialState(){return a()}startNewSetupSession(){this.setState({...this.state,sessionId:i(92513).JW()})}}let s=new n;(0,i(202146).exposeDebugValue)("notionMailAIConnectorStore",s),i.d(t,{K_:()=>a},{Lf:s})},166e3(e,t,i){function r(){let e=i(584265).default.state;if(e.phase===i(476987).o.Selected)return(0,i(466390).V8)({blockStores:e.stores})}i.d(t,{k:()=>r})},560961(e,t,i){function r(e){return(0,i(369321).QZ)({...e,hasArtifactSelectionContext:s()})}function a(e){let{aiChatType:t,isPromoDismissed:r,areSparklesHidden:a,spaceId:n}=e;return(0,i(369321).bj)({aiChatType:t,isDefaultEmptyStateDisplay:!0,isPromoDismissed:r,areSparklesHidden:a,spaceId:n,hasArtifactSelectionContext:s()})}function n(e){return(0,i(369321).Rt)({...e,hasArtifactSelectionContext:s()})}function s(){return(0,i(579993).K8)(()=>void 0!==(0,i(166e3).k)(),[])}i.d(t,{QZ:()=>r,Rt:()=>n,V9:()=>i(369321).V9,bj:()=>a})},605263(e,t,i){i(533958),i(953925),i(540679);var r=i(635790),a=i(440302);let n=(0,r.createContext)({ancestors:[]});function s(e){let{automationStore:t,children:s,contextType:o,collectionStore:l,collectionSettingsStore:c,collectionViewBlockStore:d,collectionViewStore:u,enableExistenceGuarantees:f}=e,g=(0,i(533992).v3)(),v=(0,i(327219).tz)(),{value:m}=(0,i(552709).fJ)(i(864850).T.formulas),{value:_}=(0,i(552709).fJ)(i(879267).QV.automationTypecheck),S=(0,i(470569).o)(t),y=(0,i(67499).S)(),b=(0,i(579993).K8)(()=>
1{if(m&&_)return function(e){let{environment:t,automationStore:r,automationTypecheckModule:a,contextType:n,formulasModule:s,intl:o,subscriptionInfo:l,pageStore:c,enableExistenceGuarantees:d}=e,u=d?p.get(r):p.get(r)??h.get(r);if(u)return u;let f=()=>{let e=r.getTriggerType(),u=n;return(0,i(48697).O9)(e)&&(0,i(432705).x2)(e)&&(u=(0,i(432705).H8)(e)),(0,i(100197).Z)({environment:t,automationStore:r,automationTypecheckModule:a,contextType:u,formulasModule:s,intl:o,subscriptionInfo:l,pageStore:c,enableExistenceGuarantees:d})},g=new(i(47824)).ComputedStore(f,{debugName:"automationContextTypecheckResultCachedStore",equalityFn:i(931576).n,recomputeSchedule:{type:"debounce",debounceMs:200,maxWait:750,trailing:!0,initialValue:f()}});return d&&p.set(r,g),h.set(r,g),g}({automationStore:t,automationTypecheckModule:_,contextType:o,environment:g,formulasModule:m,intl:v,subscriptionInfo:S,pageStore:"button_block"===o?null==y?void 0:y.pageStore:void 0,enableExistenceGuarantees:f})},[g,t,_,o,m,v,S,null==y?void 0:y.pageStore,f]),w=(0,r.useContext)(n),I=(0,r.useMemo)(()=>0===w.ancestors.length?[{automationStore:t,contextType:o,typecheckResultStore:b,collectionStore:l,collectionSettingsStore:c,collectionViewBlockStore:d,collectionViewStore:u}]:[...w.ancestors,{automationStore:t,contextType:o,typecheckResultStore:b,collectionStore:l,collectionSettingsStore:c,collectionViewBlockStore:d,collectionViewStore:u}],[w.ancestors,t,o,b,l,c,d,u]);(0,r.useEffect)(()=>{if(!b)return;let e=()=>{};return b.addListener(e),()=>b.removeListener(e)},[b]);let k=(0,r.useMemo)(()=>({ancestors:I,enableExistenceGuarantees:f}),[I,f]);return(0,a.jsx)(n.Provider,{value:k,children:s})}function o(){var e;let t,{typecheckResultStore:a}=c();return e=a,t=(0,i(579993).K8)(()=>null==e?void 0:e.getState(),[e]),(0,r.useMemo)(()=>t??{error:new(i(600005)).N9("Automation typecheck dependency is not ready")},[t])}function l(){var e;
1let t=null==(e=d())?void 0:e.typecheckResultStore;return(0,i(579993).K8)(()=>null==t?void 0:t.getState(),[t])}function c(){let e=(0,r.useContext)(n).ancestors.at(-1);if(!e)throw Error("No automation context found!");return e}function d(){return(0,r.useContext)(n).ancestors.at(-1)}function u(){return(0,r.useContext)(n).enableExistenceGuarantees}n.displayName="AutomationContext",n.Consumer;let p=new WeakMap,h=new WeakMap;function f(e){var t;return null==(t=p.get(e))?void 0:t.state}i.d(t,{K4:()=>d,To:()=>f,Uw:()=>l,fi:()=>u,q5:()=>o,q8:()=>c,u:()=>s})},199894(e,t,i){function r(e){let{environment:t,selection:r,transaction:a,preventSetSelection:n}=e,{blocks:s}=e,o=(0,i(385941).Z)();if(!o)throw Error("No root store.");if(r.length>0){let e=r[0],o=i(240414).T.find(t=>t.props.store===e&&t.props.canInsertAbove&&t.props.onInsertAbove);if(!o||!o.props.onInsertAbove)throw Error("No Selectable found.");let l=o.props.onInsertAbove({insertStores:s,transaction:a});return n||(0,i(967551).t)({environment:t,stores:l}),l}{let e=o.getContentStore(),r=s.map(t=>(0,i(33028).B)({parentStore:e,appendStore:t,transaction:a}).childStore);return n||(0,i(967551).t)({environment:t,stores:r}),r}}i(533958),i(730330),i(139583),i(159952),i.d(t,{t:()=>r})},210318(e,t,i){i(533958),i(953925),i(540679),i(730330),i(139583),i(974864),i(159952);var r=()=>i(188993);function a(e){let t,{environment:a,tabId:n,blocksToInsert:s,target:o,transaction:l,replaceEmptyTextBlock:c,preventSetSelection:d}=e,u=(0,i(385941).Z)();if(!u){let{route:e}=a.RouterStore.state;(0,i(132702).Dk)(e)&&(u=o.at(0))}let p=u;if(!p)throw Error("No root store.");if(o.length>0){let e=o.at(-1),r=e;if(s.find(e=>e.isType("column_list"))){let t=null==e?void 0:e.findRecordStoreUIAncestor(e=>e&&e instanceof i(970831).B&&e.isType("column_list")).ancestor;t&&t instanceof i(970831).B&&(r=t)}let d=i(240414).T.find(e=>e.props.store===r&&e.props.canInsertBelow&&e.props.onInsertBelow);d&&d.props.onInsertBelow?(t=(0,i(960408).oE)(d.props.onInsertBelow({insertStores:s,transaction:l})),c&&e&&e.isEmptyTextBlock()&&(0,i(155953).Z)({environment:a,tabId:n,blocks:[e],transaction:l})):t=s.slice().reverse().map(e=>(0,i(61506).H)({parentStore:p.getContentStore(),prependStore:e,transaction:l}).childStore)}else if(p.isCollectionView()){let e=i(496704).K.findCollectionViewBlockFromStore(p);if(e){let i=e.collectionContextStore,n=i.collectionStore();if(n)for(let e of s)(0,r().j)({environment:a,store:e,collectionStore:n,collectionContextStore:i,shouldCoerce:!0,groupsPointer:[],transaction:l});t=[]}else throw Error("No collection view found.")}else{let e=p.getContentStore();t=s.map(t=>(0,i(33028).B)({parentStore:e,appendStore:t,transaction:l}).childStore)}return d||(t=t.flatMap(e=>e.isType("column_list")?e.getContentStores().flatMap(e=>e.getContentStores()):[e]),(0,i(967551).t)({environment:a,stores:t})),t}i.d(t,{L:()=>a})},845181(e,t,i){function r(e){let{environment:t,spaceId:r}=e;if(t.device.isMobileNative)return function(e){let{environment:t,spaceId:r}=e,{device:a}=t,n=t.currentUser.id;if(!a.isMobileNative||!n||!r||!(0,i(635508).Ky)("render_in_webview")||!(0,i(635508).Ky)("create")||!i(218744).default.checkGate({gateName:"fpmn_mobile_rendering"}))return!1;if(a.isAndroid){var s,o,l;let e,t;if(s={userId:n,spaceId:r},e=null==(o=i(747071).default.getStatsigClient())?void 0:o.getContext().user,t=i(527391).t.state,!(i(205885).A.state.online&&t.loaded&&t.userId===s.userId&&t.spaceId===s.spaceId&&i(218744).default.isStatsigReady()&&(null==e?void 0:e.userID)===s.userId&&(null==(l=e.customIDs)?void 0:l.spaceId)===s.spaceId&&i(218744).default.checkGate({gateName:"android_full_page_meeting_notes_creation"})))return!1}else if(!a.isIOS)return!1;return(0,i(583773).Y)({experimentService:i(218744).default,actor:{table:i(832375).oo9,id:n},spaceId:r})}(e);let a=t.currentUser.id;return!!r&&!!a&&(0,i(583773).Y)({experimentService:i(218744).default,actor:{table:i(832375).oo9,id:a},spaceId:r})}i.d(t,{w:()=>r})},529587(e,t,i){function r(e){return e.getSetting("disable_notion_calendar")}i.d(t,{X:()=>r})},719607(e,t,i){i.r(t),i.d(t,{ChatSidebarModeButton:()=>u,ChatSidebarModeButtonPopupContents:()=>s,ChatSidebarPanelModeButton:()=>d,getChatSidebarModeOptions:()=>o});var r=i(635790);i(435368),i(159952);var a=i(440302);let n=(0,i(327219).YK)({fullscreen:{id:"chatSidebar.fullscreen.button",defaultMessage:"Full screen"}});function s(e){let t,{onFullscreen:s,fullscreenMode:o="enabled",options:l,parent:c,onSelectMode:d}=e,u=(0,i(533992).v3)(),p=(0,i(633636).wM)(),h=(0,i(972740).L)(),f=(0,i(579993).K8)(()=>i(562733).zI.state.chatPanelMode,[]);t=i(139424).A.isMobile?{menuType:i(649476).gu.ActionSheet}:{menuType:i(649476).gu.Popup,width:220};let g=(0,r.useCallback)(e=>
1{(0,i(168682).M)({environment:u,chatPanelMode:e,trackAnalytics:!0,saveUserPreference:!0}),c.close(),requestAnimationFrame(()=>{null==d||d(e)})},[c,d,u]),v=(0,i(327219).tz)(),m=(0,i(83208).X)("agent_popup_fs"),_=(0,i(579993).K8)(()=>{let e=(0,i(548124).getChatPanelState)(u);if(null!=e&&e.isOpen&&!e.isNewThread)return e.threadId},[u]),S=(0,r.useMemo)(()=>l.map((e,t)=>{let r=e.key;return{key:t,render:t=>(0,a.jsx)(i(95582).A,{...t,disabled:!1,title:e.title,icon:e.icon,isChecked:e.key===f}),action:()=>g(r)}}),[l,f,g]),y=(0,r.useMemo)(()=>({key:0,render:e=>(0,a.jsx)(i(95582).A,{...e,disabled:!1,title:v.formatMessage(n.fullscreen),icon:(0,a.jsx)(i(16275).I,{icon:i(89873).o}),isChecked:!1}),action:({event:e})=>{if(s)s(e);else{let t=h&&_?(0,i(548124).threadStoreGivenRouteData)({spaceStore:h,chatPanelState:{isOpen:!0,threadId:_,isNewThread:!1}}):void 0;i(689262).trackAgentToggleChatMode({environment:u,chatMode:"full"}),(0,i(468456).navigateToInferenceTranscriptRoute)({environment:u,tabId:p,oldThreadStore:t,newThreadStore:t,openInNewTab:"tab"===(0,i(7029).V)(e),makeTabActive:(0,i(7029).t)(e)})}c.close()}}),[_,u,v,s,c,h,p]),b=(0,r.useMemo)(()=>{let e=[{key:"panel",render:e=>(0,a.jsx)(i(83743).A,{enableActionSheetTitle:!0,...e}),items:S}];return m&&"enabled"===o&&e.push({key:"fullscreen",render:e=>(0,a.jsx)(i(83743).A,{topBorder:!0,...e}),items:[y]}),e},[m,o,S,y]);return(0,a.jsx)(i(747369).A,{...t,children:(0,a.jsx)(i(558045).A,{type:i(558045).O.Vertical,sections:b,initialFocus:0})})}function o(){return["sidebar","popup"].map(e=>({key:e,type:"button",title:(0,i(888823).H)(e),icon:(0,a.jsx)(i(16275).I,{icon:(0,i(888823).J)(e)})}))}let l=(0,i(327219).YK)({switchMode:{id:"chatSidebar.switchMode.button",defaultMessage:"Switch chat mode"}}),c={minWidth:190};function d(e){let{onFullscreen:t,fullscreenMode:n,shape:d,size:u="default"}=e,p=(0,i(327219).tz)(),h=(0,i(579993).K8)(()=>i(562733).zI.state.chatPanelMode,[]),f=(0,i(972740).L)(),g=null==f?void 0:f.id,v=(0,i(560961).V9)(g),m=(0,r.useMemo)(()=>o(),[]),_=(0,i(529927).a)({shape:d,size:u});return v?null:(0,a.jsx)(i(656252).d,{popupType:i(182718).n.Popup,alignmentToOrigin:"center",placementToOrigin:"bottom",style:c,originGap:0,content:e=>(0,a.jsx)(s,{parent:e,options:m,onFullscreen:t,fullscreenMode:n}),children:e=>(0,a.jsx)(i(51831).m_,{content:()=>(0,a.jsx)(i(327219).sA,{...l.switchMode}),children:t=>(0,a.jsx)(i(374533).K,{...e,...t,icon:()=>(0,a.jsx)(i(16275).I,{icon:(0,i(888823).J)(h)}),style:_.iconButton,ariaLabel:p.formatMessage(l.switchMode),testId:"switch-chat-mode-button"})})})}function u(e){let{aiChatFeatureController:t}=e;return t.supportsChatSidebarModes?(0,a.jsx)(d,{shape:t.headerButtonShape,size:t.supportsTallChatHeader?"tall":"default"}):null}},888823(e,t,i){let r=(0,i(327219).YK)({sidebar:{defaultMessage:"Sidebar",id:"chatSidebar.mode.sidebar"},popup:{defaultMessage:"Floating",id:"chatSidebar.mode.popup"},full:{defaultMessage:"Full",id:"chatSidebar.mode.full"}});function a(e){switch(e){case"sidebar":return i(962299).A.formatMessage(r.sidebar);case"popup":return i(962299).A.formatMessage(r.popup);case"full":return i(962299).A.formatMessage(r.full);default:(0,i(48697).HB)(e)}}function n(e){switch(e){case"sidebar":return i(357055).A;case"popup":case"full":return i(530993).q;default:(0,i(48697).HB)(e)}}i.d(t,{H:()=>a,J:()=>n})},432705(e,t,i){function r(e){return"event"===e||"recurrence"===e}function a(e){let t=e.getTrigger();return(0,i(48697).O9)(t)&&r(t.type)}function n(e){return"event"===e?"event":"recurrence"===e?"recurrence":void(0,i(48697).HB)(e)}i.d(t,{$X:()=>a,H8:()=>n,x2:()=>r})},723732(e,t,i){function r(e){let{environment:t,collectionViewBlockStore:r,collectionView:a,transaction:n,disableAppendingToCollectionViewBlock:s=!1}=e,o=i(918300).eC({environment:t,table:i(832375).Gy1,value:a,inMemoryRecordCache:r.inMemoryRecordCache,transaction:n}),l=i(547131).p.createChildStore(r,{table:i(832375).Gy1,id:o.id,spaceId:r.getSpaceId()});return s||(0,i(33028).B)({parentStore:r.getCollectionViewsStore(),appendStore:l,transaction:n}),l}i.d(t,{i:()=>r})},753833(e,t,i){function r(e){let{environment:t,spaceStore:r}=e,a=t.currentUser.id;if(!r||!a||!(0,i(551408).R)())return!1;let n=(0,i(367890).x)(t,{name:"ai_database_agents",spaceId:r.id,userId:a,amount:"unknown"});return void 0!==n&&!!(0,i(747609).e2)(n)&&(0,i(994709).v)({currentUserId:a,spaceStore:r,isOwnersOnlyDefaultEnabled:i(218744).default.checkGate({gateName:"agent_creation_default_owners_only"})}).canCreate}i.d(t,{m:()=>r})},96351(e,t,i){function r({openInNew:e,url:t,makeTabActive:a,position:n,isNewPage:s,reuseExistingTab:o,matchPeek:l,environment:c}){"tab"===e&&a?(0,i(196556).w)(c,{url:t,position:n,makeTabActive:a,isNewPage:s,reuseExistingTab:o,matchPeek:l}):"tab"!==e||a?"window"===e&&(0,i(714770).E)(t):(0,i(606237).x)(c,{url:t,position:n,isNewPage:s})}i.d(t,{B:()=>r})},558254(e,t,i){i(533958),i(435368);var r=()=>i(678703);function a(e){let{environment:t,sourceBlocks:a,destination:n,transaction:s,options:o,from:l,installationImprint:c,templateInstallationMetadata:d,appendWithoutAfter:u,unlockPage:p,skipUserFacingMessages:h,listener:f,clipboardSubtrees:g,targetInMemoryRecordCache:v}=e,m=n.existingBlockIds;if(!m||m.length!==a.length)throw Error("Synchronous mixed local server duplication requires existing block IDs for each source block");let _=e.userId??t.currentUser.id;if(!_)return i(80279).Q.fail(Error("Failed to get user ID"));
1let S=n.parent.spaceId,y=e.targetSpaceViewStore??(0,i(852864).H)({spaceStore:new(r()).SL(t,{table:"space",id:S}),userId:_,environment:t});if(!y)return i(80279).Q.fail(Error("Failed to get target space view store"));let b=e.forceExecutionTarget??i(730125).A.getState().executionTarget;f({type:"started"});let w=[],I=[],k=[],C=[];if("server"!==b){let e=(0,i(79179).loadInMemorySubtree)({environment:t,sourceStores:a,options:o,targetSpaceId:S,bailOnMiss:"local"===b,clipboardSubtrees:g});if(!e&&"local"===b)return i(80279).Q.fail(Error("Failed to load all blocks for local duplication"));if(e){let r=s.saveCheckpoint();if(w=(0,i(79179).performLocalDuplication)({environment:t,sourceStores:a,destination:n,options:o,transaction:s,from:l,onMissingLocalSubtree:({index:e,blockStore:t})=>{I.push(t),k.push(m[e])},targetSpaceId:S,targetSpaceViewStore:y,targetInMemoryRecordCache:v,existingBlockIds:m,installationImprint:c,templateInstallationMetadata:d,unlockPages:p,appendWithoutAfter:u,localSubtrees:e}),"local"===b&&I.length>0)return r(),i(80279).Q.fail(Error("Failed to duplicate all blocks locally"));if((0,i(386281).vY)(s)){if(r(),"local"===b)return i(80279).Q.fail(Error("Local duplication transaction is too large"));w=[],I=a,k=m}}else I=a,k=m;for(let e of k){let i=new(r()).Bv(t,{table:"block",id:e,spaceId:S});C.push(i)}f({type:"local_completed",createdBlocks:[...w,...C],recordIdMap:void 0})}return s.postSubmitCallbacks.push(async e=>{if(e)return void await f({type:"error",error:e});if("server"===b)return void(0,i(170013).V)({environment:t,listener:f,sourceBlocks:a,destination:n,options:{...o,isTemplateInstantiation:o.isTemplateInstantiation||!!d},unlockPages:p,from:l,appendWithoutAfter:u,skipUserFacingMessages:h});if(I.length>0){let e=await (0,i(79179).loadSubtreesForLocalDuplication)({environment:t,sourceStores:I,existingBlockIds:k,targetSpaceId:S,options:o,shouldUseServerBackedDuplication:!0,bailOnMiss:!1}),r=[],a=[],s=[];if(e){let h=(0,i(323517).createAndCommit)({environment:t,canUndo:!1,userAction:`duplicateToSynchronous.${l}`,cellTarget:{spaceWithId:S},transactionTooBigFallback:()=>(s=I,a=k,[]),perform:r=>(0,i(79179).performLocalDuplication)({environment:t,sourceStores:I,destination:n,options:o,unlockPages:p,targetSpaceId:S,transaction:r,existingBlockIds:k,localSubtrees:e,from:l,installationImprint:c,templateInstallationMetadata:d,appendWithoutAfter:u,targetSpaceViewStore:y,targetInMemoryRecordCache:v,onMissingLocalSubtree:({index:e,blockStore:t})=>{s.push(t),a.push(k[e])}})});r=h.performResult;try{if(await h.serverCommitResult,0===s.length)return void await f({type:"completed",createdBlocks:r,recordIdMap:void 0})}catch(e){await f({type:"error",error:(0,i(324497).A)(e)});return}}else s=I,a=k;if("local"!==b){let e={...n,existingBlockIds:a};(0,i(170013).V)({environment:t,listener:f,sourceBlocks:s,destination:e,options:{...o,isTemplateInstantiation:o.isTemplateInstantiation||!!d},unlockPages:p,from:l,appendWithoutAfter:u,skipUserFacingMessages:h})}}else await f({type:"completed",createdBlocks:w,recordIdMap:void 0})}),i(80279).Q.success({createdBlocks:[...w,...C]})}i.d(t,{y:()=>a})},170013(e,t,i){async function r(e){let{navigateToTarget:t,skipUserFacingMessages:r,...n}=e,{environment:s,from:o}=n,l=a;l=(0,i(209353).yE)(l,i(209353).Nf),l=(0,i(209353).ME)(l),r||(l=(0,i(209353).yE)(l,i(209353).vd),l=(0,i(209353).$2)(l)),t&&(l=(0,i(209353).em)(l));let c=`duplicateSubtree.${o}`;return l=(0,i(209353).NU)({environment:s,runner:l,userAction:c,method:"server_duplicate_subtree",from:o}),l=(0,i(209353).E0)({runner:l,userAction:c}),await (0,i(209353).Fe)({runner:l,args:n})}async function a(e){let{environment:t,destination:r,options:a,from:n,sourceBlocks:s,listener:o,appendWithoutAfter:l,unlockPages:c,scanForPromptInjection:d}=e,u=s[0].getSpaceId(),p=r.parent.spaceId,h={allowDuplicateSourceIds:a.allowDuplicateSourceIds,allowMixedExistingBlockParents:a.allowMixedExistingBlockParents,allowRedundancy:a.allowRedundancy,appendNumericTitleSuffix:a.addCopyName,resolveTemplateVariables:a.resolveTemplateVariables?{currentUserId:t.currentUser.id,currentTimeZone:(0,i(714350).P)()}:void 0,excludeCollectionChildren:a.duplicateOnlyCollectionSchema,excludeTransclusionContainerChildren:!a.deepCopyTransclusionContainers,isTemplateInstantiation:a.isTemplateInstantiation,preserveTargetBlocksOnFailure:a.preserveTargetBlocksOnFailure,unlockPages:c,scanForPromptInjection:d,sourceBlockUpdateStrategy:a.sourceBlockUpdateStrategy,shouldNavToFirstTarget:a.shouldNavToFirstTarget};i(773352).log({level:"info",from:"duplicateTo",type:"duplicateSubtree",data:{miscDataToConvertToString:{from:n,duplicateSubtreeOptions:h,sourceSpaceId:u,targetSpaceId:p}}}),(0,i(494010).Wy)(r)&&!l&&void 0===r.siblingId&&s[s.length-1].getParentId()===r.parent.id&&(r.siblingId=s[s.length-1].id);let f={source:{ids:s.map(e=>e.id),spaceId:u},destination:r,options:h,userAction:`duplicateSubtree.${n}`},g=(0,i(259242).UT)({environment:t,eventName:i(916501).$,request:f,multiCellRouting:{spaceIds:(0,i(960408).sb)([p,u])}});await (0,i(209353).nN)({environment:t,iterator:g,listener:o,targetSpaceId:p,retryOnMainCell:()=>(0,i(259242).UT)({environment:t,eventName:i(916501).$,request:f,multiCellRouting:{spaceIds:[]}})})}i(159952),i.d(t,{V:()=>r})},730125(e,t,i){let r=i(546605).Store.createValue({executionTarget:null},{name:"DuplicationDebuggingStore"});i.d(t,{},{A:r})}
1,821915(e,t,i){function r(e){let{config:t}=e,r=(0,i(83208).X)("filesystem_sandbox")&&"workflow"===t.type&&!0!==t.isHipaa,a="workflow"===t.type&&!0===t.isCustomAgent,n=(0,i(83208).X)("computer_custom_agent");return(!a||!!n)&&r}function a(e){return!!i(218744).default.checkGate({gateName:"filesystem_sandbox"})&&!e.isHipaa&&(!e.isCustomAgent||!!i(218744).default.checkGate({gateName:"computer_custom_agent"}))}i.d(t,{Y:()=>a,p:()=>r})},275750(e,t,i){function r(e=(0,i(328765).S)()){return i(218744).default.checkGate({gateName:"enable_agent_skills_v2"})&&void 0!==e&&(0,i(352740).B)(e.getSettings())}function a(e){let t=(0,i(83208).X)("enable_agent_skills_v2"),r=(0,i(579993).K8)(()=>void 0!==e&&(0,i(352740).B)(e.getSettings()),[e]);return t&&r}function n(){return a((0,i(579993).K8)(()=>(0,i(328765).S)(),[]))}i.d(t,{bO:()=>r,cc:()=>a,co:()=>n})},828294(e,t,i){function r(){return(0,i(275750).co)()}function a(e){return(0,i(275750).bO)(e)}function n(){return i(218744).default.checkGate({gateName:"enabled_skills_always_auto_usable"})}function s(){return i(218744).default.checkGate({gateName:"agent_writer_client_rendered_pages"})}i.d(t,{Qm:()=>a,__:()=>s,dI:()=>r,qY:()=>n})},61314(e,t,i){function r(e){if(!e)return null;let t=e.getSpaceStore();if(!t)return null;let r=t.userId;if(!r)return null;let a=i(678703).VF.createChildStore(t,i(729052).i1({userId:r,spaceId:t.id}));return a?!!a.isMember():null}i.d(t,{j:()=>r})},723836(e,t,i){function r({environment:e,eventProperties:t}){(0,i(104310).u)({event:{eventName:"navigate_to_library",eventProperties:t}})}function a({environment:e,libraryViewName:t}){(0,i(104310).u)({event:{eventName:"library_subitem_creation",eventProperties:{library_view_name:t}}})}function n({environment:e,libraryViewName:t}){(0,i(104310).u)({event:{eventName:"library_create_page_button",eventProperties:{library_view_name:t}}})}function s({environment:e,libraryViewName:t}){(0,i(104310).u)({event:{eventName:"library_view_selected",eventProperties:{library_view_name:t}}})}function o({environment:e,eventProperties:t}){(0,i(104310).u)({event:{eventName:"toggle_sidebar_section_visibility",eventProperties:t}})}function l({environment:e,eventProperties:t}){(0,i(104310).u)({event:{eventName:"add_items_to_sidebar_section",eventProperties:t}})}function c({environment:e,libraryViewName:t,numPagesReordered:r}){(0,i(104310).u)({event:{eventName:"library_reorder_pages",eventProperties:{library_view_name:t,num_pages_reordered:r}}})}i.d(t,{DB:()=>c,bD:()=>a,bT:()=>r,lr:()=>s,rx:()=>o,t6:()=>n,xN:()=>l})},369321(e,t,i){let r=["agent","agent_popup","slippery_slope"];function a(e){let{aiChatType:t,isDefaultEmptyStateDisplay:a,hasArtifactSelectionContext:n,bypassEntryContextSuppression:s}=e,o=(0,i(48697).Xk)(r,t),l=!i(139424).A.isMobile&&o&&a&&(s||!n);return(0,i(83208).X)("notion_wrapped_displayed",{disableExposureLogging:!l})&&l}function n(e){let{isPromoDismissed:t,spaceId:r}=e,n=(0,i(579993).K8)(()=>i(378505).gG.hasStartedInSpace(r),[r]);return a({...e,bypassEntryContextSuppression:n})&&(n||!t)}function s(e){let t=(0,i(579993).K8)(()=>i(378505).gG.hasOpenedFirstCardInSpace(e.spaceId),[e.spaceId]);return a({...e,bypassEntryContextSuppression:!1})&&!e.isPromoDismissed&&!e.areSparklesHidden&&!t}function o(e){return a({...e,bypassEntryContextSuppression:!1})&&e.isPromoDismissed}function l(e){let t=(0,i(579993).K8)(()=>i(378505).gG.hasStartedInSpace(e),[e]),r=(0,i(83208).X)("notion_wrapped_displayed",{disableExposureLogging:!0});return!i(139424).A.isMobile&&r&&t}i.d(t,{QZ:()=>n,Rt:()=>o,V9:()=>l,bj:()=>s})},378505(e,t,i){var r=()=>i(546605);function a(e,t=Date.now()){return void 0!==e&&t<e}function n(e=Date.now()){return e+6048e5}class s extends r().Store{emojiHydrationWaitKey;getInitialState(){return{hasStarted:!1,openedFirstCardSpaceId:void 0,activeCardIndex:0,activeCardFace:"teaser",cardThemeSeed:0,insightStatus:"idle",insights:void 0,insightsSpaceId:void 0,insightsBySpace:new(i(412951)).RecordValueMap,visibleLoaderCountBySpace:new(i(412951)).RecordValueMap,activeGenerationRunsBySpace:new(i(412951)).RecordValueMap,activeDisplaySpaceId:void 0,insightsSource:void 0,braintrustShareAvailableUntil:void 0,braintrustShareStatus:"idle",emojiHydrationWaitStartedAt:void 0}}reset(){this.emojiHydrationWaitKey=void 0,super.reset()}start(e){let t=this.state.insightsBySpace.get({table:"space",id:e}),i=this.hasActiveGenerationInSpace(e);this.setStateWithEmojiHydrationWait({...this.state,hasStarted:!0,activeCardIndex:0,activeCardFace:"teaser",cardThemeSeed:Math.floor(Math.random()*Number.MAX_SAFE_INTEGER),activeDisplaySpaceId:e,...i?{insightStatus:"generating",insights:void 0,insightsSpaceId:void 0,insightsSource:void 0,braintrustShareAvailableUntil:void 0,braintrustShareStatus:"idle"}:void 0!==t?{insightStatus:"ready",insights:t.insights,insightsSpaceId:e,insightsSource:t.source,braintrustShareAvailableUntil:t.braintrustShareAvailableUntil,braintrustShareStatus:t.braintrustShareStatus}:{insightStatus:"idle",insights:void 0,insightsSpaceId:void 0,insightsSource:void 0,braintrustShareAvailableUntil:void 0,braintrustShareStatus:"idle"}})}showPromo(){this.setState({...this.state,hasStarted:!1,activeCardIndex:0,activeCardFace:"teaser",activeDisplaySpaceId:void 0})}beginInsightGeneration(e){(this.state.activeGenerationRunsBySpace.set({table:"space",id:e.spaceId},e.threadId),this.state.activeDisplaySpaceId!==e.spaceId)?this.emit
1():this.setStateWithEmojiHydrationWait({...this.state,insightStatus:"generating",insights:void 0,insightsSpaceId:void 0,insightsSource:void 0,braintrustShareAvailableUntil:void 0,braintrustShareStatus:"idle"})}hasReadyInsightsInSpace(e){return void 0!==this.state.insightsBySpace.get({table:"space",id:e})}restoreCachedInsightsForSpace(e){let t=this.state.insightsBySpace.get({table:"space",id:e});return void 0!==t&&(this.setStateWithEmojiHydrationWait({...this.state,insightStatus:"ready",insights:t.insights,insightsSpaceId:e,insightsSource:t.source,braintrustShareAvailableUntil:t.braintrustShareAvailableUntil,braintrustShareStatus:t.braintrustShareStatus}),!0)}hasStartedInSpace(e){return void 0!==e&&this.state.hasStarted&&this.state.activeDisplaySpaceId===e}hasOpenedFirstCardInSpace(e){return void 0!==e&&this.state.openedFirstCardSpaceId===e}markFirstCardOpened(e){this.state.openedFirstCardSpaceId!==e&&this.setState({...this.state,openedFirstCardSpaceId:e})}getInsightStatusForSpace(e){return void 0===e?"idle":this.hasActiveGenerationInSpace(e)?"generating":void 0!==this.state.insightsBySpace.get({table:"space",id:e})?"ready":"error"===this.state.insightStatus&&this.state.activeDisplaySpaceId===e?"error":"idle"}hasActiveGenerationInSpace(e){return void 0!==this.state.activeGenerationRunsBySpace.get({table:"space",id:e})}showLoaderInSpace(e){let t={table:"space",id:e},i=this.state.visibleLoaderCountBySpace.get(t)??0;this.state.visibleLoaderCountBySpace.set(t,i+1)}hideLoaderInSpace(e){let t={table:"space",id:e},i=this.state.visibleLoaderCountBySpace.get(t)??0;i<=1?this.state.visibleLoaderCountBySpace.delete(t):this.state.visibleLoaderCountBySpace.set(t,i-1)}isLoaderVisibleInSpace(e){return(this.state.visibleLoaderCountBySpace.get({table:"space",id:e})??0)>0}isActiveGenerationRun(e){return this.state.activeGenerationRunsBySpace.get({table:"space",id:e.spaceId})===e.threadId}setInsightsForGeneration(e,t,i="generated"){if(!this.isActiveGenerationRun(t))return!1;let r=n();return(this.state.activeGenerationRunsBySpace.delete({table:"space",id:t.spaceId}),this.state.insightsBySpace.set({table:"space",id:t.spaceId},{insights:e,source:i,braintrustShareAvailableUntil:r,braintrustShareStatus:"idle"}),this.state.activeDisplaySpaceId!==t.spaceId)?this.emit():this.setStateWithEmojiHydrationWait({...this.state,insightStatus:"ready",insights:e,insightsSpaceId:t.spaceId,insightsSource:i,braintrustShareAvailableUntil:r,braintrustShareStatus:"idle"}),!0}setRehydratedInsightsForSpace(e,t,i){let r=n(i);(this.state.insightsBySpace.set({table:"space",id:t},{insights:e,source:"rehydrated",braintrustShareAvailableUntil:r,braintrustShareStatus:"idle"}),this.state.activeDisplaySpaceId!==t)?this.emit():this.setStateWithEmojiHydrationWait({...this.state,insightStatus:"ready",insights:e,insightsSpaceId:t,insightsSource:"rehydrated",braintrustShareAvailableUntil:r,braintrustShareStatus:"idle"})}failInsightGeneration(){this.setStateWithEmojiHydrationWait({...this.state,insightStatus:"error",insights:void 0,insightsSpaceId:void 0,insightsSource:void 0,braintrustShareAvailableUntil:void 0})}failInsightGenerationForRun(e){return!!this.isActiveGenerationRun(e)&&(this.state.activeGenerationRunsBySpace.delete({table:"space",id:e.spaceId}),this.state.activeDisplaySpaceId===e.spaceId?this.failInsightGeneration():this.emit(),!0)}setBraintrustShareStatus(e){let t=this.state.insightsSpaceId;if(void 0!==t){let i=this.state.insightsBySpace.get({table:"space",id:t});void 0!==i&&this.state.insightsBySpace.set({table:"space",id:t},{...i,braintrustShareStatus:e})}this.setState({...this.state,braintrustShareStatus:e})}setActiveCardIndex(e,t){let i=Math.max(0,Math.min(e,t-1)),r=i>=t-1?"reveal":"teaser";(i!==this.state.activeCardIndex||this.state.activeCardFace!==r)&&this.setState({...this.state,activeCardIndex:i,activeCardFace:r})}advanceCardSequence(e){if("teaser"===this.state.activeCardFace)return void this.setState({...this.state,activeCardFace:"reveal"});if(this.state.activeCardIndex>=e-1)return;let t=this.state.activeCardIndex+1;this.setState({...this.state,activeCardIndex:t,activeCardFace:t>=e-1?"reveal":"teaser"})}reverseCardSequence(e){var t;"reveal"!==this.state.activeCardFace||(t=this.state.activeCardIndex,t>=e-1)?this.state.activeCardIndex<=0||this.setState({...this.state,activeCardIndex:this.state.activeCardIndex-1,activeCardFace:"reveal"}):this.setState({...this.state,activeCardFace:"teaser"})}setStateWithEmojiHydrationWait(e){this.setState({...e,emojiHydrationWaitStartedAt:this.syncEmojiHydrationWait(e.insights,e.insightsSpaceId)})}syncEmojiHydrationWait(e,t){let i=function(e,t){var i;let r=null==e||null==(i=e.tellEmojiGame)?void 0:i.answer;if(void 0!==t&&void 0!==r)return{spaceId:t,answer:r}}(e,t);if(void 0===i){this.emojiHydrationWaitKey=void 0;return}return void 0!==this.emojiHydrationWaitKey&&this.emojiHydrationWaitKey.spaceId===i.spaceId&&this.emojiHydrationWaitKey.answer===i.answer?this.state.emojiHydrationWaitStartedAt:(this.emojiHydrationWaitKey=i,Date.now())}}let o=new s;i.d(t,{A8:()=>a},{gG:o})},214062(e,t,i){function r(e){if(!e)return[];let t=e.getSetting("workspace_default_skills")??[];if(!i(218744).default.checkGate({gateName:"enable_group_default_skills"}))return t;let r=e.getSetting("group_default_skills")??[];return 0===r.length?t:(0,i(543858).hC)({workspaceDefaultSkills:t,groupDefaultSkills:r,currentUserGroupIds:i(68809).f.getSpacePermissionGroupIds({spaceId:e.id})})}function a(e){let t=new Map;if(!e)return{skills:[],sourceBySkillPageId:t};let r=e.getSetting("workspace_default_skills")??[];if(!i(218744).default.checkGate({gateName:"enable_group_default_skills"})){for(let e of r)t.set(e.skill_page_id,{type:"workspace"});return{skills:r,sourceBySkillPageId:t}}let a=e.getSetting("group_default_skills")??[];if(0===a.length){for(let e of r)t.set(e.skill_page_id,{type:"workspace"});return{skills:r,sourceBySkillPageId:t}}let n=i(68809).f.getSpacePermissionGroupIds({spaceId:e.id}),s=(0,i(543858).hC)({workspaceDefaultSkills:r,groupDefaultSkills:a,currentUserGroupIds:n}),o=new Set(s.map(e=>e.skill_page_id));for(let e of r)o.has(e.skill_page_id)&&t.set(e.skill_page_id,{type:"workspace"});for(let e of a)if(n.has(e.group_id))for(let i of e.skills){if(!o.has(i.skill_page_id))continue;let r=t.get(i.skill_page_id);if((null==r?void 0:r.type)==="workspace")continue;let a=(null==r?void 0:r.groupIds)??[];a.includes(e.group_id)||t.set(i.skill_page_id,{type:"group",groupIds:[...a,e.group_id]})}return{skills:s,sourceBySkillPageId:t}}i(499468),i(586042),i(169187),i(726090),i(132457),i(219390),i(73168),i(159952),i.d(t,{O:()=>a,g:()=>r})},931263(e,t,i){function r(e){let{stores:t}=i(584265).default.state,r=t[0];if(!r)return;let a=i(240414).T.findSelectableFromStore(r);if(a&&a.props.onEditText){let t=a.props.onEditText,n=r.pointer.spaceId;(0,i(323517).createAndCommit)({userAction:"selectionActions.editSelection",environment:e,canUndo:!0,cellTarget:n?{spaceWithId:n}:void 0,perform:e=>{t({isAtStartOfLine:!1,isClick:!1,transaction:e})}})}}i.d(t,{Z:()=>r})},630131(e,t,i){function r(e,t){return(0,i(893004).z)(e,i(96530).L,t)}i.d(t,{Y:()=>r})},188465(e,t,i){i.d(t,{B:()=>s});var r=()=>i(129499),a=()=>i(955630);function n(e){for(let t of e){let e=function(e){let t=e.getTitleStore(
1);if(t&&i(521595).n.findNodeFromStore(t))return t}(t);if(e&&t.getType()!==a().xd.code)return{blockStore:t,titleStore:e}}}function s(e){let t,a=n(e);if(!a)return;let s=n([...e].reverse());if(!s)return;let o=(0,i(787926).Ag)({includeNonSelectableListContainer:!1,rootStore:a.blockStore.getHighestContentBlockUIAncestor()});if(!o)return;let l=(0,i(787926).mP)(s.blockStore,o);if(l){for(let e of(0,i(827049).Y_)(l)){let i=e.value.store.getTitleStore();if(i){let e=(0,r().s)(i);e&&(t={store:i,index:e.endIndex})}}if(t)return{start:{store:a.titleStore,index:0},end:t}}}},250943(e,t,i){function r(e){let{multiSelection:t}=e;return(0,i(356264).$)(t).map(({store:e,selection:t})=>{let r=(0,i(247438).RQ)(e.getValue()),a=(0,i(247438).xbM)(r,t),{tokensInsideRange:n}=(0,i(247438).AI5)(r,a.startIndex,a.endIndex);return(0,i(536614).r4)(n,e)}).join("\n\n")}i(159952),i.d(t,{E:()=>r})},487016(e,t,i){i(533958),i(435368),i(499468),i(586042),i(169187),i(726090),i(132457),i(219390),i(73168),i(730330),i(976614),i(139583),i(159952);var r=()=>i(436746),a=()=>i(388507),n=()=>i(717673);function s({transaction:e,collectionStore:t,propertyTemplates:o,insertionContext:l,preExistingTemplatePropertyIds:c}){var d,u;let p=(null==(d=t.getParentBlockStore())?void 0:d.getCollectionViewStores().filter(e=>"table"===e.getType()))??[];if(0===p.length)return;let h=[];for(let e of o){let i=(0,n().S1)({collectionStore:t,templateId:e.templateId,instancePointerType:"property"});i&&h.push({property:i.id,visible:!(0,a().Sz)(e),...e.tablePropertyFormat})}if(0!==h.length)for(let t of p){let a=function({storedPropertyFormats:e,propertyFormatsFromTemplate:t,insertionPropertyFormats:r,preExistingTemplatePropertyIds:a}){let n=r??e,s=new Set(n.map(e=>e.property)),o=void 0===a?[]:t.filter(e=>!a.has(e.property)),l=new Set(o.map(e=>e.property)),c=t.filter(e=>!l.has(e.property)&&!s.has(e.property));if(0!==o.length||0!==c.length)return[...(0,i(636013).H)({propertyFormats:n,newPropertyFormats:o}),...c]}({storedPropertyFormats:(null==(u=t.getPropertyFormatsStore("table_properties"))?void 0:u.getValue())??[],propertyFormatsFromTemplate:h,insertionPropertyFormats:(null==l?void 0:l.collectionViewId)===t.id?l.propertyFormats:void 0,preExistingTemplatePropertyIds:c});a&&(0,r().z)({stores:[t],update:{table_properties:a},transaction:e})}}function o({transaction:e,collectionStore:t,propertyTemplates:i}){let a=[];for(let e of i){let i=(0,n().S1)({collectionStore:t,templateId:e.templateId,instancePointerType:"property"});i&&a.push({property:i.id,visible:!0})}let s=t.getFormat().collection_page_properties??[],l=new Set(s.map(e=>e.property)),c=a.filter(e=>!l.has(e.property));c.length&&(0,r().z)({stores:[t],update:{collection_page_properties:[...s,...c]},transaction:e})}function l({environment:e,newPageStore:t,result:r}){if("accepted_template"===r.type||"accepted_empty_collection"===r.type||"accepted_link_database"===r.type){let a=t.getSpaceId();(0,i(323517).createAndCommit)({environment:e,canUndo:!1,cellTarget:a?{spaceWithId:a}:void 0,perform:a=>{let n=t.getTitleValue();if((0,i(787932).z)({store:t,transaction:a,data:{alive:!1}}),"accepted_empty_collection"===r.type&&!(0,i(247438).w9s)(n)){let s=i(970831).B.createChildStore(t,{table:"block",id:r.blockId}).getTitleStore();s&&i(53517).yr({environment:e,transaction:a,tokens:n,index:0,store:s})}let s=t.getParentStore();if((null==s?void 0:s.table)==="block"){let e=s.getContentIds();(0,i(787932).z)({store:s,transaction:a,data:{content:e.filter(e=>e!==t.id)}})}},userAction:"clean_up_empty_new_page"})}}function c({environment:e,tabId:t,userAction:r,result:a,existingCollectionViewBlockStore:n,existingCollectionStore:s}){if("canceled"!==a.type){if("accepted_empty_collection"===a.type&&s){let t=s.getKeyStore("name"),n=(0,i(247438).x9d)(a.newCollectionTitle);if(t){let a=s.getSpaceId();(0,i(323517).createAndCommit)({userAction:r,environment:e,canUndo:!0,cellTarget:a?{spaceWithId:a}:void 0,perform:r=>i(53517).R9({environment:e,store:t,transaction:r,value:n})})}}if(n){var o;let e=null==(o=(0,i(444610).i)(n))?void 0:o.settingsStore;e&&(0,i(963405).os)({collectionSettingsStore:e})}if("accepted_template"===a.type&&null!=n&&n.isCollectionView()&&!(null!=n&&n.hasSingleSourceAndNoLinkedCollections())){let r=(0,i(444610).U)(n),s=n.getCollectionViewStores().find(e=>{var t;return(null==(t=e.getCollectionStore())?void 0:t.id)===a.collectionId});if(!r||!s)return;(0,i(979191).t)({environment:e,tabId:t,collectionContextStore:r,collectionViewId:s.id,isFullScreen:r.isFullScreenStore.state,isRootChild:r.isRootChildStore.state,isInPeekRenderer:r.isInPeekRendererStore.state})}}}async function d({environment:e,collectionViewBlockStore:t}){let r=t.id;if(!t.isDefined()){let a=await (0,i(829797).$)({environment:e,blockId:r});if(!a)return;e=await i(274662).T({environment:e,newCurrentUserId:a}),t=new(i(970831)).B(e,{table:"block",id:r}),await t.load()}let a=t.getSpaceId();if(!a)throw Error("Space ID not found for collection block");
1let n=(0,i(593303).findSpaceViewStore)(a);if(!n)throw Error(`Space view not found for space ID: ${a}`);let s=i(728372).AppStoreSidebarSpaceStore.state;(null==s?void 0:s.id)!==a&&await (0,i(784018).y)({environment:e,spaceViewStore:n});let o=t.getFormat();if((null==o?void 0:o.collection_view_sub_type)==="workflow_template_placeholder"&&null!=o&&o.placeholder_workflow_template_id&&t.isCollectionView()){let{getCollectionTemplateFromId:r}=await i(708370).t.load(),a=r(o.placeholder_workflow_template_id);if(!a)throw Error(`Collection template "${o.placeholder_workflow_template_id}" not found`);let{onNavigateToPlaceholderWorkflowTemplateBlock:n}=await i(903673).O.load();n({environment:e,collectionTemplate:a,collectionViewBlockStore:t})}else(0,i(114020).u)({environment:e,store:t,pageVisitSource:i(254656).y8.WorkflowTemplatesDeeplink,isNewPage:!1})}i.d(t,{Bi:()=>o,My:()=>s,ZM:()=>c,_M:()=>l,navigateToWorkflowTemplateOnboardingModal:()=>d})},726342(e,t,i){function r(e){return e instanceof i(681735).h||e instanceof i(695906).SpaceStore||e instanceof i(970831).B}i.d(t,{u:()=>r})},685257(e,t,i){function r(){return"prod"}function a(e){return!e.device.isPhone}i.d(t,{M:()=>r,u:()=>a})},3906(e,t,i){let r="settings-advanced",a="settings-trigger";function n(e){return"settings"===e||e===r||e===a}function s(e,t){return e===r?{type:"advanced"}:e===a&&void 0!==t?{type:"trigger",triggerId:t}:{type:"overview"}}function o(e){switch(e.type){case"overview":return{workflowViewType:"settings"};case"advanced":return{workflowViewType:r};case"trigger":return{workflowViewType:a,workflowViewId:e.triggerId}}}i.d(t,{EJ:()=>o,LM:()=>n,pU:()=>s})},747238(e,t,i){function r(e){return e.newSetupExperienceEnabled&&(0,i(3906).LM)(e.workflowViewType)}function a(e){return(0,i(3906).LM)(e)?"settings":n(e)?e:void 0}function n(e){switch(e){case"settings":case"activity":return!0;default:return!1}}i.d(t,{B2:()=>n,DR:()=>a,cB:()=>r})},646440(e,t,i){i.r(t),i(533958);var r=()=>i(223753);function a(e){return e.table===i(832375).C0E?e:void 0}function n(e){var t;return(null==(t=e.getModel())?void 0:t.getData())||(0,i(425749).bZ)()}function s(e){let{workflowPointer:t,threadPointer:i}=e,r=t??i;if(!r)throw Error("No workflow definition pointer found");return r}function o(e){switch(e.table){case"workflow":return e.id;case"workflow_artifact":return e.getParentId();case"thread":{var t;let r=null==(t=e.getData())?void 0:t.workflow_id;if(r)return r;let a=e.getConfig();if((null==a?void 0:a.type)==="workflow")return a.workflowId;return e.getParentTable()===i(832375).C0E?e.getParentId():void 0}default:(0,i(48697).HB)(e)}}function l(e){var t,r;let a;switch(e.table){case i(832375).U6v:a=null==(t=e.getData())?void 0:t.runtime_actor_pointer;break;case i(832375).C0E:a=n(e).runtime_actor_pointer??(null==(r=e.getPublishedArtifactStore())||null==(r=r.getData())?void 0:r.runtime_actor_pointer);break;default:(0,i(48697).HB)(e)}if(a&&"bot"===a.table)return a.id}function c(e){var t,i,r,a;let n=e.getData(),s=e.getDraftData(),o=(null==n||null==(t=n.runtime_actor_pointer)?void 0:t.id)??(null==s||null==(i=s.runtime_actor_pointer)?void 0:i.id),l=(null==n||null==(r=n.draft_runtime_actor_pointer)?void 0:r.id)??(null==s||null==(a=s.draft_runtime_actor_pointer)?void 0:a.id);return[...void 0!==o?[o]:[],...void 0!==l?[l]:[]]}function d(e){let{spaceStore:t,workflowStore:r}=e,a=l(r);if(a)return i(447003).v.createChildStore(t,{table:"bot",id:a,spaceId:t.id})}function u(e){let{botId:t,environment:a,spaceId:n}=e,s=(0,r().rL)({spaceId:n,botId:t});if(s)return s;if(!a)return;let o=(0,i(203462).zf)(a).getData(a,{spaceId:n});if(o){for(let e of o.agents)if(l(e)===t)return(0,r().wv)({spaceId:n,botId:t,workflowId:e.id}),e.id}}function p(e){return e.table!==i(832375).U6v?e.getDraftDataStore():e.getDataStore()}i.d(t,{getBotIdFromStore:()=>l,getBotStoreFromWorkflow:()=>d,getWorkflowBotIds:()=>c,getWorkflowDataStore:()=>p,getWorkflowDefinitionPointer:()=>s,getWorkflowIdForBot:()=>u,getWorkflowIdFromStore:()=>o,getWorkflowValue:()=>n,maybeWorkflowStore:()=>a})},994709(e,t,i){function r(e){let{currentUserId:t,spaceStore:r,isOwnersOnlyDefaultEnabled:a}=e,n=null==r?void 0:r.getModel(),s=null==n?void 0:n.getSettings();if(!r||!t||!n||!s)return{canCreate:!1,reason:"feature_disabled"};let o=(0,i(993077).dp)(r,t),l=o.getMembershipTypeAsRoleOrNone();if(!1!==o.isPageGuest()||!1!==o.isRestrictedMember()||"none"===l)return{canCreate:!1,reason:"policy_restriction"};let c=i(68809).f.getSpacePermissionGroupIds({spaceId:r.id}),d=(0,i(960408).oE)(Array.from(c).map(e=>{let t=(0,i(13717).E)({spaceStore:r,groupId:e});if(!t)return;let a=t.getSettings();return{settings:a?{can_create_custom_agents:a.can_create_custom_agents}:void 0}})),u={policy:s.custom_agent_creation_policy,userRole:l,userPermissionGroups:d,isOwnersOnlyDefaultEnabled:a};return(0,i(322450).K)(u)}i(159952),i.d(t,{v:()=>r})},541933(e,t,i){function r(){return i(218744).default.getConfig({configName:"custom_agent_sub_features"}).stuck_run_threshold_seconds??3600}function a(e,t=3600){var i;let r=null==(i=e.getData())?void 0:i.agent_provider;if((null==r?void 0:r.providerId)==="agent_service")return!1;let n=e.getUpdatedTime()??e.getCreatedTime();return!!n&&Date.now()-n>1e3*t}i.d(t,{N:()=>r,_:()=>a})},86089(e,t,i){i.d(t,{s:()=>s,getWorkflowAgentConfig:()=>a,a:()=>n}
1),i(730330),i(765324);let r=new(i(246382)).R({key:"agent_memory_database_page",namespace:i(274919).Bq,important:!0,trackingType:"preference"});function a(e){let{isOnboardingAgent:t,searchScopes:a,searchSessionId:n,useWebSearch:s,internetAccess:l,manageWorkers:c,useReadOnlyMode:d,agentMemorySettings:u,model:p,externalAgentModel:h,externalAgentReasoningEffort:f,isCustomAgent:g,isCustomAgentBuilder:v,isCustomAgentCreate:m,workflowId:_,modelFromUser:S,reasoningEffort:y,writerMode:b,useRulePrioritization:w,useCustomAgentDraft:I,databaseAgentConfigMode:k,isAgentResearchRequest:C,environment:x,spaceId:M,spaceStore:T}=e,A=i(886556).z.isZeroRetentionEnabled(),R=(0,i(612608).MI)((0,i(612608).VD)("ai_agent_large_tool_result_computer_offload"),o),B=(0,i(612608).MI)((0,i(612608).VD)("agent_script_agent_runscript_only"),o),E=o("agent_gtm_entity_tools"),F=o("software_factory_page"),P=(0,i(16712).p1)({checkGate:o,enableScriptAgent:!0,isCustomAgent:!!g}),D=(0,i(612608).MI)((0,i(612608).VD)("agent_user_session_context"),o),j=o("agent_crdt_operations"),N=(0,i(612608).MI)((0,i(612608).VD)("agent_card_customization"),o),V=(0,i(612608).MI)((0,i(612608).VD)("agent_system_prompt_as_page"),o),Q=(0,i(328765).S)(),O=T??(void 0===M||(null==Q?void 0:Q.id)===M?Q:void 0),z=o("sams_specials"),W=o("elons_specials"),U=o("ai_image_generation")&&!z&&!W&&((null==O?void 0:O.isAiImageGenerationEnabledOnSpace())??!0),L=(0,i(753833).m)({environment:x,spaceStore:O}),q="work_with_core_dbs"===e.onboardingAgentVersion,H=o("agent_markdown_vnext"),G=o("agent_suggested_edits_tools"),K=o("enable_agent_skills_v2"),$=K&&o("enable_skills_in_custom_agents"),X=o("agent_update_page_order_updates"),Y=o("agent_support_property_reorder"),Z=o("agent_stale_view_edit_guard_enabled"),J=i(218744).default.getConfig({configName:"agent_writer_model_config"}).defaultModel,ee=r.getState(),et=null==ee?void 0:ee.pageId,ei=(0,i(876688).wd)(),er=ei.some(e=>(0,i(281708).yY)(e)),ea=o("mail_notification_preferences_tools"),en=o("outlook_custom_agent_email_connector"),es=o("notion_mail_deprecated"),eo=o("agent_web_research"),el=o("agent_query_calendar_tool")&&er,ec=ei.some(e=>(0,i(281708).Xs)(e)&&"outlook"!==e),ed=o("agent_query_mail_tool")&&ec,eu=i(218744).default.checkGate({gateName:"agent_rule_priority_hierarchy"}),ep=(0,i(48697).Xk)(i(388021).UX,e.agentMessageKey),eh=!b&&!A&&(void 0===s||s),ef=(0,i(821915).Y)({isHipaa:A,isCustomAgent:!!g});return{type:"workflow",...P,enableAgentDiffs:!q,enableCsvAttachmentSupport:!0,showDatabaseAgentsDiscoverability:L,enableAgentThreadTools:e.enableAgentThreadTools??!1,enableCrdtOperations:j,enableAgentCardCustomization:N,enableSystemPromptAsPage:V,enableUserSessionContext:D,enableLargeToolResultComputerOffload:R,...B?{enableScriptAgentRunScriptOnly:!0}:{},enableScriptAgentGtm:E,enableComputer:ef,enableSoftwareFactoryPage:F,...g?{}:{enableAgentGenerateImage:U},enableQueryCalendar:el,enableQueryMail:ed,enableMailNotificationPreferences:ea,enableMailAgentMultiProviderSupport:en,enableNotionMailDeprecated:es,enableWebResearch:eo,useRulePrioritization:w??eu,memoryDatabasePageId:et,workflowId:_,availableConnectors:ei,searchScopes:b?[]:a??i(425749).R2,useWebSearch:eh,isHipaa:A,internetAccess:l??!1,manageWorkers:c??!1,useReadOnlyMode:!_&&(d??!1),agentMemorySettings:u,writerMode:!!b,model:b?J:p,externalAgentModel:h,externalAgentReasoningEffort:f,reasoningEffort:y,searchSessionId:n,modelFromUser:!b&&(S??void 0!==p),isCustomAgent:!!g,isCustomAgentBuilder:!!v,isCustomAgentCreate:!!m,isAgentResearchRequest:!!C,useCustomAgentDraft:!!I,enableMarkdownVNext:H,enableSuggestedEditsTools:G,enableAgentSkillsV2:!g&&K,enableSkillsInCustomAgents:$,updatePageStaleViewGuardEnabled:Z,enableUpdatePageOrderUpdates:X,enableAgentSupportPropertyReorder:Y,...b||(t||"onboarding"===e.oracleThreadType)&&!ep?{}:{enableAgentAskSurvey:!0},...t||"onboarding"===e.oracleThreadType||void 0!==e.onboardingAgentVersion?{disableTodos:!0}
1:{},databaseAgentConfigMode:!!k,isOnboardingAgent:!!t,onboardingAgentVersion:e.onboardingAgentVersion,agentMessageKey:e.agentMessageKey,isMobile:i(139424).A.isMobile}}function n(){return o("ai_research_mode_script_agent")}function s(e){let{environment:t,searchScope:i,spaceId:r,useWebSearch:n}=e;return{...a({environment:t,spaceId:r,searchScopes:i?[i]:void 0,useWebSearch:n}),enableScriptAgent:!0,isAgentResearchRequest:!0}}function o(e){return i(218744).default.checkGate({gateName:e})}},223753(e,t,i){let r=new Map;function a(e){return`${e.spaceId}:${e.botId}`}function n(e){r.set(a(e),e.workflowId)}function s(e){return r.get(a(e))}i.d(t,{rL:()=>s,wv:()=>n})},346596(e,t,i){var r=i(635790);function a(e){let{workflowIdFromRoute:t,spaceStore:a}=(0,i(579993).K8)(()=>({workflowIdFromRoute:"agent"===e.RouterStore.state.route.name?e.RouterStore.state.route.workflowId:void 0,spaceStore:i(728372).AppStoreSidebarSpaceStore.state}),[e]);return(0,r.useMemo)(()=>{if(t&&a)return i(360851).N.createChildStore(a,{table:i(832375).C0E,id:t,spaceId:a.id})},[t,a])}function n(e){let t="agent"===e.RouterStore.state.route.name?e.RouterStore.state.route.workflowId:void 0,r=i(728372).AppStoreSidebarSpaceStore.state;if(t&&r)return i(360851).N.createChildStore(r,{table:i(832375).C0E,id:t,spaceId:r.id})}i.d(t,{L:()=>a,k:()=>n})},681008(e,t,i){i(635790);var r=i(440302);let a={viewBox:"0 0 20 20",fittedViewBox:"1.64 1.23 16.72 17.53",svg:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M8.833 7.26a2.522 2.522 0 0 1 4.34.022.551.551 0 0 1-.95.555 1.422 1.422 0 0 0-2.446-.012L6.676 13l2.255.366a.55.55 0 0 1-.176 1.085L5.7 13.956a.55.55 0 0 1-.384-.825z"}),(0,r.jsx)("path",{d:"M10.518 8.605a.705.705 0 1 1-.225 1.393.705.705 0 0 1 .225-1.393m-3.719-.602a.706.706 0 1 1-.227 1.393.706.706 0 0 1 .227-1.393M5.146 5.999a2.524 2.524 0 0 1 3.586.23.55.55 0 0 1-.83.72 1.426 1.426 0 0 0-2.023-.13.55.55 0 1 1-.733-.82"}),(0,r.jsx)("path",{d:"M11.258 1.236c4.03 0 7.097 4.047 7.098 8.764s-3.069 8.762-7.098 8.763H8.743l-.375-.012C4.524 18.509 1.645 14.569 1.645 10c0-4.717 3.068-8.763 7.097-8.764zm-2.516 1.1c-3.202 0-5.998 3.31-5.998 7.664 0 4.355 2.796 7.663 5.998 7.663S14.74 14.355 14.74 10s-2.795-7.664-5.998-7.664m6.846 5.354c.164.74.253 1.516.253 2.31 0 3.134-1.356 5.97-3.446 7.522 2.699-.674 4.86-3.693 4.86-7.522a9.7 9.7 0 0 0-.275-2.31zm-.979-2.622q.396.718.672 1.523h1.35a8 8 0 0 0-.784-1.523zm-2.215-2.591a7.6 7.6 0 0 1 1.499 1.492h1.054c-.74-.738-1.614-1.258-2.553-1.492"})]})},n=(0,i(104509).wt)("aiCoin",a,"default");i.d(t,{},{f:n})},920976(e,t,i){i(635790);var r=i(440302);let a={viewBox:"0 0 20 20",fittedViewBox:"3.26 1.98 16.24 17.02",svg:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M16 12c.345 0 .625.28.625.625v2.25h2.25a.625.625 0 0 1 0 1.25h-2.25v2.25a.625.625 0 1 1-1.25 0v-2.25h-2.25a.625.625 0 0 1 0-1.25h2.25v-2.25c0-.345.28-.625.624-.625M9.702 5.022a3.918 3.918 0 0 1 6.742.036.626.626 0 0 1-1.08.63 2.668 2.668 0 0 0-4.59-.023L5.376 14.68l4.19.68a.625.625 0 0 1-.2 1.233l-5.1-.827a.625.625 0 0 1-.437-.938z"}),(0,r.jsx)("path",{d:"M10.912 8.094a1.178 1.178 0 1 1 2.326.377 1.178 1.178 0 0 1-2.326-.377M4.7 7.086a1.179 1.179 0 1 1 2.328.378A1.179 1.179 0 0 1 4.7 7.086M3.488 2.985a3.92 3.92 0 0 1 5.572.357.625.625 0 0 1-.944.818 2.67 2.67 0 0 0-3.796-.243.625.625 0 1 1-.832-.932"})]})},n=(0,i(104509).wt)("aiFacePlus",a,"default");i.d(t,{},{F:n})},937776(e,t,i){i(635790);var r=i(440302);let a={viewBox:"0 0 20 20",fittedViewBox:"3.12 3.12 13.75 13.76",svg:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M8 9.875a.625.625 0 1 0 0 1.25h4a.625.625 0 1 0 0-1.25z"}),(0,r.jsx)("path",{d:"M3.125 4.75c0-.897.728-1.625 1.625-1.625h10.5c.898 0 1.625.728 1.625 1.625v1.57c0 .676-.413 1.256-1 1.5v7.43c0 .898-.727 1.625-1.625 1.625h-8.5a1.625 1.625 0 0 1-1.625-1.625V7.82c-.587-.244-1-.824-1-1.5zm11.5 3.195h-9.25v7.305c0 .207.168.375.375.375h8.5a.375.375 0 0 0 .375-.375zm1-1.625V4.75a.375.375 0 0 0-.375-.375H4.75a.375.375 0 0 0-.375.375v1.57c0 .205.164.372.369.375h10.512a.375.375 0 0 0 .369-.375"})]})},n=(0,i(104509).wt)("archiveBox",a,"default");i.d(t,{},{B:n})},289871(e,t,i){i(635790);let r={viewBox:"0 0 20 20",fittedViewBox:"3.12 3.12 13.75 13.75",svg:(0,i(440302).jsx)("path",{d:"M13.125 4.25c0-.621.504-1.125 1.125-1.125h1.5c.621 0 1.125.504 1.125 1.125v11.5c0 .621-.504 1.125-1.125 1.125h-1.5a1.125 1.125 0 0 1-1.125-1.125zm1.25.125v11.25h1.25V4.375zm-6.25 6.375c0-.621.504-1.125 1.125-1.125h1.5c.621 0 1.125.504 1.125 1.125v5c0 .621-.504 1.125-1.125 1.125h-1.5a1.125 1.125 0 0 1-1.125-1.125zm1.25.125v4.75h1.25v-4.75zM4.25 5.625c-.621 0-1.125.504-1.125 1.125v9c0 .621.504 1.125 1.125 1.125h1.5c.621 0 1.125-.504 1.125-1.125v-9c0-.621-.504-1.125-1.125-1.125zm.125 10v-8.75h1.25v8.75z"})},a=(0,i(104509).wt)("chartBarXAxis",r,"default");i.d(t,{},{q:a})},799891(e,t,i){i(635790);let r={viewBox:"0 0 20 20",fittedViewBox:"1.81 2.39 16.38 15.08",svg:(0,i(440302).jsx)("path",{d:"M16.938 9.353c0-2.97-2.539-5.54-6.545-5.697L10 3.648c-4.232 0-6.938 2.639-6.938 5.705 0 1.438.583 2.752 1.617 3.76a.63.63 0 0 1 .18.546 7.3 7.3 0 0 1-.89 2.528c1.108-.13 2.12-.614 3.01-1.344l.063-.044a.63.63 0 0 1 .505-.073 9 9 0 0 0 2.454.333l.392-.007c4.006-.158 6.545-2.728 6.545-5.699m1.25 0c0 3.803-3.234 6.766-7.747 6.948l-.44.008a10.2 10.2 0 0 1-2.485-.299c-1.349 1.022-2.985 1.62-4.826 1.428a.625.625 0 0 1-.406-1.033c.712-.817 1.096-1.737 1.284-2.642-1.116-1.197-1.756-2.733-1.756-4.41 0-3.925 3.447-6.955 8.189-6.955l.44.009c4.512.181 7.747 3.143 7.747 6.946"})},a=(0,i(104509).wt)("chatBubble",r,"default");i.d(t,{},{y:a})},853160(e,t,i){i.r(t),i(635790);var r=i(440302);let a={viewBox:"0 0 20 20",fittedViewBox:"2.37 2.37 15.25 15.26",svg:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M12.876 7.982a.625.625 0 1 0-1.072-.644L9.25 11.595 7.815 9.92a.625.625 0 0 0-.95.813l2 2.334a.625.625 0 0 0 1.01-.085z"}),(0,r.jsx)("path",{d:"M10 2.375a7.625 7.625 0 1 0 0 15.25 7.625 7.625 0 0 0 0-15.25M3.625 10a6.375 6.375 0 1 1 12.75 0 6.375 6.375 0 0 1-12.75 0"})]})},n=(0,i(104509).wt)("checkmarkCircle",a,"default");i.d(t,{},{checkmarkCircleIcon:n,iconDefinition:a})},823811(e,t,i){i(635790);let r={viewBox:"0 0 20 20",fittedViewBox:"2.37 4.12 15.25 11.75",svg:(0,i(440302).jsx)("path",{d:"M2.375 6.25c0-1.174.951-2.125 2.125-2.125h11c1.174 0 2.125.951 2.125 2.125v7.5a2.125 2.125 0 0 1-2.125 2.125h-11a2.125 2.125 0 0 1-2.125-2.125zm1.25 7.49L7.366 10 3.625 6.259zm.884.885H15.49l-3.74-3.741-1.309 1.308a.625.625 0 0 1-.884 0L8.25 10.884zM12.634 10l3.741 3.741V6.26zM4.509 5.375 10 10.866l5.491-5.491z"})},a=(0,i(104509).wt)("envelope",r,"default");i.d(t,{},{o:a})},895105(e,t,i){i.r(t),i(635790);let r={viewBox:"0 0 20 20",fittedViewBox:"2.37 4.87 15.25 10.25",svg:(0,i(440302).jsx)("path",{d:"M3 4.875a.625.625 0 1 0 0 1.25h14a.625.625 0 1 0 0-1.25zm2.125 5.742h9.75a.625.625 0 0 0 0-1.25h-9.75a.625.625 0 0 0 0 1.25m1.5 3.883c0-.345.28-.625.625-.625h5.5a.625.625 0 1 1 0 1.25h-5.5a.625.625 0 0 1-.625-.625"})},a=(0,i(104509).wt)("filter",r,"default");i.d(t,{},{filterIcon:a,iconDefinition:r})},789701(e,t,i){i(635790);let r={viewBox:"0 0 20 20",fittedViewBox:"1.87 3.62 16.25 12.75",svg:(0,i(440302).jsx)("path",{d:"M6.303 3.625c-.71 0-1.374.355-1.768.946L2.232 8.025c-.233.35-.357.76-.357 1.18v5.045c0 1.174.951 2.125 2.125 2.125h12a2.125 2.125 0 0 0 2.125-2.125V9.204c0-.42-.124-.83-.357-1.179l-2.303-3.454a2.13 2.13 0 0 0-1.768-.946zm-.728 1.64a.88.88 0 0 1 .728-.39h7.394c.293 0 .566.146.728.39l2.303 3.454a1 1 0 0 1 .083.156h-4.702a.625.625 0 0 0-.625.625v.476a1.484 1.484 0 0 1-2.968 0V9.5a.625.625 0 0 0-.625-.625H3.189a1 1 0 0 1 .083-.156zm-2.45 4.86H7.27a2.734 2.734 0 0 0 5.46 0h4.145v4.125a.875.875 0 0 1-.875.875H4a.875.875 0 0 1-.875-.875z"})},a=(0,i(104509).wt)("inbox",r,"default");i.d(t,{},{y:a})},877163(e,t,i){i(635790);let r={viewBox:"0 0 20 20",fittedViewBox:"4.62 1.77 10.75 15.98",svg:(0,i(440302).jsx)("path",{d:"M11.633 1.812c.263.096.43.354.41.632l-.392 5.51h3.099a.625.625 0 0 1 .506.992l-6.18 8.54a.625.625 0 0 1-1.13-.412l.402-5.5H5.25a.625.625 0 0 1-.507-.99l6.17-8.55a.625.625 0 0 1 .72-.222m-5.161 8.513H9.02a.625.625 0 0 1 .623.67l-.29 3.976 4.173-5.766H10.98a.625.625 0 0 1-.623-.67l.284-3.987z"})},a=(0,i(104509).wt)("lightning",r,"default");i.d(t,{},{m:a})},312528(e,t,i){i.r(t),i(635790);let r={viewBox:"0 0 20 20",fittedViewBox:"2.44 2.45 15.57 15.57",svg:(0,i(440302).jsx)("path",{d:"M10.55 3a.55.55 0 0 0-1.1 0v2a.55.55 0 0 0 1.1 0zM8.47 8.47a.75.75 0 0 1 1.06 0l.897.896-1.06 1.06-.897-.896a.75.75 0 0 1 0-1.06m1.603 2.664 6.647 6.646a.75.75 0 1 0 1.06-1.06l-6.646-6.647zM10.55 15a.55.55 0 0 0-1.1 0v2a.55.55 0 0 0 1.1 0zm-3.697-1.853a.55.55 0 0 1 0 .777L5.44 15.34a.55.55 0 1 1-.778-.778l1.415-1.415a.55.55 0 0 1 .777 0m8.485-8.486a.55.55 0 0 1 0 .778l-1.415 1.414a.55.55 0 1 1-.777-.777L14.56 4.66a.55.55 0 0 1 .777 0M5.55 10a.55.55 0 0 1-.55.55H3a.55.55 0 1 1 0-1.1h2a.55.55 0 0 1 .55.55m12 0a.55.55 0 0 1-.55.55h-2a.55.55 0 1 1 0-1.1h2a.55.55 0 0 1 .55.55M6.853 6.853a.55.55 0 0 1-.778 
10L4.661 5.44a.55.55 0 1 1 .778-.778l1.414 1.415a.55.55 0 0 1 0 .777"})},a=(0,i(104509).wt)("magicWand",r,"default");i.d(t,{},{iconDefinition:r,magicWandIcon:a})},530993(e,t,i){i(635790);var r=i(440302);let a={viewBox:"0 0 20 20",fittedViewBox:"2.37 4.12 15.25 11.75",directional:!0,svg:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M11.93 9.125a.5.5 0 0 0-.5.5v3.75a.5.5 0 0 0 .5.5h3.145a.5.5 0 0 0 .5-.5v-3.75a.5.5 0 0 0-.5-.5z"}),(0,r.jsx)("path",{d:"M4.5 4.125A2.125 2.125 0 0 0 2.375 6.25v7.5c0 1.174.951 2.125 2.125 2.125h11a2.125 2.125 0 0 0 2.125-2.125v-7.5A2.125 2.125 0 0 0 15.5 4.125zM3.625 6.25c0-.483.392-.875.875-.875h11c.483 0 .875.392.875.875v7.5a.875.875 0 0 1-.875.875h-11a.875.875 0 0 1-.875-.875z"})]})},n=(0,i(104509).wt)("peekCorner",a,"default");i.d(t,{},{q:n})},104050(e,t,i){i(635790);var r=i(440302);let a={viewBox:"0 0 20 20",fittedViewBox:"2.62 2.62 15.26 15.26",svg:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",{d:"M8.387 5.933c.115-.523.861-.523.976 0l.202.918a1.75 1.75 0 0 0 1.334 1.334l.918.202c.523.115.523.861 0 .976l-.918.202a1.75 1.75 0 0 0-1.334 1.334l-.202.918c-.115.523-.861.523-.976 0l-.202-.918a1.75 1.75 0 0 0-1.334-1.334l-.918-.202c-.523-.115-.523-.861 0-.976l.918-.202a1.75 1.75 0 0 0 1.334-1.334z"}),(0,r.jsx)("path",{d:"M8.875 2.625a6.25 6.25 0 1 0 3.955 11.09l3.983 3.982a.625.625 0 1 0 .884-.884l-3.983-3.982a6.25 6.25 0 0 0-4.84-10.205m-5 6.25a5 5 0 1 1 10 0 5 5 0 0 1-10 0"})]})},n=(0,i(104509).wt)("sparkleMagnifyingGlass",a,"default");i.d(t,{},{f:n})},680983(e,t,i){i.r(t),i(635790);var r=i(440302);let a={viewBox:"0 0 20 20",fittedViewBox:"3.49 1.5 13.02 16.01",svg:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("g",{className:"logo-light-mode",children:(0,r.jsx)("path",{fill:"#000",d:"M12.927 5.37q.17 0 .525.04.364.032.825.178.46.145.938.469.476.323.881.905-.041.025-.307.219-.26.194-.59.566a3.4 3.4 0 0 0-.582.93q-.243.557-.243 1.333 0 .89.307 1.504.315.615.728.995.42.38.744.557.331.17.355.178-.008.033-.12.364a9 9 0 0 1-.357.84q-.233.51-.614 1.068-.348.493-.72.946a3.4 3.4 0 0 1-.8.736 1.7 1.7 0 0 1-.97.29q-.413 0-.704-.096a5 5 0 0 1-.558-.227 4.4 4.4 0 0 0-.573-.218 2.7 2.7 0 0 0-.785-.097q-.615 0-1.027.162-.403.17-.768.331a2.1 2.1 0 0 1-.857.162q-.75 0-1.326-.598a14 14 0 0 1-1.164-1.431 9 9 0 0 1-.84-1.528 10.5 10.5 0 0 1-.607-1.836 8.5 8.5 0 0 1-.226-1.94q0-1.552.59-2.611T5.594 5.96a3.73 3.73 0 0 1 1.916-.542q.525 0 .986.17.47.17.873.348.405.17.736.17.315 0 .744-.179.428-.186.946-.371.525-.186 1.132-.186m-.566-1.31a3.3 3.3 0 0 1-1.019.816q-.606.324-1.148.324a1 1 0 0 1-.218-.024l-.025-.114a2 2 0 0 1-.008-.178q0-.614.267-1.196t.615-.97q.428-.51 1.083-.85.663-.339 1.27-.363.023.138.024.315 0 .623-.235 1.213a3.8 3.8 0 0 1-.606 1.027"})}),(0,r.jsx)("g",{className:"logo-dark-mode",children:(0,r.jsx)("path",{fill:"#fff",d:"M12.927 5.37q.17 0 .525.04.364.032.825.178.46.145.938.469.476.323.881.905-.041.025-.307.219-.26.194-.59.566a3.4 3.4 0 0 0-.582.93q-.243.557-.243 1.333 0 .89.307 1.504.315.615.728.995.42.38.744.557.331.17.355.178-.008.033-.12.364a9 9 0 0 1-.357.84q-.233.51-.614 1.068-.348.493-.72.946a3.4 3.4 0 0 1-.8.736 1.7 1.7 0 0 1-.97.29q-.413 0-.704-.096a5 5 0 0 1-.558-.227 4.4 4.4 0 0 0-.573-.218 2.7 2.7 0 0 0-.785-.097q-.615 0-1.027.162-.403.17-.768.331a2.1 2.1 0 0 1-.857.162q-.75 0-1.326-.598a14 14 0 0 1-1.164-1.431 9 9 0 0 1-.84-1.528 10.5 10.5 0 0 1-.607-1.836 8.5 8.5 0 0 1-.226-1.94q0-1.552.59-2.611T5.594 5.96a3.73 3.73 0 0 1 1.916-.542q.525 0 .986.17.47.17.873.348.405.17.736.17.315 0 .744-.179.428-.186.946-.371.525-.186 1.132-.186m-.566-1.31a3.3 3.3 0 0 1-1.019.816q-.606.324-1.148.324a1 1 0 0 1-.218-.024l-.024-.114a2 2 0 0 1-.009-.178q0-.614.267-1.196t.615-.97q.428-.51 1.083-.85.663-.339 1.27-.363.023.138.024.315 0 .623-.235 1.213a3.8 3.8 0 0 1-.606 1.027"})})]})},n=(0,i(104509).wt)("apple",a,"default");i.d(t,{},{appleIcon:n,iconDefinition:a})},781259(e,t,i){function r(e,t){if(void 0===e)return{status:"unresolved"};if("none"===e.membershipType||"page_guest"===e.membershipType)return{status:"ineligible",reason:"non_member"};if("restricted_member"!==e.membershipType&&"member"!==e.membershipType&&"membership_admin"!==e.membershipType&&"owner"!==e.membershipType)return(0,i(48697).HB)(e.membershipType);{let r=(0,i(262166).OX)(e.subscriptionTier);return r&&(null==t?void 0:t.allowEnterprise)!==!0?{status:"ineligible",reason:"enterprise"}:r||!0!==e.is_sales_assisted?{status:"eligible"}:{status:"ineligible",reason:"sales_assisted"}}}i.d(t,{j:()=>r},{I:"agent_service_personal_agent_override"})},352740(e,t,i){function r(e){return(null==e?void 0:e.disable_agent_skills)!==!0}function a(e){return(null==e?void 0:e.disable_agent_skill_assets)!==!0}i.d(t,{$:()=>a,B:()=>r})},843209(e,t,i){i(533958);let r={openai:"OpenAI",anthropic:"Anthropic"};function a(e){return r[e]}i.d(t,{Ju:()=>a},{TK:["openai","anthropic"]})},34969(e,t,i){let r={manual:"manual",resultsAdvanced:"results-advanced",yAscending:"y-ascending",yDescending:"y-descending",xAscending:"x-ascending",xDescending:"x-descending"};function a(e){switch(null==e?void 0:e.type){case"manual":return r.manual;case"descending":return r.xDescending;default:return r.xAscending}}function n(e){return!(0,i(525918).$)(e)}i.d(t,{e0:()=>n,gN:()=>a},{S0:r})},543131(e,t,i){i.d(t,{},{O:"notion://database/hide_subitems_filter",j:"notion://database/hide_parents_filter"})},324994(e,t,i){function r(e){return t=>({getRecordModel:e})}i.d(t,{z:()=>r})},322450(e,t,i){function r(e=!1){return e?"workspace_owners_only":"all_workspace_members"}function a(e){let{policy:t,userRole:a,userPermissionGroups:n,isOwnersOnlyDefaultEnabled:s}=e,o=r(s),l=a&&(0,i(642157).Km)(a);switch(t??o){case"disabled":return{canCreate:!1,reason:"policy_restriction"};case"workspace_owners_only":if(!l)return{canCreate:!1,reason:"policy_restriction"};break;case"all_workspace_members":break;
1case"custom":if(!(null==n?void 0:n.some(e=>{var t;return(null==(t=e.settings)?void 0:t.can_create_custom_agents)===!0}))&&!l)return{canCreate:!1,reason:"policy_restriction"}}return{canCreate:!0}}i(730330),i(765324),i.d(t,{D:()=>r,K:()=>a})},543858(e,t,i){function r(e){let{workspaceDefaultSkills:t,groupDefaultSkills:i,currentUserGroupIds:r}=e,a=new Map,n=e=>{var t,i;let r=a.get(e.skill_page_id);a.set(e.skill_page_id,r?(t=r,i=e,{skill_page_id:t.skill_page_id,...void 0!==t.disable_automatic_use||void 0!==i.disable_automatic_use?{disable_automatic_use:!!(t.disable_automatic_use&&i.disable_automatic_use)}:{},use_automatically:(t.use_automatically??!1)||(i.use_automatically??!1),show_in_editor:(t.show_in_editor??!1)||(i.show_in_editor??!1),show_during_meetings:(t.show_during_meetings??!1)||(i.show_during_meetings??!1),show_after_meetings:(t.show_after_meetings??!1)||(i.show_after_meetings??!1)}):e)};for(let e of t)n(e);for(let e of i)if(r.has(e.group_id))for(let t of e.skills)n(t);return Array.from(a.values()).slice(0,50)}function a(e){let t=(null==e?void 0:e.installed_skill_page_ids)??[],i=(null==e?void 0:e.selected_skill_page_ids)??[],r=(null==e?void 0:e.rich_text_skills)??[];return{installed:g([...t,...i,...r]),explicitlyInstalled:t,autoEnabled:i,editor:r,duringMeeting:(null==e?void 0:e.during_meeting_notes_skill_page_ids)??[],afterMeeting:(null==e?void 0:e.after_meeting_notes_skill_page_ids)??[]}}function n(e,t,i=!1){let r=a(e),s=l(e,t),o=g([...s.map(e=>e.skill_page_id),...r.installed]),c=new Set(s.filter(e=>e.disable_automatic_use).map(e=>e.skill_page_id));return{installed:o,explicitlyInstalled:r.explicitlyInstalled,autoEnabled:i?o.filter(t=>{var i;return!((null==e||null==(i=e.automatic_use_disabled_by_skill)?void 0:i[t])??c.has(t))}):h(s,"automatic_use",r.autoEnabled),editor:h(s,"editor",r.editor),duringMeeting:h(s,"during_meeting",r.duringMeeting),afterMeeting:h(s,"after_meeting",r.afterMeeting)}}function s(e){let{aiPrompts:t,workspaceDefaultSkills:i,pageId:r,disabled:a}=e,s=n(t,i).installed;if(!s.includes(r))return t;let o={};for(let e of s){var l;let i=null==t||null==(l=t.automatic_use_disabled_by_skill)?void 0:l[e];void 0!==i&&(o[e]=i)}return o[r]=a,{...t,automatic_use_disabled_by_skill:o}}function o(e,t){return l(e,t).map(e=>e.skill_page_id)}function l(e,t){let i=new Set((null==e?void 0:e.overridden_workspace_default_skill_page_ids)??[]);return t.filter(e=>!i.has(e.skill_page_id))}function c(e,t,i){return l(e,t).filter(e=>p(e,i)).map(e=>e.skill_page_id)}function d(e,t,i){return f(n(e,t),i)}function u(e,t){return f(a(e),t)}function p(e,t){switch(t){case"automatic_use":return e.use_automatically??!1;case"editor":return e.show_in_editor??!1;case"during_meeting":return e.show_during_meetings??!1;case"after_meeting":return e.show_after_meetings??!1}}function h(e,t,i){return g([...e.filter(e=>p(e,t)).map(e=>e.skill_page_id),...i])}function f(e,t){switch(t){case"automatic_use":return e.autoEnabled;case"editor":return e.editor;case"during_meeting":return e.duringMeeting;case"after_meeting":return e.afterMeeting}}function g(e){return Array.from(new Set(e))}i(499468),i(586042),i(169187),i(726090),i(132457),i(219390),i(73168),i(730330),i(976614),i(159952),i.d(t,{Ag:()=>d,F_:()=>o,NP:()=>c,Wp:()=>s,cn:()=>n,hC:()=>r,nF:()=>u,pn:()=>l,tf:()=>a})},221111(e,t,i){i.d(t,{},{p:["skills","htmlBlock","mcp","aiMeetingNotes"]})},583773(e,t,i){function r(e){let{experimentService:t,actor:i,spaceId:r}=e;return t.checkGate({gateName:"full_page_meeting_notes_creation",actor:i,customIDs:{spaceId:r}})}i.d(t,{Y:()=>r})},147281(e,t,i){var r=()=>i(374985),a=class extends r().${constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,i(442337).PL)()})}getOptimisticResult(e){return e.behavior=(0,i(442337).PL)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:r}=e,a=super.createResult(e,t),{isFetching:n,isRefetching:s,isError:o,isRefetchError:l}
1=a,c=r.fetchMeta?.fetchMore?.direction,d=o&&"forward"===c,u=n&&"forward"===c,p=o&&"backward"===c,h=n&&"backward"===c;return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,i(442337).rB)(t,r.data),hasPreviousPage:(0,i(442337).RQ)(t,r.data),isFetchNextPageError:d,isFetchingNextPage:u,isFetchPreviousPageError:p,isFetchingPreviousPage:h,isRefetchError:l&&!d&&!p,isRefetching:s&&!u&&!h}}};i.d(t,{z:()=>a})},374985(e,t,i){var r=()=>i(251358),a=class extends r().Q{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#i=(0,i(312080).T)(),this.bindMethods(),this.setOptions(t)}#e;#r=void 0;#a=void 0;#n=void 0;#s;#o;#i;#t;#l;#c;#d;#u;#p;#h;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#r.addObserver(this),n(this.#r,this.options)?this.#g():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return s(this.#r,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return s(this.#r,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#m(),this.#_(),this.#r.removeObserver(this)}setOptions(e){let t=this.options,r=this.#r;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,i(90694).Eh)(this.options.enabled,this.#r))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#r.setOptions(this.options),t._defaulted&&!(0,i(90694).f8)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#r,observer:this});let a=this.hasListeners();a&&o(this.#r,r,this.options,t)&&this.#g(),this.updateResult(),a&&(this.#r!==r||(0,i(90694).Eh)(this.options.enabled,this.#r)!==(0,i(90694).Eh)(t.enabled,this.#r)||(0,i(90694).d2)(this.options.staleTime,this.#r)!==(0,i(90694).d2)(t.staleTime,this.#r))&&this.#y();let n=this.#b();a&&(this.#r!==r||(0,i(90694).Eh)(this.options.enabled,this.#r)!==(0,i(90694).Eh)(t.enabled,this.#r)||n!==this.#h)&&this.#w(n)}getOptimisticResult(e){var t,r;let a=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(a,e);return t=this,r=n,(0,i(90694).f8)(t.getCurrentResult(),r)||(this.#n=n,this.#o=this.options,this.#s=this.#r.state),n}getCurrentResult(){return this.#n}trackResult(e,t){return new Proxy(e,{get:(e,i)=>(this.trackProp(i),t?.(i),"promise"===i&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#i.status||this.#i.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,i))})}trackProp(e){this.#f.add(e)}getCurrentQuery(){return this.#r}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),i=this.#e.getQueryCache().build(this.#e,t);return i.fetch().then(()=>this.createResult(i,t))}fetch(e){return this.#g({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#g(e){this.#S();let t=this.#r.fetch(this.options,e);return e?.throwOnError||(t=t.catch(i(90694).lQ)),t}#y(){this.#m();let e=(0,i(90694).d2)(this.options.staleTime,this.#r);if(i(68591).H.isServer()||this.#n.isStale||!(0,i(90694).gn)(e))return;let t=(0,i(90694).j3)(this.#n.dataUpdatedAt,e);this.#u=i(670573).zs.setTimeout(()=>{this.#n.isStale||this.updateResult()},t+1)}#b(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#r):this.options.refetchInterval)??!1}#w(e){this.#_(),this.#h=e,!i(68591).H.isServer()&&!1!==(0,i(90694).Eh)(this.options.enabled,this.#r)&&(0,i(90694).gn)(this.#h)&&0!==this.#h&&(this.#p=i(670573).zs.setInterval(()=>{(this.options.refetchIntervalInBackground||i(879412).m.isFocused())&&this.#g()},this.#h))}#v(){this.#y(),this.#w(this.#b())}#m(){void 0!==this.#u&&(i(670573).zs.clearTimeout(this.#u),this.#u=void 0)}#_(){void 0!==this.#p&&(i(670573).zs.clearInterval(this.#p),this.#p=void 0)}createResult(e,t){let r,a=this.#r,s=this.options,c=this.#n,d=this.#s,u=this.#o,p=e!==a?e.state:this.#a,{state:h}=e,f={...h},g=!1;if(t._optimisticResults){let r=this.hasListeners(),l=!r&&n(e,t),c=r&&o(e,a,t,s);(l||c)&&(f={...f,...(0,i(471291).k)(h.data,e.options)}),"isRestoring"===t._optimisticResults&&(f.fetchStatus="idle")}let{error:v,errorUpdatedAt:m,status:_}=f;r=f.data;let S=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===_){let e;c?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(e=c.data,S=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#d?.state.data,this.#d):t.placeholderData,void 0!==e&&(_="success",r=(0,i(90694).pl)(c?.data,e,t),g=!0)}if(t.select&&void 0!==r&&!S)if(c&&r===d?.data&&t.select===this.#l)r=this.#c;else try{this.#l=t.select,r=t.select(r),r=(0,i(90694).pl)(c?.data,r,t),this.#c=r,this.#t=null}catch(e){this.#t=e}this.#t&&(v=this.#t,r=this.#c,m=Date.now(),_="error");let y="fetching"===f.fetchStatus,b="pending"===_,w="error"===_,I=b&&y,k=void 0!==r,C={status:_,fetchStatus:f.fetchStatus,isPending:b,isSuccess:"success"===_,isError:w,isInitialLoading:I,isLoading:I,data:r,dataUpdatedAt:f.dataUpdatedAt,error:v,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdate
1Count:f.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:f.dataUpdateCount>p.dataUpdateCount||f.errorUpdateCount>p.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:w&&!k,isPaused:"paused"===f.fetchStatus,isPlaceholderData:g,isRefetchError:w&&k,isStale:l(e,t),refetch:this.refetch,promise:this.#i,isEnabled:!1!==(0,i(90694).Eh)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==C.data,r="error"===C.status&&!t,n=e=>{r?e.reject(C.error):t&&e.resolve(C.data)},s=()=>{n(this.#i=C.promise=(0,i(312080).T)())},o=this.#i;switch(o.status){case"pending":e.queryHash===a.queryHash&&n(o);break;case"fulfilled":(r||C.data!==o.value)&&s();break;case"rejected":r&&C.error===o.reason||s()}}return C}updateResult(){let e=this.#n,t=this.createResult(this.#r,this.options);if(this.#s=this.#r.state,this.#o=this.options,void 0!==this.#s.data&&(this.#d=this.#r),(0,i(90694).f8)(t,e))return;this.#n=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,i="function"==typeof t?t():t;if("all"===i||!i&&!this.#f.size)return!0;let r=new Set(i??this.#f);return this.options.throwOnError&&r.add("error"),Object.keys(this.#n).some(t=>this.#n[t]!==e[t]&&r.has(t))};this.#I({listeners:r()})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#r)return;let t=this.#r;this.#r=e,this.#a=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#I(e){i(767143).jG.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#e.getQueryCache().notify({query:this.#r,type:"observerResultsUpdated"})})}};function n(e,t){return!1!==(0,i(90694).Eh)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&s(e,t,t.refetchOnMount)}function s(e,t,r){if(!1!==(0,i(90694).Eh)(t.enabled,e)&&"static"!==(0,i(90694).d2)(t.staleTime,e)){let i="function"==typeof r?r(e):r;return"always"===i||!1!==i&&l(e,t)}return!1}function o(e,t,r,a){return(e!==t||!1===(0,i(90694).Eh)(a.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&l(e,r)}function l(e,t){return!1!==(0,i(90694).Eh)(t.enabled,e)&&e.isStaleByTime((0,i(90694).d2)(t.staleTime,e))}i.d(t,{$:()=>a})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.