@odoo/o-spreadsheet 18.0.70 → 18.0.71

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.
@@ -2,9 +2,9 @@
2
2
  /**
3
3
  * This file is generated by o-spreadsheet build tools. Do not edit it.
4
4
  * @see https://github.com/odoo/o-spreadsheet
5
- * @version 18.0.70
6
- * @date 2026-06-06T06:20:39.985Z
7
- * @hash 3ff29f6
5
+ * @version 18.0.71
6
+ * @date 2026-06-17T08:50:04.188Z
7
+ * @hash 18d4601
8
8
  */
9
9
 
10
10
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
@@ -37218,10 +37218,10 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
37218
37218
  allSheetsMatches = [];
37219
37219
  activeSheetMatches = [];
37220
37220
  specificRangeMatches = [];
37221
+ selectedMatchPosition = null;
37221
37222
  currentSearchRegex = null;
37222
37223
  isSearchDirty = false;
37223
37224
  initialShowFormulaState;
37224
- preserveSelectedMatchIndex = false;
37225
37225
  irreplaceableMatchCount = 0;
37226
37226
  notificationStore = this.get(NotificationStore);
37227
37227
  selectedMatchIndex = null;
@@ -37325,7 +37325,10 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
37325
37325
  */
37326
37326
  _updateSearch(toSearch, searchOptions) {
37327
37327
  this.searchOptions = searchOptions;
37328
- if (toSearch !== this.toSearch) this.selectedMatchIndex = null;
37328
+ if (toSearch !== this.toSearch) {
37329
+ this.selectedMatchIndex = null;
37330
+ this.selectedMatchPosition = null;
37331
+ }
37329
37332
  this.toSearch = toSearch;
37330
37333
  this.currentSearchRegex = getSearchRegex(this.toSearch, this.searchOptions);
37331
37334
  this.refreshSearch();
@@ -37334,8 +37337,14 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
37334
37337
  * refresh the matches according to the current search options
37335
37338
  */
37336
37339
  refreshSearch(jumpToMatchSheet = true) {
37337
- if (!this.preserveSelectedMatchIndex) this.selectedMatchIndex = null;
37338
37340
  this.findMatches();
37341
+ if (this.selectedMatchPosition) if (this.selectedMatchPosition.sheetId !== this.getters.getActiveSheetId()) {
37342
+ this.selectedMatchIndex = null;
37343
+ this.selectedMatchPosition = null;
37344
+ } else {
37345
+ const index = this.searchMatches.findIndex((match) => match.sheetId === this.selectedMatchPosition?.sheetId && match.col === this.selectedMatchPosition?.col && match.row === this.selectedMatchPosition?.row);
37346
+ if (index !== -1) this.selectedMatchIndex = index;
37347
+ }
37339
37348
  this.selectNextCell(0, jumpToMatchSheet);
37340
37349
  }
37341
37350
  getSheetsInSearchOrder() {
@@ -37403,6 +37412,7 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
37403
37412
  const matches = this.searchMatches;
37404
37413
  if (!matches.length) {
37405
37414
  this.selectedMatchIndex = null;
37415
+ this.selectedMatchPosition = null;
37406
37416
  return;
37407
37417
  }
37408
37418
  let nextIndex;
@@ -37416,14 +37426,13 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
37416
37426
  } else nextIndex = this.selectedMatchIndex + indexChange;
37417
37427
  nextIndex = (nextIndex + matches.length) % matches.length;
37418
37428
  this.selectedMatchIndex = nextIndex;
37429
+ this.selectedMatchPosition = matches[this.selectedMatchIndex];
37419
37430
  const selectedMatch = matches[nextIndex];
37420
37431
  if (jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
37421
- this.preserveSelectedMatchIndex = true;
37422
37432
  this.model.dispatch("ACTIVATE_SHEET", {
37423
37433
  sheetIdFrom: this.getters.getActiveSheetId(),
37424
37434
  sheetIdTo: selectedMatch.sheetId
37425
37435
  });
37426
- this.preserveSelectedMatchIndex = false;
37427
37436
  this.isSearchDirty = false;
37428
37437
  }
37429
37438
  this.model.selection.getBackToDefault();
@@ -37434,14 +37443,12 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
37434
37443
  */
37435
37444
  replace() {
37436
37445
  if (this.selectedMatchIndex === null) return;
37437
- this.preserveSelectedMatchIndex = true;
37438
37446
  this.model.dispatch("REPLACE_SEARCH", {
37439
37447
  searchString: this.toSearch,
37440
37448
  replaceWith: this.toReplace,
37441
37449
  matches: [this.searchMatches[this.selectedMatchIndex]],
37442
37450
  searchOptions: this.searchOptions
37443
37451
  });
37444
- this.preserveSelectedMatchIndex = false;
37445
37452
  }
37446
37453
  /**
37447
37454
  * Apply the replace function to all the matches one time.
@@ -41777,8 +41784,12 @@ var CellComposerStore = class extends AbstractComposerStore {
41777
41784
  }
41778
41785
  stopEdition(direction) {
41779
41786
  if (this.canStopEdition()) {
41787
+ const { col, row } = this.currentEditedCell;
41780
41788
  this._stopEdition();
41781
- if (direction) this.model.selection.moveAnchorCell(direction, 1);
41789
+ if (direction) {
41790
+ this.model.selection.selectCell(col, row);
41791
+ this.model.selection.moveAnchorCell(direction, 1);
41792
+ }
41782
41793
  return;
41783
41794
  }
41784
41795
  const editedCell = this.currentEditedCell;
@@ -66558,6 +66569,6 @@ exports.stores = stores;
66558
66569
  exports.tokenColors = tokenColors;
66559
66570
  exports.tokenize = tokenize;
66560
66571
 
66561
- __info__.version = "18.0.70";
66562
- __info__.date = "2026-06-06T06:20:39.985Z";
66563
- __info__.hash = "3ff29f6";
66572
+ __info__.version = "18.0.71";
66573
+ __info__.date = "2026-06-17T08:50:04.188Z";
66574
+ __info__.hash = "18d4601";
@@ -2,9 +2,9 @@
2
2
  /**
3
3
  * This file is generated by o-spreadsheet build tools. Do not edit it.
4
4
  * @see https://github.com/odoo/o-spreadsheet
5
- * @version 18.0.70
6
- * @date 2026-06-06T06:20:39.985Z
7
- * @hash 3ff29f6
5
+ * @version 18.0.71
6
+ * @date 2026-06-17T08:50:04.188Z
7
+ * @hash 18d4601
8
8
  */
9
9
 
10
10
  import { Component, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, xml } from "@odoo/owl";
@@ -37217,10 +37217,10 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
37217
37217
  allSheetsMatches = [];
37218
37218
  activeSheetMatches = [];
37219
37219
  specificRangeMatches = [];
37220
+ selectedMatchPosition = null;
37220
37221
  currentSearchRegex = null;
37221
37222
  isSearchDirty = false;
37222
37223
  initialShowFormulaState;
37223
- preserveSelectedMatchIndex = false;
37224
37224
  irreplaceableMatchCount = 0;
37225
37225
  notificationStore = this.get(NotificationStore);
37226
37226
  selectedMatchIndex = null;
@@ -37324,7 +37324,10 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
37324
37324
  */
37325
37325
  _updateSearch(toSearch, searchOptions) {
37326
37326
  this.searchOptions = searchOptions;
37327
- if (toSearch !== this.toSearch) this.selectedMatchIndex = null;
37327
+ if (toSearch !== this.toSearch) {
37328
+ this.selectedMatchIndex = null;
37329
+ this.selectedMatchPosition = null;
37330
+ }
37328
37331
  this.toSearch = toSearch;
37329
37332
  this.currentSearchRegex = getSearchRegex(this.toSearch, this.searchOptions);
37330
37333
  this.refreshSearch();
@@ -37333,8 +37336,14 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
37333
37336
  * refresh the matches according to the current search options
37334
37337
  */
37335
37338
  refreshSearch(jumpToMatchSheet = true) {
37336
- if (!this.preserveSelectedMatchIndex) this.selectedMatchIndex = null;
37337
37339
  this.findMatches();
37340
+ if (this.selectedMatchPosition) if (this.selectedMatchPosition.sheetId !== this.getters.getActiveSheetId()) {
37341
+ this.selectedMatchIndex = null;
37342
+ this.selectedMatchPosition = null;
37343
+ } else {
37344
+ const index = this.searchMatches.findIndex((match) => match.sheetId === this.selectedMatchPosition?.sheetId && match.col === this.selectedMatchPosition?.col && match.row === this.selectedMatchPosition?.row);
37345
+ if (index !== -1) this.selectedMatchIndex = index;
37346
+ }
37338
37347
  this.selectNextCell(0, jumpToMatchSheet);
37339
37348
  }
37340
37349
  getSheetsInSearchOrder() {
@@ -37402,6 +37411,7 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
37402
37411
  const matches = this.searchMatches;
37403
37412
  if (!matches.length) {
37404
37413
  this.selectedMatchIndex = null;
37414
+ this.selectedMatchPosition = null;
37405
37415
  return;
37406
37416
  }
37407
37417
  let nextIndex;
@@ -37415,14 +37425,13 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
37415
37425
  } else nextIndex = this.selectedMatchIndex + indexChange;
37416
37426
  nextIndex = (nextIndex + matches.length) % matches.length;
37417
37427
  this.selectedMatchIndex = nextIndex;
37428
+ this.selectedMatchPosition = matches[this.selectedMatchIndex];
37418
37429
  const selectedMatch = matches[nextIndex];
37419
37430
  if (jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
37420
- this.preserveSelectedMatchIndex = true;
37421
37431
  this.model.dispatch("ACTIVATE_SHEET", {
37422
37432
  sheetIdFrom: this.getters.getActiveSheetId(),
37423
37433
  sheetIdTo: selectedMatch.sheetId
37424
37434
  });
37425
- this.preserveSelectedMatchIndex = false;
37426
37435
  this.isSearchDirty = false;
37427
37436
  }
37428
37437
  this.model.selection.getBackToDefault();
@@ -37433,14 +37442,12 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
37433
37442
  */
37434
37443
  replace() {
37435
37444
  if (this.selectedMatchIndex === null) return;
37436
- this.preserveSelectedMatchIndex = true;
37437
37445
  this.model.dispatch("REPLACE_SEARCH", {
37438
37446
  searchString: this.toSearch,
37439
37447
  replaceWith: this.toReplace,
37440
37448
  matches: [this.searchMatches[this.selectedMatchIndex]],
37441
37449
  searchOptions: this.searchOptions
37442
37450
  });
37443
- this.preserveSelectedMatchIndex = false;
37444
37451
  }
37445
37452
  /**
37446
37453
  * Apply the replace function to all the matches one time.
@@ -41776,8 +41783,12 @@ var CellComposerStore = class extends AbstractComposerStore {
41776
41783
  }
41777
41784
  stopEdition(direction) {
41778
41785
  if (this.canStopEdition()) {
41786
+ const { col, row } = this.currentEditedCell;
41779
41787
  this._stopEdition();
41780
- if (direction) this.model.selection.moveAnchorCell(direction, 1);
41788
+ if (direction) {
41789
+ this.model.selection.selectCell(col, row);
41790
+ this.model.selection.moveAnchorCell(direction, 1);
41791
+ }
41781
41792
  return;
41782
41793
  }
41783
41794
  const editedCell = this.currentEditedCell;
@@ -66329,6 +66340,6 @@ const constants = {
66329
66340
  //#endregion
66330
66341
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
66331
66342
 
66332
- __info__.version = "18.0.70";
66333
- __info__.date = "2026-06-06T06:20:39.985Z";
66334
- __info__.hash = "3ff29f6";
66343
+ __info__.version = "18.0.71";
66344
+ __info__.date = "2026-06-17T08:50:04.188Z";
66345
+ __info__.hash = "18d4601";
@@ -2,9 +2,9 @@
2
2
  /**
3
3
  * This file is generated by o-spreadsheet build tools. Do not edit it.
4
4
  * @see https://github.com/odoo/o-spreadsheet
5
- * @version 18.0.70
6
- * @date 2026-06-06T06:20:39.985Z
7
- * @hash 3ff29f6
5
+ * @version 18.0.71
6
+ * @date 2026-06-17T08:50:04.188Z
7
+ * @hash 18d4601
8
8
  */
9
9
 
10
10
  (function(exports, _odoo_owl) {
@@ -37219,10 +37219,10 @@ stores.inject(MyMetaStore, storeInstance);
37219
37219
  allSheetsMatches = [];
37220
37220
  activeSheetMatches = [];
37221
37221
  specificRangeMatches = [];
37222
+ selectedMatchPosition = null;
37222
37223
  currentSearchRegex = null;
37223
37224
  isSearchDirty = false;
37224
37225
  initialShowFormulaState;
37225
- preserveSelectedMatchIndex = false;
37226
37226
  irreplaceableMatchCount = 0;
37227
37227
  notificationStore = this.get(NotificationStore);
37228
37228
  selectedMatchIndex = null;
@@ -37326,7 +37326,10 @@ stores.inject(MyMetaStore, storeInstance);
37326
37326
  */
37327
37327
  _updateSearch(toSearch, searchOptions) {
37328
37328
  this.searchOptions = searchOptions;
37329
- if (toSearch !== this.toSearch) this.selectedMatchIndex = null;
37329
+ if (toSearch !== this.toSearch) {
37330
+ this.selectedMatchIndex = null;
37331
+ this.selectedMatchPosition = null;
37332
+ }
37330
37333
  this.toSearch = toSearch;
37331
37334
  this.currentSearchRegex = getSearchRegex(this.toSearch, this.searchOptions);
37332
37335
  this.refreshSearch();
@@ -37335,8 +37338,14 @@ stores.inject(MyMetaStore, storeInstance);
37335
37338
  * refresh the matches according to the current search options
37336
37339
  */
37337
37340
  refreshSearch(jumpToMatchSheet = true) {
37338
- if (!this.preserveSelectedMatchIndex) this.selectedMatchIndex = null;
37339
37341
  this.findMatches();
37342
+ if (this.selectedMatchPosition) if (this.selectedMatchPosition.sheetId !== this.getters.getActiveSheetId()) {
37343
+ this.selectedMatchIndex = null;
37344
+ this.selectedMatchPosition = null;
37345
+ } else {
37346
+ const index = this.searchMatches.findIndex((match) => match.sheetId === this.selectedMatchPosition?.sheetId && match.col === this.selectedMatchPosition?.col && match.row === this.selectedMatchPosition?.row);
37347
+ if (index !== -1) this.selectedMatchIndex = index;
37348
+ }
37340
37349
  this.selectNextCell(0, jumpToMatchSheet);
37341
37350
  }
37342
37351
  getSheetsInSearchOrder() {
@@ -37404,6 +37413,7 @@ stores.inject(MyMetaStore, storeInstance);
37404
37413
  const matches = this.searchMatches;
37405
37414
  if (!matches.length) {
37406
37415
  this.selectedMatchIndex = null;
37416
+ this.selectedMatchPosition = null;
37407
37417
  return;
37408
37418
  }
37409
37419
  let nextIndex;
@@ -37417,14 +37427,13 @@ stores.inject(MyMetaStore, storeInstance);
37417
37427
  } else nextIndex = this.selectedMatchIndex + indexChange;
37418
37428
  nextIndex = (nextIndex + matches.length) % matches.length;
37419
37429
  this.selectedMatchIndex = nextIndex;
37430
+ this.selectedMatchPosition = matches[this.selectedMatchIndex];
37420
37431
  const selectedMatch = matches[nextIndex];
37421
37432
  if (jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
37422
- this.preserveSelectedMatchIndex = true;
37423
37433
  this.model.dispatch("ACTIVATE_SHEET", {
37424
37434
  sheetIdFrom: this.getters.getActiveSheetId(),
37425
37435
  sheetIdTo: selectedMatch.sheetId
37426
37436
  });
37427
- this.preserveSelectedMatchIndex = false;
37428
37437
  this.isSearchDirty = false;
37429
37438
  }
37430
37439
  this.model.selection.getBackToDefault();
@@ -37435,14 +37444,12 @@ stores.inject(MyMetaStore, storeInstance);
37435
37444
  */
37436
37445
  replace() {
37437
37446
  if (this.selectedMatchIndex === null) return;
37438
- this.preserveSelectedMatchIndex = true;
37439
37447
  this.model.dispatch("REPLACE_SEARCH", {
37440
37448
  searchString: this.toSearch,
37441
37449
  replaceWith: this.toReplace,
37442
37450
  matches: [this.searchMatches[this.selectedMatchIndex]],
37443
37451
  searchOptions: this.searchOptions
37444
37452
  });
37445
- this.preserveSelectedMatchIndex = false;
37446
37453
  }
37447
37454
  /**
37448
37455
  * Apply the replace function to all the matches one time.
@@ -41778,8 +41785,12 @@ stores.inject(MyMetaStore, storeInstance);
41778
41785
  }
41779
41786
  stopEdition(direction) {
41780
41787
  if (this.canStopEdition()) {
41788
+ const { col, row } = this.currentEditedCell;
41781
41789
  this._stopEdition();
41782
- if (direction) this.model.selection.moveAnchorCell(direction, 1);
41790
+ if (direction) {
41791
+ this.model.selection.selectCell(col, row);
41792
+ this.model.selection.moveAnchorCell(direction, 1);
41793
+ }
41783
41794
  return;
41784
41795
  }
41785
41796
  const editedCell = this.currentEditedCell;
@@ -66375,8 +66386,8 @@ exports.stores = stores;
66375
66386
  exports.tokenColors = tokenColors;
66376
66387
  exports.tokenize = tokenize;
66377
66388
 
66378
- __info__.version = "18.0.70";
66379
- __info__.date = "2026-06-06T06:20:39.985Z";
66380
- __info__.hash = "3ff29f6";
66389
+ __info__.version = "18.0.71";
66390
+ __info__.date = "2026-06-17T08:50:04.188Z";
66391
+ __info__.hash = "18d4601";
66381
66392
 
66382
66393
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
@@ -1170,7 +1170,7 @@ stores.inject(MyMetaStore, storeInstance);
1170
1170
  }
1171
1171
  }
1172
1172
  }
1173
- `;var WP=class extends t.Component{static template=`o-spreadsheet-DataValidationPreview`;static props={onClick:Function,rule:Object};ref=(0,t.useRef)(`dvPreview`);setup(){yP(this.ref,this)}deleteDataValidation(){let e=this.env.model.getters.getActiveSheetId();this.env.model.dispatch(`REMOVE_DATA_VALIDATION_RULE`,{sheetId:e,id:this.props.rule.id})}get highlights(){return this.props.rule.ranges.map(e=>({sheetId:this.env.model.getters.getActiveSheetId(),zone:e.zone,color:_,fillAlpha:.06}))}get rangesString(){let e=this.env.model.getters.getActiveSheetId();return this.props.rule.ranges.map(t=>this.env.model.getters.getRangeString(t,e)).join(`, `)}get descriptionString(){return Q.get(this.props.rule.criterion.type).getPreview(this.props.rule.criterion,this.env.model.getters)}},GP=class extends t.Component{static template=`o-spreadsheet-DataValidationPanel`;static props={onCloseSidePanel:Function};static components={DataValidationPreview:WP,DataValidationEditor:UP};state=(0,t.useState)({mode:`list`,activeRule:void 0});onPreviewClick(e){let t=this.env.model.getters.getActiveSheetId(),n=this.env.model.getters.getDataValidationRule(t,e);n&&(this.state.mode=`edit`,this.state.activeRule=n)}addDataValidationRule(){this.state.mode=`edit`,this.state.activeRule=void 0}onExitEditMode(){this.state.mode=`list`,this.state.activeRule=void 0}localizeDVRule(e){return e&&ml(e,this.env.model.getters.getLocale())}get validationRules(){let e=this.env.model.getters.getActiveSheetId();return this.env.model.getters.getDataValidationRules(e)}};let KP=`#8B008B`;var qP=class extends hd{mutators=[`updateSearchOptions`,`updateSearchContent`,`searchFormulas`,`selectPreviousMatch`,`selectNextMatch`,`replace`];allSheetsMatches=[];activeSheetMatches=[];specificRangeMatches=[];currentSearchRegex=null;isSearchDirty=!1;initialShowFormulaState;preserveSelectedMatchIndex=!1;irreplaceableMatchCount=0;notificationStore=this.get(sP);selectedMatchIndex=null;toSearch=``;toReplace=``;searchOptions={matchCase:!1,exactMatch:!1,searchFormulas:!1,searchScope:`activeSheet`,specificRange:void 0};constructor(e){super(e),this.initialShowFormulaState=this.model.getters.shouldShowFormulas(),this.searchOptions.searchFormulas=this.initialShowFormulaState;let t=e(xN);t.register(this),this.onDispose(()=>{this.model.dispatch(`SET_FORMULA_VISIBILITY`,{show:this.initialShowFormulaState}),t.unRegister(this)})}get searchMatches(){switch(this.searchOptions.searchScope){case`allSheets`:return this.allSheetsMatches;case`activeSheet`:return this.activeSheetMatches;case`specificRange`:return this.specificRangeMatches}}updateSearchContent(e){this._updateSearch(e,this.searchOptions)}updateSearchOptions(e){this._updateSearch(this.toSearch,{...this.searchOptions,...e})}searchFormulas(e){this.model.dispatch(`SET_FORMULA_VISIBILITY`,{show:e}),this.updateSearchOptions({searchFormulas:e})}selectPreviousMatch(){this.selectNextCell(-1)}selectNextMatch(){this.selectNextCell(1)}handle(e){switch(e.type){case`SET_FORMULA_VISIBILITY`:this.updateSearchOptions({searchFormulas:e.show});break;case`UNDO`:case`REDO`:case`REMOVE_TABLE`:case`UPDATE_FILTER`:case`REMOVE_COLUMNS_ROWS`:case`HIDE_COLUMNS_ROWS`:case`UNHIDE_COLUMNS_ROWS`:case`ADD_COLUMNS_ROWS`:case`EVALUATE_CELLS`:case`UPDATE_CELL`:case`ACTIVATE_SHEET`:this.isSearchDirty=!0,this.searchOptions.specificRange&&(this.searchOptions.specificRange=this.searchOptions.specificRange.clone({sheetId:this.getters.getActiveSheetId()}));break;case`DELETE_SHEET`:this.searchOptions.searchScope===`specificRange`&&this.searchOptions.specificRange?.sheetId===e.sheetId&&(this.searchOptions={...this.searchOptions,specificRange:void 0}),this.isSearchDirty=!0;break;case`REPLACE_SEARCH`:for(let t of e.matches)this.replaceMatch(t,e.searchString,e.replaceWith,e.searchOptions);this.irreplaceableMatchCount>0&&this.showReplaceWarningMessage(e.matches.length,this.irreplaceableMatchCount),this.irreplaceableMatchCount=0;break}}finalize(){this.isSearchDirty&&=(this.refreshSearch(!1),!1)}get allSheetMatchesCount(){return this.allSheetsMatches.length}get activeSheetMatchesCount(){return this.activeSheetMatches.length}get specificRangeMatchesCount(){return this.specificRangeMatches.length}_updateSearch(e,t){this.searchOptions=t,e!==this.toSearch&&(this.selectedMatchIndex=null),this.toSearch=e,this.currentSearchRegex=Wt(this.toSearch,this.searchOptions),this.refreshSearch()}refreshSearch(e=!0){this.preserveSelectedMatchIndex||(this.selectedMatchIndex=null),this.findMatches(),this.selectNextCell(0,e)}getSheetsInSearchOrder(){switch(this.searchOptions.searchScope){case`allSheets`:let e=this.getters.getSheetIds(),t=e.findIndex(e=>e===this.getters.getActiveSheetId());return[e[t],...e.slice(t+1),...e.slice(0,t)];case`activeSheet`:return[this.getters.getActiveSheetId()];case`specificRange`:let n=this.searchOptions.specificRange;return n&&n?[n.sheetId]:[]}}findMatches(){let e=[];if(this.toSearch)for(let t of this.getters.getSheetIds())e.push(...this.findMatchesInSheet(t));if(this.allSheetsMatches=e,this.activeSheetMatches=e.filter(e=>e.sheetId===this.getters.getActiveSheetId()),this.searchOptions.specificRange){let{sheetId:t,zone:n}=this.searchOptions.specificRange;this.specificRangeMatches=e.filter(e=>e.sheetId===t&&dr(e.col,e.row,n))}else this.specificRangeMatches=[]}findMatchesInSheet(e){let t=[],{left:n,right:r,top:i,bottom:a}=this.getters.getSheetZone(e);for(let o=i;o<=a;o++)for(let i=n;i<=r;i++){let n=this.getters.isColHidden(e,i),r=this.getters.isRowHidden(e,o);if(n||r)continue;let a={sheetId:e,col:i,row:o};if(this.currentSearchRegex?.test(this.getSearchableString(a))){let n={sheetId:e,col:i,row:o};t.push(n)}}return t}selectNextCell(e,t=!0){let n=this.searchMatches;if(!n.length){this.selectedMatchIndex=null;return}let r;if(this.selectedMatchIndex===null){let e=-1;for(let t of this.getSheetsInSearchOrder())if(e=n.findIndex(e=>e.sheetId===t),e!==-1)break;r=e}else r=this.selectedMatchIndex+e;r=(r+n.length)%n.length,this.selectedMatchIndex=r;let i=n[r];t&&this.getters.getActiveSheetId()!==i.sheetId&&(this.preserveSelectedMatchIndex=!0,this.model.dispatch(`ACTIVATE_SHEET`,{sheetIdFrom:this.getters.getActiveSheetId(),sheetIdTo:i.sheetId}),this.preserveSelectedMatchIndex=!1,this.isSearchDirty=!1),this.model.selection.getBackToDefault(),this.model.selection.selectCell(i.col,i.row)}replace(){this.selectedMatchIndex!==null&&(this.preserveSelectedMatchIndex=!0,this.model.dispatch(`REPLACE_SEARCH`,{searchString:this.toSearch,replaceWith:this.toReplace,matches:[this.searchMatches[this.selectedMatchIndex]],searchOptions:this.searchOptions}),this.preserveSelectedMatchIndex=!1)}replaceAll(){this.model.dispatch(`REPLACE_SEARCH`,{searchString:this.toSearch,replaceWith:this.toReplace,matches:this.searchMatches,searchOptions:this.searchOptions})}showReplaceWarningMessage(e,t){let n=e-t;n===0?this.notificationStore.notifyUser({type:`warning`,sticky:!1,text:E(`Match(es) cannot be replaced as they are part of a formula.`)}):this.notificationStore.notifyUser({type:`warning`,sticky:!1,text:E(`%(replaceable_count)s match(es) replaced. %(irreplaceable_count)s match(es) cannot be replaced as they are part of a formula.`,{replaceable_count:n,irreplaceable_count:t})})}replaceMatch(e,t,n,r){let i=this.getters.getCell(e);if(!i?.content)return;if(i?.isFormula&&!r.searchFormulas){this.irreplaceableMatchCount++;return}let a=Wt(t,r),o=new RegExp(a.source,a.flags+`g`),s=tl(this.getters.getCellText(e,{showFormula:r.searchFormulas}).replace(o,n),this.getters.getLocale());this.model.dispatch(`UPDATE_CELL`,{...e,content:s})}getSearchableString(e){return this.getters.getCellText(e,{showFormula:this.searchOptions.searchFormulas})}get highlights(){let e=[],t=this.getters.getActiveSheetId();for(let[n,r]of this.searchMatches.entries()){if(r.sheetId!==t)continue;let i=D(r),a=this.getters.expandZone(t,i),{width:o,height:s}=this.getters.getVisibleRect(a);o>0&&s>0&&e.push({sheetId:t,zone:a,color:KP,noBorder:n!==this.selectedMatchIndex,thinLine:!0,fillAlpha:.2})}if(this.searchOptions.searchScope===`specificRange`){let n=this.searchOptions.specificRange;n&&n.sheetId===t&&e.push({sheetId:t,zone:n.zone,color:KP,noFill:!0,thinLine:!0})}return e}};H`
1173
+ `;var WP=class extends t.Component{static template=`o-spreadsheet-DataValidationPreview`;static props={onClick:Function,rule:Object};ref=(0,t.useRef)(`dvPreview`);setup(){yP(this.ref,this)}deleteDataValidation(){let e=this.env.model.getters.getActiveSheetId();this.env.model.dispatch(`REMOVE_DATA_VALIDATION_RULE`,{sheetId:e,id:this.props.rule.id})}get highlights(){return this.props.rule.ranges.map(e=>({sheetId:this.env.model.getters.getActiveSheetId(),zone:e.zone,color:_,fillAlpha:.06}))}get rangesString(){let e=this.env.model.getters.getActiveSheetId();return this.props.rule.ranges.map(t=>this.env.model.getters.getRangeString(t,e)).join(`, `)}get descriptionString(){return Q.get(this.props.rule.criterion.type).getPreview(this.props.rule.criterion,this.env.model.getters)}},GP=class extends t.Component{static template=`o-spreadsheet-DataValidationPanel`;static props={onCloseSidePanel:Function};static components={DataValidationPreview:WP,DataValidationEditor:UP};state=(0,t.useState)({mode:`list`,activeRule:void 0});onPreviewClick(e){let t=this.env.model.getters.getActiveSheetId(),n=this.env.model.getters.getDataValidationRule(t,e);n&&(this.state.mode=`edit`,this.state.activeRule=n)}addDataValidationRule(){this.state.mode=`edit`,this.state.activeRule=void 0}onExitEditMode(){this.state.mode=`list`,this.state.activeRule=void 0}localizeDVRule(e){return e&&ml(e,this.env.model.getters.getLocale())}get validationRules(){let e=this.env.model.getters.getActiveSheetId();return this.env.model.getters.getDataValidationRules(e)}};let KP=`#8B008B`;var qP=class extends hd{mutators=[`updateSearchOptions`,`updateSearchContent`,`searchFormulas`,`selectPreviousMatch`,`selectNextMatch`,`replace`];allSheetsMatches=[];activeSheetMatches=[];specificRangeMatches=[];selectedMatchPosition=null;currentSearchRegex=null;isSearchDirty=!1;initialShowFormulaState;irreplaceableMatchCount=0;notificationStore=this.get(sP);selectedMatchIndex=null;toSearch=``;toReplace=``;searchOptions={matchCase:!1,exactMatch:!1,searchFormulas:!1,searchScope:`activeSheet`,specificRange:void 0};constructor(e){super(e),this.initialShowFormulaState=this.model.getters.shouldShowFormulas(),this.searchOptions.searchFormulas=this.initialShowFormulaState;let t=e(xN);t.register(this),this.onDispose(()=>{this.model.dispatch(`SET_FORMULA_VISIBILITY`,{show:this.initialShowFormulaState}),t.unRegister(this)})}get searchMatches(){switch(this.searchOptions.searchScope){case`allSheets`:return this.allSheetsMatches;case`activeSheet`:return this.activeSheetMatches;case`specificRange`:return this.specificRangeMatches}}updateSearchContent(e){this._updateSearch(e,this.searchOptions)}updateSearchOptions(e){this._updateSearch(this.toSearch,{...this.searchOptions,...e})}searchFormulas(e){this.model.dispatch(`SET_FORMULA_VISIBILITY`,{show:e}),this.updateSearchOptions({searchFormulas:e})}selectPreviousMatch(){this.selectNextCell(-1)}selectNextMatch(){this.selectNextCell(1)}handle(e){switch(e.type){case`SET_FORMULA_VISIBILITY`:this.updateSearchOptions({searchFormulas:e.show});break;case`UNDO`:case`REDO`:case`REMOVE_TABLE`:case`UPDATE_FILTER`:case`REMOVE_COLUMNS_ROWS`:case`HIDE_COLUMNS_ROWS`:case`UNHIDE_COLUMNS_ROWS`:case`ADD_COLUMNS_ROWS`:case`EVALUATE_CELLS`:case`UPDATE_CELL`:case`ACTIVATE_SHEET`:this.isSearchDirty=!0,this.searchOptions.specificRange&&(this.searchOptions.specificRange=this.searchOptions.specificRange.clone({sheetId:this.getters.getActiveSheetId()}));break;case`DELETE_SHEET`:this.searchOptions.searchScope===`specificRange`&&this.searchOptions.specificRange?.sheetId===e.sheetId&&(this.searchOptions={...this.searchOptions,specificRange:void 0}),this.isSearchDirty=!0;break;case`REPLACE_SEARCH`:for(let t of e.matches)this.replaceMatch(t,e.searchString,e.replaceWith,e.searchOptions);this.irreplaceableMatchCount>0&&this.showReplaceWarningMessage(e.matches.length,this.irreplaceableMatchCount),this.irreplaceableMatchCount=0;break}}finalize(){this.isSearchDirty&&=(this.refreshSearch(!1),!1)}get allSheetMatchesCount(){return this.allSheetsMatches.length}get activeSheetMatchesCount(){return this.activeSheetMatches.length}get specificRangeMatchesCount(){return this.specificRangeMatches.length}_updateSearch(e,t){this.searchOptions=t,e!==this.toSearch&&(this.selectedMatchIndex=null,this.selectedMatchPosition=null),this.toSearch=e,this.currentSearchRegex=Wt(this.toSearch,this.searchOptions),this.refreshSearch()}refreshSearch(e=!0){if(this.findMatches(),this.selectedMatchPosition)if(this.selectedMatchPosition.sheetId!==this.getters.getActiveSheetId())this.selectedMatchIndex=null,this.selectedMatchPosition=null;else{let e=this.searchMatches.findIndex(e=>e.sheetId===this.selectedMatchPosition?.sheetId&&e.col===this.selectedMatchPosition?.col&&e.row===this.selectedMatchPosition?.row);e!==-1&&(this.selectedMatchIndex=e)}this.selectNextCell(0,e)}getSheetsInSearchOrder(){switch(this.searchOptions.searchScope){case`allSheets`:let e=this.getters.getSheetIds(),t=e.findIndex(e=>e===this.getters.getActiveSheetId());return[e[t],...e.slice(t+1),...e.slice(0,t)];case`activeSheet`:return[this.getters.getActiveSheetId()];case`specificRange`:let n=this.searchOptions.specificRange;return n&&n?[n.sheetId]:[]}}findMatches(){let e=[];if(this.toSearch)for(let t of this.getters.getSheetIds())e.push(...this.findMatchesInSheet(t));if(this.allSheetsMatches=e,this.activeSheetMatches=e.filter(e=>e.sheetId===this.getters.getActiveSheetId()),this.searchOptions.specificRange){let{sheetId:t,zone:n}=this.searchOptions.specificRange;this.specificRangeMatches=e.filter(e=>e.sheetId===t&&dr(e.col,e.row,n))}else this.specificRangeMatches=[]}findMatchesInSheet(e){let t=[],{left:n,right:r,top:i,bottom:a}=this.getters.getSheetZone(e);for(let o=i;o<=a;o++)for(let i=n;i<=r;i++){let n=this.getters.isColHidden(e,i),r=this.getters.isRowHidden(e,o);if(n||r)continue;let a={sheetId:e,col:i,row:o};if(this.currentSearchRegex?.test(this.getSearchableString(a))){let n={sheetId:e,col:i,row:o};t.push(n)}}return t}selectNextCell(e,t=!0){let n=this.searchMatches;if(!n.length){this.selectedMatchIndex=null,this.selectedMatchPosition=null;return}let r;if(this.selectedMatchIndex===null){let e=-1;for(let t of this.getSheetsInSearchOrder())if(e=n.findIndex(e=>e.sheetId===t),e!==-1)break;r=e}else r=this.selectedMatchIndex+e;r=(r+n.length)%n.length,this.selectedMatchIndex=r,this.selectedMatchPosition=n[this.selectedMatchIndex];let i=n[r];t&&this.getters.getActiveSheetId()!==i.sheetId&&(this.model.dispatch(`ACTIVATE_SHEET`,{sheetIdFrom:this.getters.getActiveSheetId(),sheetIdTo:i.sheetId}),this.isSearchDirty=!1),this.model.selection.getBackToDefault(),this.model.selection.selectCell(i.col,i.row)}replace(){this.selectedMatchIndex!==null&&this.model.dispatch(`REPLACE_SEARCH`,{searchString:this.toSearch,replaceWith:this.toReplace,matches:[this.searchMatches[this.selectedMatchIndex]],searchOptions:this.searchOptions})}replaceAll(){this.model.dispatch(`REPLACE_SEARCH`,{searchString:this.toSearch,replaceWith:this.toReplace,matches:this.searchMatches,searchOptions:this.searchOptions})}showReplaceWarningMessage(e,t){let n=e-t;n===0?this.notificationStore.notifyUser({type:`warning`,sticky:!1,text:E(`Match(es) cannot be replaced as they are part of a formula.`)}):this.notificationStore.notifyUser({type:`warning`,sticky:!1,text:E(`%(replaceable_count)s match(es) replaced. %(irreplaceable_count)s match(es) cannot be replaced as they are part of a formula.`,{replaceable_count:n,irreplaceable_count:t})})}replaceMatch(e,t,n,r){let i=this.getters.getCell(e);if(!i?.content)return;if(i?.isFormula&&!r.searchFormulas){this.irreplaceableMatchCount++;return}let a=Wt(t,r),o=new RegExp(a.source,a.flags+`g`),s=tl(this.getters.getCellText(e,{showFormula:r.searchFormulas}).replace(o,n),this.getters.getLocale());this.model.dispatch(`UPDATE_CELL`,{...e,content:s})}getSearchableString(e){return this.getters.getCellText(e,{showFormula:this.searchOptions.searchFormulas})}get highlights(){let e=[],t=this.getters.getActiveSheetId();for(let[n,r]of this.searchMatches.entries()){if(r.sheetId!==t)continue;let i=D(r),a=this.getters.expandZone(t,i),{width:o,height:s}=this.getters.getVisibleRect(a);o>0&&s>0&&e.push({sheetId:t,zone:a,color:KP,noBorder:n!==this.selectedMatchIndex,thinLine:!0,fillAlpha:.2})}if(this.searchOptions.searchScope===`specificRange`){let n=this.searchOptions.specificRange;n&&n.sheetId===t&&e.push({sheetId:t,zone:n.zone,color:KP,noFill:!0,thinLine:!0})}return e}};H`
1174
1174
  .o-find-and-replace {
1175
1175
  outline: none;
1176
1176
  height: 100%;
@@ -1542,7 +1542,7 @@ stores.inject(MyMetaStore, storeInstance);
1542
1542
  color: white;
1543
1543
  pointer-events: none;
1544
1544
  }
1545
- `;var wI=class extends t.Component{static template=`o-spreadsheet-ClientTag`;static props={active:Boolean,name:String,color:String,col:Number,row:Number};get tagStyle(){let{col:e,row:t,color:n}=this.props,{height:r}=this.env.model.getters.getSheetViewDimensionWithHeaders(),{x:i,y:a}=this.env.model.getters.getVisibleRect({left:e,top:t,right:e,bottom:t});return U({bottom:`${r-a+15}px`,left:`${i-1}px`,border:`1px solid ${n}`,"background-color":n})}};let TI=E(`The cell you are trying to edit has been deleted.`);var EI=class extends cP{canStopEdition(){return this.editionMode===`inactive`?!0:this.checkDataValidation()}stopEdition(e){if(this.canStopEdition()){this._stopEdition(),e&&this.model.selection.moveAnchorCell(e,1);return}let t=this.currentEditedCell,n=w(t.col,t.row),r=this.getters.getValidationRuleForCell(t);if(!r)return;let i=Q.get(r.criterion.type).getErrorString(r.criterion,this.getters,t.sheetId);this.notificationStore.raiseError(E(`The data you entered in %s violates the data validation rule set on the cell:
1545
+ `;var wI=class extends t.Component{static template=`o-spreadsheet-ClientTag`;static props={active:Boolean,name:String,color:String,col:Number,row:Number};get tagStyle(){let{col:e,row:t,color:n}=this.props,{height:r}=this.env.model.getters.getSheetViewDimensionWithHeaders(),{x:i,y:a}=this.env.model.getters.getVisibleRect({left:e,top:t,right:e,bottom:t});return U({bottom:`${r-a+15}px`,left:`${i-1}px`,border:`1px solid ${n}`,"background-color":n})}};let TI=E(`The cell you are trying to edit has been deleted.`);var EI=class extends cP{canStopEdition(){return this.editionMode===`inactive`?!0:this.checkDataValidation()}stopEdition(e){if(this.canStopEdition()){let{col:t,row:n}=this.currentEditedCell;this._stopEdition(),e&&(this.model.selection.selectCell(t,n),this.model.selection.moveAnchorCell(e,1));return}let t=this.currentEditedCell,n=w(t.col,t.row),r=this.getters.getValidationRuleForCell(t);if(!r)return;let i=Q.get(r.criterion.type).getErrorString(r.criterion,this.getters,t.sheetId);this.notificationStore.raiseError(E(`The data you entered in %s violates the data validation rule set on the cell:
1546
1546
  %s`,n,i)),this.cancelEdition()}handle(e){switch(super.handle(e),e.type){case`SET_FORMATTING`:this.cancelEdition();break;case`ADD_COLUMNS_ROWS`:this.onAddElements(e);break;case`REMOVE_COLUMNS_ROWS`:e.dimension===`COL`?this.onColumnsRemoved(e):this.onRowsRemoved(e);break;case`ACTIVATE_SHEET`:if(this._currentContent.startsWith(`=`)||(this._cancelEdition(),this.resetContent()),e.sheetIdFrom!==e.sheetIdTo){let t=this.getters.getActivePosition(),{col:n,row:r}=this.getters.getNextVisibleCellPosition({sheetId:e.sheetIdTo,col:t.col,row:t.row}),i=this.getters.expandZone(e.sheetIdTo,D({col:n,row:r}));this.model.selection.resetAnchor(this,{cell:{col:n,row:r},zone:i})}break;case`DELETE_SHEET`:case`UNDO`:case`REDO`:!this.getters.tryGetSheet(this.sheetId)&&this.editionMode!==`inactive`&&(this.sheetId=this.getters.getActiveSheetId(),this.resetContent(),this.cancelEditionAndActivateSheet(),this.notificationStore.raiseError(TI));break}}get placeholder(){let e=this.getters.getActivePosition(),t=this.model.getters.getArrayFormulaSpreadingOn(e);if(t)return this.getters.getCellText(t,{showFormula:!0})}get currentEditedCell(){return{sheetId:this.sheetId,col:this.col,row:this.row}}onColumnsRemoved(e){if(e.elements.includes(this.col)&&this.editionMode!==`inactive`){this.cancelEdition(),this.notificationStore.raiseError(TI);return}let{top:t,left:n}=ir({left:this.col,right:this.col,top:this.row,bottom:this.row},`left`,[...e.elements]);this.col=n,this.row=t}onRowsRemoved(e){if(e.elements.includes(this.row)&&this.editionMode!==`inactive`){this.cancelEdition(),this.notificationStore.raiseError(TI);return}let{top:t,left:n}=ir({left:this.col,right:this.col,top:this.row,bottom:this.row},`top`,[...e.elements]);this.col=n,this.row=t}onAddElements(e){let{top:t,left:n}=rr({left:this.col,right:this.col,top:this.row,bottom:this.row},e.dimension===`COL`?`left`:`top`,e.base,e.position,e.quantity);this.col=n,this.row=t}confirmEdition(e){if(e){let t=this.getters.getActiveSheetId(),n=this.getters.getEvaluatedCell({sheetId:t,col:this.col,row:this.row});n.link&&!e.startsWith(`=`)&&(e=ht(e,n.link.url)),this.addHeadersForSpreadingFormula(e),this.model.dispatch(`UPDATE_CELL`,{...this.currentEditedCell,content:e})}else this.model.dispatch(`UPDATE_CELL`,{...this.currentEditedCell,content:``});this.model.dispatch(`AUTOFILL_TABLE_COLUMN`,{...this.currentEditedCell}),this.setContent(``)}getComposerContent(e){let t=this.getters.getLocale(),n=this.getters.getCell(e);if(n?.isFormula)return ol(n.content,t);if(this.model.getters.getArrayFormulaSpreadingOn(e))return``;let{format:r,value:i,type:a,formattedValue:o}=this.getters.getEvaluatedCell(e);switch(a){case`empty`:return``;case`text`:case`error`:return i;case`boolean`:return o;case`number`:return r&&Go(r)?Qr(o,t)===null?B(i,{locale:t,format:Number.isInteger(i)?t.dateFormat:_l(t)}):o:this.numberComposerContent(i,r,t)}}numberComposerContent(e,t,n){return t?.includes(`%`)?`${Wo(e*100,n.decimalSeparator)}%`:Wo(e,n.decimalSeparator)}addHeadersForSpreadingFormula(e){if(!e.startsWith(`=`))return;let t=this.getters.evaluateFormula(this.sheetId,e,{sheetId:this.sheetId,col:this.col,row:this.row});if(!A(t))return;let n=this.getters.getNumberRows(this.sheetId),r=this.getters.getNumberCols(this.sheetId),i=this.row+t[0].length-n,a=this.col+t.length-r;a>0&&this.model.dispatch(`ADD_COLUMNS_ROWS`,{sheetId:this.sheetId,dimension:`COL`,base:r-1,position:`after`,quantity:a+20}),i>0&&this.model.dispatch(`ADD_COLUMNS_ROWS`,{sheetId:this.sheetId,dimension:`ROW`,base:n-1,position:`after`,quantity:i+50})}checkDataValidation(){let e={sheetId:this.sheetId,col:this.col,row:this.row},t=this.getCurrentCanonicalContent(),n=t.startsWith(`=`)?this.getters.evaluateFormula(this.sheetId,t):hs(t,this.getters.getLocale());if(A(n))return!0;let r=this.getters.getValidationResultForCellValue(n,e);return!(!r.isValid&&r.rule.isBlocking)}};let DI=3*.4*window.devicePixelRatio||1;H`
1547
1547
  div.o-grid-composer {
1548
1548
  z-index: ${20};
@@ -3301,4 +3301,4 @@ stores.inject(MyMetaStore, storeInstance);
3301
3301
  <Relationships xmlns="${ef.Relationships}">
3302
3302
  <Relationship ${K(e)} />
3303
3303
  </Relationships>
3304
- `),`_rels/.rels`)}function NH(e){let t={},n=new Set;for(let r of e.sheets){let e=r.name.slice(0,31),i=1;for(;n.has(e);)e=e.slice(0,31-String(i).length)+ i++;n.add(e),e!==r.name&&(t[r.name]=e,r.name=e)}if(!Object.keys(t).length)return e;let r=Object.keys(t).sort((e,t)=>t.length-e.length),i=JSON.stringify(e);for(let e of r){let n=RegExp(`'?${nt(e)}'?!`,`g`);i=i.replaceAll(n,n=>{let r=t[e];return n.replace(e,r)})}return JSON.parse(i)}function PH(e){for(let t of e.sheets)t.tables=t.tables.filter(e=>pr(Qn(e.range)).numberOfRows>1);return e}var FH=class extends rd{corePlugins=[];featurePlugins=[];statefulUIPlugins=[];coreViewsPlugins=[];range;session;isReplayingCommand=!1;renderers={};status=0;config;corePluginConfig;uiPluginConfig;state;selection;getters;coreGetters;uuidGenerator;handlers=[];uiHandlers=[];coreHandlers=[];constructor(e={},n={},r=[],i=new wc,a=!1){let o=performance.now();console.debug(`##### Model creation #####`),super(),Jn(),r=Wh(e,r);let s=Rh(e,a);this.state=new nV,this.uuidGenerator=i,this.config=this.setupConfig(n),this.session=this.setupSession(s.revisionId),this.coreGetters={},this.range=new WL(this.coreGetters),this.coreGetters.getRangeString=this.range.getRangeString.bind(this.range),this.coreGetters.getRangeFromSheetXC=this.range.getRangeFromSheetXC.bind(this.range),this.coreGetters.createAdaptedRanges=this.range.createAdaptedRanges.bind(this.range),this.coreGetters.getRangeDataFromXc=this.range.getRangeDataFromXc.bind(this.range),this.coreGetters.getRangeDataFromZone=this.range.getRangeDataFromZone.bind(this.range),this.coreGetters.getRangeFromRangeData=this.range.getRangeFromRangeData.bind(this.range),this.coreGetters.getRangeFromZone=this.range.getRangeFromZone.bind(this.range),this.coreGetters.recomputeRanges=this.range.recomputeRanges.bind(this.range),this.coreGetters.isRangeValid=this.range.isRangeValid.bind(this.range),this.coreGetters.extendRange=this.range.extendRange.bind(this.range),this.coreGetters.getRangesUnion=this.range.getRangesUnion.bind(this.range),this.coreGetters.removeRangesSheetPrefix=this.range.removeRangesSheetPrefix.bind(this.range),this.getters={isReadonly:()=>this.config.mode===`readonly`||this.config.mode===`dashboard`,isDashboard:()=>this.config.mode===`dashboard`},this.selection=new eV(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of cB.getAll())this.setupCorePlugin(e,s);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(r);for(let e of dB.getAll()){let t=this.setupUiPlugin(e);this.coreViewsPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(let e of uB.getAll()){let t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of lB.getAll()){let t=this.setupUiPlugin(e);this.featurePlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}if(this.uuidGenerator.setIsFastStrategy(!1),this.dispatch(`START`),this.selection.observe(this,{handleEvent:()=>this.trigger(`update`)}),this.setupSessionEvents(),this.joinSession(),n.snapshotRequested||e[`[Content_Types].xml`]&&!this.getters.isReadonly()){let e=performance.now();console.debug(`Snapshot requested`),this.session.snapshot(this.exportData()),this.garbageCollectExternalResources(),console.debug(`Snapshot taken in`,performance.now()-e,`ms`)}(0,t.markRaw)(this),console.debug(`Model created in`,performance.now()-o,`ms`),console.debug(`######`)}joinSession(){this.session.join(this.config.client)}async leaveSession(){let e=this.getters.isReadonly()?void 0:Et(()=>this.exportData());await this.session.leave(e)}setupUiPlugin(e){let t=new e(this.uiPluginConfig);for(let n of e.getters){if(!(n in t))throw Error(`Invalid getter name: ${n} for plugin ${t.constructor}`);if(n in this.getters)throw Error(`Getter "${n}" is already defined.`);this.getters[n]=t[n].bind(t)}for(let n of e.layers)this.renderers[n]||(this.renderers[n]=[]),this.renderers[n].push(t);return t}setupCorePlugin(e,t){let n=new e(this.corePluginConfig);for(let t of e.getters){if(!(t in n))throw Error(`Invalid getter name: ${t} for plugin ${n.constructor}`);if(t in this.coreGetters)throw Error(`Getter "${t}" is already defined.`);this.coreGetters[t]=n[t].bind(n)}n.import(t),this.corePlugins.push(n),this.coreHandlers.push(n),this.handlers.push(n)}onRemoteRevisionReceived({commands:e}){for(let t of e){let e=this.status;this.status=2,this.dispatchToHandlers(this.statefulUIPlugins,t),this.status=e}this.finalize()}setupSession(e){return new lz(XB({initialRevisionId:e,recordChanges:this.state.recordChanges.bind(this.state),dispatch:e=>{if(!this.checkDispatchAllowed(e).isSuccessful){this.dispatchToHandlers(this.coreHandlers,{type:`UNDO`,commands:[e]});return}this.isReplayingCommand=!0,this.dispatchToHandlers(this.coreHandlers,e),this.isReplayingCommand=!1}}),this.config.transportService,e)}setupSessionEvents(){this.session.on(`remote-revision-received`,this,this.onRemoteRevisionReceived),this.session.on(`revision-undone`,this,({commands:e})=>{this.dispatchFromCorePlugin(`UNDO`,{commands:e}),this.finalize()}),this.session.on(`revision-redone`,this,({commands:e})=>{this.dispatchFromCorePlugin(`REDO`,{commands:e}),this.finalize()}),this.session.on(`unexpected-revision-id`,this,()=>this.trigger(`unexpected-revision-id`)),this.session.on(`collaborative-event-received`,this,()=>{this.trigger(`update`)})}setupConfig(e){let t=e.client||{id:this.uuidGenerator.smallUuid(),name:E(`Anonymous`).toString()},n=e.transportService||new HB;return{...e,mode:e.mode||`normal`,custom:e.custom||{},external:this.setupExternalConfig(e.external||{}),transportService:n,client:t,moveClient:()=>{},snapshotRequested:!1,notifyUI:e=>this.trigger(`notify-ui`,e),raiseBlockingErrorUI:e=>this.trigger(`raise-error-ui`,{text:e}),customColors:e.customColors||[]}}setupExternalConfig(e){let t=e.loadLocales||(()=>Promise.resolve(Xi));return{...e,loadLocales:t}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,canDispatch:this.canDispatch,uuidGenerator:this.uuidGenerator,custom:this.config.custom,external:this.config.external}}setupUiPluginConfig(){return{getters:this.getters,stateObserver:this.state,dispatch:this.dispatch,canDispatch:this.canDispatch,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[]}}checkDispatchAllowed(e){let t=Gi(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some(e=>e!==`Success`)?new qi(t.flat()):qi.Success}checkDispatchAllowedCoreCommand(e){let t=this.corePlugins.map(t=>t.allowDispatch(e));return t.push(this.range.allowDispatch(e)),t}checkDispatchAllowedLocalCommand(e){return this.uiHandlers.map(t=>t.allowDispatch(e))}finalize(){this.status=3;for(let e of this.handlers)e.finalize();this.status=0,this.trigger(`command-finalized`)}canDispatch=(e,t)=>this.checkDispatchAllowed(IH(e,t));dispatch=(e,t)=>{let n=IH(e,t),r=this.status;if(this.getters.isReadonly()&&!Ki(n))return new qi(`Readonly`);if(!this.session.canApplyOptimisticUpdate())return new qi(`WaitingSessionConfirmation`);switch(r){case 0:let t=this.checkDispatchAllowed(n);if(!t.isSuccessful)return this.trigger(`update`),t;this.status=1;let{changes:r,commands:i}=this.state.recordChanges(()=>{let t=performance.now();Gi(n)&&this.state.addCommand(n),this.dispatchToHandlers(this.handlers,n),this.finalize();let r=performance.now()-t;r>5&&console.debug(e,r,`ms`)});this.session.save(n,i,r),this.status=0,this.trigger(`update`);break;case 1:if(Gi(n)){let e=this.checkDispatchAllowed(n);if(!e.isSuccessful)return e;this.state.addCommand(n)}this.dispatchToHandlers(this.handlers,n);break;case 3:throw Error(`Cannot dispatch commands in the finalize state`);case 2:if(Gi(n))throw Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,n)}return qi.Success};dispatchFromCorePlugin=(e,t)=>{let n=IH(e,t),r=this.status;this.status=2;let i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,n),this.status=r,qi.Success};dispatchToHandlers(e,t){let n=Gi(t);for(let r of e)!n&&r instanceof DL||r.beforeHandle(t);for(let r of e)!n&&r instanceof DL||r.handle(t);this.trigger(`command-dispatched`,t)}drawLayer(e,t){let n=this.renderers[t];if(n)for(let r of n)e.ctx.save(),r.drawLayer(e,t),e.ctx.restore()}exportData(){let e=Xh();for(let t of this.handlers)t instanceof DL&&t.export(e);return e.revisionId=this.session.getRevisionId()||`START_REVISION`,e=y(e),e}updateMode(e){this.config.mode=e,this.trigger(`update`)}exportXLSX(){this.dispatch(`EVALUATE_CELLS`);let e=Qh();for(let t of this.handlers)t instanceof EL&&t.exportForExcel(e);return e=y(e),wH(e)}garbageCollectExternalResources(){for(let e of this.corePlugins)e.garbageCollectExternalResources()}};function IH(e,t={}){let n=y(t);return n.type=e,n}let LH={},RH={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:26,HEADER_WIDTH:48,TOPBAR_HEIGHT:63,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:96,DEFAULT_CELL_HEIGHT:23,SCROLLBAR_WIDTH:15},zH={autoCompleteProviders:c_,autofillModifiersRegistry:$E,autofillRulesRegistry:eD,cellMenuRegistry:yj,colMenuRegistry:dN,errorTypes:ta,linkMenuRegistry:nk,functionRegistry:RT,featurePluginRegistry:lB,iconsOnCellRegistry:pf,statefulUIPluginRegistry:uB,coreViewsPluginRegistry:dB,corePluginRegistry:cB,rowMenuRegistry:gN,sidePanelRegistry:pI,figureRegistry:pO,chartSidePanelComponentRegistry:rP,chartComponentRegistry:aO,chartRegistry:iO,chartSubtypeRegistry:sO,topbarMenuRegistry:SN,topbarComponentRegistry:wN,clickableCellRegistry:fB,otRegistry:CN,inverseCommandRegistry:yO,urlRegistry:Xa,cellPopoverRegistry:uD,numberFormatMenuRegistry:fN,repeatLocalCommandTransformRegistry:Wz,repeatCommandTransformRegistry:Uz,clipboardHandlersRegistries:ed,pivotRegistry:jF,pivotTimeAdapterRegistry:lu,pivotSidePanelRegistry:LF,pivotNormalizationValueRegistry:Bu,supportedPivotPositionalFormulaRegistry:JE,pivotToFunctionValueRegistry:Vu,migrationStepRegistry:Fh},BH={arg:Y,isEvaluationError:P,toBoolean:L,toJsDate:R,toNumber:F,toString:I,toNormalizedPivotValue:Iu,toXC:w,toZone:Qn,toUnboundedZone:Zn,toCartesian:Pn,numberToLetters:Tn,lettersToNumber:En,UuidGenerator:wc,formatValue:B,createCurrencyFormat:Qo,ColorGenerator:wn,computeTextWidth:sc,createEmptyWorkbookData:Xh,createEmptySheet:Yh,createEmptyExcelSheet:Zh,getDefaultChartJsRuntime:Xg,chartFontColor:Dd,getChartAxisTitleRuntime:Md,getChartAxisType:wD,getTrendDatasetForBarChart:Fd,getTrendDatasetForLineChart:jD,getFillingMode:t_,rgbaToHex:cn,colorToRGBA:ln,positionToZone:D,isDefined:S,isMatrix:A,lazy:Et,genericRepeat:Gz,createAction:m,createActions:f,transformRangeData:nd,deepEquals:C,overlap:ur,union:or,isInside:dr,deepCopy:y,expandZoneOnInsertion:nr,reduceZoneOnDeletion:ar,unquote:at,getMaxObjectId:Ou,getFunctionsFromTokens:LE,getFirstPivotFunction:GE,getNumberOfPivotFunctions:qE,parseDimension:ju,isDateOrDatetimeField:Mu,makeFieldProposal:BE,insertTokenAfterArgSeparator:HE,insertTokenAfterLeftParenthesis:UE,mergeContiguousZones:jr,getPivotHighlights:vN,pivotTimeAdapter:uu,UNDO_REDO_PIVOT_COMMANDS:AR,createPivotFormula:Fu,areDomainArgsFieldsValid:Pu,splitReference:Vs,formatTickValue:zd,sanitizeSheetName:st,isNumber:Oi,isDateTime:Xr},VH={isMarkdownLink:pt,parseMarkdownLink:gt,markdownLink:ht,openLink:to,urlRepresentation:eo},HH={Checkbox:TN,Section:Z,RoundColorPicker:HN,ChartDataSeries:kN,ChartErrorSection:jN,ChartLabelRange:MN,ChartTitle:WN,ChartPanel:oP,ChartFigure:lO,ChartJsComponent:o_,Grid:CL,GridOverlay:eL,ScorecardChart:s_,LineConfigPanel:ZN,BarConfigPanel:PN,PieChartDesignPanel:QN,GenericChartConfigPanel:NN,ChartWithAxisDesignPanel:qN,GaugeChartConfigPanel:YN,GaugeChartDesignPanel:XN,ScorecardChartConfigPanel:eP,ScorecardChartDesignPanel:tP,ChartTypePicker:iP,FigureComponent:mI,Menu:pk,Popover:lk,SelectionInput:ON,ValidationMessages:AN,AddDimensionButton:tF,PivotDimensionGranularity:aF,PivotDimensionOrder:oF,PivotDimension:iF,PivotLayoutConfigurator:lF,PivotHTMLRenderer:TL,EditableName:wL,PivotDeferUpdate:$P,PivotTitleSection:uF,CogWheelMenu:rF,TextInput:nF,SidePanelCollapsible:IN},UH={useDragAndDropListItems:fP,useHighlights:bP,useHighlightsOnHover:yP},WH={useStoreProvider:cd,DependencyContainer:id,CellPopoverStore:GO,ComposerFocusStore:_d,CellComposerStore:EI,FindAndReplaceStore:qP,HighlightStore:xN,HoveredCellStore:WO,ModelStore:pd,NotificationStore:sP,RendererStore:md,SelectionInputStore:DN,SpreadsheetStore:hd,useStore:V,useLocalStore:ld,SidePanelStore:yL,PivotSidePanelStore:FF,PivotMeasureDisplayPanelStore:ZP};function GH(e,t){return RT.add(e,t),{addFunction:(e,t)=>GH(e,t)}}let KH={DEFAULT_LOCALE:k,HIGHLIGHT_COLOR:_,PIVOT_TABLE_CONFIG:Ze,TREND_LINE_XAXIS_ID:`x1`,CHART_AXIS_CHOICES:Vd,ChartTerms:ag};e.AbstractCellClipboardHandler=Pc,e.AbstractChart=Ag,e.AbstractFigureClipboardHandler=Gu,e.CellErrorType=j,e.CommandResult=Yi,e.CorePlugin=DL,e.DispatchResult=qi,e.EvaluationError=M,e.Model=FH,e.PivotRuntimeDefinition=dF,e.Registry=h,e.Revision=sz,e.SPREADSHEET_DIMENSIONS=RH,e.Spreadsheet=VB,e.SpreadsheetPivotTable=hF,e.UIPlugin=$,e.__info__=LH,e.addFunction=GH,e.addRenderingLayer=ea,e.astToFormula=bC,e.compile=OE,e.compileTokens=kE,e.components=HH,e.constants=KH,e.convertAstNodes=gC,e.coreTypes=Wi,e.findCellInNewZone=Sr,e.functionCache=DE,e.helpers=BH,e.hooks=UH,e.invalidateCFEvaluationCommands=Vi,e.invalidateDependenciesCommands=Bi,e.invalidateEvaluationCommands=Ri,e.iterateAstNodes=_C,e.links=VH,e.load=Rh,e.parse=mC,e.parseTokens=hC,e.readonlyAllowedCommands=Ui,e.registries=zH,e.setDefaultSheetViewSize=Ye,e.setTranslationMethod=qn,e.stores=WH,e.tokenColors=_E,e.tokenize=Rc,LH.version=`18.0.70`,LH.date=`2026-06-06T06:20:39.985Z`,LH.hash=`3ff29f6`})(this.o_spreadsheet=this.o_spreadsheet||{},owl);
3304
+ `),`_rels/.rels`)}function NH(e){let t={},n=new Set;for(let r of e.sheets){let e=r.name.slice(0,31),i=1;for(;n.has(e);)e=e.slice(0,31-String(i).length)+ i++;n.add(e),e!==r.name&&(t[r.name]=e,r.name=e)}if(!Object.keys(t).length)return e;let r=Object.keys(t).sort((e,t)=>t.length-e.length),i=JSON.stringify(e);for(let e of r){let n=RegExp(`'?${nt(e)}'?!`,`g`);i=i.replaceAll(n,n=>{let r=t[e];return n.replace(e,r)})}return JSON.parse(i)}function PH(e){for(let t of e.sheets)t.tables=t.tables.filter(e=>pr(Qn(e.range)).numberOfRows>1);return e}var FH=class extends rd{corePlugins=[];featurePlugins=[];statefulUIPlugins=[];coreViewsPlugins=[];range;session;isReplayingCommand=!1;renderers={};status=0;config;corePluginConfig;uiPluginConfig;state;selection;getters;coreGetters;uuidGenerator;handlers=[];uiHandlers=[];coreHandlers=[];constructor(e={},n={},r=[],i=new wc,a=!1){let o=performance.now();console.debug(`##### Model creation #####`),super(),Jn(),r=Wh(e,r);let s=Rh(e,a);this.state=new nV,this.uuidGenerator=i,this.config=this.setupConfig(n),this.session=this.setupSession(s.revisionId),this.coreGetters={},this.range=new WL(this.coreGetters),this.coreGetters.getRangeString=this.range.getRangeString.bind(this.range),this.coreGetters.getRangeFromSheetXC=this.range.getRangeFromSheetXC.bind(this.range),this.coreGetters.createAdaptedRanges=this.range.createAdaptedRanges.bind(this.range),this.coreGetters.getRangeDataFromXc=this.range.getRangeDataFromXc.bind(this.range),this.coreGetters.getRangeDataFromZone=this.range.getRangeDataFromZone.bind(this.range),this.coreGetters.getRangeFromRangeData=this.range.getRangeFromRangeData.bind(this.range),this.coreGetters.getRangeFromZone=this.range.getRangeFromZone.bind(this.range),this.coreGetters.recomputeRanges=this.range.recomputeRanges.bind(this.range),this.coreGetters.isRangeValid=this.range.isRangeValid.bind(this.range),this.coreGetters.extendRange=this.range.extendRange.bind(this.range),this.coreGetters.getRangesUnion=this.range.getRangesUnion.bind(this.range),this.coreGetters.removeRangesSheetPrefix=this.range.removeRangesSheetPrefix.bind(this.range),this.getters={isReadonly:()=>this.config.mode===`readonly`||this.config.mode===`dashboard`,isDashboard:()=>this.config.mode===`dashboard`},this.selection=new eV(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of cB.getAll())this.setupCorePlugin(e,s);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(r);for(let e of dB.getAll()){let t=this.setupUiPlugin(e);this.coreViewsPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(let e of uB.getAll()){let t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of lB.getAll()){let t=this.setupUiPlugin(e);this.featurePlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}if(this.uuidGenerator.setIsFastStrategy(!1),this.dispatch(`START`),this.selection.observe(this,{handleEvent:()=>this.trigger(`update`)}),this.setupSessionEvents(),this.joinSession(),n.snapshotRequested||e[`[Content_Types].xml`]&&!this.getters.isReadonly()){let e=performance.now();console.debug(`Snapshot requested`),this.session.snapshot(this.exportData()),this.garbageCollectExternalResources(),console.debug(`Snapshot taken in`,performance.now()-e,`ms`)}(0,t.markRaw)(this),console.debug(`Model created in`,performance.now()-o,`ms`),console.debug(`######`)}joinSession(){this.session.join(this.config.client)}async leaveSession(){let e=this.getters.isReadonly()?void 0:Et(()=>this.exportData());await this.session.leave(e)}setupUiPlugin(e){let t=new e(this.uiPluginConfig);for(let n of e.getters){if(!(n in t))throw Error(`Invalid getter name: ${n} for plugin ${t.constructor}`);if(n in this.getters)throw Error(`Getter "${n}" is already defined.`);this.getters[n]=t[n].bind(t)}for(let n of e.layers)this.renderers[n]||(this.renderers[n]=[]),this.renderers[n].push(t);return t}setupCorePlugin(e,t){let n=new e(this.corePluginConfig);for(let t of e.getters){if(!(t in n))throw Error(`Invalid getter name: ${t} for plugin ${n.constructor}`);if(t in this.coreGetters)throw Error(`Getter "${t}" is already defined.`);this.coreGetters[t]=n[t].bind(n)}n.import(t),this.corePlugins.push(n),this.coreHandlers.push(n),this.handlers.push(n)}onRemoteRevisionReceived({commands:e}){for(let t of e){let e=this.status;this.status=2,this.dispatchToHandlers(this.statefulUIPlugins,t),this.status=e}this.finalize()}setupSession(e){return new lz(XB({initialRevisionId:e,recordChanges:this.state.recordChanges.bind(this.state),dispatch:e=>{if(!this.checkDispatchAllowed(e).isSuccessful){this.dispatchToHandlers(this.coreHandlers,{type:`UNDO`,commands:[e]});return}this.isReplayingCommand=!0,this.dispatchToHandlers(this.coreHandlers,e),this.isReplayingCommand=!1}}),this.config.transportService,e)}setupSessionEvents(){this.session.on(`remote-revision-received`,this,this.onRemoteRevisionReceived),this.session.on(`revision-undone`,this,({commands:e})=>{this.dispatchFromCorePlugin(`UNDO`,{commands:e}),this.finalize()}),this.session.on(`revision-redone`,this,({commands:e})=>{this.dispatchFromCorePlugin(`REDO`,{commands:e}),this.finalize()}),this.session.on(`unexpected-revision-id`,this,()=>this.trigger(`unexpected-revision-id`)),this.session.on(`collaborative-event-received`,this,()=>{this.trigger(`update`)})}setupConfig(e){let t=e.client||{id:this.uuidGenerator.smallUuid(),name:E(`Anonymous`).toString()},n=e.transportService||new HB;return{...e,mode:e.mode||`normal`,custom:e.custom||{},external:this.setupExternalConfig(e.external||{}),transportService:n,client:t,moveClient:()=>{},snapshotRequested:!1,notifyUI:e=>this.trigger(`notify-ui`,e),raiseBlockingErrorUI:e=>this.trigger(`raise-error-ui`,{text:e}),customColors:e.customColors||[]}}setupExternalConfig(e){let t=e.loadLocales||(()=>Promise.resolve(Xi));return{...e,loadLocales:t}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,canDispatch:this.canDispatch,uuidGenerator:this.uuidGenerator,custom:this.config.custom,external:this.config.external}}setupUiPluginConfig(){return{getters:this.getters,stateObserver:this.state,dispatch:this.dispatch,canDispatch:this.canDispatch,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[]}}checkDispatchAllowed(e){let t=Gi(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some(e=>e!==`Success`)?new qi(t.flat()):qi.Success}checkDispatchAllowedCoreCommand(e){let t=this.corePlugins.map(t=>t.allowDispatch(e));return t.push(this.range.allowDispatch(e)),t}checkDispatchAllowedLocalCommand(e){return this.uiHandlers.map(t=>t.allowDispatch(e))}finalize(){this.status=3;for(let e of this.handlers)e.finalize();this.status=0,this.trigger(`command-finalized`)}canDispatch=(e,t)=>this.checkDispatchAllowed(IH(e,t));dispatch=(e,t)=>{let n=IH(e,t),r=this.status;if(this.getters.isReadonly()&&!Ki(n))return new qi(`Readonly`);if(!this.session.canApplyOptimisticUpdate())return new qi(`WaitingSessionConfirmation`);switch(r){case 0:let t=this.checkDispatchAllowed(n);if(!t.isSuccessful)return this.trigger(`update`),t;this.status=1;let{changes:r,commands:i}=this.state.recordChanges(()=>{let t=performance.now();Gi(n)&&this.state.addCommand(n),this.dispatchToHandlers(this.handlers,n),this.finalize();let r=performance.now()-t;r>5&&console.debug(e,r,`ms`)});this.session.save(n,i,r),this.status=0,this.trigger(`update`);break;case 1:if(Gi(n)){let e=this.checkDispatchAllowed(n);if(!e.isSuccessful)return e;this.state.addCommand(n)}this.dispatchToHandlers(this.handlers,n);break;case 3:throw Error(`Cannot dispatch commands in the finalize state`);case 2:if(Gi(n))throw Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,n)}return qi.Success};dispatchFromCorePlugin=(e,t)=>{let n=IH(e,t),r=this.status;this.status=2;let i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,n),this.status=r,qi.Success};dispatchToHandlers(e,t){let n=Gi(t);for(let r of e)!n&&r instanceof DL||r.beforeHandle(t);for(let r of e)!n&&r instanceof DL||r.handle(t);this.trigger(`command-dispatched`,t)}drawLayer(e,t){let n=this.renderers[t];if(n)for(let r of n)e.ctx.save(),r.drawLayer(e,t),e.ctx.restore()}exportData(){let e=Xh();for(let t of this.handlers)t instanceof DL&&t.export(e);return e.revisionId=this.session.getRevisionId()||`START_REVISION`,e=y(e),e}updateMode(e){this.config.mode=e,this.trigger(`update`)}exportXLSX(){this.dispatch(`EVALUATE_CELLS`);let e=Qh();for(let t of this.handlers)t instanceof EL&&t.exportForExcel(e);return e=y(e),wH(e)}garbageCollectExternalResources(){for(let e of this.corePlugins)e.garbageCollectExternalResources()}};function IH(e,t={}){let n=y(t);return n.type=e,n}let LH={},RH={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:26,HEADER_WIDTH:48,TOPBAR_HEIGHT:63,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:96,DEFAULT_CELL_HEIGHT:23,SCROLLBAR_WIDTH:15},zH={autoCompleteProviders:c_,autofillModifiersRegistry:$E,autofillRulesRegistry:eD,cellMenuRegistry:yj,colMenuRegistry:dN,errorTypes:ta,linkMenuRegistry:nk,functionRegistry:RT,featurePluginRegistry:lB,iconsOnCellRegistry:pf,statefulUIPluginRegistry:uB,coreViewsPluginRegistry:dB,corePluginRegistry:cB,rowMenuRegistry:gN,sidePanelRegistry:pI,figureRegistry:pO,chartSidePanelComponentRegistry:rP,chartComponentRegistry:aO,chartRegistry:iO,chartSubtypeRegistry:sO,topbarMenuRegistry:SN,topbarComponentRegistry:wN,clickableCellRegistry:fB,otRegistry:CN,inverseCommandRegistry:yO,urlRegistry:Xa,cellPopoverRegistry:uD,numberFormatMenuRegistry:fN,repeatLocalCommandTransformRegistry:Wz,repeatCommandTransformRegistry:Uz,clipboardHandlersRegistries:ed,pivotRegistry:jF,pivotTimeAdapterRegistry:lu,pivotSidePanelRegistry:LF,pivotNormalizationValueRegistry:Bu,supportedPivotPositionalFormulaRegistry:JE,pivotToFunctionValueRegistry:Vu,migrationStepRegistry:Fh},BH={arg:Y,isEvaluationError:P,toBoolean:L,toJsDate:R,toNumber:F,toString:I,toNormalizedPivotValue:Iu,toXC:w,toZone:Qn,toUnboundedZone:Zn,toCartesian:Pn,numberToLetters:Tn,lettersToNumber:En,UuidGenerator:wc,formatValue:B,createCurrencyFormat:Qo,ColorGenerator:wn,computeTextWidth:sc,createEmptyWorkbookData:Xh,createEmptySheet:Yh,createEmptyExcelSheet:Zh,getDefaultChartJsRuntime:Xg,chartFontColor:Dd,getChartAxisTitleRuntime:Md,getChartAxisType:wD,getTrendDatasetForBarChart:Fd,getTrendDatasetForLineChart:jD,getFillingMode:t_,rgbaToHex:cn,colorToRGBA:ln,positionToZone:D,isDefined:S,isMatrix:A,lazy:Et,genericRepeat:Gz,createAction:m,createActions:f,transformRangeData:nd,deepEquals:C,overlap:ur,union:or,isInside:dr,deepCopy:y,expandZoneOnInsertion:nr,reduceZoneOnDeletion:ar,unquote:at,getMaxObjectId:Ou,getFunctionsFromTokens:LE,getFirstPivotFunction:GE,getNumberOfPivotFunctions:qE,parseDimension:ju,isDateOrDatetimeField:Mu,makeFieldProposal:BE,insertTokenAfterArgSeparator:HE,insertTokenAfterLeftParenthesis:UE,mergeContiguousZones:jr,getPivotHighlights:vN,pivotTimeAdapter:uu,UNDO_REDO_PIVOT_COMMANDS:AR,createPivotFormula:Fu,areDomainArgsFieldsValid:Pu,splitReference:Vs,formatTickValue:zd,sanitizeSheetName:st,isNumber:Oi,isDateTime:Xr},VH={isMarkdownLink:pt,parseMarkdownLink:gt,markdownLink:ht,openLink:to,urlRepresentation:eo},HH={Checkbox:TN,Section:Z,RoundColorPicker:HN,ChartDataSeries:kN,ChartErrorSection:jN,ChartLabelRange:MN,ChartTitle:WN,ChartPanel:oP,ChartFigure:lO,ChartJsComponent:o_,Grid:CL,GridOverlay:eL,ScorecardChart:s_,LineConfigPanel:ZN,BarConfigPanel:PN,PieChartDesignPanel:QN,GenericChartConfigPanel:NN,ChartWithAxisDesignPanel:qN,GaugeChartConfigPanel:YN,GaugeChartDesignPanel:XN,ScorecardChartConfigPanel:eP,ScorecardChartDesignPanel:tP,ChartTypePicker:iP,FigureComponent:mI,Menu:pk,Popover:lk,SelectionInput:ON,ValidationMessages:AN,AddDimensionButton:tF,PivotDimensionGranularity:aF,PivotDimensionOrder:oF,PivotDimension:iF,PivotLayoutConfigurator:lF,PivotHTMLRenderer:TL,EditableName:wL,PivotDeferUpdate:$P,PivotTitleSection:uF,CogWheelMenu:rF,TextInput:nF,SidePanelCollapsible:IN},UH={useDragAndDropListItems:fP,useHighlights:bP,useHighlightsOnHover:yP},WH={useStoreProvider:cd,DependencyContainer:id,CellPopoverStore:GO,ComposerFocusStore:_d,CellComposerStore:EI,FindAndReplaceStore:qP,HighlightStore:xN,HoveredCellStore:WO,ModelStore:pd,NotificationStore:sP,RendererStore:md,SelectionInputStore:DN,SpreadsheetStore:hd,useStore:V,useLocalStore:ld,SidePanelStore:yL,PivotSidePanelStore:FF,PivotMeasureDisplayPanelStore:ZP};function GH(e,t){return RT.add(e,t),{addFunction:(e,t)=>GH(e,t)}}let KH={DEFAULT_LOCALE:k,HIGHLIGHT_COLOR:_,PIVOT_TABLE_CONFIG:Ze,TREND_LINE_XAXIS_ID:`x1`,CHART_AXIS_CHOICES:Vd,ChartTerms:ag};e.AbstractCellClipboardHandler=Pc,e.AbstractChart=Ag,e.AbstractFigureClipboardHandler=Gu,e.CellErrorType=j,e.CommandResult=Yi,e.CorePlugin=DL,e.DispatchResult=qi,e.EvaluationError=M,e.Model=FH,e.PivotRuntimeDefinition=dF,e.Registry=h,e.Revision=sz,e.SPREADSHEET_DIMENSIONS=RH,e.Spreadsheet=VB,e.SpreadsheetPivotTable=hF,e.UIPlugin=$,e.__info__=LH,e.addFunction=GH,e.addRenderingLayer=ea,e.astToFormula=bC,e.compile=OE,e.compileTokens=kE,e.components=HH,e.constants=KH,e.convertAstNodes=gC,e.coreTypes=Wi,e.findCellInNewZone=Sr,e.functionCache=DE,e.helpers=BH,e.hooks=UH,e.invalidateCFEvaluationCommands=Vi,e.invalidateDependenciesCommands=Bi,e.invalidateEvaluationCommands=Ri,e.iterateAstNodes=_C,e.links=VH,e.load=Rh,e.parse=mC,e.parseTokens=hC,e.readonlyAllowedCommands=Ui,e.registries=zH,e.setDefaultSheetViewSize=Ye,e.setTranslationMethod=qn,e.stores=WH,e.tokenColors=_E,e.tokenize=Rc,LH.version=`18.0.71`,LH.date=`2026-06-17T08:50:04.188Z`,LH.hash=`18d4601`})(this.o_spreadsheet=this.o_spreadsheet||{},owl);
@@ -1,9 +1,9 @@
1
1
  <!--
2
2
  This file is generated by o-spreadsheet build tools. Do not edit it.
3
3
  @see https://github.com/odoo/o-spreadsheet
4
- @version 18.0.70
5
- @date 2026-06-06T06:20:40.849Z
6
- @hash 3ff29f6
4
+ @version 18.0.71
5
+ @date 2026-06-17T08:50:04.926Z
6
+ @hash 18d4601
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ActionButton">
@@ -8,10 +8,10 @@ export declare class FindAndReplaceStore extends SpreadsheetStore implements Hig
8
8
  private allSheetsMatches;
9
9
  private activeSheetMatches;
10
10
  private specificRangeMatches;
11
+ private selectedMatchPosition;
11
12
  private currentSearchRegex;
12
13
  private isSearchDirty;
13
14
  private initialShowFormulaState;
14
- private preserveSelectedMatchIndex;
15
15
  private irreplaceableMatchCount;
16
16
  private notificationStore;
17
17
  selectedMatchIndex: number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "18.0.70",
3
+ "version": "18.0.71",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",