<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp
  xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
  xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
  xsi:type="TaskPaneApp">
  
  <Id>85b3cb27-e229-46ad-92ae-75c22c3383d5</Id>
  <Version>2.6.0.0</Version>
  <ProviderName>BlazeXL</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="BlazeXL"/>
  <Description DefaultValue="Bring BlazeXL's governed Python, data, and AI workflows into Excel"/>
  <IconUrl DefaultValue="https://blazexl.com/addin/assets/icon-32.png"/>
  <HighResolutionIconUrl DefaultValue="https://blazexl.com/addin/assets/icon-64.png"/>
  <SupportUrl DefaultValue="https://blazexl.com/support"/>
  
  <AppDomains>
    <AppDomain>https://blazexl.com</AppDomain>
  </AppDomains>
  
  <Hosts>
    <Host Name="Workbook"/>
  </Hosts>

  <!--
    D-0029 + D-0102 (P-0200 D3): require CustomFunctionsRuntime 1.1 and SharedRuntime 1.1, and only those.

    BLAZEXL.PY is a custom function, so without CustomFunctionsRuntime there is no product, and the add-in runs its
    taskpane and functions in one shared runtime (<Runtime lifetime="long">). Declaring both blocks install where the
    add-in cannot work (Office 2019 and earlier, iPad) instead of installing and silently failing, and keeps the
    store from testing it there (AppSource gate M1).

    ExcelApi is deliberately NOT declared. Per Microsoft's own guidance, an add-in that still provides value without a
    set should check at runtime rather than refuse to load. The highest set any emitted sheet operation needs is 1.9,
    while the D-0029 emission ceiling is 1.14 (the maximum Office LTSC 2021 supports).
  -->
  <Requirements>
    <Sets DefaultMinVersion="1.1">
      <Set Name="CustomFunctionsRuntime" MinVersion="1.1"/>
      <Set Name="SharedRuntime" MinVersion="1.1"/>
    </Sets>
  </Requirements>

  <DefaultSettings>
    <SourceLocation DefaultValue="https://blazexl.com/addin/taskpane.html"/>
  </DefaultSettings>
  
  <Permissions>ReadWriteDocument</Permissions>
  
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Hosts>
      <Host xsi:type="Workbook">
        <Runtimes>
          <Runtime resid="Taskpane.Url" lifetime="long" />
        </Runtimes>
        <AllFormFactors>
          <ExtensionPoint xsi:type="CustomFunctions">
            <Script>
              <SourceLocation resid="Functions.Script.Url"/>
            </Script>
            <Page>
              <SourceLocation resid="Taskpane.Url"/>
            </Page>
            <Metadata>
              <SourceLocation resid="Functions.Metadata.Url"/>
            </Metadata>
            <Namespace resid="Functions.Namespace"/>
          </ExtensionPoint>
        </AllFormFactors>
        
        <DesktopFormFactor>
          <FunctionFile resid="Taskpane.Url"/>
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <OfficeTab id="TabHome">
              <Group id="BlazeXLGroup">
                <Label resid="GroupLabel"/>
                <Icon>
                  <bt:Image size="16" resid="Icon.16x16"/>
                  <bt:Image size="32" resid="Icon.32x32"/>
                  <bt:Image size="80" resid="Icon.80x80"/>
                </Icon>
                <Control xsi:type="Button" id="TaskpaneButton">
                  <Label resid="TaskpaneButton.Label"/>
                  <Supertip>
                    <Title resid="TaskpaneButton.Title"/>
                    <Description resid="TaskpaneButton.Tooltip"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Icon.16x16"/>
                    <bt:Image size="32" resid="Icon.32x32"/>
                    <bt:Image size="80" resid="Icon.80x80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>BlazeXLTaskpane</TaskpaneId>
                    <SourceLocation resid="Taskpane.Url"/>
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
          <ExtensionPoint xsi:type="ContextMenu">
            <OfficeMenu id="ContextMenuCell">
              <Control xsi:type="Button" id="AnalyzeWithAIBtn">
                <Label resid="AnalyzeWithAI.Label"/>
                <Supertip>
                  <Title resid="AnalyzeWithAI.Title"/>
                  <Description resid="AnalyzeWithAI.Tooltip"/>
                </Supertip>
                <Icon>
                  <bt:Image size="16" resid="Icon.16x16"/>
                  <bt:Image size="32" resid="Icon.32x32"/>
                  <bt:Image size="80" resid="Icon.80x80"/>
                </Icon>
                <Action xsi:type="ExecuteFunction">
                  <FunctionName>analyzeWithAI</FunctionName>
                </Action>
              </Control>
            </OfficeMenu>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    
    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16x16" DefaultValue="https://blazexl.com/addin/assets/icon-16.png"/>
        <bt:Image id="Icon.32x32" DefaultValue="https://blazexl.com/addin/assets/icon-32.png"/>
        <bt:Image id="Icon.80x80" DefaultValue="https://blazexl.com/addin/assets/icon-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Functions.Script.Url" DefaultValue="https://blazexl.com/addin/dist/functions.js"/>
        <bt:Url id="Functions.Page.Url" DefaultValue="https://blazexl.com/addin/functions.html"/>
        <bt:Url id="Functions.Metadata.Url" DefaultValue="https://blazexl.com/addin/functions.json"/>
        <bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://blazexl.com/docs"/>
        <bt:Url id="Commands.Url" DefaultValue="https://blazexl.com/addin/commands.html"/>
        <bt:Url id="Taskpane.Url" DefaultValue="https://blazexl.com/addin/taskpane.html"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="Functions.Namespace" DefaultValue="BLAZEXL"/>
        <bt:String id="GroupLabel" DefaultValue="BlazeXL"/>
        <bt:String id="TaskpaneButton.Label" DefaultValue="BlazeXL"/>
        <bt:String id="TaskpaneButton.Title" DefaultValue="Open BlazeXL Dashboard"/>
        <bt:String id="AnalyzeWithAI.Label" DefaultValue="Send to BlazeXL Analyst"/>
        <bt:String id="AnalyzeWithAI.Title" DefaultValue="BlazeXL AI Analysis"/>
        <bt:String id="GetStarted.Title" DefaultValue="Welcome to BlazeXL!"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Open BlazeXL for governed workflows, visualizations, and settings"/>
        <bt:String id="AnalyzeWithAI.Tooltip" DefaultValue="Send this range to BlazeXL Analyst to start an AI analysis workflow"/>
        <bt:String id="GetStarted.Description" DefaultValue="BlazeXL is ready in Excel. Open the Home tab and click 'BlazeXL' to run governed Python, data, and AI workflows."/>
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>
