@8sheets/data-grid 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/api/serialize.js +1 -1
- package/calc/engine.js +1 -1
- package/calc/functions/info.js +1 -1
- package/calcx/lang/convert.js +1 -1
- package/cells/book-css.js +7 -2
- package/cells/cf-engine.js +1 -1
- package/cells/find-engine.js +2 -2
- package/cells/find.js +1 -1
- package/cells/goto.js +1 -1
- package/cells/link-model.js +1 -0
- package/cells/selection-modes.js +1 -1
- package/celltypes/dropdowns.js +2 -2
- package/core/cond-format.js +1 -1
- package/core/culture.js +1 -1
- package/core/edit-ranges.js +1 -0
- package/core/host-rules.js +1 -0
- package/core/protection.js +1 -1
- package/core/sheet.js +1 -1
- package/core/structure.js +1 -1
- package/core/workbook.js +1 -1
- package/datasheets/manager.js +1 -1
- package/datasheets/persist.js +1 -1
- package/extras/getdata/persist.js +2 -2
- package/i18n/en/cells.js +1 -1
- package/i18n/en/format.js +1 -1
- package/i18n/en/misc.js +1 -1
- package/i18n/en/ribbon.js +1 -1
- package/i18n/pl/cells.js +1 -1
- package/i18n/pl/format.js +1 -1
- package/i18n/pl/misc.js +1 -1
- package/i18n/pl/ribbon.js +1 -1
- package/io/client.js +1 -1
- package/io/csv.js +7 -7
- package/io/encoding.js +1 -0
- package/io/foreign-sheets.js +2 -2
- package/io/plan.js +1 -1
- package/io/xlsx-tail.js +1 -1
- package/io/xlsx-write.js +2 -2
- package/package.json +1 -1
- package/pivot/engine.js +1 -1
- package/pivot/xml.js +2 -2
- package/print/note-pages.js +2 -0
- package/print/paginate.js +1 -1
- package/print/pdf-links.js +1 -0
- package/print/pdf.js +11 -11
- package/print/render-page.js +3 -3
- package/table-view/files.js +1 -1
- package/table-view/mount.js +1 -1
- package/table-view/version.js +1 -1
- package/ui/dialogs.js +3 -3
- package/ui/icons.js +1 -1
- package/ui/protection-ui.js +1 -1
package/i18n/pl/ribbon.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={Themes:"Motywy",Background:"Tło","Delete Background":"Usuń tło","Sheet Left-to-Right":"Arkusz od lewej do prawej","Sheet Right-to-Left":"Arkusz od prawej do lewej",Scripts:"Skrypty","Stop Recording":"Zatrzymaj rejestrowanie","Record Actions":"Rejestruj akcje",PivotTable:"Tabela przestawna","Recommended PivotTables":"Polecane tabele przestawne","this app doesn't suggest PivotTables yet":"ta aplikacja nie podpowiada jeszcze tabel przestawnych","Insert Table":"Wstaw tabelę","Table Sheet":"Arkusz tabeli","New TableSheet from the selection":"Nowy arkusz tabeli z zaznaczenia","Gantt Sheet":"Arkusz Gantta","New project plan":"Nowy plan projektu","Report Sheet":"Arkusz raportu","New report template":"Nowy szablon raportu","Field List":"Lista pól","Bind cells to JSON data or a table record":"Powiąż komórki z danymi JSON lub rekordem tabeli",Forms:"Formularze","Microsoft Forms needs an online service; the owner decides on those":"Microsoft Forms wymaga usługi online; o takich usługach decyduje właściciel","From Picture":"Z obrazu","reading a table from a picture needs an online service; the owner decides on those":"odczytanie tabeli z obrazu wymaga usługi online; o takich usługach decyduje właściciel",Shapes:"Kształty",Pictures:"Obrazy",Icons:"Ikony","3D Models":"Modele 3D","this app can't show 3D models; those in opened files show their picture and stay in the file":"ta aplikacja nie wyświetla modeli 3D; modele w otwartych plikach są pokazywane jako obraz i pozostają w pliku",Audio:"Dźwięk","this app can't play sounds; those in opened files show their picture and stay in the file":"ta aplikacja nie odtwarza dźwięków; dźwięki w otwartych plikach są pokazywane jako obraz i pozostają w pliku",Video:"Wideo","this app can't play movies; those in opened files show their picture and stay in the file":"ta aplikacja nie odtwarza filmów; filmy w otwartych plikach są pokazywane jako obraz i pozostają w pliku",SmartArt:"SmartArt","new SmartArt needs a layout engine, which is the owner's decision; SmartArt in opened files shows, moves and takes text edits":"nowy SmartArt wymaga mechanizmu układu, o którym decyduje właściciel; SmartArt z otwartych plików jest wyświetlany, można go przenosić i edytować w nim tekst",Screenshot:"Zrzut ekranu","a web page can't capture other windows without screen sharing":"strona internetowa nie może przechwycić innych okien bez udostępniania ekranu",Checkbox:"Pole wyboru","Recommended Charts":"Polecane wykresy","this app doesn't suggest charts yet; All Charts lists every type":"ta aplikacja nie podpowiada jeszcze wykresów; okno Wszystkie wykresy zawiera każdy typ","Column or Bar":"Wykres kolumnowy lub słupkowy","Line or Area":"Wykres liniowy lub warstwowy","Pie or Doughnut":"Wykres kołowy lub pierścieniowy",Hierarchy:"Hierarchia",Statistic:"Statystyczne","Scatter or Bubble":"Wykres punktowy lub bąbelkowy","Waterfall, Funnel, Stock, Surface or Radar":"Wykres kaskadowy, lejkowy, giełdowy, powierzchniowy lub radarowy",Combo:"Kombi","More Column Charts…":"Więcej wykresów kolumnowych…","More Line Charts…":"Więcej wykresów liniowych…","More Pie Charts…":"Więcej wykresów kołowych…","More Treemap Charts…":"Więcej wykresów typu mapa drzewa…","More Histogram Charts…":"Więcej wykresów typu histogram…","More X Y (Scatter) Charts…":"Więcej wykresów punktowych (XY)…","More Stock Charts…":"Więcej wykresów giełdowych…","More Combo Charts…":"Więcej wykresów kombi…","More Map Charts…":"Więcej wykresów typu mapa…","All Charts":"Wszystkie wykresy",Maps:"Mapy",PivotChart:"Wykres przestawny","Data Chart":"Wykres danych","Chart from a data table":"Wykres z tabeli danych",Sparklines:"Wykresy przebiegu w czasie","Line…":"Liniowy…","Column…":"Kolumnowy…","Win/Loss…":"Zysk/strata…",Slicer:"Fragmentator",Timeline:"Oś czasu","New Comment":"Nowy komentarz","New Note":"Nowa notatka","Text Box":"Pole tekstowe","Click or drag on the sheet to draw the text box.":"Kliknij lub przeciągnij na arkuszu, aby narysować pole tekstowe.","Header & Footer":"Nagłówek i stopka",WordArt:"WordArt",Object:"Obiekt","embedding objects needs the operating system's object servers, which a browser can't reach":"osadzanie obiektów wymaga serwerów obiektów systemu operacyjnego, do których przeglądarka nie ma dostępu",Equation:"Równanie","the equation editor isn't built yet":"edytor równań nie jest jeszcze gotowy",Symbol:"Symbol","Select a cell in a PivotTable first, or insert a PivotTable.":"Najpierw zaznacz komórkę w tabeli przestawnej lub wstaw tabelę przestawną.","Bring to Front":"Przesuń na wierzch","Send to Back":"Przesuń na spód","Delete Object":"Usuń obiekt","Python in Excel runs on Microsoft's cloud service":"język Python w programie Excel działa w usłudze w chmurze firmy Microsoft","Insert Function":"Wstaw funkcję",AutoSum:"Autosumowanie","Count Numbers":"Zlicz liczby",Max:"Maksimum",Min:"Minimum","More Functions…":"Więcej funkcji…","Recently Used":"Ostatnio używane",Financial:"Finansowe",Logical:"Logiczne","fn|Text":"Tekstowe","Date & Time":"Daty i godziny","Lookup & Reference":"Wyszukiwanie i odwołania","Math & Trig":"Matematyczne i trygonometryczne","More Functions":"Więcej funkcji","More functions":"Więcej funkcji","Statistical…":"Statystyczne…","Engineering…":"Inżynierskie…","Information…":"Informacyjne…","Database…":"Bazy danych…","Insert Python":"Wstaw Python",Editor:"Edytor",Initialization:"Inicjowanie","Name Manager":"Menedżer nazw","Define Name":"Definiuj nazwę","Define Name…":"Definiuj nazwę…","Apply Names…":"Zastosuj nazwy…","Use in Formula":"Użyj w formule","Use a name in a formula":"Użyj nazwy w formule","Paste Names…":"Wklej nazwy…","Create from Selection":"Utwórz z zaznaczenia","Trace Precedents":"Śledź poprzedniki","Trace Dependents":"Śledź zależności","Remove Arrows":"Usuń strzałki","Show Formulas":"Pokaż formuły","Error Checking":"Sprawdzanie błędów","Error Checking…":"Sprawdzanie błędów…","Trace Error":"Śledź błąd","Watch Window":"Okno czujki","cmd|Evaluate Formula":"Szacuj formułę","Calculation Options":"Opcje obliczania","Calculation options":"Opcje obliczania","Calculate Now":"Oblicz teraz","Calculate Sheet":"Oblicz arkusz","Calculation settings":"Ustawienia obliczania","Formula Editor":"Edytor formuł","Trace Links":"Śledź łącza","Formula Language":"Język formuł","AI Assistant":"Asystent AI","AI Settings":"Ustawienia AI","Get Data":"Pobierz dane","Data from Picture":"Dane z obrazu","Refresh All":"Odśwież wszystko","Queries & Connections":"Zapytania i połączenia","a query's settings are under Queries & Connections, Edit":"ustawienia zapytania są dostępne w oknie Zapytania i połączenia, polecenie Edytuj","Workbook Links":"Linki skoroszytu",Stocks:"Akcje",Currencies:"Waluty",Geography:"Geografia","Stocks data comes from Microsoft's online service; data types in opened files show their saved fields":"dane typu Akcje pochodzą z usługi online firmy Microsoft; typy danych w otwartych plikach pokazują zapisane pola","Currencies data comes from Microsoft's online service; data types in opened files show their saved fields":"dane typu Waluty pochodzą z usługi online firmy Microsoft; typy danych w otwartych plikach pokazują zapisane pola","Geography data comes from Microsoft's online service; data types in opened files show their saved fields":"dane typu Geografia pochodzą z usługi online firmy Microsoft; typy danych w otwartych plikach pokazują zapisane pola","Sort A to Z":"Sortuj od A do Z","Sort Z to A":"Sortuj od Z do A",Reapply:"Zastosuj ponownie",Advanced:"Zaawansowane","Text to Columns":"Tekst jako kolumny","Clean Data":"Wyczyść dane","Clean Data is a Copilot feature that needs an online service; the owner decides on those":"funkcja Wyczyść dane należy do Copilot i wymaga usługi online; o takich usługach decyduje właściciel","Analyze Data":"Analizuj dane","Analyze Data needs an online service; the owner decides on those":"funkcja Analizuj dane wymaga usługi online; o takich usługach decyduje właściciel","Flash Fill":"Wypełnianie błyskawiczne","Remove Duplicates":"Usuń duplikaty","Data Validation":"Poprawność danych",Consolidate:"Konsoliduj","Cell Type":"Typ komórki","Cell type":"Typ komórki","What-If Analysis":"Analiza warunkowa","Scenario Manager…":"Menedżer scenariuszy…","Goal Seek…":"Szukaj wyniku…","Data Table…":"Tabela danych…","Group…":"Grupuj…","Auto Outline":"Autokonspekt","Ungroup…":"Rozgrupuj…","Clear Outline":"Wyczyść konspekt",Subtotal:"Suma częściowa","Show Detail":"Pokaż szczegóły","Hide Detail":"Ukryj szczegóły",Outline:"Konspekt","Analysis Tools":"Narzędzia analizy","the Analysis ToolPak's procedures aren't built yet":"procedury dodatku Analysis ToolPak nie są jeszcze gotowe",Spelling:"Pisownia",Thesaurus:"Tezaurus","Workbook Statistics":"Statystyki skoroszytu","AutoCorrect Options":"Opcje Autokorekty","cmd|Check Accessibility":"Sprawdź ułatwienia dostępu","Show Changes":"Pokaż zmiany","Delete Comment":"Usuń komentarz","Previous Comment":"Poprzedni komentarz","Next Comment":"Następny komentarz","Show Comments":"Pokaż komentarze","Protect Sheet":"Chroń arkusz","Unprotect Sheet":"Nie chroń arkusza","Protect Workbook":"Chroń skoroszyt","Unprotect Workbook":"Nie chroń skoroszytu","Always Open Read-Only":"Zawsze otwieraj tylko do odczytu","Always Open Read-Only":"Zawsze otwieraj tylko do odczytu","Hide Ink":"Ukryj pismo odręczne","Edit Note":"Edytuj notatkę","Previous Note":"Poprzednia notatka","Next Note":"Następna notatka","Show Note":"Pokaż notatkę","Hide Note":"Ukryj notatkę","Show All Notes":"Pokaż wszystkie notatki","Hide All Notes":"Ukryj wszystkie notatki","Delete Note":"Usuń notatkę","Format Note…":"Formatuj notatkę…","Convert to Comments":"Konwertuj na komentarze","Not available yet: notes can't be turned into threaded comments yet":"Jeszcze niedostępne: notatek nie można jeszcze przekształcić w komentarze wątkowe","Paste and Match Formatting":"Wklej i dopasuj formatowanie","Format Painter":"Malarz formatów","Font size":"Rozmiar czcionki","Increase font size":"Zwiększ rozmiar czcionki","Decrease font size":"Zmniejsz rozmiar czcionki","Bold (⌘B)":"Pogrubienie (⌘B)","Italic (⌘I)":"Kursywa (⌘I)","Underline (⌘U)":"Podkreślenie (⌘U)","Strikethrough (⇧⌘X)":"Przekreślenie (⇧⌘X)",Superscript:"Indeks górny",Subscript:"Indeks dolny",Borders:"Obramowania","Bottom Border":"Dolna krawędź","Top Border":"Górna krawędź","Left Border":"Lewa krawędź","Right Border":"Prawa krawędź","No Border":"Bez krawędzi","All Borders":"Wszystkie krawędzie","Outside Borders":"Krawędzie zewnętrzne","Thick Outside Borders":"Grube krawędzie zewnętrzne","Bottom Double Border":"Podwójna krawędź dolna","Thick Bottom Border":"Gruba krawędź dolna","Top and Bottom Border":"Krawędź górna i dolna","Top and Thick Bottom Border":"Krawędź górna i gruba dolna","Top and Double Bottom Border":"Krawędź górna i podwójna dolna","More Borders…":"Więcej krawędzi…","Draw Border":"Rysuj obramowanie","Draw Border Grid":"Rysuj siatkę obramowania","Erase Border":"Wymaż obramowanie","Line Color":"Kolor linii","Line Style":"Styl linii",Hair:"Włosowa",Dotted:"Kropkowana",Dashed:"Kreskowana","Dash Dot Dot":"Kreska-kropka-kropka","Medium Dashed":"Średnia kreskowana","Medium Dash Dot":"Średnia kreska-kropka","Medium Dash Dot Dot":"Średnia kreska-kropka-kropka","Slanted Dash Dot":"Ukośna kreska-kropka",Thick:"Gruba","Fill color":"Kolor wypełnienia","Font color":"Kolor czcionki","Top align":"Wyrównaj do góry","Middle align":"Wyrównaj do środka","Bottom align":"Wyrównaj do dołu",Orientation:"Orientacja","Angle Counterclockwise":"Obróć tekst w lewo","Angle Clockwise":"Obróć tekst w prawo","Vertical Text":"Tekst pionowy","Rotate Text Up":"Obróć tekst w górę","Rotate Text Down":"Obróć tekst w dół",Horizontal:"Poziomo","Align left":"Wyrównaj do lewej","cmd|Center":"Wyśrodkuj","Align right":"Wyrównaj do prawej","Decrease indent":"Zmniejsz wcięcie","Increase indent":"Zwiększ wcięcie","Wrap Text":"Zawijaj tekst","Merge & Center":"Scal i wyśrodkuj","Merge Across":"Scal wszystkie","Merge Cells":"Scal komórki","Unmerge Cells":"Rozdziel komórki","numfmt|Number format":"Format liczb","numfmt|Number":"Liczbowe","numfmt|Currency":"Walutowe","numfmt|Accounting":"Księgowe","numfmt|Short Date":"Data krótka","numfmt|Long Date":"Data długa","numfmt|Time":"Czas","numfmt|Percentage":"Procentowe","numfmt|Fraction":"Ułamkowe","numfmt|Scientific":"Naukowe","numfmt|Text":"Tekstowe",Custom:"Niestandardowe","Accounting format":"Format liczb księgowych","Percent style":"Zapis procentowy","Comma style":"Zapis dziesiętny","Increase decimal":"Zwiększ dziesiętne","Decrease decimal":"Zmniejsz dziesiętne","Conditional Formatting":"Formatowanie warunkowe","Format as Table":"Formatuj jako tabelę","Cell Styles":"Style komórki","Insert Cells…":"Wstaw komórki…","Insert Cells: Shift Down":"Wstaw komórki: przesuń w dół","Insert Cells: Shift Right":"Wstaw komórki: przesuń w prawo","Insert Sheet Rows":"Wstaw wiersze arkusza","Insert Sheet Columns":"Wstaw kolumny arkusza","Insert Sheet":"Wstaw arkusz","Insert Chart Sheet":"Wstaw arkusz wykresu","Delete Cells…":"Usuń komórki…","Delete Cells: Shift Up":"Usuń komórki: przesuń w górę","Delete Cells: Shift Left":"Usuń komórki: przesuń w lewo","Delete Sheet Rows":"Usuń wiersze arkusza","Delete Sheet Columns":"Usuń kolumny arkusza","Cell Options":"Opcje komórki","cmd|Fill":"Wypełnij","Sort & Filter":"Sortuj i filtruj","Custom Sort…":"Sortowanie niestandardowe…","Clear Filter":"Wyczyść filtr","Find & Select":"Znajdź i zaznacz","Find…":"Znajdź…","Replace…":"Zamień…","Go To…":"Przejdź do…","Go To Special…":"Przejdź do — specjalnie…",Constants:"Stałe","Selection Pane…":"Okienko zaznaczenia…","this app shows each workbook in one browser tab, with one window":"ta aplikacja pokazuje każdy skoroszyt w jednej karcie przeglądarki, w jednym oknie","sheet views belong to workbooks shared online; the owner decides on online services":"widoki arkusza dotyczą skoroszytów udostępnianych online; o usługach online decyduje właściciel","Sheet View":"Widok arkusza",Keep:"Zachowaj",Exit:"Zakończ","Custom Views":"Widoki niestandardowe",Ruler:"Linijka","The ruler shows in Page Layout view":"Linijka jest widoczna w widoku Układ strony",Gridlines:"Linie siatki","Formula Bar":"Pasek formuły",Headings:"Nagłówki","Message Bar":"Pasek komunikatów","Status Bar":"Pasek stanu","Sheet Tabs":"Karty arkuszy","Outline Symbols":"Symbole konspektu","Zero Values":"Wartości zerowe","Horizontal Scroll Bar":"Poziomy pasek przewijania","Vertical Scroll Bar":"Pionowy pasek przewijania","View Options":"Opcje widoku","Editing Options":"Opcje edycji","Focus Cell":"Komórka fokusu",Shortcuts:"Skróty","Zoom to 100%":"Powiększenie 100%","Zoom to Selection":"Powiększ do zaznaczenia","New Window":"Nowe okno","Arrange All":"Rozmieść wszystko","Freeze Panes":"Zablokuj okienka","Unfreeze Panes":"Odblokuj okienka","Freeze Top Row":"Zablokuj górny wiersz","Freeze First Column":"Zablokuj pierwszą kolumnę",Split:"Podziel","Panes and Sizes":"Okienka i rozmiary","Split, last rows, sizes, moving headers":"Podział, ostatnie wiersze, rozmiary, przesuwane nagłówki","Full Screen":"Pełny ekran","View Side by Side":"Wyświetl obok siebie","Synchronous Scrolling":"Przewijanie synchroniczne","Reset Window Position":"Resetuj położenie okna","Switch Windows":"Przełącz okna",Macros:"Makra","Scripts…":"Skrypty…","Table Name:":"Nazwa tabeli:","Resize Table":"Zmień rozmiar tabeli","New range":"Nowy zakres","That range isn't valid.":"Ten zakres jest nieprawidłowy.","That isn't a valid table name.":"To nie jest prawidłowa nazwa tabeli.","Another table already uses that name.":"Ta nazwa jest już używana przez inną tabelę.","A defined name already uses that name.":"Ta nazwa jest już używana przez nazwę zdefiniowaną.","Clear the row under the table to add a total row.":"Wyczyść wiersz pod tabelą, aby dodać wiersz sumy.","Clear the row above the table to show its headers.":"Wyczyść wiersz nad tabelą, aby pokazać jej nagłówki.","The header row must stay in the same row.":"Wiersz nagłówka musi pozostać w tym samym wierszu.","The table must keep its first column.":"Tabela musi zachować swoją pierwszą kolumnę.","The table needs at least one data row.":"Tabela musi mieć co najmniej jeden wiersz danych.","A table can't overlap another table.":"Tabela nie może nakładać się na inną tabelę.","Summarize with PivotTable":"Podsumuj za pomocą tabeli przestawnej","Insert Slicer":"Wstaw fragmentator","AutoFormat Options":"Opcje Autoformatowania","Convert to Range":"Konwertuj na zakres","Header Row":"Wiersz nagłówka","Total Row":"Wiersz sumy","Banded Rows":"Wiersze naprzemienne","First Column":"Pierwsza kolumna","Last Column":"Ostatnia kolumna","Banded Columns":"Kolumny naprzemienne","Filter Button":"Przycisk filtru","Table Styles":"Style tabeli","Table styles":"Style tabeli","Timeline Caption:":"Podpis osi czasu:","Slicer Caption:":"Podpis fragmentatora:","Timeline Settings":"Ustawienia osi czasu","Slicer Settings":"Ustawienia fragmentatora","Report Connections":"Połączenia raportu","a table slicer filters its own table only":"fragmentator tabeli filtruje tylko swoją tabelę","Timeline Styles":"Style osi czasu","Slicer Styles":"Style fragmentatora","nothing is filtered":"nic nie jest filtrowane","Columns:":"Kolumny:","Size and Properties":"Rozmiar i właściwości","PivotTable Name:":"Nazwa tabeli przestawnej:","That PivotTable name is empty or already in use.":"Ta nazwa tabeli przestawnej jest pusta lub już używana.","Field Settings":"Ustawienia pola","Select a field in the PivotTable first.":"Najpierw zaznacz pole w tabeli przestawnej.","Group Field":"Grupuj pole","Group a field":"Grupuj pole","Ungroup a field":"Rozgrupuj pole","No grouped fields":"Brak zgrupowanych pól","Insert a slicer":"Wstaw fragmentator","Insert Timeline":"Wstaw oś czasu","Insert a timeline":"Wstaw oś czasu","No date fields":"Brak pól daty","Change Data Source":"Zmień źródło danych","Change PivotTable Data Source":"Zmienianie źródła danych tabeli przestawnej","Clear All":"Wyczyść wszystko","Clear Filters":"Wyczyść filtry","Select Entire":"Zaznacz całość","Move PivotTable":"Przenieś tabelę przestawną",Location:"Lokalizacja","That location isn't valid.":"Ta lokalizacja jest nieprawidłowa.","Delete PivotTable":"Usuń tabelę przestawną","Calculated Field":"Pole obliczeniowe","+/- Buttons":"Przyciski +/-","Field Headers":"Nagłówki pól","Do Not Show Subtotals":"Nie pokazuj sum częściowych","Show All Subtotals at Bottom of Group":"Pokaż wszystkie sumy częściowe u dołu grupy","Show All Subtotals at Top of Group":"Pokaż wszystkie sumy częściowe u góry grupy","Off for Rows and Columns":"Wyłączone dla wierszy i kolumn","On for Rows and Columns":"Włączone dla wierszy i kolumn","On for Rows Only":"Włączone tylko dla wierszy","On for Columns Only":"Włączone tylko dla kolumn",Subtotals:"Sumy częściowe","Grand Totals":"Sumy końcowe","Grand totals":"Sumy końcowe","Report Layout":"Układ raportu","Report layout":"Układ raportu","Show in Compact Form":"Pokaż w formie kompaktowej","Show in Outline Form":"Pokaż w formie konspektu","Show in Tabular Form":"Pokaż w formie tabelarycznej","Repeat All Item Labels":"Powtórz wszystkie etykiety elementów","Do Not Repeat Item Labels":"Nie powtarzaj etykiet elementów","Row Headers":"Nagłówki wierszy","Column Headers":"Nagłówki kolumn","PivotTable Styles":"Style tabeli przestawnej","This chart has no cell range to work from.":"Ten wykres nie ma zakresu komórek, na podstawie którego można go odtworzyć.","Switch Row/Column":"Przełącz wiersz/kolumnę","Select Data":"Zaznacz dane","Add Data":"Dodaj dane",Templates:"Szablony","No Outline":"Bez konturu","shape|Fill":"Wypełnienie","shape|Outline":"Kontur",Weight:"Grubość","Outline Weight":"Grubość konturu",Points:"Punkty","Height of the object":"Wysokość obiektu","Width of the object":"Szerokość obiektu","Height (pt)":"Wysokość (pkt)","Width (pt)":"Szerokość (pkt)","(blank)":"(puste)","No changes since tracking began. Edits from now on are listed here.":"Brak zmian od rozpoczęcia śledzenia. Zmiany wprowadzane od teraz będą wyświetlane tutaj.","Shared session":"Sesja udostępniona",Changes:"Zmiany","Changes are kept while this workbook is open. With a shared session, its history comes from the server.":"Zmiany są przechowywane, dopóki ten skoroszyt jest otwarty. W sesji udostępnionej historia pochodzi z serwera.","Black Pen":"Czarne pióro","Red Pen":"Czerwone pióro","Blue Pen":"Niebieskie pióro",Highlighter:"Zakreślacz",Thickness:"Grubość",Select:"Zaznacz","Lasso Select":"Zaznaczanie lassem",Eraser:"Gumka","No scaling":"Bez skalowania","Fit sheet on one page":"Dopasuj arkusz do jednej strony","Fit all columns on one page":"Dopasuj wszystkie kolumny do jednej strony","Fit all rows on one page":"Dopasuj wszystkie wiersze do jednej strony","Custom scale":"Skala niestandardowa","Custom fit":"Dopasowanie niestandardowe","margins|Normal":"Normalne","margins|Wide":"Szerokie","margins|Narrow":"Wąskie",Letter:"Letter",Tabloid:"Tabloid",Ledger:"Ledger",Legal:"Legal",Statement:"Statement",Executive:"Executive","B4 (JIS)":"B4 (JIS)","B5 (JIS)":"B5 (JIS)","Envelope #10":"Koperta nr 10","Envelope DL":"Koperta DL","Envelope C5":"Koperta C5","Print output":"Wydruk","There is nothing to print on this sheet.":"W tym arkuszu nie ma nic do wydrukowania.","Page preview. Use the arrow keys to scroll.":"Podgląd strony. Użyj klawiszy strzałek, aby przewijać.","Page {page} of {count}, sheet {name}":"Strona {page} z {count}, arkusz {name}","Active sheet":"Aktywny arkusz","Entire workbook":"Cały skoroszyt",Selection:"Zaznaczenie",Portrait:"Pionowa",Landscape:"Pozioma","margin|Top":"Górny","margin|Bottom":"Dolny","margin|Left":"Lewy","margin|Right":"Prawy",Header:"Nagłówek",Footer:"Stopka","Scale (%)":"Skala (%)","Pages wide (0 = auto)":"Stron szerokości (0 = automatycznie)","Pages tall (0 = auto)":"Stron wysokości (0 = automatycznie)","Down, then over":"W dół, potem w poprzek","Over, then down":"W poprzek, potem w dół","&CPage &P of &N":"&CStrona &P z &N","Center horizontally":"Wyśrodkuj w poziomie","Center vertically":"Wyśrodkuj w pionie","Print gridlines":"Drukuj linie siatki","Print row and column headings":"Drukuj nagłówki wierszy i kolumn","Black and white":"Czarno-białe","Draft quality":"Jakość robocza","Ignore print area":"Ignoruj obszar wydruku",Paper:"Papier",Margins:"Marginesy",Scaling:"Skalowanie","Page order":"Kolejność stron","First page (Home)":"Pierwsza strona (Home)","Previous page (Page Up)":"Poprzednia strona (Page Up)","Next page (Page Down)":"Następna strona (Page Down)","Last page (End)":"Ostatnia strona (End)","Page number":"Numer strony","Zoom out (-)":"Pomniejsz (-)","Zoom in (+)":"Powiększ (+)",Fit:"Dopasuj","of {total}":"z {total}","No pages":"Brak stron","{pages} pages is too many for browser printing. Save as PDF, then print the file.":"Liczba stron ({pages}) jest za duża do drukowania w przeglądarce. Zapisz jako PDF, a następnie wydrukuj plik.","Preparing pages":"Przygotowywanie stron","Couldn't print: {message}":"Nie można drukować: {message}","Couldn't save: {message}":"Nie można zapisać: {message}","Writing PDF":"Zapisywanie pliku PDF","{count} characters had no font and show as approximations.":{one:"{count} znak nie miał czcionki i jest pokazany w przybliżeniu.",few:"{count} znaki nie miały czcionki i są pokazane w przybliżeniu.",many:"{count} znaków nie miało czcionki i są pokazane w przybliżeniu.",other:"{count} znaku nie miało czcionki i są pokazane w przybliżeniu."},"Saved {file}":"Zapisano plik {file}",Canceled:"Anulowano","Save as PDF":"Zapisz jako PDF","Page navigation and zoom":"Nawigacja stron i powiększenie",Breaks:"Podziały","Print Area":"Obszar wydruku","Print Titles":"Tytuły wydruku","Set Print Area":"Ustaw obszar wydruku","Add to Print Area":"Dodaj do obszaru wydruku","Clear Print Area":"Wyczyść obszar wydruku","Insert Page Break":"Wstaw podział strony","Remove Page Break":"Usuń podział strony","Reset All Page Breaks":"Resetuj wszystkie podziały stron","Rows to Repeat: Selection":"Wiersze do powtarzania: zaznaczenie","Columns to Repeat: Selection":"Kolumny do powtarzania: zaznaczenie","Clear Print Titles":"Wyczyść tytuły wydruku","Page Setup":"Ustawienia strony","fit|Automatic":"Automatycznie","Width:":"Szerokość:","Height:":"Wysokość:",Scale:"Skala","Scale:":"Skala:",View:"Wyświetl","View gridlines":"Wyświetl linie siatki","View headings":"Wyświetl nagłówki","Print headings":"Drukuj nagłówki","Page Layout View is not compatible with Freeze Panes. If you continue, the panes on this sheet will be unfrozen. Would you like to continue?":"Widok Układ strony nie jest zgodny z blokowaniem okienek. Jeśli będziesz kontynuować, okienka w tym arkuszu zostaną odblokowane. Czy chcesz kontynuować?","Header, left section":"Nagłówek, lewa sekcja","Header, center section":"Nagłówek, środkowa sekcja","Header, right section":"Nagłówek, prawa sekcja","Footer, left section":"Stopka, lewa sekcja","Footer, center section":"Stopka, środkowa sekcja","Footer, right section":"Stopka, prawa sekcja","Number of Pages":"Liczba stron","Current Date":"Bieżąca data","Current Time":"Bieżąca godzina","File Path":"Ścieżka pliku","File Name":"Nazwa pliku","Sheet Name":"Nazwa arkusza","Insert Page Number":"Wstaw numer strony","Insert Number of Pages":"Wstaw liczbę stron","Insert Current Date":"Wstaw bieżącą datę","Insert Current Time":"Wstaw bieżącą godzinę","Insert File Path":"Wstaw ścieżkę pliku","Insert File Name":"Wstaw nazwę pliku","Insert Sheet Name":"Wstaw nazwę arkusza","Go to Header":"Przejdź do nagłówka","Go to Footer":"Przejdź do stopki","Different First Page":"Inna pierwsza strona","Different Odd & Even Pages":"Inne strony parzyste i nieparzyste","Scale with Document":"Skaluj z dokumentem","Align with Page Margins":"Wyrównaj do marginesów strony","hf|Page":"Strona","hf|Pages":"Strony","hf|Date":"Data","hf|Time":"Czas","hf|Path":"Ścieżka","hf|File":"Plik","hf|Tab":"Karta","hf|Picture":"Obraz","(none)":"(brak)","(custom)":"(niestandardowy)","Left section":"Lewa sekcja","Center section":"Środkowa sekcja","Right section":"Prawa sekcja","Left section:":"Lewa sekcja:","Center section:":"Środkowa sekcja:","Right section:":"Prawa sekcja:","Insert {code}":"Wstaw {code}","Put the cursor in a section and click a button to insert a code. Type && for an ampersand.":"Umieść kursor w sekcji i kliknij przycisk, aby wstawić kod. Wpisz &&, aby wstawić znak &.","Customize Header…":"Dostosuj nagłówek…","Customize Footer…":"Dostosuj stopkę…","Different odd and even pages":"Inne strony parzyste i nieparzyste","Different first page":"Inna pierwsza strona","Scale with document":"Skaluj z dokumentem","Align with page margins":"Wyrównaj do marginesów strony","Header and Footer":"Nagłówek i stopka","Track Changes (Legacy)":"Śledź zmiany (starsza wersja)","Replaced by collaboration (File > Share…) and Review > Show Changes":"Zastąpione współpracą (Plik > Udostępnij…) i poleceniem Recenzja > Pokaż zmiany","Highlight Changes…":"Wyróżnij zmiany…","Accept or Reject Changes…":"Zaakceptuj lub odrzuć zmiany…","Share Workbook (Legacy)…":"Udostępnij skoroszyt (starsza wersja)…","Compare and Merge Workbooks…":"Porównaj i scal skoroszyty…","More Commands":"Więcej poleceń","Show the Classic Ribbon":"Pokaż klasyczną wstążkę","Show the Simplified Ribbon":"Pokaż uproszczoną wstążkę","Mini Toolbar":"Minipasek narzędzi","Interface Size":"Rozmiar interfejsu","Interface size":"Rozmiar interfejsu","Data Validation…":"Poprawność danych…","Circle Invalid Data":"Zakreśl nieprawidłowe dane","Clear Validation Circles":"Wyczyść zakreślenia sprawdzania poprawności","Rows to repeat at top":"Wiersze do powtarzania u góry","Columns to repeat at left":"Kolumny do powtarzania z lewej","That reference isn't valid.":"To odwołanie jest nieprawidłowe.","Reset Print Area":"Resetuj obszar wydruku","Inside Horizontal Border":"Wewnętrzna krawędź pozioma","Inside Vertical Border":"Wewnętrzna krawędź pionowa","Double Underline":"Podwójne podkreślenie","More Accounting Formats…":"Więcej formatów księgowych…","Format Cell Alignment":"Formatuj wyrównanie komórki","$ English (United States)":"$ angielski (Stany Zjednoczone)","£ English (United Kingdom)":"£ angielski (Wielka Brytania)","€ Euro (€ 123)":"€ euro (€ 123)","¥ Chinese (PRC)":"¥ chiński (ChRL)","zł Polish":"zł polski","CHF French (Switzerland)":"CHF francuski (Szwajcaria)","Text Contains…":"Tekst zawierający…","Unique Values…":"Wartości unikatowe…",Regroup:"Grupuj ponownie"};export{e as default};
|
|
1
|
+
var e={Themes:"Motywy",Background:"Tło","Delete Background":"Usuń tło","Sheet Left-to-Right":"Arkusz od lewej do prawej","Sheet Right-to-Left":"Arkusz od prawej do lewej",Scripts:"Skrypty","Stop Recording":"Zatrzymaj rejestrowanie","Record Actions":"Rejestruj akcje",PivotTable:"Tabela przestawna","Recommended PivotTables":"Polecane tabele przestawne","this app doesn't suggest PivotTables yet":"ta aplikacja nie podpowiada jeszcze tabel przestawnych","Insert Table":"Wstaw tabelę","Table Sheet":"Arkusz tabeli","New TableSheet from the selection":"Nowy arkusz tabeli z zaznaczenia","Gantt Sheet":"Arkusz Gantta","New project plan":"Nowy plan projektu","Report Sheet":"Arkusz raportu","New report template":"Nowy szablon raportu","Field List":"Lista pól","Bind cells to JSON data or a table record":"Powiąż komórki z danymi JSON lub rekordem tabeli",Forms:"Formularze","Microsoft Forms needs an online service; the owner decides on those":"Microsoft Forms wymaga usługi online; o takich usługach decyduje właściciel","From Picture":"Z obrazu","reading a table from a picture needs an online service; the owner decides on those":"odczytanie tabeli z obrazu wymaga usługi online; o takich usługach decyduje właściciel",Shapes:"Kształty",Pictures:"Obrazy",Icons:"Ikony","3D Models":"Modele 3D","this app can't show 3D models; those in opened files show their picture and stay in the file":"ta aplikacja nie wyświetla modeli 3D; modele w otwartych plikach są pokazywane jako obraz i pozostają w pliku",Audio:"Dźwięk","this app can't play sounds; those in opened files show their picture and stay in the file":"ta aplikacja nie odtwarza dźwięków; dźwięki w otwartych plikach są pokazywane jako obraz i pozostają w pliku",Video:"Wideo","this app can't play movies; those in opened files show their picture and stay in the file":"ta aplikacja nie odtwarza filmów; filmy w otwartych plikach są pokazywane jako obraz i pozostają w pliku",SmartArt:"SmartArt","new SmartArt needs a layout engine, which is the owner's decision; SmartArt in opened files shows, moves and takes text edits":"nowy SmartArt wymaga mechanizmu układu, o którym decyduje właściciel; SmartArt z otwartych plików jest wyświetlany, można go przenosić i edytować w nim tekst",Screenshot:"Zrzut ekranu","a web page can't capture other windows without screen sharing":"strona internetowa nie może przechwycić innych okien bez udostępniania ekranu",Checkbox:"Pole wyboru","Recommended Charts":"Polecane wykresy","this app doesn't suggest charts yet; All Charts lists every type":"ta aplikacja nie podpowiada jeszcze wykresów; okno Wszystkie wykresy zawiera każdy typ","Column or Bar":"Wykres kolumnowy lub słupkowy","Line or Area":"Wykres liniowy lub warstwowy","Pie or Doughnut":"Wykres kołowy lub pierścieniowy",Hierarchy:"Hierarchia",Statistic:"Statystyczne","Scatter or Bubble":"Wykres punktowy lub bąbelkowy","Waterfall, Funnel, Stock, Surface or Radar":"Wykres kaskadowy, lejkowy, giełdowy, powierzchniowy lub radarowy",Combo:"Kombi","More Column Charts…":"Więcej wykresów kolumnowych…","More Line Charts…":"Więcej wykresów liniowych…","More Pie Charts…":"Więcej wykresów kołowych…","More Treemap Charts…":"Więcej wykresów typu mapa drzewa…","More Histogram Charts…":"Więcej wykresów typu histogram…","More X Y (Scatter) Charts…":"Więcej wykresów punktowych (XY)…","More Stock Charts…":"Więcej wykresów giełdowych…","More Combo Charts…":"Więcej wykresów kombi…","More Map Charts…":"Więcej wykresów typu mapa…","All Charts":"Wszystkie wykresy",Maps:"Mapy",PivotChart:"Wykres przestawny","Data Chart":"Wykres danych","Chart from a data table":"Wykres z tabeli danych",Sparklines:"Wykresy przebiegu w czasie","Line…":"Liniowy…","Column…":"Kolumnowy…","Win/Loss…":"Zysk/strata…",Slicer:"Fragmentator",Timeline:"Oś czasu","New Comment":"Nowy komentarz","New Note":"Nowa notatka","Text Box":"Pole tekstowe","Click or drag on the sheet to draw the text box.":"Kliknij lub przeciągnij na arkuszu, aby narysować pole tekstowe.","Header & Footer":"Nagłówek i stopka",WordArt:"WordArt",Object:"Obiekt","embedding objects needs the operating system's object servers, which a browser can't reach":"osadzanie obiektów wymaga serwerów obiektów systemu operacyjnego, do których przeglądarka nie ma dostępu",Equation:"Równanie","the equation editor isn't built yet":"edytor równań nie jest jeszcze gotowy",Symbol:"Symbol","Select a cell in a PivotTable first, or insert a PivotTable.":"Najpierw zaznacz komórkę w tabeli przestawnej lub wstaw tabelę przestawną.","Bring to Front":"Przesuń na wierzch","Send to Back":"Przesuń na spód","Delete Object":"Usuń obiekt","Python in Excel runs on Microsoft's cloud service":"język Python w programie Excel działa w usłudze w chmurze firmy Microsoft","Insert Function":"Wstaw funkcję",AutoSum:"Autosumowanie","Count Numbers":"Zlicz liczby",Max:"Maksimum",Min:"Minimum","More Functions…":"Więcej funkcji…","Recently Used":"Ostatnio używane",Financial:"Finansowe",Logical:"Logiczne","fn|Text":"Tekstowe","Date & Time":"Daty i godziny","Lookup & Reference":"Wyszukiwanie i odwołania","Math & Trig":"Matematyczne i trygonometryczne","More Functions":"Więcej funkcji","More functions":"Więcej funkcji","Statistical…":"Statystyczne…","Engineering…":"Inżynierskie…","Information…":"Informacyjne…","Database…":"Bazy danych…","Insert Python":"Wstaw Python",Editor:"Edytor",Initialization:"Inicjowanie","Name Manager":"Menedżer nazw","Define Name":"Definiuj nazwę","Define Name…":"Definiuj nazwę…","Apply Names…":"Zastosuj nazwy…","Use in Formula":"Użyj w formule","Use a name in a formula":"Użyj nazwy w formule","Paste Names…":"Wklej nazwy…","Create from Selection":"Utwórz z zaznaczenia","Trace Precedents":"Śledź poprzedniki","Trace Dependents":"Śledź zależności","Remove Arrows":"Usuń strzałki","Show Formulas":"Pokaż formuły","Error Checking":"Sprawdzanie błędów","Error Checking…":"Sprawdzanie błędów…","Trace Error":"Śledź błąd","Watch Window":"Okno czujki","cmd|Evaluate Formula":"Szacuj formułę","Calculation Options":"Opcje obliczania","Calculation options":"Opcje obliczania","Calculate Now":"Oblicz teraz","Calculate Sheet":"Oblicz arkusz","Calculation settings":"Ustawienia obliczania","Formula Editor":"Edytor formuł","Trace Links":"Śledź łącza","Formula Language":"Język formuł","AI Assistant":"Asystent AI","AI Settings":"Ustawienia AI","Get Data":"Pobierz dane","Data from Picture":"Dane z obrazu","Refresh All":"Odśwież wszystko","Queries & Connections":"Zapytania i połączenia","a query's settings are under Queries & Connections, Edit":"ustawienia zapytania są dostępne w oknie Zapytania i połączenia, polecenie Edytuj","Workbook Links":"Linki skoroszytu",Stocks:"Akcje",Currencies:"Waluty",Geography:"Geografia","Stocks data comes from Microsoft's online service; data types in opened files show their saved fields":"dane typu Akcje pochodzą z usługi online firmy Microsoft; typy danych w otwartych plikach pokazują zapisane pola","Currencies data comes from Microsoft's online service; data types in opened files show their saved fields":"dane typu Waluty pochodzą z usługi online firmy Microsoft; typy danych w otwartych plikach pokazują zapisane pola","Geography data comes from Microsoft's online service; data types in opened files show their saved fields":"dane typu Geografia pochodzą z usługi online firmy Microsoft; typy danych w otwartych plikach pokazują zapisane pola","Sort A to Z":"Sortuj od A do Z","Sort Z to A":"Sortuj od Z do A",Reapply:"Zastosuj ponownie",Advanced:"Zaawansowane","Text to Columns":"Tekst jako kolumny","Clean Data":"Wyczyść dane","Trim Extra Spaces":"Usuń zbędne spacje","Remove Invisible Characters":"Usuń niewidoczne znaki","Remove Line Breaks":"Usuń podziały wierszy",UPPERCASE:"WIELKIE LITERY",lowercase:"małe litery","Capitalize Each Word":"Każdy Wyraz Wielką Literą","Sentence case":"Jak w zdaniu","tOGGLE cASE":"oDWRÓĆ wIELKOŚĆ lITER","Cells changed: {count}":"Zmienione komórki: {count}","No text in the selection needed the change.":"Żaden tekst w zaznaczeniu nie wymagał zmiany.","Analyze Data":"Analizuj dane","Analyze Data needs an online service; the owner decides on those":"funkcja Analizuj dane wymaga usługi online; o takich usługach decyduje właściciel","Flash Fill":"Wypełnianie błyskawiczne","Remove Duplicates":"Usuń duplikaty","Data Validation":"Poprawność danych",Consolidate:"Konsoliduj","Cell Type":"Typ komórki","Cell type":"Typ komórki","What-If Analysis":"Analiza warunkowa","Scenario Manager…":"Menedżer scenariuszy…","Goal Seek…":"Szukaj wyniku…","Data Table…":"Tabela danych…","Group…":"Grupuj…","Auto Outline":"Autokonspekt","Ungroup…":"Rozgrupuj…","Clear Outline":"Wyczyść konspekt",Subtotal:"Suma częściowa","Show Detail":"Pokaż szczegóły","Hide Detail":"Ukryj szczegóły",Outline:"Konspekt","Analysis Tools":"Narzędzia analizy","the Analysis ToolPak's procedures aren't built yet":"procedury dodatku Analysis ToolPak nie są jeszcze gotowe",Spelling:"Pisownia",Thesaurus:"Tezaurus","Workbook Statistics":"Statystyki skoroszytu","AutoCorrect Options":"Opcje Autokorekty","cmd|Check Accessibility":"Sprawdź ułatwienia dostępu","Show Changes":"Pokaż zmiany","Delete Comment":"Usuń komentarz","Previous Comment":"Poprzedni komentarz","Next Comment":"Następny komentarz","Show Comments":"Pokaż komentarze","Protect Sheet":"Chroń arkusz","Unprotect Sheet":"Nie chroń arkusza","Protect Workbook":"Chroń skoroszyt","The model is too large for the Simplex LP method.":"Model jest za duży dla metody LP simpleks.","Solver stopped at the iteration limit before it found a solution.":"Solver osiągnął limit iteracji, zanim znalazł rozwiązanie.","Comments and notes":"Komentarze i notatki","At end of sheet":"Na końcu arkusza","As displayed on sheet":"Tak jak wyświetlono w arkuszu","To:":"Na:",Solver:"Solver","Solver Parameters":"Parametry Solver","Set Objective":"Ustaw cel","Set Objective:":"Ustaw cel:","By Changing Variable Cells":"Przez zmienianie komórek zmiennych","By Changing Variable Cells:":"Przez zmienianie komórek zmiennych:","Value Of":"Wartość","Value Of:":"Wartość:","goal|Max":"Maks","goal|Min":"Min","Subject to the Constraints":"Podlegających ograniczeniom","Subject to the Constraints:":"Podlegających ograniczeniom:","Make Unconstrained Variables Non-Negative":"Ustaw wartości nieujemne dla zmiennych bez ograniczeń","Select a Solving Method":"Wybierz metodę rozwiązywania","Select a Solving Method:":"Wybierz metodę rozwiązywania:","GRG Nonlinear":"Nieliniowa GRG","Simplex LP":"LP simpleks",Evolutionary:"Ewolucyjna","For smooth nonlinear problems. It finds a local optimum.":"Dla gładkich problemów nieliniowych. Znajduje optimum lokalne.","For linear problems, also with whole numbers. It finds the global optimum.":"Dla problemów liniowych, także z liczbami całkowitymi. Znajduje optimum globalne.","For problems that aren't smooth, such as ones with IF or LOOKUP. Give every variable a lower and an upper bound.":"Dla problemów, które nie są gładkie, np. z funkcjami JEŻELI lub WYSZUKAJ. Podaj dla każdej zmiennej dolną i górną granicę.",integer:"całkowita",binary:"binarna",AllDifferent:"wszystkie różne","Change…":"Zmień…","Reset All":"Resetuj wszystko",Solve:"Rozwiąż","Cell Reference":"Odwołanie do komórki","Cell Reference:":"Odwołanie do komórki:",Constraint:"Ograniczenie","Constraint:":"Ograniczenie:",Relation:"Relacja","Change Constraint":"Zmienianie ograniczenia","Add Constraint":"Dodawanie ograniczenia","The constraint must be a number, a cell reference or a name.":"Ograniczenie musi być liczbą, odwołaniem do komórki lub nazwą.","Solver Options":"Opcje Solver","All Methods":"Wszystkie metody","Constraint Precision":"Dokładność ograniczeń","Constraint Precision:":"Dokładność ograniczeń:","Ignore Integer Constraints":"Ignoruj ograniczenia całkowitoliczbowe","Integer Optimality (%)":"Optymalność całkowitoliczbowa (%)","Integer Optimality (%):":"Optymalność całkowitoliczbowa (%):","Max Time (Seconds)":"Maksymalny czas (sekundy)","Max Time (Seconds):":"Maksymalny czas (sekundy):",Iterations:"Liczba iteracji","Iterations:":"Liczba iteracji:","Max Subproblems":"Maksymalna liczba podproblemów","Max Subproblems:":"Maksymalna liczba podproblemów:",Convergence:"Zbieżność","Convergence:":"Zbieżność:","Central derivatives":"Pochodne centralne","Use Multistart":"Użyj wielu punktów startowych","Population Size":"Wielkość populacji","Population Size:":"Wielkość populacji:","Mutation Rate":"Współczynnik mutacji","Mutation Rate:":"Współczynnik mutacji:","Random Seed":"Wartość początkowa losowania","Require Bounds on Variables":"Wymagaj granic dla zmiennych","Enter positive numbers. The precision must be between 0 and 1.":"Wprowadź liczby dodatnie. Dokładność musi być między 0 a 1.","Solving… Press Esc to stop.":"Rozwiązywanie… Naciśnij klawisz Esc, aby zatrzymać.","Solver Results":"Wyniki Solver","Keep Solver Solution":"Zachowaj rozwiązanie Solver","Restore Original Values":"Przywróć wartości początkowe","Answer Report":"Raport wyników","Return to Solver Parameters Dialog":"Wróć do okna Parametry Solver","Solver Answer Report":"Raport wyników Solver","Worksheet: {name}":"Arkusz: {name}","Result: {text}":"Wynik: {text}","Solving method: {name}":"Metoda rozwiązywania: {name}","Objective Cell":"Komórka celu","Original Value":"Wartość początkowa","Final Value":"Wartość końcowa","Variable Cells":"Komórki zmiennych",Integer:"Całkowita",Contin:"Ciągła",Constraints:"Ograniczenia","report|Status":"Stan",Slack:"Zapas","Not Binding":"Niewiążące","Solver found a solution. All constraints and optimality conditions are satisfied.":"Solver znalazł rozwiązanie. Wszystkie ograniczenia i warunki optymalizacji są spełnione.","A local optimum was found with GRG Nonlinear; with Simplex LP it is the global one.":"W metodzie Nieliniowa GRG jest to optimum lokalne, a w metodzie LP simpleks — globalne.","Solver found an integer solution within tolerance. All constraints are satisfied.":"Solver znalazł rozwiązanie całkowitoliczbowe w granicach tolerancji. Wszystkie ograniczenia są spełnione.","Better integer solutions may exist. To make sure the best one is found, set the integer tolerance to 0% in Options.":"Mogą istnieć lepsze rozwiązania całkowitoliczbowe. Aby na pewno znaleźć najlepsze, ustaw w opcjach optymalność całkowitoliczbową 0%.","Solver cannot improve the current solution. All constraints are satisfied.":"Solver nie może poprawić bieżącego rozwiązania. Wszystkie ograniczenia są spełnione.","The Evolutionary method can't tell whether a solution is the best there is.":"Metoda ewolucyjna nie może stwierdzić, czy rozwiązanie jest najlepsze z możliwych.","Solver stopped at the iteration limit.":"Solver zatrzymał się po osiągnięciu limitu iteracji.","The best values found so far are in the cells.":"W komórkach są najlepsze znalezione dotąd wartości.","Solver stopped at the time limit.":"Solver zatrzymał się po osiągnięciu limitu czasu.","Solver stopped at the limit of subproblems.":"Solver zatrzymał się po osiągnięciu limitu podproblemów.","Solver stopped at your request.":"Solver zatrzymano na żądanie użytkownika.","Solver stopped at the time limit before it found a solution.":"Solver osiągnął limit czasu, zanim znalazł rozwiązanie.","Solver stopped at the limit of subproblems before it found a solution.":"Solver osiągnął limit podproblemów, zanim znalazł rozwiązanie.","Solver stopped at your request before it found a solution.":"Solver zatrzymano, zanim znalazł rozwiązanie.","Solver could not find a feasible solution.":"Solver nie mógł znaleźć rozwiązania dopuszczalnego.","Solver can't find a point at which all constraints are satisfied.":"Solver nie może znaleźć punktu, w którym wszystkie ograniczenia są spełnione.","The objective cell values do not converge.":"Wartości komórki celu nie są zbieżne.","Solver can make the objective as large, or as small, as it likes. Check the constraints.":"Solver może dowolnie zwiększać lub zmniejszać wartość komórki celu. Sprawdź ograniczenia.","The variable cells aren't a valid reference.":"Komórki zmiennych nie są prawidłowym odwołaniem.","The variable cells must be on the active sheet.":"Komórki zmiennych muszą być w aktywnym arkuszu.","There are too many variable cells. Solver takes up to {max}.":"Za dużo komórek zmiennych. Solver przyjmuje do {max}.","The variable cells must hold values, not formulas.":"Komórki zmiennych muszą zawierać wartości, a nie formuły.","The objective must be a single cell of the active sheet.":"Cel musi być pojedynczą komórką aktywnego arkusza.","The objective cell must hold a formula.":"Komórka celu musi zawierać formułę.","Set an objective or add a constraint.":"Ustaw cel lub dodaj ograniczenie.","A constraint's cell reference isn't valid: {ref}":"Odwołanie do komórki w ograniczeniu jest nieprawidłowe: {ref}","A constraint covers too many cells: {ref}":"Ograniczenie obejmuje zbyt wiele komórek: {ref}","An int, bin or dif constraint must refer to variable cells.":"Ograniczenie int, bin lub dif musi odwoływać się do komórek zmiennych.","A constraint's right side must be a number or a cell reference: {ref}":"Prawa strona ograniczenia musi być liczbą lub odwołaniem do komórki: {ref}","A constraint's two sides must have the same number of cells, or the right side one.":"Obie strony ograniczenia muszą mieć tyle samo komórek albo prawa strona jedną.","An error value or text was found in the objective or in a constraint.":"W celu lub w ograniczeniu znaleziono wartość błędu lub tekst.","The linearity conditions required by this LP Solver are not satisfied.":"Warunki liniowości wymagane przez ten Solver LP nie są spełnione.","AllDifferent constraints need the Evolutionary method.":"Ograniczenia „wszystkie różne” wymagają metody ewolucyjnej.","The Evolutionary method needs a lower and an upper bound on every variable cell. Add them as constraints, or turn off Require Bounds on Variables in Options.":"Metoda ewolucyjna wymaga dolnej i górnej granicy dla każdej komórki zmiennej. Dodaj je jako ograniczenia lub wyłącz w opcjach „Wymagaj granic dla zmiennych”.","Allow Edit Ranges":"Zezwalaj na edytowanie zakresów","Ranges unlocked by a password when sheet is protected":"Zakresy odblokowywane hasłem, gdy arkusz jest chroniony",password:"hasło","Unprotect the sheet to change its ranges.":"Aby zmienić zakresy, wyłącz ochronę arkusza.","New Range":"Nowy zakres","Modify Range":"Modyfikowanie zakresu","Refers to cells":"Odwołuje się do komórek","Refers to cells:":"Odwołuje się do komórek:","Range password":"Hasło zakresu","Range password:":"Hasło zakresu:","Remove the password":"Usuń hasło",unchanged:"bez zmian","Without a password anyone can edit these cells while the sheet is protected.":"Bez hasła każdy może edytować te komórki, gdy arkusz jest chroniony.","The title must start with a letter or an underscore and hold only letters, digits, underscores and points.":"Tytuł musi zaczynać się od litery lub podkreślenia i może zawierać tylko litery, cyfry, podkreślenia i kropki.","Another range already has this title.":"Inny zakres ma już ten tytuł.","Unlock Range":"Odblokowywanie zakresu","A cell you are trying to change is password protected. Enter the password to change this cell.":"Komórka, którą próbujesz zmienić, jest chroniona hasłem. Wprowadź hasło, aby zmienić tę komórkę.","Unprotect Workbook":"Nie chroń skoroszytu","Always Open Read-Only":"Zawsze otwieraj tylko do odczytu","Always Open Read-Only":"Zawsze otwieraj tylko do odczytu","Hide Ink":"Ukryj pismo odręczne","Edit Note":"Edytuj notatkę","Previous Note":"Poprzednia notatka","Next Note":"Następna notatka","Show Note":"Pokaż notatkę","Hide Note":"Ukryj notatkę","Show All Notes":"Pokaż wszystkie notatki","Hide All Notes":"Ukryj wszystkie notatki","Delete Note":"Usuń notatkę","Format Note…":"Formatuj notatkę…","Convert to Comments":"Konwertuj na komentarze","Not available yet: notes can't be turned into threaded comments yet":"Jeszcze niedostępne: notatek nie można jeszcze przekształcić w komentarze wątkowe","Paste and Match Formatting":"Wklej i dopasuj formatowanie","Format Painter":"Malarz formatów","Font size":"Rozmiar czcionki","Increase font size":"Zwiększ rozmiar czcionki","Decrease font size":"Zmniejsz rozmiar czcionki","Bold (⌘B)":"Pogrubienie (⌘B)","Italic (⌘I)":"Kursywa (⌘I)","Underline (⌘U)":"Podkreślenie (⌘U)","Strikethrough (⇧⌘X)":"Przekreślenie (⇧⌘X)",Superscript:"Indeks górny",Subscript:"Indeks dolny",Borders:"Obramowania","Bottom Border":"Dolna krawędź","Top Border":"Górna krawędź","Left Border":"Lewa krawędź","Right Border":"Prawa krawędź","No Border":"Bez krawędzi","All Borders":"Wszystkie krawędzie","Outside Borders":"Krawędzie zewnętrzne","Thick Outside Borders":"Grube krawędzie zewnętrzne","Bottom Double Border":"Podwójna krawędź dolna","Thick Bottom Border":"Gruba krawędź dolna","Top and Bottom Border":"Krawędź górna i dolna","Top and Thick Bottom Border":"Krawędź górna i gruba dolna","Top and Double Bottom Border":"Krawędź górna i podwójna dolna","More Borders…":"Więcej krawędzi…","Draw Border":"Rysuj obramowanie","Draw Border Grid":"Rysuj siatkę obramowania","Erase Border":"Wymaż obramowanie","Line Color":"Kolor linii","Line Style":"Styl linii",Hair:"Włosowa",Dotted:"Kropkowana",Dashed:"Kreskowana","Dash Dot Dot":"Kreska-kropka-kropka","Medium Dashed":"Średnia kreskowana","Medium Dash Dot":"Średnia kreska-kropka","Medium Dash Dot Dot":"Średnia kreska-kropka-kropka","Slanted Dash Dot":"Ukośna kreska-kropka",Thick:"Gruba","Fill color":"Kolor wypełnienia","Font color":"Kolor czcionki","Top align":"Wyrównaj do góry","Middle align":"Wyrównaj do środka","Bottom align":"Wyrównaj do dołu",Orientation:"Orientacja","Angle Counterclockwise":"Obróć tekst w lewo","Angle Clockwise":"Obróć tekst w prawo","Vertical Text":"Tekst pionowy","Rotate Text Up":"Obróć tekst w górę","Rotate Text Down":"Obróć tekst w dół",Horizontal:"Poziomo","Align left":"Wyrównaj do lewej","cmd|Center":"Wyśrodkuj","Align right":"Wyrównaj do prawej","Decrease indent":"Zmniejsz wcięcie","Increase indent":"Zwiększ wcięcie","Wrap Text":"Zawijaj tekst","Merge & Center":"Scal i wyśrodkuj","Merge Across":"Scal wszystkie","Merge Cells":"Scal komórki","Unmerge Cells":"Rozdziel komórki","numfmt|Number format":"Format liczb","numfmt|Number":"Liczbowe","numfmt|Currency":"Walutowe","numfmt|Accounting":"Księgowe","numfmt|Short Date":"Data krótka","numfmt|Long Date":"Data długa","numfmt|Time":"Czas","numfmt|Percentage":"Procentowe","numfmt|Fraction":"Ułamkowe","numfmt|Scientific":"Naukowe","numfmt|Text":"Tekstowe",Custom:"Niestandardowe","Accounting format":"Format liczb księgowych","Percent style":"Zapis procentowy","Comma style":"Zapis dziesiętny","Increase decimal":"Zwiększ dziesiętne","Decrease decimal":"Zmniejsz dziesiętne","Conditional Formatting":"Formatowanie warunkowe","Format as Table":"Formatuj jako tabelę","Cell Styles":"Style komórki","Insert Cells…":"Wstaw komórki…","Insert Cells: Shift Down":"Wstaw komórki: przesuń w dół","Insert Cells: Shift Right":"Wstaw komórki: przesuń w prawo","Insert Sheet Rows":"Wstaw wiersze arkusza","Insert Sheet Columns":"Wstaw kolumny arkusza","Insert Sheet":"Wstaw arkusz","Insert Chart Sheet":"Wstaw arkusz wykresu","Delete Cells…":"Usuń komórki…","Delete Cells: Shift Up":"Usuń komórki: przesuń w górę","Delete Cells: Shift Left":"Usuń komórki: przesuń w lewo","Delete Sheet Rows":"Usuń wiersze arkusza","Delete Sheet Columns":"Usuń kolumny arkusza","Cell Options":"Opcje komórki","cmd|Fill":"Wypełnij","Sort & Filter":"Sortuj i filtruj","Custom Sort…":"Sortowanie niestandardowe…","Clear Filter":"Wyczyść filtr","Find & Select":"Znajdź i zaznacz","Find…":"Znajdź…","Replace…":"Zamień…","Go To…":"Przejdź do…","Go To Special…":"Przejdź do — specjalnie…",Constants:"Stałe","Selection Pane…":"Okienko zaznaczenia…","this app shows each workbook in one browser tab, with one window":"ta aplikacja pokazuje każdy skoroszyt w jednej karcie przeglądarki, w jednym oknie","sheet views belong to workbooks shared online; the owner decides on online services":"widoki arkusza dotyczą skoroszytów udostępnianych online; o usługach online decyduje właściciel","Sheet View":"Widok arkusza",Keep:"Zachowaj",Exit:"Zakończ","Custom Views":"Widoki niestandardowe",Ruler:"Linijka","The ruler shows in Page Layout view":"Linijka jest widoczna w widoku Układ strony",Gridlines:"Linie siatki","Formula Bar":"Pasek formuły",Headings:"Nagłówki","Message Bar":"Pasek komunikatów","Status Bar":"Pasek stanu","Sheet Tabs":"Karty arkuszy","Outline Symbols":"Symbole konspektu","Zero Values":"Wartości zerowe","Horizontal Scroll Bar":"Poziomy pasek przewijania","Vertical Scroll Bar":"Pionowy pasek przewijania","View Options":"Opcje widoku","Editing Options":"Opcje edycji","Focus Cell":"Komórka fokusu",Shortcuts:"Skróty","Zoom to 100%":"Powiększenie 100%","Zoom to Selection":"Powiększ do zaznaczenia","New Window":"Nowe okno","Arrange All":"Rozmieść wszystko","Freeze Panes":"Zablokuj okienka","Unfreeze Panes":"Odblokuj okienka","Freeze Top Row":"Zablokuj górny wiersz","Freeze First Column":"Zablokuj pierwszą kolumnę",Split:"Podziel","Panes and Sizes":"Okienka i rozmiary","Split, last rows, sizes, moving headers":"Podział, ostatnie wiersze, rozmiary, przesuwane nagłówki","Full Screen":"Pełny ekran","View Side by Side":"Wyświetl obok siebie","Synchronous Scrolling":"Przewijanie synchroniczne","Reset Window Position":"Resetuj położenie okna","Switch Windows":"Przełącz okna",Macros:"Makra","Scripts…":"Skrypty…","Table Name:":"Nazwa tabeli:","Resize Table":"Zmień rozmiar tabeli","New range":"Nowy zakres","That range isn't valid.":"Ten zakres jest nieprawidłowy.","That isn't a valid table name.":"To nie jest prawidłowa nazwa tabeli.","Another table already uses that name.":"Ta nazwa jest już używana przez inną tabelę.","A defined name already uses that name.":"Ta nazwa jest już używana przez nazwę zdefiniowaną.","Clear the row under the table to add a total row.":"Wyczyść wiersz pod tabelą, aby dodać wiersz sumy.","Clear the row above the table to show its headers.":"Wyczyść wiersz nad tabelą, aby pokazać jej nagłówki.","The header row must stay in the same row.":"Wiersz nagłówka musi pozostać w tym samym wierszu.","The table must keep its first column.":"Tabela musi zachować swoją pierwszą kolumnę.","The table needs at least one data row.":"Tabela musi mieć co najmniej jeden wiersz danych.","A table can't overlap another table.":"Tabela nie może nakładać się na inną tabelę.","Summarize with PivotTable":"Podsumuj za pomocą tabeli przestawnej","Insert Slicer":"Wstaw fragmentator","AutoFormat Options":"Opcje Autoformatowania","Convert to Range":"Konwertuj na zakres","Header Row":"Wiersz nagłówka","Total Row":"Wiersz sumy","Banded Rows":"Wiersze naprzemienne","First Column":"Pierwsza kolumna","Last Column":"Ostatnia kolumna","Banded Columns":"Kolumny naprzemienne","Filter Button":"Przycisk filtru","Table Styles":"Style tabeli","Table styles":"Style tabeli","Timeline Caption:":"Podpis osi czasu:","Slicer Caption:":"Podpis fragmentatora:","Timeline Settings":"Ustawienia osi czasu","Slicer Settings":"Ustawienia fragmentatora","Report Connections":"Połączenia raportu","a table slicer filters its own table only":"fragmentator tabeli filtruje tylko swoją tabelę","Timeline Styles":"Style osi czasu","Slicer Styles":"Style fragmentatora","nothing is filtered":"nic nie jest filtrowane","Columns:":"Kolumny:","Size and Properties":"Rozmiar i właściwości","PivotTable Name:":"Nazwa tabeli przestawnej:","That PivotTable name is empty or already in use.":"Ta nazwa tabeli przestawnej jest pusta lub już używana.","Field Settings":"Ustawienia pola","Select a field in the PivotTable first.":"Najpierw zaznacz pole w tabeli przestawnej.","Group Field":"Grupuj pole","Group a field":"Grupuj pole","Ungroup a field":"Rozgrupuj pole","No grouped fields":"Brak zgrupowanych pól","Insert a slicer":"Wstaw fragmentator","Insert Timeline":"Wstaw oś czasu","Insert a timeline":"Wstaw oś czasu","No date fields":"Brak pól daty","Change Data Source":"Zmień źródło danych","Change PivotTable Data Source":"Zmienianie źródła danych tabeli przestawnej","Clear All":"Wyczyść wszystko","Clear Filters":"Wyczyść filtry","Select Entire":"Zaznacz całość","Move PivotTable":"Przenieś tabelę przestawną",Location:"Lokalizacja","That location isn't valid.":"Ta lokalizacja jest nieprawidłowa.","Delete PivotTable":"Usuń tabelę przestawną","Calculated Field":"Pole obliczeniowe","+/- Buttons":"Przyciski +/-","Field Headers":"Nagłówki pól","Do Not Show Subtotals":"Nie pokazuj sum częściowych","Show All Subtotals at Bottom of Group":"Pokaż wszystkie sumy częściowe u dołu grupy","Show All Subtotals at Top of Group":"Pokaż wszystkie sumy częściowe u góry grupy","Off for Rows and Columns":"Wyłączone dla wierszy i kolumn","On for Rows and Columns":"Włączone dla wierszy i kolumn","On for Rows Only":"Włączone tylko dla wierszy","On for Columns Only":"Włączone tylko dla kolumn",Subtotals:"Sumy częściowe","Grand Totals":"Sumy końcowe","Grand totals":"Sumy końcowe","Report Layout":"Układ raportu","Report layout":"Układ raportu","Show in Compact Form":"Pokaż w formie kompaktowej","Show in Outline Form":"Pokaż w formie konspektu","Show in Tabular Form":"Pokaż w formie tabelarycznej","Repeat All Item Labels":"Powtórz wszystkie etykiety elementów","Do Not Repeat Item Labels":"Nie powtarzaj etykiet elementów","Row Headers":"Nagłówki wierszy","Column Headers":"Nagłówki kolumn","PivotTable Styles":"Style tabeli przestawnej","This chart has no cell range to work from.":"Ten wykres nie ma zakresu komórek, na podstawie którego można go odtworzyć.","Switch Row/Column":"Przełącz wiersz/kolumnę","Select Data":"Zaznacz dane","Add Data":"Dodaj dane",Templates:"Szablony","No Outline":"Bez konturu","shape|Fill":"Wypełnienie","shape|Outline":"Kontur",Weight:"Grubość","Outline Weight":"Grubość konturu",Points:"Punkty","Height of the object":"Wysokość obiektu","Width of the object":"Szerokość obiektu","Height (pt)":"Wysokość (pkt)","Width (pt)":"Szerokość (pkt)","(blank)":"(puste)","No changes since tracking began. Edits from now on are listed here.":"Brak zmian od rozpoczęcia śledzenia. Zmiany wprowadzane od teraz będą wyświetlane tutaj.","Shared session":"Sesja udostępniona",Changes:"Zmiany","Changes are kept while this workbook is open. With a shared session, its history comes from the server.":"Zmiany są przechowywane, dopóki ten skoroszyt jest otwarty. W sesji udostępnionej historia pochodzi z serwera.","Black Pen":"Czarne pióro","Red Pen":"Czerwone pióro","Blue Pen":"Niebieskie pióro",Highlighter:"Zakreślacz",Thickness:"Grubość",Select:"Zaznacz","Lasso Select":"Zaznaczanie lassem",Eraser:"Gumka","No scaling":"Bez skalowania","Fit sheet on one page":"Dopasuj arkusz do jednej strony","Fit all columns on one page":"Dopasuj wszystkie kolumny do jednej strony","Fit all rows on one page":"Dopasuj wszystkie wiersze do jednej strony","Custom scale":"Skala niestandardowa","Custom fit":"Dopasowanie niestandardowe","margins|Normal":"Normalne","margins|Wide":"Szerokie","margins|Narrow":"Wąskie",Letter:"Letter",Tabloid:"Tabloid",Ledger:"Ledger",Legal:"Legal",Statement:"Statement",Executive:"Executive","B4 (JIS)":"B4 (JIS)","B5 (JIS)":"B5 (JIS)","Envelope #10":"Koperta nr 10","Envelope DL":"Koperta DL","Envelope C5":"Koperta C5","Print output":"Wydruk","There is nothing to print on this sheet.":"W tym arkuszu nie ma nic do wydrukowania.","Page preview. Use the arrow keys to scroll.":"Podgląd strony. Użyj klawiszy strzałek, aby przewijać.","Page {page} of {count}, sheet {name}":"Strona {page} z {count}, arkusz {name}","Active sheet":"Aktywny arkusz","Entire workbook":"Cały skoroszyt",Selection:"Zaznaczenie",Portrait:"Pionowa",Landscape:"Pozioma","margin|Top":"Górny","margin|Bottom":"Dolny","margin|Left":"Lewy","margin|Right":"Prawy",Header:"Nagłówek",Footer:"Stopka","Scale (%)":"Skala (%)","Pages wide (0 = auto)":"Stron szerokości (0 = automatycznie)","Pages tall (0 = auto)":"Stron wysokości (0 = automatycznie)","Down, then over":"W dół, potem w poprzek","Over, then down":"W poprzek, potem w dół","&CPage &P of &N":"&CStrona &P z &N","Center horizontally":"Wyśrodkuj w poziomie","Center vertically":"Wyśrodkuj w pionie","Print gridlines":"Drukuj linie siatki","Print row and column headings":"Drukuj nagłówki wierszy i kolumn","Black and white":"Czarno-białe","Draft quality":"Jakość robocza","Ignore print area":"Ignoruj obszar wydruku",Paper:"Papier",Margins:"Marginesy",Scaling:"Skalowanie","Page order":"Kolejność stron","First page (Home)":"Pierwsza strona (Home)","Previous page (Page Up)":"Poprzednia strona (Page Up)","Next page (Page Down)":"Następna strona (Page Down)","Last page (End)":"Ostatnia strona (End)","Page number":"Numer strony","Zoom out (-)":"Pomniejsz (-)","Zoom in (+)":"Powiększ (+)",Fit:"Dopasuj","of {total}":"z {total}","No pages":"Brak stron","{pages} pages is too many for browser printing. Save as PDF, then print the file.":"Liczba stron ({pages}) jest za duża do drukowania w przeglądarce. Zapisz jako PDF, a następnie wydrukuj plik.","Preparing pages":"Przygotowywanie stron","Couldn't print: {message}":"Nie można drukować: {message}","Couldn't save: {message}":"Nie można zapisać: {message}","Writing PDF":"Zapisywanie pliku PDF","{count} characters had no font and show as approximations.":{one:"{count} znak nie miał czcionki i jest pokazany w przybliżeniu.",few:"{count} znaki nie miały czcionki i są pokazane w przybliżeniu.",many:"{count} znaków nie miało czcionki i są pokazane w przybliżeniu.",other:"{count} znaku nie miało czcionki i są pokazane w przybliżeniu."},"Saved {file}":"Zapisano plik {file}",Canceled:"Anulowano","Save as PDF":"Zapisz jako PDF","Page navigation and zoom":"Nawigacja stron i powiększenie",Breaks:"Podziały","Print Area":"Obszar wydruku","Print Titles":"Tytuły wydruku","Set Print Area":"Ustaw obszar wydruku","Add to Print Area":"Dodaj do obszaru wydruku","Clear Print Area":"Wyczyść obszar wydruku","Insert Page Break":"Wstaw podział strony","Remove Page Break":"Usuń podział strony","Reset All Page Breaks":"Resetuj wszystkie podziały stron","Rows to Repeat: Selection":"Wiersze do powtarzania: zaznaczenie","Columns to Repeat: Selection":"Kolumny do powtarzania: zaznaczenie","Clear Print Titles":"Wyczyść tytuły wydruku","Page Setup":"Ustawienia strony","fit|Automatic":"Automatycznie","Width:":"Szerokość:","Height:":"Wysokość:",Scale:"Skala","Scale:":"Skala:",View:"Wyświetl","View gridlines":"Wyświetl linie siatki","View headings":"Wyświetl nagłówki","Print headings":"Drukuj nagłówki","Page Layout View is not compatible with Freeze Panes. If you continue, the panes on this sheet will be unfrozen. Would you like to continue?":"Widok Układ strony nie jest zgodny z blokowaniem okienek. Jeśli będziesz kontynuować, okienka w tym arkuszu zostaną odblokowane. Czy chcesz kontynuować?","Header, left section":"Nagłówek, lewa sekcja","Header, center section":"Nagłówek, środkowa sekcja","Header, right section":"Nagłówek, prawa sekcja","Footer, left section":"Stopka, lewa sekcja","Footer, center section":"Stopka, środkowa sekcja","Footer, right section":"Stopka, prawa sekcja","Number of Pages":"Liczba stron","Current Date":"Bieżąca data","Current Time":"Bieżąca godzina","File Path":"Ścieżka pliku","File Name":"Nazwa pliku","Sheet Name":"Nazwa arkusza","Insert Page Number":"Wstaw numer strony","Insert Number of Pages":"Wstaw liczbę stron","Insert Current Date":"Wstaw bieżącą datę","Insert Current Time":"Wstaw bieżącą godzinę","Insert File Path":"Wstaw ścieżkę pliku","Insert File Name":"Wstaw nazwę pliku","Insert Sheet Name":"Wstaw nazwę arkusza","Go to Header":"Przejdź do nagłówka","Go to Footer":"Przejdź do stopki","Different First Page":"Inna pierwsza strona","Different Odd & Even Pages":"Inne strony parzyste i nieparzyste","Scale with Document":"Skaluj z dokumentem","Align with Page Margins":"Wyrównaj do marginesów strony","hf|Page":"Strona","hf|Pages":"Strony","hf|Date":"Data","hf|Time":"Czas","hf|Path":"Ścieżka","hf|File":"Plik","hf|Tab":"Karta","hf|Picture":"Obraz","(none)":"(brak)","(custom)":"(niestandardowy)","Left section":"Lewa sekcja","Center section":"Środkowa sekcja","Right section":"Prawa sekcja","Left section:":"Lewa sekcja:","Center section:":"Środkowa sekcja:","Right section:":"Prawa sekcja:","Insert {code}":"Wstaw {code}","Put the cursor in a section and click a button to insert a code. Type && for an ampersand.":"Umieść kursor w sekcji i kliknij przycisk, aby wstawić kod. Wpisz &&, aby wstawić znak &.","Customize Header…":"Dostosuj nagłówek…","Customize Footer…":"Dostosuj stopkę…","Different odd and even pages":"Inne strony parzyste i nieparzyste","Different first page":"Inna pierwsza strona","Scale with document":"Skaluj z dokumentem","Align with page margins":"Wyrównaj do marginesów strony","Header and Footer":"Nagłówek i stopka","Track Changes (Legacy)":"Śledź zmiany (starsza wersja)","Replaced by collaboration (File > Share…) and Review > Show Changes":"Zastąpione współpracą (Plik > Udostępnij…) i poleceniem Recenzja > Pokaż zmiany","Highlight Changes…":"Wyróżnij zmiany…","Accept or Reject Changes…":"Zaakceptuj lub odrzuć zmiany…","Share Workbook (Legacy)…":"Udostępnij skoroszyt (starsza wersja)…","Compare and Merge Workbooks…":"Porównaj i scal skoroszyty…","More Commands":"Więcej poleceń","Show the Classic Ribbon":"Pokaż klasyczną wstążkę","Show the Simplified Ribbon":"Pokaż uproszczoną wstążkę","Mini Toolbar":"Minipasek narzędzi","Interface Size":"Rozmiar interfejsu","Interface size":"Rozmiar interfejsu","Data Validation…":"Poprawność danych…","Circle Invalid Data":"Zakreśl nieprawidłowe dane","Clear Validation Circles":"Wyczyść zakreślenia sprawdzania poprawności","Rows to repeat at top":"Wiersze do powtarzania u góry","Columns to repeat at left":"Kolumny do powtarzania z lewej","That reference isn't valid.":"To odwołanie jest nieprawidłowe.","Reset Print Area":"Resetuj obszar wydruku","Inside Horizontal Border":"Wewnętrzna krawędź pozioma","Inside Vertical Border":"Wewnętrzna krawędź pionowa","Double Underline":"Podwójne podkreślenie","More Accounting Formats…":"Więcej formatów księgowych…","Format Cell Alignment":"Formatuj wyrównanie komórki","$ English (United States)":"$ angielski (Stany Zjednoczone)","£ English (United Kingdom)":"£ angielski (Wielka Brytania)","€ Euro (€ 123)":"€ euro (€ 123)","¥ Chinese (PRC)":"¥ chiński (ChRL)","zł Polish":"zł polski","CHF French (Switzerland)":"CHF francuski (Szwajcaria)","Text Contains…":"Tekst zawierający…","Unique Values…":"Wartości unikatowe…",Regroup:"Grupuj ponownie"};export{e as default};
|
package/io/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getDataPackage as S}from"../extras/getdata/persist.js";import{cellTypesPackage as k}from"../celltypes/cell-types.js";import{Sheet as v}from"../core/sheet.js";import{Workbook as P}from"../core/workbook.js";import{buildBlock as x,newBlockBuffers as C}from"./export-blocks.js";import{buildPlan as b}from"./plan.js";import{applySheetFilter as I}from"../cells/filter-file.js";import{applySheetViewInfo as M}from"../cells/view-xml.js";import{docPropsCommitted as R}from"../cells/docprops-xml.js";import{namedStylesCommitted as E}from"../cells/cell-styles-xml.js";import{buildPivotPackage as _}from"../pivot/xml.js";import{resolveColor as z}from"./xlsx-styles.js";import{applyPrintNames as F}from"../print/page-setup.js";import{MAX_COLS as T,parseCellRef as N}from"../core/address.js";const q="The file reader didn't start. Check the connection and try again.";class Z{constructor(){this.worker=new Worker(new URL("./io.worker.js",import.meta.url),{type:"module"}),this.worker.onmessage=e=>this._on(e.data),this.worker.onerror=e=>this._fail(new Error(e.message||q)),this.book=null,this.onProgress=null,this.opening=null,this.saving=null,this.queue=Promise.resolve(),this.retired=!1,this.closed=!1,this.cellsRead=0,this.sourceStrings=0,this.sourceStyles=0,this.sheetSourceCount=0,this.unlockState=null,this.hasPassword=!1,this.onIntegrityFailed=null,this.partNames=new Set,this.nextPivotCacheId=1,this.numFmtIds=new Map}async packageOf(e){if(!this.unlockState)return e;const{openUnlocked:s}=await import("./crypto/index.js");return(await s(e,this.unlockState)).package}setPassword(e){this.hasPassword=!!e,this.worker.postMessage({op:"setPassword",password:e||null})}_enqueue(e){if(this.retired)return Promise.reject(new Error("This file's Worker was closed."));const s=()=>this.closed?Promise.reject(new Error("The workbook was destroyed.")):e(),t=this.queue.then(s,s);return this.queue=t.catch(()=>{}),t}retire(){this.retired=!0,this.queue.then(()=>this.worker.terminate())}close(){this.retired=!0,this.closed=!0,this.worker.terminate(),(this.opening||this.saving||this.uploading)&&this._fail(new Error("The workbook was destroyed."))}open(e,s={}){return this._enqueue(()=>this._open(e,s))}_open(e,{onReady:s,onProgress:t,password:r}={}){const l=new P;return this.book=l,this.cellsRead=0,this.onProgress=t,this.onReady=s,new Promise((o,u)=>{this.opening={resolve:o,reject:u},this.worker.postMessage({op:"open",file:e,password:r})})}save(e,s,t={}){return this._enqueue(()=>this._save(e,s,t))}async _save(e,s,{onProgress:t,objects:r,pivots:l,slicers:o,dataSheets:u,chartExtras:g,commit:c=s!==null,markSaved:h=!0}={}){this.book=e;const n=e.edits;this.onProgress=t,await r?.prepareSave?.(e),u?.prepareSave();const a=b(e,{strings:this.sourceStrings,styles:this.sourceStyles,sheets:this.sheetSourceCount}),f={edits:e.edits,strings:e.strings.size,styles:e.styles.list.length,dxfs:e.dxfs?.length??0,sheets:[...e.sheets],tables:[...e.engine?.tables.values()??[]]};a.sheets.forEach((d,m)=>{d.objects=r?.serialize(e.sheets[m])??null}),a.cellTypes=[...r?.extrasPackage?.(e)??[],...k(e),...S(e),...g??[]],a.cellTypes.some(d=>d.path==="xl/metadata.xml")&&(a.dynamicArrays=!1),a.errorVms=e.errorVms??null;const p=l?this._pivotPlan(e,l,a):null,w=o?.savePlan(a)??null;a.dataSheets=await u?.savePackage()??null,a.foreign=e.source===null&&e.collabPackage&&e.packageInfo?.kept===!0?{...e.collabPackage,expected:!0}:null;let y;try{y=await new Promise((d,m)=>{this.saving={resolve:d,reject:m,edits:f.edits},this.worker.postMessage({op:"save",plan:a,handle:s,commit:c})})}catch(d){throw p?.restore(),w?.restore(),d}finally{u?.finishSave()}if(h&&e.edits===n&&(e.dirty=!1),c){const d=e.edits===f.edits;this._commit(e,f,a,d),R(e,a.docProps,d),E(e,a.namedStyles,d),p?.commit(d),w?.commit(d)}else p?.restore(),w?.restore();return y}uploadPackage({url:e,key:s}){return this._enqueue(()=>new Promise(t=>{this.uploading=t,this.worker.postMessage({op:"uploadPackage",url:e,key:s})}))}_pivotPlan(e,s,t){const r=s.pivots,l=s.removedParts??[];if(r.length===0&&l.length===0)return null;const o=r.map(h=>[h,h.part,h.cache,h.cache.part,h.cache.id]),u=new Map;let g=Math.max(163,...this.numFmtIds.values())+1;const c=_(r,{existing:[...this.partNames],saveRecords:!1,firstCacheId:this.nextPivotCacheId,numFmtId:h=>{const n=this.numFmtIds.get(h)??u.get(h);return n!==void 0?n:(u.set(h,g),g++)}});if(t.pivotNumFmts=[...u].map(([h,n])=>({id:n,code:h})),c.parts.length>0||l.length>0){const h=n=>`rIdPivotCache${n.cacheId}`;t.pivots={parts:c.parts.map(({name:n,contentType:a,xml:f})=>({name:n,contentType:a,xml:f})),contentTypes:c.contentTypes,replaced:[...c.replaced,...l],relationships:c.relationships.map(({from:n,id:a,type:f,target:p,sheet:w})=>({from:n,id:a,type:f,target:p,sheetIndex:n===null?e.sheets.indexOf(w):-1})),caches:c.workbook.pivotCaches.map(n=>({cacheId:n.cacheId,type:n.type,target:n.target,relId:h(n)}))}}return{restore:()=>{for(const[h,n,a,f,p]of o)h.part=n,a.part=f,a.id=p},commit:h=>{h&&(s.removedParts=[]);for(const n of c.parts)this.partNames.add(n.name);if(this.nextPivotCacheId+=c.workbook.pivotCaches.length,h)for(const n of r)n.dirty=!1;for(const n of c.relationships){if(n.from===null||!/\/pivotCacheDefinition$/.test(n.type))continue;const a=r.find(f=>f.part===n.from);a&&(a.cache.part=n.target.replace(/^\//,""))}}}}_commit(e,s,t,r){e.source={},this.sourceStrings=s.strings,this.sourceStyles=s.styles,this.sheetSourceCount=s.sheets.length,e.sourceDxfs=s.dxfs;const l=new Set(t.removedTables);e.removedTables=(e.removedTables??[]).filter(o=>!l.has(o)),r&&(e.protectionChanged=!1,e.calcModeChanged=!1,e.personsChanged=!1,e.formulasEdited=!1,e.namesChanged=!1),s.sheets.forEach((o,u)=>{o.sourceIndex=u;const g=new Set(t.sheets[u].structureOps);o.structureOps=(o.structureOps??[]).filter(c=>!g.has(c)),r&&(o.colsChanged=!1,o.viewChanged=!1,o.defaultsChanged=!1,o.filterChanged=!1,o.cfChanged=!1,o.validationsChanged=!1,o.hyperlinksChanged=!1,o.protectionChanged=!1,o.scenariosChanged=!1,o.threadsChanged=!1,o.commentsChanged=!1,o.sparklinesChanged=!1,o.pageSetupChanged=!1,o.tabColorChanged=!1)});for(const o of s.tables)o.isNew=!1,o.source=!0,r&&(o.dirty=!1,o.columnsChanged=!1)}_on(e){const s=this.book;switch(e.op){case"meta":{s.date1904=e.info.date1904===!0,s.sheets=e.info.sheets.map((t,r)=>{const l=new v(t.name);return l.hidden=t.hidden,t.veryHidden&&(l.veryHidden=!0),l.sourceIndex=r,l}),s.sheets.length===0&&(s.sheets=[new v("Sheet1")]),s.activeSheet=Math.min(e.info.activeTab,s.sheets.length-1),s.styles.load(e.info.styles),this.sourceStyles=e.info.styles.length,this.sheetSourceCount=e.info.sheets.length,this.meta=e.info,s.protection=e.info.workbookProtection,s.persons=e.info.persons??[],this.nextPivotCacheId=(e.info.maxPivotCacheId??0)+1,this.numFmtIds=new Map(Object.entries(e.info.numFmts??{}).map(([t,r])=>[r,Number(t)])),s.theme=e.info.theme,s.themeName=e.info.themeName??null,s.dxfs=e.info.dxfs,s.sourceDxfs=e.info.dxfs.length,s.source={},this.onReady?.(s);break}case"strings":if(s.strings.addPage(e.bytes,e.offsets),e.rich){s.strings.rich??=new Map;for(const[t,r]of e.rich){for(const l of r)l.color&&(l.color=z({a:l.color},s.theme??[]));s.strings.rich.set(t,r)}}break;case"stringsEnd":this.sourceStrings=e.count;break;case"sheetStart":if(D(s.sheets[e.index],e.info),e.info.chartSheet){const t=s.sheets[e.index];t.isChartSheet=!0,t.hideHeadings=!0,t.showGridlines=!1}break;case"cells":{const t=s.sheets[e.index],r=e.batch;t.applyBatch(r),r.rowMeta!==null&&A(t,r.rowMeta),this.cellsRead+=r.count,this.onProgress?.({cells:this.cellsRead,sheet:e.index,sheets:s.sheets.length}),r.formulas=null,r.valueMeta=null,this.worker.postMessage({op:"ack",batch:r},[r.rows.buffer,r.cols.buffer,r.kinds.buffer,r.values.buffer,r.styles.buffer]);break}case"sheetEnd":{const t=s.sheets[e.index];t.merges=e.merges,t.mergeIndex=null,O(t,e.features,e.comments),e.pageSetup&&(t.pageSetup=F(e.pageSetup,this.meta.printNames,e.index)),t.revision++,this.onProgress?.({cells:this.cellsRead,sheet:e.index,sheets:s.sheets.length,sheetDone:!0});break}case"opened":{s.dirty=!1;const t=this.opening;this.opening=null,t?.resolve(s);break}case"blockRequest":{if(s.edits!==this.saving?.edits){this.worker.postMessage({op:"block",id:e.id,error:"The workbook changed during the save. Save again to include your edits."});break}const t=e.recycled??C(),r=x(s.sheets[e.sheet],s.strings,e.from,t);this.worker.postMessage({op:"block",id:e.id,block:r},[r.rows.buffer,r.cols.buffer,r.kinds.buffer,r.values.buffer,r.styles.buffer]),this.onProgress?.({saving:!0,sheet:e.sheet,row:e.from,sheets:s.sheets.length,maxRow:s.sheets[e.sheet].maxRow});break}case"uploaded":{const t=this.uploading;this.uploading=null,t?.(e.status);break}case"saved":{for(const[l,o]of e.numFmts??[])this.numFmtIds.set(l,o);const t=s.source===null,r=this.saving;this.saving=null,r?.resolve({size:e.size,blob:e.blob??null,hadNoSource:t});break}case"unlocked":this.unlockState=e.state,this.hasPassword=e.state!==null;break;case"integrity":this.onIntegrityFailed?.(e.message);break;case"error":this._fail(Object.assign(new Error(e.message),{code:e.code}));break;default:}}_fail(e){const s=this.opening??this.saving,t=this.uploading;this.opening=null,this.saving=null,this.uploading=null,s?s.reject(e):t?t(`failed: ${e.message}`):console.error(e)}}function O(i,e,s){e&&(e.pictureRid&&(i.backgroundRid=e.pictureRid),e.headerPictureRid&&(i.headerPictureRid=e.headerPictureRid),I(i,e.filter),e.cf.length&&(i.cf=e.cf),e.validations.length&&(i.validations=e.validations),e.hyperlinks.length&&(i.hyperlinks=e.hyperlinks),e.protection&&(i.protection=e.protection),e.customSheetViews&&(i.fileSheetViews=e.customSheetViews),e.scenarios&&(i.scenarios=e.scenarios),e.ignoredErrors&&(i.ignoredErrors=e.ignoredErrors),e.threads?.length&&(i.threads=e.threads),e.sparklines?.length&&(i.sparklines=e.sparklines)),s?.length&&(i.comments=new Map(s.map(t=>{const r=N(t.ref);return[r.row*T+r.col,t]})))}function D(i,e){i.summaryAbove=e.summaryAbove===!0,i.outlineAutoStyles=e.outlineAutoStyles===!0,i.summaryLeft=e.summaryLeft===!0,i.rows.setDefaultSize(e.defaultHeight),i.cols.setDefaultSize(e.defaultWidth),i.tabColor=e.tabColor,i.frozenRows=e.frozenRows,i.frozenCols=e.frozenCols,i.showGridlines=e.showGridlines,i.zoom=e.zoom,i.rtl=e.rtl===!0,M(i,e);for(const s of e.cols)for(let t=s.min;t<=s.max;t++)s.width>=0&&s.width!==e.defaultWidth&&i.cols.setSize(t,s.width),s.hidden&&i.cols.setHidden(t,!0),s.style&&(i.colStyles===null&&(i.colStyles=new Map),i.colStyles.set(t,s.style)),s.extra&&(i.colExtras===null&&(i.colExtras=new Map),i.colExtras.set(t,s.extra))}function A(i,e){for(let s=0;s<e.length;s+=6){const t=e[s];e[s+1]>=0&&i.rows.setSize(t,e[s+1],e[s+4]===0),e[s+2]&&i.rows.setHidden(t,!0),e[s+3]&&(i.rowStyles===null&&(i.rowStyles=new Map),i.rowStyles.set(t,e[s+3])),e[s+5]&&(i.rowExtras===null&&(i.rowExtras=new Map),i.rowExtras.set(t,e[s+5]))}}export{Z as IoClient,q as WORKER_FAILED};
|
|
1
|
+
import{getDataPackage as S}from"../extras/getdata/persist.js";import{cellTypesPackage as k}from"../celltypes/cell-types.js";import{Sheet as v}from"../core/sheet.js";import{Workbook as P}from"../core/workbook.js";import{buildBlock as x,newBlockBuffers as C}from"./export-blocks.js";import{buildPlan as b}from"./plan.js";import{applySheetFilter as I}from"../cells/filter-file.js";import{applySheetViewInfo as R}from"../cells/view-xml.js";import{docPropsCommitted as M}from"../cells/docprops-xml.js";import{namedStylesCommitted as E}from"../cells/cell-styles-xml.js";import{buildPivotPackage as _}from"../pivot/xml.js";import{resolveColor as z}from"./xlsx-styles.js";import{applyPrintNames as F}from"../print/page-setup.js";import{MAX_COLS as T,parseCellRef as N}from"../core/address.js";const q="The file reader didn't start. Check the connection and try again.";class Z{constructor(){this.worker=new Worker(new URL("./io.worker.js",import.meta.url),{type:"module"}),this.worker.onmessage=e=>this._on(e.data),this.worker.onerror=e=>this._fail(new Error(e.message||q)),this.book=null,this.onProgress=null,this.opening=null,this.saving=null,this.queue=Promise.resolve(),this.retired=!1,this.closed=!1,this.cellsRead=0,this.sourceStrings=0,this.sourceStyles=0,this.sheetSourceCount=0,this.unlockState=null,this.hasPassword=!1,this.onIntegrityFailed=null,this.partNames=new Set,this.nextPivotCacheId=1,this.numFmtIds=new Map}async packageOf(e){if(!this.unlockState)return e;const{openUnlocked:s}=await import("./crypto/index.js");return(await s(e,this.unlockState)).package}setPassword(e){this.hasPassword=!!e,this.worker.postMessage({op:"setPassword",password:e||null})}_enqueue(e){if(this.retired)return Promise.reject(new Error("This file's Worker was closed."));const s=()=>this.closed?Promise.reject(new Error("The workbook was destroyed.")):e(),t=this.queue.then(s,s);return this.queue=t.catch(()=>{}),t}retire(){this.retired=!0,this.queue.then(()=>this.worker.terminate())}close(){this.retired=!0,this.closed=!0,this.worker.terminate(),(this.opening||this.saving||this.uploading)&&this._fail(new Error("The workbook was destroyed."))}open(e,s={}){return this._enqueue(()=>this._open(e,s))}_open(e,{onReady:s,onProgress:t,password:r}={}){const l=new P;return this.book=l,this.cellsRead=0,this.onProgress=t,this.onReady=s,new Promise((o,u)=>{this.opening={resolve:o,reject:u},this.worker.postMessage({op:"open",file:e,password:r})})}save(e,s,t={}){return this._enqueue(()=>this._save(e,s,t))}async _save(e,s,{onProgress:t,objects:r,pivots:l,slicers:o,dataSheets:u,chartExtras:g,commit:h=s!==null,markSaved:c=!0}={}){this.book=e;const n=e.edits;this.onProgress=t,await r?.prepareSave?.(e),u?.prepareSave();const a=b(e,{strings:this.sourceStrings,styles:this.sourceStyles,sheets:this.sheetSourceCount}),f={edits:e.edits,strings:e.strings.size,styles:e.styles.list.length,dxfs:e.dxfs?.length??0,sheets:[...e.sheets],tables:[...e.engine?.tables.values()??[]]};a.sheets.forEach((d,m)=>{d.objects=r?.serialize(e.sheets[m])??null}),a.cellTypes=[...r?.extrasPackage?.(e)??[],...k(e),...S(e),...g??[]],a.cellTypes.some(d=>d.path==="xl/metadata.xml")&&(a.dynamicArrays=!1),a.errorVms=e.errorVms??null;const p=l?this._pivotPlan(e,l,a):null,w=o?.savePlan(a)??null;a.dataSheets=await u?.savePackage()??null,a.foreign=e.source===null&&e.collabPackage&&e.packageInfo?.kept===!0?{...e.collabPackage,expected:!0}:null;let y;try{y=await new Promise((d,m)=>{this.saving={resolve:d,reject:m,edits:f.edits},this.worker.postMessage({op:"save",plan:a,handle:s,commit:h})})}catch(d){throw p?.restore(),w?.restore(),d}finally{u?.finishSave()}if(c&&e.edits===n&&(e.dirty=!1),h){const d=e.edits===f.edits;this._commit(e,f,a,d),M(e,a.docProps,d),E(e,a.namedStyles,d),p?.commit(d),w?.commit(d)}else p?.restore(),w?.restore();return y}uploadPackage({url:e,key:s}){return this._enqueue(()=>new Promise(t=>{this.uploading=t,this.worker.postMessage({op:"uploadPackage",url:e,key:s})}))}_pivotPlan(e,s,t){const r=s.pivots,l=s.removedParts??[];if(r.length===0&&l.length===0)return null;const o=r.map(c=>[c,c.part,c.cache,c.cache.part,c.cache.id]),u=new Map;let g=Math.max(163,...this.numFmtIds.values())+1;const h=_(r,{existing:[...this.partNames],saveRecords:!1,firstCacheId:this.nextPivotCacheId,numFmtId:c=>{const n=this.numFmtIds.get(c)??u.get(c);return n!==void 0?n:(u.set(c,g),g++)}});if(t.pivotNumFmts=[...u].map(([c,n])=>({id:n,code:c})),h.parts.length>0||l.length>0){const c=n=>`rIdPivotCache${n.cacheId}`;t.pivots={parts:h.parts.map(({name:n,contentType:a,xml:f})=>({name:n,contentType:a,xml:f})),contentTypes:h.contentTypes,replaced:[...h.replaced,...l],relationships:h.relationships.map(({from:n,id:a,type:f,target:p,sheet:w})=>({from:n,id:a,type:f,target:p,sheetIndex:n===null?e.sheets.indexOf(w):-1})),caches:h.workbook.pivotCaches.map(n=>({cacheId:n.cacheId,type:n.type,target:n.target,relId:c(n)}))}}return{restore:()=>{for(const[c,n,a,f,p]of o)c.part=n,a.part=f,a.id=p},commit:c=>{c&&(s.removedParts=[]);for(const n of h.parts)this.partNames.add(n.name);if(this.nextPivotCacheId+=h.workbook.pivotCaches.length,c)for(const n of r)n.dirty=!1;for(const n of h.relationships){if(n.from===null||!/\/pivotCacheDefinition$/.test(n.type))continue;const a=r.find(f=>f.part===n.from);a&&(a.cache.part=n.target.replace(/^\//,""))}}}}_commit(e,s,t,r){e.source={},this.sourceStrings=s.strings,this.sourceStyles=s.styles,this.sheetSourceCount=s.sheets.length,e.sourceDxfs=s.dxfs;const l=new Set(t.removedTables);e.removedTables=(e.removedTables??[]).filter(o=>!l.has(o)),r&&(e.protectionChanged=!1,e.calcModeChanged=!1,e.personsChanged=!1,e.formulasEdited=!1,e.namesChanged=!1),s.sheets.forEach((o,u)=>{o.sourceIndex=u;const g=new Set(t.sheets[u].structureOps);o.structureOps=(o.structureOps??[]).filter(h=>!g.has(h)),r&&(o.colsChanged=!1,o.viewChanged=!1,o.defaultsChanged=!1,o.filterChanged=!1,o.cfChanged=!1,o.validationsChanged=!1,o.hyperlinksChanged=!1,o.protectionChanged=!1,o.scenariosChanged=!1,o.threadsChanged=!1,o.commentsChanged=!1,o.sparklinesChanged=!1,o.pageSetupChanged=!1,o.tabColorChanged=!1)});for(const o of s.tables)o.isNew=!1,o.source=!0,r&&(o.dirty=!1,o.columnsChanged=!1)}_on(e){const s=this.book;switch(e.op){case"meta":{s.date1904=e.info.date1904===!0,s.sheets=e.info.sheets.map((t,r)=>{const l=new v(t.name);return l.hidden=t.hidden,t.veryHidden&&(l.veryHidden=!0),l.sourceIndex=r,l}),s.sheets.length===0&&(s.sheets=[new v("Sheet1")]),s.activeSheet=Math.min(e.info.activeTab,s.sheets.length-1),s.styles.load(e.info.styles),this.sourceStyles=e.info.styles.length,this.sheetSourceCount=e.info.sheets.length,this.meta=e.info,s.protection=e.info.workbookProtection,s.persons=e.info.persons??[],this.nextPivotCacheId=(e.info.maxPivotCacheId??0)+1,this.numFmtIds=new Map(Object.entries(e.info.numFmts??{}).map(([t,r])=>[r,Number(t)])),s.theme=e.info.theme,s.themeName=e.info.themeName??null,s.dxfs=e.info.dxfs,s.sourceDxfs=e.info.dxfs.length,s.source={},this.onReady?.(s);break}case"strings":if(s.strings.addPage(e.bytes,e.offsets),e.rich){s.strings.rich??=new Map;for(const[t,r]of e.rich){for(const l of r)l.color&&(l.color=z({a:l.color},s.theme??[]));s.strings.rich.set(t,r)}}break;case"stringsEnd":this.sourceStrings=e.count;break;case"sheetStart":if(D(s.sheets[e.index],e.info),e.info.chartSheet){const t=s.sheets[e.index];t.isChartSheet=!0,t.hideHeadings=!0,t.showGridlines=!1}break;case"cells":{const t=s.sheets[e.index],r=e.batch;t.applyBatch(r),r.rowMeta!==null&&A(t,r.rowMeta),this.cellsRead+=r.count,this.onProgress?.({cells:this.cellsRead,sheet:e.index,sheets:s.sheets.length}),r.formulas=null,r.valueMeta=null,this.worker.postMessage({op:"ack",batch:r},[r.rows.buffer,r.cols.buffer,r.kinds.buffer,r.values.buffer,r.styles.buffer]);break}case"sheetEnd":{const t=s.sheets[e.index];t.merges=e.merges,t.mergeIndex=null,O(t,e.features,e.comments),e.pageSetup&&(t.pageSetup=F(e.pageSetup,this.meta.printNames,e.index)),t.revision++,this.onProgress?.({cells:this.cellsRead,sheet:e.index,sheets:s.sheets.length,sheetDone:!0});break}case"opened":{s.dirty=!1;const t=this.opening;this.opening=null,t?.resolve(s);break}case"blockRequest":{if(s.edits!==this.saving?.edits){this.worker.postMessage({op:"block",id:e.id,error:"The workbook changed during the save. Save again to include your edits."});break}const t=e.recycled??C(),r=x(s.sheets[e.sheet],s.strings,e.from,t);this.worker.postMessage({op:"block",id:e.id,block:r},[r.rows.buffer,r.cols.buffer,r.kinds.buffer,r.values.buffer,r.styles.buffer]),this.onProgress?.({saving:!0,sheet:e.sheet,row:e.from,sheets:s.sheets.length,maxRow:s.sheets[e.sheet].maxRow});break}case"uploaded":{const t=this.uploading;this.uploading=null,t?.(e.status);break}case"saved":{for(const[l,o]of e.numFmts??[])this.numFmtIds.set(l,o);const t=s.source===null,r=this.saving;this.saving=null,r?.resolve({size:e.size,blob:e.blob??null,hadNoSource:t});break}case"unlocked":this.unlockState=e.state,this.hasPassword=e.state!==null;break;case"integrity":this.onIntegrityFailed?.(e.message);break;case"error":this._fail(Object.assign(new Error(e.message),{code:e.code}));break;default:}}_fail(e){const s=this.opening??this.saving,t=this.uploading;this.opening=null,this.saving=null,this.uploading=null,s?s.reject(e):t?t(`failed: ${e.message}`):console.error(e)}}function O(i,e,s){e&&(e.pictureRid&&(i.backgroundRid=e.pictureRid),e.headerPictureRid&&(i.headerPictureRid=e.headerPictureRid),I(i,e.filter),e.cf.length&&(i.cf=e.cf),e.validations.length&&(i.validations=e.validations),e.hyperlinks.length&&(i.hyperlinks=e.hyperlinks),e.protection&&(i.protection=e.protection),e.customSheetViews&&(i.fileSheetViews=e.customSheetViews),e.scenarios&&(i.scenarios=e.scenarios),e.ignoredErrors&&(i.ignoredErrors=e.ignoredErrors),e.protectedRanges&&(i.protectedRanges=e.protectedRanges),e.threads?.length&&(i.threads=e.threads),e.sparklines?.length&&(i.sparklines=e.sparklines)),s?.length&&(i.comments=new Map(s.map(t=>{const r=N(t.ref);return[r.row*T+r.col,t]})))}function D(i,e){i.summaryAbove=e.summaryAbove===!0,i.outlineAutoStyles=e.outlineAutoStyles===!0,i.summaryLeft=e.summaryLeft===!0,i.rows.setDefaultSize(e.defaultHeight),i.cols.setDefaultSize(e.defaultWidth),i.tabColor=e.tabColor,i.frozenRows=e.frozenRows,i.frozenCols=e.frozenCols,i.showGridlines=e.showGridlines,i.zoom=e.zoom,i.rtl=e.rtl===!0,R(i,e);for(const s of e.cols)for(let t=s.min;t<=s.max;t++)s.width>=0&&s.width!==e.defaultWidth&&i.cols.setSize(t,s.width),s.hidden&&i.cols.setHidden(t,!0),s.style&&(i.colStyles===null&&(i.colStyles=new Map),i.colStyles.set(t,s.style)),s.extra&&(i.colExtras===null&&(i.colExtras=new Map),i.colExtras.set(t,s.extra))}function A(i,e){for(let s=0;s<e.length;s+=6){const t=e[s];e[s+1]>=0&&i.rows.setSize(t,e[s+1],e[s+4]===0),e[s+2]&&i.rows.setHidden(t,!0),e[s+3]&&(i.rowStyles===null&&(i.rowStyles=new Map),i.rowStyles.set(t,e[s+3])),e[s+5]&&(i.rowExtras===null&&(i.rowExtras=new Map),i.rowExtras.set(t,e[s+5]))}}export{Z as IoClient,q as WORKER_FAILED};
|
package/io/csv.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{MAX_COLS as W,MAX_ROWS as
|
|
2
|
-
`);const
|
|
3
|
-
`&&(e=e.slice(1)),
|
|
4
|
-
`&&(n=n.slice(1)),
|
|
5
|
-
`)||u.includes("\r");function*
|
|
6
|
-
`,this.row=r,this.col=0),i+=this.delimiter.repeat(h-this.col),i+=
|
|
1
|
+
import{MAX_COLS as W,MAX_ROWS as at}from"../core/address.js";import{BATCH_CELLS as v}from"./xlsx-read.js";import{BOOL as j,CHUNK_BITS as lt,CHUNK_SIZE as J,EMPTY as ot,NUM as X,STR as rt}from"../core/sheet.js";import{parseInput as ct}from"../core/input.js";import{regionInput as ft}from"../core/region-input.js";import{dateSerial as ht,formatGeneral as ut}from"../core/numfmt.js";import{decodeText as dt,sampleText as wt}from"./encoding.js";import{cutFixed as mt,fixedCuts as pt,sniffDelimiter as G}from"./text-split.js";function P(){return{count:0,rows:new Uint32Array(v),cols:new Uint16Array(v),kinds:new Uint8Array(v),values:new Float64Array(v),styles:new Uint16Array(v),formulas:null,valueMeta:null,rowMeta:null}}async function Tt(u,{delimiter:l,addString:i,styleFor:r,onBatch:h,onProgress:m,preserveIdentifiers:b=!1,textColumns:A,delimiters:k,consecutive:H=!1,qualifier:d='"',fixed:y=null,startRow:C=0,skipColumns:M=null,dateColumns:L=null,region:S=null,encoding:V,fallback:q=S?.ansi,onEncoding:tt,maxRows:N=at}){const et=S?ft(S):a=>a;k?.length&&(l=k[0]),y&&(l=`
|
|
2
|
+
`);const it=new Set((k?.length?k:[]).map(a=>a.charCodeAt(0))),I=d?d.charCodeAt(0):-1;let Y=a=>a;if(M?.size){const a=Math.max(...M),e=new Int32Array(a+1);let s=0;for(let t=0;t<=a;t++)M.has(t)?(e[t]=-1,s++):e[t]=t-s;Y=t=>t<=a?e[t]:t-s}const Z={encoding:V,fallback:q},R=u.stream().pipeThrough(dt({...Z,onEncoding:tt})).getReader();let c=P(),p=0,z=!1,_=0,g=new Uint32Array(0);const st=(a,e)=>{if(_*2>=g.length){const s=new Uint32Array(Math.max(64,g.length*2));s.set(g),g=s}g[_*2]=a,g[_*2+1]=e,_++};let x=0,f="",B=!1,D=!1,F=l,U=!1;F===void 0&&u.slice&&(F=G((await wt(u,Z)).text,S?.listSep));let $=!0,T="";if(F===void 0){for(;T.length<65536;){const{done:a,value:e}=await R.read();if(a)break;T+=e}F=G(T.slice(0,65536),S?.listSep)}const E=async()=>{c.count>0&&(await h(c),c=P())},O=()=>{const a=p>=C?Y(x):-1,e=a>=0&&f!=="";if(e&&(p-C>=N||a>=W))z=!0;else if(e){const s=f[0]==="="&&!A?.has(x);s&&st(p-C,a);const t=A?.has(x)||s||b&&/^0\d+$/.test(f),n=L?.has(x)?ht(f,L.get(x)):null,w=n!==null?{kind:X,value:n,format:"m/d/yyyy"}:ct(t?`'${f}`:et(f),S?.currency),o=c.count++;c.rows[o]=p-C,c.cols[o]=a,w.kind===X?(c.kinds[o]=X,c.values[o]=w.value,c.styles[o]=w.format?r(w.format):0):w.kind===j?(c.kinds[o]=j,c.values[o]=w.value,c.styles[o]=0):w.kind===ot?c.count--:(c.kinds[o]=rt,c.values[o]=i(w.text??f),c.styles[o]=0)}f="",x++};if(y)return nt();let K=!1;for(;;){const a=T?{value:T}:await R.read();if(T="",a.done)break;let e=a.value;$&&e.charCodeAt(0)===65279&&(e=e.slice(1)),$=!1,U&&e.length&&(e[0]===`
|
|
3
|
+
`&&(e=e.slice(1)),U=!1);let s=0;for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(B){n===I&&(f+=e.slice(s,t),e.charCodeAt(t+1)===I?(f+=d,t++,s=t+1):t+1>=e.length?(D=!0,B=!1,s=t+1):(B=!1,s=t+1));continue}if(D&&(D=!1,n===I)){f+=d,B=!0,s=t+1;continue}if(n===I&&f===""&&s===t)B=!0,s=t+1;else if(n===F.charCodeAt(0)||it.has(n)){if(H&&K&&f===""&&s===t){s=t+1;continue}f+=e.slice(s,t),O(),s=t+1,K=!0}else(n===10||n===13)&&(K=!1,f+=e.slice(s,t),O(),n===13&&(e.charCodeAt(t+1)===10?t++:t+1===e.length&&(U=!0)),p++,x=0,s=t+1,c.count>=v-W&&await E())}f+=e.slice(s),m?.(p)}return(f!==""||x>0)&&(O(),p++),await E(),{rows:Math.min(N,Math.max(0,p-C)),truncated:z,formulas:_,formulaCells:g.slice(0,_*2)};async function nt(){const a=pt(y);let e="";const s=async()=>{for(const t of mt(e,a))f=t,O();p++,x=0,e="",c.count>=v-W&&await E()};for(;;){const t=await R.read();if(t.done)break;let n=t.value;$&&n.charCodeAt(0)===65279&&(n=n.slice(1)),$=!1,U&&n.length&&(n[0]===`
|
|
4
|
+
`&&(n=n.slice(1)),U=!1);let w=0;for(let o=0;o<n.length;o++){const Q=n.charCodeAt(o);Q!==10&&Q!==13||(e+=n.slice(w,o),await s(),Q===13&&(n.charCodeAt(o+1)===10?o++:o+1===n.length&&(U=!0)),w=o+1)}e+=n.slice(w),m?.(p)}return e!==""&&await s(),await E(),{rows:Math.min(N,Math.max(0,p-C)),truncated:z,formulas:_,formulaCells:g.slice(0,_*2)}}}const yt=(u,l)=>u.includes(l)||u.includes('"')||u.includes(`
|
|
5
|
+
`)||u.includes("\r");function*xt(u,l){let i=[],r=0;const{maxRow:h,maxCol:m,columns:b}=u;for(let A=0;A<=h;A+=J){const k=[];for(let d=0;d<=m;d++){const y=b[d]?.[A>>>lt];y&&k.push([d,y])}const H=Math.min(J,h-A+1);for(let d=0;d<H;d++)for(const[y,C]of k){if(!C.kinds[d])continue;const M=A+d,L=l(u,M,y);i.push([M,y,L]),r+=L.length,(i.length>=2048||r>=262144)&&(yield i,i=[],r=0)}yield i,i=[],r=0}}class At{constructor(l,i=",",{bom:r=!1,width:h=0}={}){this.sink=l,this.delimiter=i,this.row=0,this.col=0,this.encoder=new TextEncoder,this.bom=r,this.width=h,this.emptyRow=i.repeat(Math.max(0,h-1))}_pad(){return this.delimiter.repeat(Math.max(0,this.width-1-this.col))}async _write(l){this.bom&&(l=`\uFEFF${l}`,this.bom=!1),await this.sink.write(this.encoder.encode(l))}async batch(l){let i="";for(const[r,h,m]of l)r>this.row&&(i+=this._pad(),r-this.row>1&&(await this._write(i),i="",await this._emptyRows(r-this.row-1)),i+=`\r
|
|
6
|
+
`,this.row=r,this.col=0),i+=this.delimiter.repeat(h-this.col),i+=yt(m,this.delimiter)?`"${m.replace(/"/g,'""')}"`:m,this.col=h,i.length>=1<<20&&(await this._write(i),i="");i&&await this._write(i)}async _emptyRows(l){const i=`\r
|
|
7
7
|
${this.emptyRow}`,r=Math.max(1,Math.floor((1<<20)/i.length));for(let h=l;h>0;h-=r)await this._write(i.repeat(Math.min(h,r)))}async finish(l){if(l<this.row){this.bom&&await this._write("");return}await this._write(this._pad()),await this._emptyRows(l-this.row),await this._write(`\r
|
|
8
|
-
`)}}async function
|
|
8
|
+
`)}}async function bt(u,l,i,r=",",h={}){const m=new At(i,r,h);for(const b of xt(u,l))await m.batch(b);await m.finish(u.maxRow)}export{At as CsvWriter,xt as csvBatches,ut as formatGeneral,Tt as readCsv,G as sniffDelimiter,bt as writeCsv};
|
package/io/encoding.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const U={"utf-8":"UTF-8","utf-16le":"UTF-16","windows-1250":"Central European (Windows-1250)","iso-8859-2":"Central European (ISO-8859-2)","windows-1251":"Cyrillic (Windows-1251)","windows-1252":"Western European (Windows-1252)","windows-1253":"Greek (Windows-1253)","windows-1254":"Turkish (Windows-1254)","windows-1255":"Hebrew (Windows-1255)","windows-1256":"Arabic (Windows-1256)","windows-1257":"Baltic (Windows-1257)","windows-1258":"Vietnamese (Windows-1258)","windows-874":"Thai (Windows-874)",ibm866:"Cyrillic (DOS 866)",shift_jis:"Japanese (Shift-JIS)","euc-jp":"Japanese (EUC)",gb18030:"Chinese Simplified (GB18030)",big5:"Chinese Traditional (Big5)","euc-kr":"Korean (EUC)"},p={"windows-1250":"pl cs sk hu sl hr ro sq bs","windows-1251":"ru uk be bg sr mk kk ky mn tt","windows-1253":"el","windows-1254":"tr az uz","windows-1255":"he","windows-1256":"ar fa ur","windows-1257":"lt lv et","windows-1258":"vi","windows-874":"th",shift_jis:"ja","euc-kr":"ko"},m=new Map(Object.entries(p).flatMap(([i,n])=>n.split(" ").map(f=>[f,i])));function W(i){let n;try{n=new Intl.Locale(i||"en-US").maximize()}catch{return"windows-1252"}return n.language==="zh"?n.script==="Hant"?"big5":"gb18030":n.script==="Cyrl"?"windows-1251":n.script==="Latn"&&n.language==="sr"?"windows-1250":m.get(n.language)??"windows-1252"}const b=[[[239,187,191],"utf-8"],[[255,254],"utf-16le"],[[254,255],"utf-16be"]];function x(i){for(const[n,f]of b)if(i.length>=n.length&&n.every((r,t)=>i[t]===r))return f;return null}function g(i,n){let f=0,r=0;for(let t=n;t<i.length;){const s=i[t];if(s<128){t++;continue}const d=s>=194&&s<=223?1:s>=224&&s<=239?2:s>=240&&s<=244?3:0;if(d===0){r++,t++;continue}let l=1;for(;l<=d&&t+l<i.length;){const a=i[t+l],o=l>1?128:s===224?160:s===240?144:128,u=l>1?191:s===237?159:s===244?143:191;if(a<o||a>u)break;l++}l>d?f++:t+l<i.length&&r++,t+=l}return f===0&&r===0?null:f>r?"utf-8":"other"}function T(i){const n=Math.min(i.length&-2,64);if(n<4)return null;let f=0,r=0;for(let t=0;t<n;t+=2)i[t]===0&&f++,i[t+1]===0&&r++;return r*2>=n*.7&&f===0?"utf-16le":f*2>=n*.7&&r===0?"utf-16be":null}function E({encoding:i,fallback:n="windows-1252",onEncoding:f}={}){let r=null,t=null,s=!1;const d=o=>{r=new TextDecoder(o),f?.(o)};i&&d(i);const l=(o,u)=>{const e=new Uint8Array(o.length+u.length);return e.set(o),e.set(u,o.length),e},a=(o,u)=>{const e=r.decode(o,{stream:!0});e&&u.enqueue(e)};return new TransformStream({transform(o,u){let e=o instanceof Uint8Array?o:new Uint8Array(o.buffer??o,o.byteOffset??0,o.byteLength);if(r){a(e,u);return}if(t&&(e=l(t,e)),t=null,!s){if(e.length<4){t=e.slice();return}const w=x(e)??T(e);s=!0,w&&d(w)}if(!r){let w=0;for(;w<e.length&&e[w]<128;)w++;if(w===e.length){u.enqueue(h(e));return}const c=g(e,w);if(c===null){w>0&&u.enqueue(h(e.subarray(0,w))),t=e.slice(w);return}d(c==="utf-8"?"utf-8":n)}a(e,u)},flush(o){if(!r){const e=t??new Uint8Array(0);d(x(e)??(g(e,0)==="utf-8"||e.every(w=>w<128)?"utf-8":n)),a(e,o)}const u=r.decode();u&&o.enqueue(u)}})}const C=new TextDecoder,h=i=>C.decode(i);async function y(i,n={},f=65536){let r=n.encoding??"utf-8",t="";const s=i.slice(0,f).stream().pipeThrough(E({...n,onEncoding:d=>{r=d}})).getReader();for(;;){const{done:d,value:l}=await s.read();if(d)return{text:t,encoding:r};t+=l}}export{U as TEXT_ENCODINGS,W as ansiEncoding,E as decodeText,y as sampleText};
|
package/io/foreign-sheets.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{relativeTarget as z,relsPathOf as
|
|
2
|
-
`,X=["sheetCalcPr","sheetProtection","protectedRanges","scenarios","autoFilter","sortState","dataConsolidate","customSheetViews","mergeCells","phoneticPr","conditionalFormatting","dataValidations","hyperlinks","printOptions","pageMargins","pageSetup","headerFooter","rowBreaks","colBreaks","customProperties","cellWatches","ignoredErrors","smartTags","drawing","legacyDrawing","legacyDrawingHF","drawingHF","picture","oleObjects","controls","webPublishItems","tableParts","extLst"],ae=new Set(["sheetCalcPr","protectedRanges","dataConsolidate","phoneticPr","customProperties","cellWatches","ignoredErrors","smartTags","legacyDrawing","oleObjects","controls","webPublishItems"]),I=(e,n)=>{const t=new RegExp(`\\s${n.replace(/[.:]/g,"\\$&")}="([^"]*)"`).exec(e);return t?F(t[1]):void 0},q=e=>[...e.matchAll(/<Relationship\b[^>]*\/>/g)].map(n=>({id:I(n[0],"Id"),type:I(n[0],"Type"),target:I(n[0],"Target"),mode:I(n[0],"TargetMode")})),K=e=>e.slice(e.indexOf(":")+1),P=/<[^>"']*(?:(?:"[^"]*"|'[^']*')[^>"']*)*>/y;function B(e){const n=K(/^<([\w.:-]+)/.exec(e)[1]);if(n!=="AlternateContent")return n;for(const t of e.matchAll(/<([\w.:-]+)/g)){const s=K(t[1]);if(s!=="AlternateContent"&&s!=="Choice"&&s!=="Fallback")return s}return n}function C(e){const n=[];let t=0,s=-1;for(let r=e.indexOf("<");r>=0;r=e.indexOf("<",r)){P.lastIndex=r;const a=P.exec(e);if(!a)break;const o=a[0],i=r;if(r=P.lastIndex,!(o[1]==="?"||o[1]==="!"))if(o[1]==="/"){if(t===0)break;--t===0&&n.push({name:B(e.slice(s,r)),start:s,end:r})}else t===0?o.endsWith("/>")?n.push({name:B(o),start:i,end:r}):(t=1,s=i):o.endsWith("/>")||t++}return n}async function re(e,n,t){const s=(await e.stream(n)).pipeThrough(new TextDecoderStream).getReader(),r=[];let a=null,o="",i=0,l=0,f=0,m=-1;const w=async()=>{const{done:g,value:$}=await s.read();return g?!1:(o+=$,!0)};try{for(;;){if(i===0){const y=/<(?:[\w.-]+:)?sheetData\b[^>]*?(\/?)>/.exec(o);if(y){a=/<(?:[\w.-]+:)?worksheet\b[^>]*>/.exec(o)?.[0]??"",i=y[1]?2:1,o=o.slice(y.index+y[0].length);continue}if(!await w())break;continue}if(i===1){const y=/<\/(?:[\w.-]+:)?sheetData\s*>/.exec(o);if(y){i=2,o=o.slice(y.index+y[0].length);continue}if(o=o.slice(-32),!await w())break;continue}const g=o.indexOf("<",l);P.lastIndex=g;const $=g>=0?P.exec(o):null;if(!$){if(m<0&&(o=g>=0?o.slice(g):"",l=0),!await w())break;continue}const b=$[0];if(l=P.lastIndex,!(b[1]==="?"||b[1]==="!")){if(b[1]==="/"){if(f===0)break;--f===0&&m>=0&&(r.push(o.slice(m,l)),m=-1)}else if(f===0){const y=K(/^<([\w.:-]+)/.exec(b)[1]),k=t.has(y)||y==="AlternateContent";b.endsWith("/>")?k&&r.push(b):(f=1,k&&(m=g))}else b.endsWith("/>")||f++;m<0&&(o=o.slice(l),l=0)}}}finally{s.cancel().catch(()=>{})}return{root:a??"",elements:r.filter(g=>t.has(B(g)))}}function W(e){const n={};for(const t of e.matchAll(/\sxmlns(?::([\w.-]+))?="([^"]*)"/g))n[t[1]??""]=t[2];return n}function H(e){const n=/^<(?:[\w.-]+:)?extLst\b[^>]*>/.exec(e);if(!n||n[0].endsWith("/>"))return[];const t=e.slice(n[0].length,e.search(/<\/(?:[\w.-]+:)?extLst\s*>\s*$/));return C(`${t}</x>`).map(s=>t.slice(s.start,s.end)).map(s=>({uri:I(/^<[^>]*>/.exec(s)[0],"uri")??"",xml:s})).filter(s=>/^<(?:[\w.-]+:)?ext\b/.test(s.xml))}function G(e){const n=new Set;for(const t of e.matchAll(/<\/?([\w.-]+):[\w.-]+|\s([\w.-]+):[\w.-]+=/g))n.add(t[1]??t[2]);for(const t of e.matchAll(/\s(?:[\w.-]+:)?(?:Requires|Ignorable|ProcessContent|PreserveElements|PreserveAttributes)="([^"]*)"/g))for(const s of t[1].split(/\s+/))s&&n.add(s.split(":")[0]);return n.delete("xmlns"),n.delete("xml"),n}const le=e=>[...e.fragments.flatMap(n=>[n.pre??"",n.xml,n.post??""]),...e.exts.map(n=>n.xml)];async function he(e,n){const t={sheets:{},tables:{},parts:{}},s=async a=>{if(t.parts[a]||!e.has(a)||n.skip(a))return;const o=e.has(S(a))?q(await e.text(S(a))):[];t.parts[a]={contentType:n.contentTypeOf(a),rels:o.map(i=>({...i,target:i.mode==="External"?i.target:N(a,i.target)}))};for(const i of t.parts[a].rels)i.mode!=="External"&&await s(i.target)};let r;try{r=await ee(e)}catch{return t}for(const[a,o]of r){if(!e.has(o)||o.includes("/chartsheets/"))continue;const i=S(o),l=e.has(i)?q(await e.text(i)):[],f=new Map(l.map(p=>[p.id,p])),{root:m,elements:w}=await re(e,o,new Set([...ae,"pageSetup","extLst"])),g=W(m),$=Object.keys(g).find(p=>p&&g[p]===A)??"r",b=Object.keys(g).find(p=>p&&g[p]===_),y=b&&I(m,`${b}:Ignorable`)?.split(/\s+/).filter(Boolean)||[],k=new RegExp(`\\s${$}:[\\w.-]+="([^"]*)"`,"g"),c={decls:g,rPrefix:$,ignorable:y,fragments:[],exts:[],printer:null,vml:null,shapeIds:[],rels:{},bare:[]},h=async p=>{const u=f.get(p);if(!u||c.rels[p])return!!u;const x=u.mode==="External"?u.target:N(o,u.target);return c.rels[p]={type:u.type,target:x,mode:u.mode},u.mode!=="External"&&await s(x),!0};for(const p of w){const u=B(p);if(u==="pageSetup"){const d=I(p,`${$}:id`);d&&await h(d)&&(c.printer=d);continue}if(u==="extLst"){for(const d of H(p))if(!oe.has(d.uri.toUpperCase())){for(const T of d.xml.matchAll(k))await h(F(T[1]));c.exts.push(d)}continue}let x={name:u,xml:p};if(u==="controls"){const d=ce(p,T=>f.get(T)?.type!==te,$);if(!d)continue;x={name:u,...d}}if(u==="legacyDrawing"){const d=I(p,`${$}:id`);if(!d||!await h(d))continue;c.vml=d}for(const d of x.xml.matchAll(k))await h(F(d[1]));if(u==="oleObjects"||u==="controls")for(const d of x.xml.matchAll(/\sshapeId="(\d+)"/g))c.shapeIds.includes(Number(d[1]))||c.shapeIds.push(Number(d[1]));c.fragments.push(x)}for(const p of l)p.type===V&&p.mode!=="External"&&await h(p.id)&&c.bare.push(p.id);c.vml&&c.shapeIds.length===0&&(delete c.rels[c.vml],c.fragments=c.fragments.filter(p=>p.name!=="legacyDrawing"),c.vml=null),(c.fragments.length||c.exts.length||c.printer||c.bare.length)&&(t.sheets[a]=c);for(const p of l){if(p.type!==`${A}/table`||p.mode==="External")continue;const u=N(o,p.target);if(!e.has(u))continue;const x=await e.text(u),d=/<(?:[\w.-]+:)?table\b[^>]*>/.exec(x)?.[0]??"";if(I(d,"tableType")!=="queryTable")continue;const E=(e.has(S(u))?q(await e.text(S(u))):[]).filter(D=>D.type===V&&D.mode!=="External");if(E.length===0)continue;const v=[];for(const D of E){const U=N(u,D.target);await s(U),v.push({id:D.id,type:D.type,target:U})}const Z=[...x.matchAll(/<(?:[\w.-]+:)?tableColumn\b[^>]*>/g)].map(D=>({id:I(D[0],"id"),name:I(D[0],"name"),uniqueName:I(D[0],"uniqueName"),queryTableFieldId:I(D[0],"queryTableFieldId")}));t.tables[(I(d,"name")??"").toUpperCase()]={columns:Z,rels:v}}}return t}function ce(e,n,t){const s=/<(?:[\w.-]+:)?controls\b[^>]*>/.exec(e);if(!s||(e.match(/<(?:[\w.-]+:)?controls\b/g)??[]).length!==1)return null;const r=e.search(/<\/(?:[\w.-]+:)?controls\s*>/);if(r<0)return null;const a=e.slice(s.index+s[0].length,r),o=C(`${a}</x>`).map(i=>a.slice(i.start,i.end)).filter(i=>{const l=/<(?:[\w.-]+:)?control\b[^>]*>/.exec(i)?.[0],f=l&&I(l,`${t}:id`);return f?n(f):!1});return o.length===0?null:{xml:o.join(""),units:o,pre:e.slice(0,s.index+s[0].length),post:e.slice(r)}}function Y(e,n){const t=e.lastIndexOf("/"),s=e.lastIndexOf("."),r=s>t?e.slice(0,s):e,a=s>t?e.slice(s):"";if(/-kept\d*$/.test(r)&&!n.has(e))return e;let o=`${r}-kept${a}`;for(let i=2;n.has(o);i++)o=`${r}-kept${i}${a}`;return o}const ie=(e,n)=>!!(n&&!n.existing&&e.comments?.length||e.objects?.controls&&(e.objects.controls.items?.length||e.objects.controls.cameras?.length));function ge(e,n){const t=e?.kept;if(!t)return null;const s=new Map,r=new Set(Object.keys(t.parts)),a=m=>{if(s.has(m)||!t.parts[m])return;const w=Y(m,r);r.add(w),s.set(m,w);for(const g of t.parts[m].rels)g.mode!=="External"&&a(g.target)},o=new Map,i=[];n.sheets.forEach((m,w)=>{const g=m.chartSheet?null:t.sheets[m.name];if(!g)return;const $=!!g.vml&&ie(m,n.noteParts?.[w]);for(const[y,k]of Object.entries(g.rels))if(k.mode!=="External")if(y===g.vml)for(const c of t.parts[k.target]?.rels??[])c.mode!=="External"&&a(c.target);else a(k.target);let b=null;g.vml&&!$&&(b=Y(g.rels[g.vml].target,r),r.add(b),i.push({partName:`/${b}`,contentType:se})),o.set(w,{...g,merge:$,vmlName:b})});const l=new Map;for(const m of n.tables??[]){const w=m.xml!==null?t.tables[m.patch.name.toUpperCase()]:null;if(!w)continue;const g=[...m.xml.matchAll(/<tableColumn\b[^>]*>/g)].map(b=>I(b[0],"name")),$=new Map(w.columns.map(b=>[b.name?.toLowerCase(),b]));if(!(g.length!==w.columns.length||g.some(b=>!$.has(b?.toLowerCase())))){for(const b of w.rels)a(b.target);l.set(m.part,{...w,byName:$})}}if(o.size===0&&l.size===0)return null;const f=[...[...s].map(([m,w])=>({partName:`/${w}`,contentType:t.parts[m].contentType})),...i];return{sheets:o,tables:l,names:s,types:f,kept:t}}function O(e,n,t){return e.map(s=>{const r=s.mode==="External"?s.target:z(n,t.get(s.target)??s.target);return`<Relationship Id="${R(s.id)}" Type="${R(s.type)}" Target="${R(r)}"${s.mode?` TargetMode="${R(s.mode)}"`:""}/>`}).join("")}function M(e,n,t={}){const s=G(e),r=/^<[^>"']*(?:(?:"[^"]*"|'[^']*')[^>"']*)*>/.exec(e)[0],a=W(r),o=[...s].filter(l=>!(l in a)&&n[l]&&t[l]!==n[l]&&!(l==="r"&&n[l]===A)).map(l=>` xmlns:${l}="${R(n[l])}"`).join("");if(!o)return e;const i=r.endsWith("/>")?r.length-2:r.length-1;return e.slice(0,i)+o+e.slice(i)}function xe(e,n){const t=/<(?:[\w.-]+:)?worksheet\b[^>]*>/.exec(e);if(!t)return e;const s=W(t[0]),r=new Set;for(const l of le(n))for(const f of G(l))r.add(f);let a=t[0];const o=[];for(const l of r)!l||!n.decls[l]||l in s||(o.push(` xmlns:${l}="${R(n.decls[l])}"`),s[l]=n.decls[l]);const i=n.ignorable.filter(l=>r.has(l)&&s[l]===n.decls[l]);if(i.length){let l=Object.keys(s).find(f=>f&&s[f]===_);if(!l&&!("mc"in s)&&(l="mc",o.push(` xmlns:mc="${_}"`),s.mc=_),l){const f=new RegExp(`(\\s${l}:Ignorable=")([^"]*)(")`),m=f.exec(a)?.[2].split(/\s+/).filter(Boolean)??[],w=[...new Set([...m,...i])].join(" ");a=f.test(a)?a.replace(f,`$1${w}$3`):a.replace(/(\/?)>$/,` ${l}:Ignorable="${w}"$1>`)}}return o.length&&(a=a.replace(/(\/?)>$/,`${o.join("")}$1>`)),n.rootDecls=s,e.replace(t[0],a)}function we(e,n){const t=e?.controls;if(!t||!n?.shapeIds.length)return;const s=new Set(n.shapeIds),r=[...t.items??[],...t.cameras??[]];if(!r.some(m=>s.has(m.shapeId)))return;let a=typeof e.xml=="string"?e.xml:e.xml?new TextDecoder().decode(e.xml):"";const o=[...a.matchAll(/<(?:[\w.-]+:)?cNvPr\b[^>]*?\sid="(\d+)"|_x0000_s(\d+)"/g)].map(m=>Number(m[1]??m[2]));let i=Math.max(1024,...n.shapeIds,...r.map(m=>m.shapeId),...o);const l=new Set(String(t.idmap??"").split(",").map(m=>m.trim()).filter(Boolean)),f=new Set(t.items??[]);for(const m of r){if(!s.has(m.shapeId))continue;const w=m.shapeId,g=++i;m.shapeId=g,l.add(String(Math.floor(g/1024))),f.has(m)&&(a=a.replace(new RegExp(`(<(?:[\\w.-]+:)?cNvPr\\b[^>]*?\\sid=")${w}(")`),`$1${g}$2`)),a=a.replace(new RegExp(`_x0000_s${w}"`,"g"),`_x0000_s${g}"`)}t.idmap=[...l].join(","),e.xml&&(e.xml=a)}function L(e,n,t){const s=X.indexOf(n),r=C(e).find(o=>X.indexOf(o.name)>s),a=r?r.start:e.search(/<\/(?:[\w.-]+:)?worksheet\s*>/);return a<0?e+t:e.slice(0,a)+t+e.slice(a)}const Q=e=>[...e.matchAll(/<v:(shape|rect|roundrect|oval|line|polyline|arc|group|image)\b(?:(?!<\/v:\1>)[\s\S])*?<\/v:\1>/g)].map(n=>n[0]);async function be(e,n){const{group:t,part:s,pending:r,extraParts:a,foreignZip:o,names:i}=n,{kept:l}=n;let f=e,m=0;const w=new Map,g=h=>{if(!w.has(h)){const p=`rIdKept${++m}`;w.set(h,p);const u=t.rels[h];r.push(O([{id:p,type:u.type,target:u.target,mode:u.mode}],s,i))}return w.get(h)},$=new RegExp(`(\\s${t.rPrefix}:[\\w.-]+=")([^"]*)(")`,"g"),b=h=>h.replace($,(p,u,x,d)=>t.rels[F(x)]?`${u}${g(F(x))}${d}`:p);if(t.printer){const h=g(t.printer),p=/<pageSetup\b[^>]*?\/>/.exec(f);f=p?f.replace(p[0],p[0].replace(/\/>$/,` r:id="${h}"/>`)):L(f,"pageSetup",`<pageSetup r:id="${h}"/>`)}for(const h of t.bare)g(h);const y=new Set(C(f).map(h=>h.name)),k=t.rootDecls??{};let c=t.fragments;if(t.vml){const h=/<legacyDrawing\b[^>]*\br:id="([^"]+)"/.exec(f)?.[1],p=await o.text(t.rels[t.vml].target),u=l.parts[t.rels[t.vml].target]?.rels??[];let x=!1;if(t.merge&&h){const d=r.map(v=>v.includes(`Id="${h}"`)?/Target="([^"]+)"/.exec(v)?.[1]:null).find(Boolean),T=d?N(s,d):null,E=T?a.find(v=>v.path===T):null;x=E?J(E,p,t,u,a,i):!1,x&&(c=c.filter(v=>v.name!=="legacyDrawing"))}else if(!t.merge&&!h){const d={path:t.vmlName,xml:pe(p)};if(x=J(d,p,t,u,a,i),x){a.push(d);const T=`rIdKept${++m}`;r.push(O([{id:T,type:ne,target:t.vmlName}],s,i)),c=c.map(E=>E.name==="legacyDrawing"?{name:E.name,xml:`<legacyDrawing r:id="${T}"/>`}:E)}}x||(c=c.filter(d=>!["legacyDrawing","oleObjects","controls"].includes(d.name)))}for(const h of c){if(h.name==="controls"){const p=h.units.map(x=>M(b(x),t.decls,k)),u=C(f).find(x=>x.name==="controls");if(u){const x=f.slice(u.start,u.end),d=x.search(/<\/(?:[\w.-]+:)?controls\s*>/);f=f.slice(0,u.start)+x.slice(0,d)+p.join("")+x.slice(d)+f.slice(u.end)}else f=L(f,"controls",M(`${b(h.pre)}${p.join("")}${h.post}`,t.decls,k));continue}y.has(h.name)||(f=L(f,h.name,M(b(h.xml),t.decls,k)))}if(t.exts.length){const h=C(f).find(d=>d.name==="extLst"),p=h?f.slice(h.start,h.end):"",u=new Set(H(p).map(d=>d.uri.toUpperCase())),x=t.exts.filter(d=>!u.has(d.uri.toUpperCase())).map(d=>M(b(d.xml),t.decls,k)).join("");if(x&&h){const d=p.search(/<\/(?:[\w.-]+:)?extLst\s*>\s*$/);f=f.slice(0,h.start)+p.slice(0,d)+x+p.slice(d)+f.slice(h.end)}else x&&(f=L(f,"extLst",`<extLst>${x}</extLst>`))}return f}function pe(e){const n=/<xml\b[^>]*>/.exec(e)?.[0]??'<xml xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel">',t=/<o:shapelayout\b[\s\S]*?<\/o:shapelayout>/.exec(e)?.[0]??"";return`${n}${t}</xml>`}function fe(e,n){return e.replace(/(<o:idmap\b[^>]*?\sdata=")([^"]*)(")/,(t,s,r,a)=>{const o=new Set(r.split(",").map(i=>i.trim()).filter(Boolean));for(const i of n)o.add(String(Math.floor(i/1024)));return`${s}${[...o].join(",")}${a}`})}function J(e,n,t,s,r,a){let o=typeof e.xml=="string"?e.xml:new TextDecoder().decode(e.xml);const i=new Set(t.shapeIds),l=Q(n).filter(c=>i.has(Number(/\bid="_x0000_s(\d+)"/.exec(c)?.[1])));if(l.length===0)return!1;let f=Math.max(1024,...[...o.matchAll(/_x0000_s(\d+)/g)].map(c=>Number(c[1])),...t.shapeIds);for(const c of Q(o)){const h=Number(/\bid="_x0000_s(\d+)"/.exec(c)?.[1]);i.has(h)&&/ObjectType="Note"/.test(c)&&(o=o.replace(c,c.replace(`id="_x0000_s${h}"`,`id="_x0000_s${++f}"`)))}if([...o.matchAll(/\bid="_x0000_s(\d+)"/g)].some(c=>i.has(Number(c[1]))))return!1;o=fe(o,t.shapeIds);const m=new Map,w=[],g=S(e.path),$=r.find(c=>c.path===g);let b=0;const y=l.map(c=>c.replace(/(\so:relid=")([^"]*)(")/g,(h,p,u,x)=>{const d=s.find(T=>T.id===u);return d?(m.has(u)||(m.set(u,`rIdKeptV${++b}`),w.push({...d,id:m.get(u)})),`${p}${m.get(u)}${x}`):h})),k=[...new Set(y.map(c=>/\btype="#([^"]+)"/.exec(c)?.[1]).filter(Boolean))].filter(c=>!o.includes(`id="${c}"`)).map(c=>new RegExp(`<v:shapetype\\b[^>]*\\bid="${c}"(?:(?!</v:shapetype>)[\\s\\S])*?</v:shapetype>`).exec(n)?.[0]??"").join("");if(e.xml=o.replace(/<\/xml>\s*$/,`${k}${y.join("")}</xml>`),w.length){const c=O(w,e.path,a);$?$.xml=String($.xml).replace("</Relationships>",`${c}</Relationships>`):r.push({path:g,xml:`${j}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${c}</Relationships>`})}return!0}function $e(e,n){let t=e.replace(/<table\b[^>]*?(\/?)>/,s=>/\stableType=/.test(s)?s:s.replace(/(\/?)>$/,' tableType="queryTable"$1>'));return t=t.replace(/<tableColumn\b[^>]*?(\/?)>/g,s=>{const r=n.byName.get(I(s,"name")?.toLowerCase());if(!r)return s;let a=s.replace(/\s(?:uniqueName|queryTableFieldId)="[^"]*"/g,"").replace(/\sid="[^"]*"/,` id="${R(r.id)}"`);const o=`${r.uniqueName!==void 0?` uniqueName="${R(r.uniqueName)}"`:""}${r.queryTableFieldId!==void 0?` queryTableFieldId="${R(r.queryTableFieldId)}"`:""}`;return a=a.replace(/(\/?)>$/,`${o}$1>`),a}),t}const ye=(e,n,t)=>({path:S(e),xml:`${j}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${O(n.rels,e,t)}</Relationships>`});async function Ie(e,n,t,s){for(const[r,a]of n.names){const o=t.entries.get(r);if(!o||s.has(a))continue;await e.copyRaw(t,o,a),s.add(a);const i=n.kept.parts[r].rels;if(i.length){const l=S(a);s.has(l)||(await e.addBytes(l,`${j}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${O(i,a,n.names)}</Relationships>`),s.add(l))}}}export{be as applyKeptSheet,we as clearKeptShapeIds,xe as declareKeptNamespaces,ye as keptTableRels,$e as keptTableXml,ge as planKeptParts,he as readKeptSheets,Ie as writeKeptParts};
|
|
1
|
+
import{relativeTarget as z,relsPathOf as v,resolveTarget as N,sheetPartsByName as ee}from"./package-paths.js";import{unescapeXml as F}from"./xml-scan.js";import{escapeMarkup as S}from"./xml-escape.js";const A="http://schemas.openxmlformats.org/officeDocument/2006/relationships",_="http://schemas.openxmlformats.org/markup-compatibility/2006",te=`${A}/ctrlProp`,V=`${A}/queryTable`,ne=`${A}/vmlDrawing`,se="application/vnd.openxmlformats-officedocument.vmlDrawing",oe=new Set(["{78C0D931-6437-407D-A8EE-F0AAD7539E65}","{05C60535-1F16-4FD2-B633-F4F36F0B64E0}","{A8765BA9-456A-4DAB-B4F3-ACF838C121DE}","{3A4CF648-6AED-40F4-86FF-DC5316D8AED3}","{7E03D99C-DC04-49D9-9315-930204A7B6E9}"]),j=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
`,X=["sheetCalcPr","sheetProtection","protectedRanges","scenarios","autoFilter","sortState","dataConsolidate","customSheetViews","mergeCells","phoneticPr","conditionalFormatting","dataValidations","hyperlinks","printOptions","pageMargins","pageSetup","headerFooter","rowBreaks","colBreaks","customProperties","cellWatches","ignoredErrors","smartTags","drawing","legacyDrawing","legacyDrawingHF","drawingHF","picture","oleObjects","controls","webPublishItems","tableParts","extLst"],ae=new Set(["sheetCalcPr","protectedRanges","dataConsolidate","phoneticPr","customProperties","cellWatches","ignoredErrors","smartTags","legacyDrawing","oleObjects","controls","webPublishItems"]),I=(e,n)=>{const t=new RegExp(`\\s${n.replace(/[.:]/g,"\\$&")}="([^"]*)"`).exec(e);return t?F(t[1]):void 0},q=e=>[...e.matchAll(/<Relationship\b[^>]*\/>/g)].map(n=>({id:I(n[0],"Id"),type:I(n[0],"Type"),target:I(n[0],"Target"),mode:I(n[0],"TargetMode")})),K=e=>e.slice(e.indexOf(":")+1),P=/<[^>"']*(?:(?:"[^"]*"|'[^']*')[^>"']*)*>/y;function B(e){const n=K(/^<([\w.:-]+)/.exec(e)[1]);if(n!=="AlternateContent")return n;for(const t of e.matchAll(/<([\w.:-]+)/g)){const s=K(t[1]);if(s!=="AlternateContent"&&s!=="Choice"&&s!=="Fallback")return s}return n}function C(e){const n=[];let t=0,s=-1;for(let r=e.indexOf("<");r>=0;r=e.indexOf("<",r)){P.lastIndex=r;const a=P.exec(e);if(!a)break;const o=a[0],i=r;if(r=P.lastIndex,!(o[1]==="?"||o[1]==="!"))if(o[1]==="/"){if(t===0)break;--t===0&&n.push({name:B(e.slice(s,r)),start:s,end:r})}else t===0?o.endsWith("/>")?n.push({name:B(o),start:i,end:r}):(t=1,s=i):o.endsWith("/>")||t++}return n}async function re(e,n,t){const s=(await e.stream(n)).pipeThrough(new TextDecoderStream).getReader(),r=[];let a=null,o="",i=0,l=0,f=0,m=-1;const w=async()=>{const{done:g,value:$}=await s.read();return g?!1:(o+=$,!0)};try{for(;;){if(i===0){const y=/<(?:[\w.-]+:)?sheetData\b[^>]*?(\/?)>/.exec(o);if(y){a=/<(?:[\w.-]+:)?worksheet\b[^>]*>/.exec(o)?.[0]??"",i=y[1]?2:1,o=o.slice(y.index+y[0].length);continue}if(!await w())break;continue}if(i===1){const y=/<\/(?:[\w.-]+:)?sheetData\s*>/.exec(o);if(y){i=2,o=o.slice(y.index+y[0].length);continue}if(o=o.slice(-32),!await w())break;continue}const g=o.indexOf("<",l);P.lastIndex=g;const $=g>=0?P.exec(o):null;if(!$){if(m<0&&(o=g>=0?o.slice(g):"",l=0),!await w())break;continue}const b=$[0];if(l=P.lastIndex,!(b[1]==="?"||b[1]==="!")){if(b[1]==="/"){if(f===0)break;--f===0&&m>=0&&(r.push(o.slice(m,l)),m=-1)}else if(f===0){const y=K(/^<([\w.:-]+)/.exec(b)[1]),k=t.has(y)||y==="AlternateContent";b.endsWith("/>")?k&&r.push(b):(f=1,k&&(m=g))}else b.endsWith("/>")||f++;m<0&&(o=o.slice(l),l=0)}}}finally{s.cancel().catch(()=>{})}return{root:a??"",elements:r.filter(g=>t.has(B(g)))}}function W(e){const n={};for(const t of e.matchAll(/\sxmlns(?::([\w.-]+))?="([^"]*)"/g))n[t[1]??""]=t[2];return n}function H(e){const n=/^<(?:[\w.-]+:)?extLst\b[^>]*>/.exec(e);if(!n||n[0].endsWith("/>"))return[];const t=e.slice(n[0].length,e.search(/<\/(?:[\w.-]+:)?extLst\s*>\s*$/));return C(`${t}</x>`).map(s=>t.slice(s.start,s.end)).map(s=>({uri:I(/^<[^>]*>/.exec(s)[0],"uri")??"",xml:s})).filter(s=>/^<(?:[\w.-]+:)?ext\b/.test(s.xml))}function G(e){const n=new Set;for(const t of e.matchAll(/<\/?([\w.-]+):[\w.-]+|\s([\w.-]+):[\w.-]+=/g))n.add(t[1]??t[2]);for(const t of e.matchAll(/\s(?:[\w.-]+:)?(?:Requires|Ignorable|ProcessContent|PreserveElements|PreserveAttributes)="([^"]*)"/g))for(const s of t[1].split(/\s+/))s&&n.add(s.split(":")[0]);return n.delete("xmlns"),n.delete("xml"),n}const le=e=>[...e.fragments.flatMap(n=>[n.pre??"",n.xml,n.post??""]),...e.exts.map(n=>n.xml)];async function he(e,n){const t={sheets:{},tables:{},parts:{}},s=async a=>{if(t.parts[a]||!e.has(a)||n.skip(a))return;const o=e.has(v(a))?q(await e.text(v(a))):[];t.parts[a]={contentType:n.contentTypeOf(a),rels:o.map(i=>({...i,target:i.mode==="External"?i.target:N(a,i.target)}))};for(const i of t.parts[a].rels)i.mode!=="External"&&await s(i.target)};let r;try{r=await ee(e)}catch{return t}for(const[a,o]of r){if(!e.has(o)||o.includes("/chartsheets/"))continue;const i=v(o),l=e.has(i)?q(await e.text(i)):[],f=new Map(l.map(p=>[p.id,p])),{root:m,elements:w}=await re(e,o,new Set([...ae,"pageSetup","extLst"])),g=W(m),$=Object.keys(g).find(p=>p&&g[p]===A)??"r",b=Object.keys(g).find(p=>p&&g[p]===_),y=b&&I(m,`${b}:Ignorable`)?.split(/\s+/).filter(Boolean)||[],k=new RegExp(`\\s${$}:[\\w.-]+="([^"]*)"`,"g"),c={decls:g,rPrefix:$,ignorable:y,fragments:[],exts:[],printer:null,vml:null,shapeIds:[],rels:{},bare:[]},h=async p=>{const u=f.get(p);if(!u||c.rels[p])return!!u;const x=u.mode==="External"?u.target:N(o,u.target);return c.rels[p]={type:u.type,target:x,mode:u.mode},u.mode!=="External"&&await s(x),!0};for(const p of w){const u=B(p);if(u==="pageSetup"){const d=I(p,`${$}:id`);d&&await h(d)&&(c.printer=d);continue}if(u==="extLst"){for(const d of H(p))if(!oe.has(d.uri.toUpperCase())){for(const T of d.xml.matchAll(k))await h(F(T[1]));c.exts.push(d)}continue}let x={name:u,xml:p};if(u==="controls"){const d=ce(p,T=>f.get(T)?.type!==te,$);if(!d)continue;x={name:u,...d}}if(u==="legacyDrawing"){const d=I(p,`${$}:id`);if(!d||!await h(d))continue;c.vml=d}for(const d of x.xml.matchAll(k))await h(F(d[1]));if(u==="oleObjects"||u==="controls")for(const d of x.xml.matchAll(/\sshapeId="(\d+)"/g))c.shapeIds.includes(Number(d[1]))||c.shapeIds.push(Number(d[1]));c.fragments.push(x)}for(const p of l)p.type===V&&p.mode!=="External"&&await h(p.id)&&c.bare.push(p.id);c.vml&&c.shapeIds.length===0&&(delete c.rels[c.vml],c.fragments=c.fragments.filter(p=>p.name!=="legacyDrawing"),c.vml=null),(c.fragments.length||c.exts.length||c.printer||c.bare.length)&&(t.sheets[a]=c);for(const p of l){if(p.type!==`${A}/table`||p.mode==="External")continue;const u=N(o,p.target);if(!e.has(u))continue;const x=await e.text(u),d=/<(?:[\w.-]+:)?table\b[^>]*>/.exec(x)?.[0]??"";if(I(d,"tableType")!=="queryTable")continue;const E=(e.has(v(u))?q(await e.text(v(u))):[]).filter(D=>D.type===V&&D.mode!=="External");if(E.length===0)continue;const R=[];for(const D of E){const U=N(u,D.target);await s(U),R.push({id:D.id,type:D.type,target:U})}const Z=[...x.matchAll(/<(?:[\w.-]+:)?tableColumn\b[^>]*>/g)].map(D=>({id:I(D[0],"id"),name:I(D[0],"name"),uniqueName:I(D[0],"uniqueName"),queryTableFieldId:I(D[0],"queryTableFieldId")}));t.tables[(I(d,"name")??"").toUpperCase()]={columns:Z,rels:R}}}return t}function ce(e,n,t){const s=/<(?:[\w.-]+:)?controls\b[^>]*>/.exec(e);if(!s||(e.match(/<(?:[\w.-]+:)?controls\b/g)??[]).length!==1)return null;const r=e.search(/<\/(?:[\w.-]+:)?controls\s*>/);if(r<0)return null;const a=e.slice(s.index+s[0].length,r),o=C(`${a}</x>`).map(i=>a.slice(i.start,i.end)).filter(i=>{const l=/<(?:[\w.-]+:)?control\b[^>]*>/.exec(i)?.[0],f=l&&I(l,`${t}:id`);return f?n(f):!1});return o.length===0?null:{xml:o.join(""),units:o,pre:e.slice(0,s.index+s[0].length),post:e.slice(r)}}function Y(e,n){const t=e.lastIndexOf("/"),s=e.lastIndexOf("."),r=s>t?e.slice(0,s):e,a=s>t?e.slice(s):"";if(/-kept\d*$/.test(r)&&!n.has(e))return e;let o=`${r}-kept${a}`;for(let i=2;n.has(o);i++)o=`${r}-kept${i}${a}`;return o}const ie=(e,n)=>!!(n&&!n.existing&&e.comments?.length||e.objects?.controls&&(e.objects.controls.items?.length||e.objects.controls.cameras?.length));function ge(e,n){const t=e?.kept;if(!t)return null;const s=new Map,r=new Set(Object.keys(t.parts)),a=m=>{if(s.has(m)||!t.parts[m])return;const w=Y(m,r);r.add(w),s.set(m,w);for(const g of t.parts[m].rels)g.mode!=="External"&&a(g.target)},o=new Map,i=[];n.sheets.forEach((m,w)=>{const g=m.chartSheet?null:t.sheets[m.name];if(!g)return;const $=!!g.vml&&ie(m,n.noteParts?.[w]);for(const[y,k]of Object.entries(g.rels))if(k.mode!=="External")if(y===g.vml)for(const c of t.parts[k.target]?.rels??[])c.mode!=="External"&&a(c.target);else a(k.target);let b=null;g.vml&&!$&&(b=Y(g.rels[g.vml].target,r),r.add(b),i.push({partName:`/${b}`,contentType:se})),o.set(w,{...g,merge:$,vmlName:b})});const l=new Map;for(const m of n.tables??[]){const w=m.xml!==null?t.tables[m.patch.name.toUpperCase()]:null;if(!w)continue;const g=[...m.xml.matchAll(/<tableColumn\b[^>]*>/g)].map(b=>I(b[0],"name")),$=new Map(w.columns.map(b=>[b.name?.toLowerCase(),b]));if(!(g.length!==w.columns.length||g.some(b=>!$.has(b?.toLowerCase())))){for(const b of w.rels)a(b.target);l.set(m.part,{...w,byName:$})}}if(o.size===0&&l.size===0)return null;const f=[...[...s].map(([m,w])=>({partName:`/${w}`,contentType:t.parts[m].contentType})),...i];return{sheets:o,tables:l,names:s,types:f,kept:t}}function O(e,n,t){return e.map(s=>{const r=s.mode==="External"?s.target:z(n,t.get(s.target)??s.target);return`<Relationship Id="${S(s.id)}" Type="${S(s.type)}" Target="${S(r)}"${s.mode?` TargetMode="${S(s.mode)}"`:""}/>`}).join("")}function M(e,n,t={}){const s=G(e),r=/^<[^>"']*(?:(?:"[^"]*"|'[^']*')[^>"']*)*>/.exec(e)[0],a=W(r),o=[...s].filter(l=>!(l in a)&&n[l]&&t[l]!==n[l]&&!(l==="r"&&n[l]===A)).map(l=>` xmlns:${l}="${S(n[l])}"`).join("");if(!o)return e;const i=r.endsWith("/>")?r.length-2:r.length-1;return e.slice(0,i)+o+e.slice(i)}function xe(e,n){const t=/<(?:[\w.-]+:)?worksheet\b[^>]*>/.exec(e);if(!t)return e;const s=W(t[0]),r=new Set;for(const l of le(n))for(const f of G(l))r.add(f);let a=t[0];const o=[];for(const l of r)!l||!n.decls[l]||l in s||(o.push(` xmlns:${l}="${S(n.decls[l])}"`),s[l]=n.decls[l]);const i=n.ignorable.filter(l=>r.has(l)&&s[l]===n.decls[l]);if(i.length){let l=Object.keys(s).find(f=>f&&s[f]===_);if(!l&&!("mc"in s)&&(l="mc",o.push(` xmlns:mc="${_}"`),s.mc=_),l){const f=new RegExp(`(\\s${l}:Ignorable=")([^"]*)(")`),m=f.exec(a)?.[2].split(/\s+/).filter(Boolean)??[],w=[...new Set([...m,...i])].join(" ");a=f.test(a)?a.replace(f,`$1${w}$3`):a.replace(/(\/?)>$/,` ${l}:Ignorable="${w}"$1>`)}}return o.length&&(a=a.replace(/(\/?)>$/,`${o.join("")}$1>`)),n.rootDecls=s,e.replace(t[0],a)}function we(e,n){const t=e?.controls;if(!t||!n?.shapeIds.length)return;const s=new Set(n.shapeIds),r=[...t.items??[],...t.cameras??[]];if(!r.some(m=>s.has(m.shapeId)))return;let a=typeof e.xml=="string"?e.xml:e.xml?new TextDecoder().decode(e.xml):"";const o=[...a.matchAll(/<(?:[\w.-]+:)?cNvPr\b[^>]*?\sid="(\d+)"|_x0000_s(\d+)"/g)].map(m=>Number(m[1]??m[2]));let i=Math.max(1024,...n.shapeIds,...r.map(m=>m.shapeId),...o);const l=new Set(String(t.idmap??"").split(",").map(m=>m.trim()).filter(Boolean)),f=new Set(t.items??[]);for(const m of r){if(!s.has(m.shapeId))continue;const w=m.shapeId,g=++i;m.shapeId=g,l.add(String(Math.floor(g/1024))),f.has(m)&&(a=a.replace(new RegExp(`(<(?:[\\w.-]+:)?cNvPr\\b[^>]*?\\sid=")${w}(")`),`$1${g}$2`)),a=a.replace(new RegExp(`_x0000_s${w}"`,"g"),`_x0000_s${g}"`)}t.idmap=[...l].join(","),e.xml&&(e.xml=a)}function L(e,n,t){const s=X.indexOf(n),r=C(e).find(o=>X.indexOf(o.name)>s),a=r?r.start:e.search(/<\/(?:[\w.-]+:)?worksheet\s*>/);return a<0?e+t:e.slice(0,a)+t+e.slice(a)}const Q=e=>[...e.matchAll(/<v:(shape|rect|roundrect|oval|line|polyline|arc|group|image)\b(?:(?!<\/v:\1>)[\s\S])*?<\/v:\1>/g)].map(n=>n[0]);async function be(e,n){const{group:t,part:s,pending:r,extraParts:a,foreignZip:o,names:i}=n,{kept:l}=n;let f=e,m=0;const w=new Map,g=h=>{if(!w.has(h)){const p=`rIdKept${++m}`;w.set(h,p);const u=t.rels[h];r.push(O([{id:p,type:u.type,target:u.target,mode:u.mode}],s,i))}return w.get(h)},$=new RegExp(`(\\s${t.rPrefix}:[\\w.-]+=")([^"]*)(")`,"g"),b=h=>h.replace($,(p,u,x,d)=>t.rels[F(x)]?`${u}${g(F(x))}${d}`:p);if(t.printer){const h=g(t.printer),p=/<pageSetup\b[^>]*?\/>/.exec(f);f=p?f.replace(p[0],p[0].replace(/\/>$/,` r:id="${h}"/>`)):L(f,"pageSetup",`<pageSetup r:id="${h}"/>`)}for(const h of t.bare)g(h);const y=new Set(C(f).map(h=>h.name)),k=t.rootDecls??{};let c=t.fragments;if(t.vml){const h=/<legacyDrawing\b[^>]*\br:id="([^"]+)"/.exec(f)?.[1],p=await o.text(t.rels[t.vml].target),u=l.parts[t.rels[t.vml].target]?.rels??[];let x=!1;if(t.merge&&h){const d=r.map(R=>R.includes(`Id="${h}"`)?/Target="([^"]+)"/.exec(R)?.[1]:null).find(Boolean),T=d?N(s,d):null,E=T?a.find(R=>R.path===T):null;x=E?J(E,p,t,u,a,i):!1,x&&(c=c.filter(R=>R.name!=="legacyDrawing"))}else if(!t.merge&&!h){const d={path:t.vmlName,xml:pe(p)};if(x=J(d,p,t,u,a,i),x){a.push(d);const T=`rIdKept${++m}`;r.push(O([{id:T,type:ne,target:t.vmlName}],s,i)),c=c.map(E=>E.name==="legacyDrawing"?{name:E.name,xml:`<legacyDrawing r:id="${T}"/>`}:E)}}x||(c=c.filter(d=>!["legacyDrawing","oleObjects","controls"].includes(d.name)))}for(const h of c){if(h.name==="controls"){const p=h.units.map(x=>M(b(x),t.decls,k)),u=C(f).find(x=>x.name==="controls");if(u){const x=f.slice(u.start,u.end),d=x.search(/<\/(?:[\w.-]+:)?controls\s*>/);f=f.slice(0,u.start)+x.slice(0,d)+p.join("")+x.slice(d)+f.slice(u.end)}else f=L(f,"controls",M(`${b(h.pre)}${p.join("")}${h.post}`,t.decls,k));continue}n.written?.includes(h.name)||y.has(h.name)||(f=L(f,h.name,M(b(h.xml),t.decls,k)))}if(t.exts.length){const h=C(f).find(d=>d.name==="extLst"),p=h?f.slice(h.start,h.end):"",u=new Set(H(p).map(d=>d.uri.toUpperCase())),x=t.exts.filter(d=>!u.has(d.uri.toUpperCase())).map(d=>M(b(d.xml),t.decls,k)).join("");if(x&&h){const d=p.search(/<\/(?:[\w.-]+:)?extLst\s*>\s*$/);f=f.slice(0,h.start)+p.slice(0,d)+x+p.slice(d)+f.slice(h.end)}else x&&(f=L(f,"extLst",`<extLst>${x}</extLst>`))}return f}function pe(e){const n=/<xml\b[^>]*>/.exec(e)?.[0]??'<xml xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel">',t=/<o:shapelayout\b[\s\S]*?<\/o:shapelayout>/.exec(e)?.[0]??"";return`${n}${t}</xml>`}function fe(e,n){return e.replace(/(<o:idmap\b[^>]*?\sdata=")([^"]*)(")/,(t,s,r,a)=>{const o=new Set(r.split(",").map(i=>i.trim()).filter(Boolean));for(const i of n)o.add(String(Math.floor(i/1024)));return`${s}${[...o].join(",")}${a}`})}function J(e,n,t,s,r,a){let o=typeof e.xml=="string"?e.xml:new TextDecoder().decode(e.xml);const i=new Set(t.shapeIds),l=Q(n).filter(c=>i.has(Number(/\bid="_x0000_s(\d+)"/.exec(c)?.[1])));if(l.length===0)return!1;let f=Math.max(1024,...[...o.matchAll(/_x0000_s(\d+)/g)].map(c=>Number(c[1])),...t.shapeIds);for(const c of Q(o)){const h=Number(/\bid="_x0000_s(\d+)"/.exec(c)?.[1]);i.has(h)&&/ObjectType="Note"/.test(c)&&(o=o.replace(c,c.replace(`id="_x0000_s${h}"`,`id="_x0000_s${++f}"`)))}if([...o.matchAll(/\bid="_x0000_s(\d+)"/g)].some(c=>i.has(Number(c[1]))))return!1;o=fe(o,t.shapeIds);const m=new Map,w=[],g=v(e.path),$=r.find(c=>c.path===g);let b=0;const y=l.map(c=>c.replace(/(\so:relid=")([^"]*)(")/g,(h,p,u,x)=>{const d=s.find(T=>T.id===u);return d?(m.has(u)||(m.set(u,`rIdKeptV${++b}`),w.push({...d,id:m.get(u)})),`${p}${m.get(u)}${x}`):h})),k=[...new Set(y.map(c=>/\btype="#([^"]+)"/.exec(c)?.[1]).filter(Boolean))].filter(c=>!o.includes(`id="${c}"`)).map(c=>new RegExp(`<v:shapetype\\b[^>]*\\bid="${c}"(?:(?!</v:shapetype>)[\\s\\S])*?</v:shapetype>`).exec(n)?.[0]??"").join("");if(e.xml=o.replace(/<\/xml>\s*$/,`${k}${y.join("")}</xml>`),w.length){const c=O(w,e.path,a);$?$.xml=String($.xml).replace("</Relationships>",`${c}</Relationships>`):r.push({path:g,xml:`${j}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${c}</Relationships>`})}return!0}function $e(e,n){let t=e.replace(/<table\b[^>]*?(\/?)>/,s=>/\stableType=/.test(s)?s:s.replace(/(\/?)>$/,' tableType="queryTable"$1>'));return t=t.replace(/<tableColumn\b[^>]*?(\/?)>/g,s=>{const r=n.byName.get(I(s,"name")?.toLowerCase());if(!r)return s;let a=s.replace(/\s(?:uniqueName|queryTableFieldId)="[^"]*"/g,"").replace(/\sid="[^"]*"/,` id="${S(r.id)}"`);const o=`${r.uniqueName!==void 0?` uniqueName="${S(r.uniqueName)}"`:""}${r.queryTableFieldId!==void 0?` queryTableFieldId="${S(r.queryTableFieldId)}"`:""}`;return a=a.replace(/(\/?)>$/,`${o}$1>`),a}),t}const ye=(e,n,t)=>({path:v(e),xml:`${j}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${O(n.rels,e,t)}</Relationships>`});async function Ie(e,n,t,s){for(const[r,a]of n.names){const o=t.entries.get(r);if(!o||s.has(a))continue;await e.copyRaw(t,o,a),s.add(a);const i=n.kept.parts[r].rels;if(i.length){const l=v(a);s.has(l)||(await e.addBytes(l,`${j}<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">${O(i,a,n.names)}</Relationships>`),s.add(l))}}}export{be as applyKeptSheet,we as clearKeptShapeIds,xe as declareKeptNamespaces,ye as keptTableRels,$e as keptTableXml,ge as planKeptParts,he as readKeptSheets,Ie as writeKeptParts};
|
package/io/plan.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defaultTheme as
|
|
1
|
+
import{defaultTheme as c,themeXml as u}from"../api/theme-core.js";import{ignoredErrorsXml as h,protectedRangesXml as f}from"./xlsx-tail.js";import{colRecords as p}from"./export-blocks.js";import"../core/address.js";import{richExtras as g}from"../cells/rich-xml.js";import{prepareDefaultsForSave as C}from"../cells/cell-defaults.js";import{tablePatch as w,tableXml as x}from"../core/tables.js";import{printNameEntries as S}from"../print/page-setup.js";import{notesWithAnchors as P}from"../cells/note-xml.js";import{autoFilterXml as y,filterNameEntries as v,sheetFilterXml as R,sheetProps as X}from"../cells/filter-file.js";import{bookViewPlan as E,sheetViewPlan as N}from"../cells/view-xml.js";import{backgroundPlan as V}from"../cells/background-xml.js";import{watermarkPlan as z}from"../api/watermark-xml.js";import{docPropsPlan as I}from"../cells/docprops-xml.js";import{namedStylesPlan as O}from"../cells/cell-styles-xml.js";import{dataConsolidateXml as T}from"../cells/consolidate-links.js";import{customSheetViewsXml as D,customWorkbookViewsXml as A,viewNameEntries as F}from"../core/custom-views.js";import{externalLinkPlan as M}from"../calcx/external-write.js";const o=t=>t.map(r=>{const a={};for(const l of Object.keys(r))l[0]!=="_"&&(a[l]=r[l]);return a});function H(t){for(const r of t.formulas.descriptors())if(r.typed&&(r.cm||r.tpl?.mayArray))return!0;return!1}function L(t){const r={};for(const a of Object.keys(t))a[0]!=="_"&&(r[a]=t[a]);return r}function _(t){return[...t.engine.names].map(([r,a])=>{const l=r.indexOf("!");return{name:a.name??(l>=0?r.slice(l+1):r),localSheetId:l>=0?Number(r.slice(0,l)):void 0,text:a.text,hidden:a.hidden,comment:a.comment}})}function j(t){if(!t.engine)return[];const r=[],a=[...t.engine.tables.values()];let l=a.reduce((n,i)=>Math.max(n,i.id??0),0)+1,s=1e3;const d=new Set([...a.map(n=>n.part),...(t.removedTables??[]).map(n=>n.part)]),e=()=>{let n;do n=`xl/tables/table${s++}.xml`;while(d.has(n));return d.add(n),n};for(const n of a){if(!n.dirty)continue;const i=t.sheets.indexOf(n.sheet);if(i<0)continue;n.id===void 0&&(n.id=l++);const m=n.part??e();n.part=m,r.push({part:m,sheetIndex:i,isNew:n.isNew===!0,xml:n.source&&!n.columnsChanged?null:x(n,n.id),patch:w(n)})}return r}function ie(t,r){C(t);const a=[];for(let e=r.strings;e<t.strings.size;e++)a.push(t.strings.get(e));const l=t.source!==null,s=l?t.styles.list.slice(r.styles):t.styles.list,d=!l&&!t.theme?.length&&s.some(e=>e.themeRefs);return{bookView:E(t),docProps:I(t),namedStyles:O(t),activeSheet:t.activeSheet,date1904:t.date1904,formulasEdited:t.formulasEdited,dynamicArrays:t.sheets.some(e=>H(e)),newDxfs:(t.dxfs??[]).slice(t.sourceDxfs??0),definedNames:t.namesChanged?_(t):null,calcMode:t.calcModeChanged?t.calcMode:null,calcSettings:t.calcSettingsChanged?t.calcSettings:null,persons:t.personsChanged?t.persons:null,workbookProtection:t.protectionChanged?t.protection??{}:null,fileSharing:t.fileSharingChanged?t.fileSharing??{}:null,externalLinks:M(t),customViews:t.customViewsChanged||t.namesChanged&&t.customViews?.length?{workbookXml:A(t),names:F(t)}:null,workbookType:t.fileKind??null,tables:j(t),removedTables:t.removedTables??[],printNames:S(t.sheets),filterNames:v(t.sheets),themeXml:t.themeChanged?t.themeXml:d?u(c()):null,extraStrings:a,extraRich:g(t.strings,r.strings),styles:s.map(L),sheets:t.sheets.map((e,n)=>({name:e.name,chartSheet:e.isChartSheet===!0,sourceIndex:e.sourceIndex!==void 0?e.sourceIndex:-1,tabColor:e.tabColorChanged?e.tabColor??"":null,hidden:e.hidden===!0,veryHidden:e.hidden===!0&&e.veryHidden===!0,cols:p(e),colsChanged:e.colsChanged===!0,structureOps:e.structureOps??[],autoFilter:e.filterChanged?R(e):null,sheetProps:X(e),cf:e.cfChanged?o(e.cf??[]):null,validations:e.validationsChanged?o(e.validations??[]):null,hyperlinks:e.hyperlinksChanged?(e.hyperlinks??[]).map(({_ranges:i,...m})=>m):null,protection:e.protectionChanged?e.protection??!1:null,scenarios:e.scenariosChanged?e.scenarios??{items:[]}:null,protectedRanges:e.protectedRangesChanged?f(e.protectedRanges):null,ignoredErrors:e.ignoredErrorsChanged?h(e.ignoredErrors):null,dataConsolidate:e.dataConsolidateChanged?T(e.dataConsolidate):null,customSheetViews:t.customViewsChanged?D(t,e,i=>y(i,!1)):null,threads:e.threadsChanged?e.threads??[]:null,comments:e.commentsChanged?P(e):null,sparklines:e.sparklinesChanged?e.sparklines??[]:null,pageSetup:e.pageSetupChanged?e.pageSetup:null,viewChanged:e.viewChanged===!0,merges:e.merges,defaultHeight:e.rows.defaultSize,defaultsChanged:e.defaultsChanged===!0,frozenRows:e.frozenRows,frozenCols:e.frozenCols,showGridlines:e.showGridlines,rtl:e.rtl===!0,...N(e,t),sheetPicture:V(e,t),headerPicture:z(e,n),zoom:e.zoom,maxRow:e.maxRow,maxCol:e.maxCol,cellEstimate:(e.maxRow+1)*(e.maxCol+1)}))}}export{ie as buildPlan};
|
package/io/xlsx-tail.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{child as
|
|
1
|
+
import{child as i,children as c,parseTree as y,unescapeOoxml as p}from"./xml-scan.js";import{escapeMarkup as g,xmlAttr as u}from"./xml-escape.js";import{cfvoXml as x,colorAttrs as b,dxfToXml as v,extendRule as R,maskCfBlocks as D,parseDxfList as V}from"../cells/cf-file.js";const j=new TextEncoder,f=t=>t==="1"||t==="true";function T(t){const e=t.replace(/<\/(?:\w+:)?worksheet>\s*$/,"");return y(j.encode(`<root xmlns:r="r" xmlns:x14="x" xmlns:mc="m" xmlns:xm="m" xmlns:xr="x">${e}</root>`))}function F(t){return t?.length?`<protectedRanges>${t.map(({securityDescriptor:e,...o})=>{const r=Array.isArray(e)?e:[],n=Object.entries(typeof e=="string"?{...o,securityDescriptor:e}:o).map(([s,l])=>` ${s}="${u(String(l))}"`).join("");return r.length?`<protectedRange${n}>${r.map(s=>`<securityDescriptor>${g(s)}</securityDescriptor>`).join("")}</protectedRange>`:`<protectedRange${n}/>`}).join("")}</protectedRanges>`:""}function X(t){if(!t?.length)return"";const e=o=>String(o).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<");return`<ignoredErrors>${t.map(o=>`<ignoredError${Object.entries(o).map(([r,n])=>` ${r}="${e(n===!0?"1":n)}"`).join("")}/>`).join("")}</ignoredErrors>`}function O(t){const e={cf:[],validations:[],hyperlinks:[],protection:null};if(!t)return e;let o;try{o=T(t)}catch{return e}for(const a of c(o,"conditionalFormatting")){const m=c(a,"cfRule").map(h=>R(P(h),h));e.cf.push({sqref:a.a.sqref??"",rules:m,...f(a.a.pivot)?{pivot:!0}:{}})}const r=i(o,"dataValidations");for(const a of c(r,"dataValidation"))e.validations.push({sqref:a.a.sqref??"",type:a.a.type??"none",operator:a.a.operator??"between",formula1:i(a,"formula1")?.t??"",formula2:i(a,"formula2")?.t??"",allowBlank:f(a.a.allowBlank),showDropDown:!f(a.a.showDropDown),showError:f(a.a.showErrorMessage),showPrompt:f(a.a.showInputMessage),errorStyle:a.a.errorStyle??"stop",errorTitle:p(a.a.errorTitle??""),error:p(a.a.error??""),promptTitle:p(a.a.promptTitle??""),prompt:p(a.a.prompt??"")});for(const a of c(i(o,"hyperlinks"),"hyperlink"))e.hyperlinks.push({ref:a.a.ref,rid:a.a.id??null,location:a.a.location??null,display:p(a.a.display??null),tooltip:p(a.a.tooltip??null)});const n=i(o,"sheetProtection");n&&(e.protection={...n.a});const s=c(i(o,"protectedRanges"),"protectedRange");s.length&&(e.protectedRanges=s.map(a=>{const m=c(a,"securityDescriptor").map(h=>h.t);return{...a.a,...m.length?{securityDescriptor:m}:{}}}));const l=c(i(o,"customSheetViews"),"customSheetView");l.length&&(e.customSheetViews=l.map(a=>{const m=i(a,"pane"),h=i(a,"selection");return{...a.a,xSplit:m?.a.state==="frozen"?m.a.xSplit:void 0,ySplit:m?.a.state==="frozen"?m.a.ySplit:void 0,activeCell:h?.a.activeCell,sqref:h?.a.sqref}}));const d=i(o,"picture");d&&(e.pictureRid=d.a["r:id"]??d.a.id??null);const $=i(o,"legacyDrawingHF");$&&(e.headerPictureRid=$.a["r:id"]??$.a.id??null);const S=c(i(o,"ignoredErrors"),"ignoredError");S.length&&(e.ignoredErrors=S.map(a=>({...a.a})));const w=i(o,"scenarios");return w&&(e.scenarios={current:Number(w.a.current??0),show:Number(w.a.show??0),items:c(w,"scenario").map(a=>({name:p(a.a.name),user:p(a.a.user??""),comment:p(a.a.comment??""),locked:a.a.locked==="1",hidden:a.a.hidden==="1",cells:c(a,"inputCells").map(m=>({r:m.a.r,val:p(m.a.val??"")}))}))}),e}function P(t){const e=t.a,o={type:e.type,priority:Number(e.priority??0),dxfId:e.dxfId!==void 0?Number(e.dxfId):null,operator:e.operator??null,formulas:c(t,"formula").map(d=>d.t),text:p(e.text??null),rank:e.rank!==void 0?Number(e.rank):null,percent:f(e.percent),bottom:f(e.bottom),aboveAverage:e.aboveAverage===void 0?!0:f(e.aboveAverage),equalAverage:f(e.equalAverage),stdDev:e.stdDev!==void 0?Number(e.stdDev):0,stopIfTrue:f(e.stopIfTrue),timePeriod:e.timePeriod??null},r=d=>c(d,"cfvo").map($=>({type:$.a.type,val:$.a.val??null,gte:$.a.gte===void 0?!0:f($.a.gte)})),n=i(t,"colorScale");n&&(o.colorScale={cfvo:r(n),colors:c(n,"color").map(d=>d.a)});const s=i(t,"dataBar");s&&(o.dataBar={cfvo:r(s),color:i(s,"color")?.a??null,showValue:s.a.showValue===void 0?!0:f(s.a.showValue)});const l=i(t,"iconSet");return l&&(o.iconSet={name:l.a.iconSet??"3TrafficLights1",cfvo:r(l),reverse:f(l.a.reverse),showValue:l.a.showValue===void 0?!0:f(l.a.showValue)}),o}function E(t){let e=`type="${t.type}" priority="${t.priority}"`;t.dxfId!==null&&t.dxfId!==void 0&&(e+=` dxfId="${t.dxfId}"`),t.stopIfTrue&&(e+=' stopIfTrue="1"'),t.operator&&(e+=` operator="${t.operator}"`),t.text!==null&&t.text!==void 0&&(e+=` text="${u(t.text)}"`),t.rank!==null&&t.rank!==void 0&&(e+=` rank="${t.rank}"`),t.percent&&(e+=' percent="1"'),t.bottom&&(e+=' bottom="1"'),t.type==="aboveAverage"&&(t.aboveAverage===!1&&(e+=' aboveAverage="0"'),t.equalAverage&&(e+=' equalAverage="1"'),t.stdDev&&(e+=` stdDev="${t.stdDev}"`)),t.timePeriod&&(e+=` timePeriod="${t.timePeriod}"`);let o=(t.formulas??[]).map(r=>`<formula>${g(r)}</formula>`).join("");return t.colorScale&&(o+=`<colorScale>${x(t.colorScale.cfvo)}${t.colorScale.colors.map(r=>`<color ${b(r)}/>`).join("")}</colorScale>`),t.dataBar&&(o+=`<dataBar${t.dataBar.showValue?"":' showValue="0"'}>${x(t.dataBar.cfvo)}<color ${b(t.dataBar.color)}/></dataBar>`),t.iconSet&&(o+=`<iconSet iconSet="${t.iconSet.name}"${t.iconSet.reverse?' reverse="1"':""}${t.iconSet.showValue?"":' showValue="0"'}>${x(t.iconSet.cfvo)}</iconSet>`),`<cfRule ${e}>${o}</cfRule>`}const C=t=>t.map(e=>`<conditionalFormatting${e.pivot?' pivot="1"':""} sqref="${g(e.sqref)}">${e.rules.map(E).join("")}</conditionalFormatting>`).join("");function N(t){if(t.length===0)return"";const e=t.map(o=>{let r=`type="${o.type}"`;return o.errorStyle&&o.errorStyle!=="stop"&&(r+=` errorStyle="${o.errorStyle}"`),o.operator&&o.operator!=="between"&&(r+=` operator="${o.operator}"`),o.allowBlank&&(r+=' allowBlank="1"'),o.showDropDown===!1&&(r+=' showDropDown="1"'),o.showPrompt&&(r+=' showInputMessage="1"'),o.showError&&(r+=' showErrorMessage="1"'),o.errorTitle&&(r+=` errorTitle="${u(o.errorTitle)}"`),o.error&&(r+=` error="${u(o.error)}"`),o.promptTitle&&(r+=` promptTitle="${u(o.promptTitle)}"`),o.prompt&&(r+=` prompt="${u(o.prompt)}"`),r+=` sqref="${g(o.sqref)}"`,`<dataValidation ${r}>${o.formula1?`<formula1>${g(o.formula1)}</formula1>`:""}${o.formula2?`<formula2>${g(o.formula2)}</formula2>`:""}</dataValidation>`});return`<dataValidations count="${t.length}">${e.join("")}</dataValidations>`}const M=t=>t.length===0?"":`<hyperlinks>${t.map(e=>{let o=`ref="${g(e.ref)}"`;return e.rid&&(o+=` r:id="${g(e.rid)}"`),e.location&&(o+=` location="${g(e.location)}"`),e.display&&(o+=` display="${u(e.display)}"`),e.tooltip&&(o+=` tooltip="${u(e.tooltip)}"`),`<hyperlink ${o}/>`}).join("")}</hyperlinks>`;function z(t){if(!t||t.items.length===0)return"";const e=t.items.map(o=>`<scenario name="${u(o.name)}"${o.locked?' locked="1"':""}${o.hidden?' hidden="1"':""} count="${o.cells.length}" user="${u(o.user||"User")}"${o.comment?` comment="${u(o.comment)}"`:""}>${o.cells.map(r=>`<inputCells r="${r.r}" val="${u(r.val)}"/>`).join("")}</scenario>`).join("");return`<scenarios current="${t.current??0}" show="${t.show??0}">${e}</scenarios>`}function L(t){return t?`<sheetProtection ${Object.entries(t).map(([e,o])=>`${e}="${g(o)}"`).join(" ")}/>`:""}const k=["sheetCalcPr","sheetProtection","protectedRanges","scenarios","autoFilter","sortState","dataConsolidate","customSheetViews","mergeCells","phoneticPr","conditionalFormatting","dataValidations","hyperlinks","printOptions","pageMargins","pageSetup","headerFooter","rowBreaks","colBreaks","customProperties","cellWatches","ignoredErrors","smartTags","drawing","legacyDrawing","legacyDrawingHF","drawingHF","picture","oleObjects","controls","webPublishItems","tableParts","extLst"];function H(t,e,o){const r=new RegExp(`<${e}\\b[^>]*?(?:/>|>[\\s\\S]*?</${e}>)`,"g");let n=t.replace(r,"");if(!o)return n;const s=k.slice(k.indexOf(e)+1).join("|"),l=new RegExp(`<(?:${s})\\b|</worksheet>`).exec(D(n)),d=l?l.index:n.length;return n=n.slice(0,d)+o+n.slice(d),n}function q(t){const e=i(i(t,"r"),"rPr");if(!e)return{};const o={},r=i(e,"sz")?.a.val;r&&r!=="9"&&r!=="10"&&(o.fontSize=Number(r));const n=i(e,"rFont")?.a.val;n&&n!=="Tahoma"&&(o.fontName=n);const s=i(e,"color")?.a.rgb;return s&&(o.color=`#${s.slice(-6)}`),Object.keys(o).length?{style:o}:{}}function U(t){const e=y(t),o=c(i(e,"authors"),"author").map(r=>p(r.t));return c(i(e,"commentList"),"comment").map(r=>{const n=i(r,"text");let s="";for(const l of n.c)l.n==="t"?s+=p(l.t):l.n==="r"&&(s+=p(i(l,"t")?.t??""));return{ref:r.a.ref,author:o[Number(r.a.authorId??0)]??"",text:s,...q(n)}})}const W=(t,e)=>V(y(t),e),G=t=>t.raw??v(t);export{C as cfXml,G as dxfXml,M as hyperlinksXml,X as ignoredErrorsXml,U as parseComments,W as parseDxfs,O as parseSheetFeatures,F as protectedRangesXml,L as protectionXml,H as replaceElement,E as ruleXml,z as scenariosXml,N as validationsXml};
|