Changeset 3361573
- Timestamp:
- 09/15/2025 07:47:05 AM (7 months ago)
- Location:
- billy
- Files:
-
- 670 added
- 3 deleted
- 5 edited
-
tags/1.12.0 (added)
-
tags/1.12.0/CONTRIBUTING.md (added)
-
tags/1.12.0/LICENSE (added)
-
tags/1.12.0/README.md (added)
-
tags/1.12.0/SECURITY.md (added)
-
tags/1.12.0/assets (added)
-
tags/1.12.0/assets/admin (added)
-
tags/1.12.0/assets/admin/css (added)
-
tags/1.12.0/assets/admin/css/style-editor-rtl.css (added)
-
tags/1.12.0/assets/admin/css/style-editor.css (added)
-
tags/1.12.0/assets/admin/js (added)
-
tags/1.12.0/assets/admin/js/admin.js (added)
-
tags/1.12.0/assets/blueprints (added)
-
tags/1.12.0/assets/blueprints/blueprint.json (added)
-
tags/1.12.0/assets/img (added)
-
tags/1.12.0/assets/img/logo.png (added)
-
tags/1.12.0/billy.php (added)
-
tags/1.12.0/blocks (added)
-
tags/1.12.0/blocks/LICENSE (added)
-
tags/1.12.0/blocks/README.md (added)
-
tags/1.12.0/blocks/build (added)
-
tags/1.12.0/blocks/build/index.asset.php (added)
-
tags/1.12.0/blocks/build/index.js (added)
-
tags/1.12.0/blocks/build/index.js.map (added)
-
tags/1.12.0/blocks/index.php (added)
-
tags/1.12.0/build (added)
-
tags/1.12.0/build/main-rtl.css (added)
-
tags/1.12.0/build/main.asset.php (added)
-
tags/1.12.0/build/main.css (added)
-
tags/1.12.0/build/main.js (added)
-
tags/1.12.0/editorconfig (added)
-
tags/1.12.0/inc (added)
-
tags/1.12.0/inc/class-billy.php (added)
-
tags/1.12.0/inc/class-blocks.php (added)
-
tags/1.12.0/inc/class-pdfexport.php (added)
-
tags/1.12.0/inc/index.php (added)
-
tags/1.12.0/languages (added)
-
tags/1.12.0/languages/billy-de_DE-2ed48fe918c3caf6de05b422314988a0.json (added)
-
tags/1.12.0/languages/billy-de_DE-e7501e6f694f15088a665cde7aced956.json (added)
-
tags/1.12.0/languages/billy-de_DE.l10n.php (added)
-
tags/1.12.0/languages/billy-de_DE.mo (added)
-
tags/1.12.0/languages/billy-de_DE.po (added)
-
tags/1.12.0/languages/billy-es_ES.l10n.php (added)
-
tags/1.12.0/languages/billy-es_ES.mo (added)
-
tags/1.12.0/languages/billy-es_ES.po (added)
-
tags/1.12.0/languages/billy-fr_FR.l10n.php (added)
-
tags/1.12.0/languages/billy-fr_FR.mo (added)
-
tags/1.12.0/languages/billy-fr_FR.po (added)
-
tags/1.12.0/languages/billy-it_IT.l10n.php (added)
-
tags/1.12.0/languages/billy-it_IT.mo (added)
-
tags/1.12.0/languages/billy-it_IT.po (added)
-
tags/1.12.0/languages/billy-sl_SI.l10n.php (added)
-
tags/1.12.0/languages/billy-sl_SI.mo (added)
-
tags/1.12.0/languages/billy-sl_SI.po (added)
-
tags/1.12.0/languages/billy.pot (added)
-
tags/1.12.0/mpdf (added)
-
tags/1.12.0/mpdf/css (added)
-
tags/1.12.0/mpdf/css/pdf.css (added)
-
tags/1.12.0/mpdf/fonts (added)
-
tags/1.12.0/mpdf/fonts/Roboto-Bold.ttf (added)
-
tags/1.12.0/mpdf/fonts/Roboto-Regular.ttf (added)
-
tags/1.12.0/mpdf/tmp (added)
-
tags/1.12.0/mpdf/tmp/mpdf (added)
-
tags/1.12.0/mpdf/tmp/mpdf/ttfontdata (added)
-
tags/1.12.0/readme.txt (added)
-
tags/1.12.0/vendor-prefixed (added)
-
tags/1.12.0/vendor-prefixed/autoload-classmap.php (added)
-
tags/1.12.0/vendor-prefixed/autoload-files.php (added)
-
tags/1.12.0/vendor-prefixed/autoload.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/CJKdata.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Afrikaans_South_Africa.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Albanian_Albania.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Alsatian_France.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Arabic_Algeria.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Arabic_Bahrain.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Arabic_Egypt.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Arabic_Iraq.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Arabic_Jordan.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Arabic_Kuwait.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Arabic_Lebanon.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Arabic_Libya.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Arabic_Morocco.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Arabic_Oman.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Arabic_Pseudo_RTL.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Arabic_Qatar.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Arabic_Saudi_Arabia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Arabic_Syria.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Arabic_Tunisia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Arabic_Yemen.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Azeri_(Cyrillic)_Azerbaijan.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Azeri_(Latin)_Azerbaijan.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Bashkir_Russia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Basque_Spain.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Belarusian_Belarus.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Bosnian_(Cyrillic)_Bosnia_and_Herzegovina.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Bosnian_(Latin)_Bosnia_and_Herzegovina.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Breton_France.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Bulgarian_Bulgaria.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Catalan_Spain.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Corsican_France.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Croatian_(Latin)_Bosnia_and_Herzegovina.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Croatian_Croatia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Czech_Czech_Republic.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Danish_Denmark.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Dari_Afghanistan.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Dutch_Belgium.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Dutch_Netherlands.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/English_Australia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/English_Belize.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/English_Canada.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/English_Caribbean.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/English_India.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/English_Ireland.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/English_Jamaica.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/English_Malaysia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/English_New_Zealand.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/English_Republic_of_the_Philippines.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/English_Singapore.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/English_South_Africa.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/English_Trinidad_and_Tobago.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/English_United_Kingdom.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/English_United_States.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/English_Zimbabwe.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Estonian_Estonia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Faroese_Faroe_Islands.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Filipino_Philippines.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Finnish_Finland.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/French_Belgium.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/French_Canada.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/French_France.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/French_Luxembourg.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/French_Principality_of_Monaco.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/French_Switzerland.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Frisian_Netherlands.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Galician_Spain.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/German_Austria.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/German_Germany.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/German_Liechtenstein.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/German_Luxembourg.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/German_Switzerland.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Greek_Greece.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Greenlandic_Greenland.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Hausa_(Latin)_Nigeria.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Hebrew_Israel.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Hungarian_Hungary.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Icelandic_Iceland.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Igbo_Nigeria.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Indonesian_Indonesia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Inuktitut_(Latin)_Canada.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Invariant_Language_Invariant_Country.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Irish_Ireland.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Italian_Italy.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Italian_Switzerland.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Kinyarwanda_Rwanda.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Kiswahili_Kenya.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Kyrgyz_Kyrgyzstan.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Latvian_Latvia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Lithuanian_Lithuania.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Lower_Sorbian_Germany.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Luxembourgish_Luxembourg.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Macedonian_(FYROM)_Macedonia_(FYROM).php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Malay_Brunei_Darussalam.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Malay_Malaysia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Mapudungun_Chile.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Mohawk_Canada.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Mongolian_(Cyrillic)_Mongolia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Norwegian_(Nynorsk)_Norway.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Occitan_France.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Persian_Iran.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Polish_Poland.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Portuguese_Brazil.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Portuguese_Portugal.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Quechua_Bolivia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Quechua_Ecuador.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Quechua_Peru.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Romanian_Romania.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Romansh_Switzerland.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Russian_Russia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Sami_(Inari)_Finland.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Sami_(Lule)_Norway.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Sami_(Lule)_Sweden.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Sami_(Northern)_Finland.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Sami_(Northern)_Norway.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Sami_(Northern)_Sweden.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Sami_(Skolt)_Finland.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Sami_(Southern)_Norway.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Sami_(Southern)_Sweden.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Serbian_(Cyrillic)_Bosnia_and_Herzegovina.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Serbian_(Cyrillic)_Serbia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Serbian_(Latin)_Bosnia_and_Herzegovina.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Serbian_(Latin)_Serbia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Sesotho_sa_Leboa_South_Africa.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Setswana_South_Africa.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Slovak_Slovakia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Slovenian_Slovenia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Argentina.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Bolivia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Chile.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Colombia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Costa_Rica.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Dominican_Republic.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Ecuador.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_El_Salvador.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Guatemala.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Honduras.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Mexico.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Nicaragua.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Panama.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Paraguay.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Peru.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Puerto_Rico.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Spain.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_United_States.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Uruguay.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Spanish_Venezuela.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Swedish_Finland.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Swedish_Sweden.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Tajik_(Cyrillic)_Tajikistan.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Tamazight_(Latin)_Algeria.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Tatar_Russia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Turkish_Turkey.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Turkmen_Turkmenistan.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Ukrainian_Ukraine.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Upper_Sorbian_Germany.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Urdu_Islamic_Republic_of_Pakistan.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Uzbek_(Cyrillic)_Uzbekistan.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Uzbek_(Latin)_Uzbekistan.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Vietnamese_Vietnam.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Welsh_United_Kingdom.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Wolof_Senegal.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Yakut_Russia.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/Yoruba_Nigeria.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/isiXhosa_South_Africa.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/collations/isiZulu_South_Africa.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/entity_substitutions.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/font (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/font/ccourier.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/font/ccourierb.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/font/ccourierbi.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/font/ccourieri.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/font/chelvetica.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/font/chelveticab.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/font/chelveticabi.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/font/chelveticai.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/font/csymbol.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/font/ctimes.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/font/ctimesb.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/font/ctimesbi.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/font/ctimesi.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/font/czapfdingbats.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/iccprofiles (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/iccprofiles/sRGB_IEC61966-2-1.icc (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/lang2fonts.css (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/linebrdictK.dat (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/linebrdictL.dat (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/linebrdictT.dat (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/mpdf.css (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/no_image.jpg (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/out.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/patterns (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/patterns/NOTES.txt (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/patterns/de.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/patterns/dictionary.txt (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/patterns/en.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/patterns/es.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/patterns/fi.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/patterns/fr.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/patterns/it.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/patterns/nl.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/patterns/pl.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/patterns/ru.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/patterns/sv.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/subs_core.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/subs_win-1252.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/data/upperCase.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/AssetFetcher.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode/AbstractBarcode.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode/BarcodeException.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode/BarcodeInterface.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode/Codabar.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode/Code11.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode/Code128.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode/Code39.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode/Code93.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode/EanExt.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode/EanUpc.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode/I25.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode/Imb.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode/Msi.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode/Postnet.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode/Rm4Scc.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Barcode/S25.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Cache.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Color (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Color/ColorConverter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Color/ColorModeConverter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Color/ColorSpaceRestrictor.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Color/NamedColors.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Config (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Config/ConfigVariables.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Config/FontVariables.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Container (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Container/ContainerInterface.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Container/NotFoundException.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Container/SimpleContainer.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Conversion (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Conversion/DecToAlpha.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Conversion/DecToCjk.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Conversion/DecToHebrew.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Conversion/DecToOther.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Conversion/DecToRoman.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Css (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Css/Border.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Css/DefaultCss.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Css/TextVars.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/CssManager.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/DirectWrite.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Exception (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Exception/AssetFetchingException.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Exception/FontException.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Exception/InvalidArgumentException.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/File (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/File/LocalContentLoader.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/File/LocalContentLoaderInterface.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/File/StreamWrapperChecker.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Fonts (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Fonts/FontCache.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Fonts/FontFileFinder.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Fonts/GlyphOperator.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Fonts/MetricsGenerator.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Form.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/FpdiTrait.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Gif (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Gif/ColorTable.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Gif/FileHeader.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Gif/Gif.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Gif/Image.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Gif/ImageHeader.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Gif/Lzw.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Gradient.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/HTMLParserMode.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Http (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Http/ClientInterface.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Http/CurlHttpClient.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Http/Exception (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Http/Exception/ClientException.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Http/Exception/ForbiddenRequestException.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Http/Exception/NetworkException.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Http/Exception/RequestException.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Http/SocketHttpClient.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Hyphenator.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Image (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Image/Bmp.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Image/ImageProcessor.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Image/ImageTypeGuesser.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Image/Svg.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Image/Wmf.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Language (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Language/LanguageToFont.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Language/LanguageToFontInterface.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Language/ScriptToLanguage.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Language/ScriptToLanguageInterface.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Log (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Log/Context.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Mpdf.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/MpdfException.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/MpdfImageException.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Otl.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/OtlDump.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Output (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Output/Destination.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/PageBox.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/PageFormat.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Pdf (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Pdf/Protection (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Pdf/Protection.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Pdf/Protection/UniqidGenerator.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/ServiceFactory.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Shaper (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Shaper/Indic.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Shaper/Myanmar.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Shaper/Sea.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/SizeConverter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Strict.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/TTFontFile.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/TTFontFileAnalysis.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/TableOfContents.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/A.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Acronym.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Address.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Annotation.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Article.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Aside.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/B.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/BarCode.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Bdi.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Bdo.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Big.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/BlockQuote.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/BlockTag.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Bookmark.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Br.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Caption.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Center.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Cite.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Code.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/ColumnBreak.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Columns.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Dd.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Del.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Details.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Div.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Dl.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/DotTab.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Dt.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Em.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/FieldSet.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/FigCaption.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Figure.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Font.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Footer.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Form.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/FormFeed.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/H1.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/H2.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/H3.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/H4.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/H5.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/H6.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/HGroup.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Header.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Hr.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/I.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Img.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/IndexEntry.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/IndexInsert.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/InlineTag.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Input.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Ins.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Kbd.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Legend.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Li.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Main.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Mark.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Meter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Nav.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/NewColumn.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/NewPage.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Ol.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Option.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/P.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/PageBreak.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/PageFooter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/PageHeader.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Pre.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Progress.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Q.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/S.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Samp.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Section.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Select.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/SetHtmlPageFooter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/SetHtmlPageHeader.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/SetPageFooter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/SetPageHeader.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Small.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Span.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Strike.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Strong.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Sub.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/SubstituteTag.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Summary.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Sup.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/TBody.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/TFoot.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/THead.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Table.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Tag.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Td.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/TextArea.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/TextCircle.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Th.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Time.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Toc.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/TocEntry.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/TocPageBreak.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Tr.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Tt.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Tta.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Tts.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Ttz.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/U.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/Ul.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/VarTag.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/WatermarkImage.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Tag/WatermarkText.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Ucdn.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Utils (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Utils/Arrays.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Utils/NumericString.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Utils/PdfDate.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Utils/UtfString.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Watermark.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/WatermarkImage.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/WatermarkText.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Writer (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Writer/BackgroundWriter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Writer/BaseWriter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Writer/BookmarkWriter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Writer/ColorWriter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Writer/FontWriter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Writer/FormWriter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Writer/ImageWriter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Writer/JavaScriptWriter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Writer/MetadataWriter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Writer/ObjectWriter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Writer/OptionalContentWriter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Writer/PageWriter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/Writer/ResourceWriter.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/functions-dev.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/mpdf/src/functions.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/psr-http-message-shim (added)
-
tags/1.12.0/vendor-prefixed/mpdf/psr-http-message-shim/src (added)
-
tags/1.12.0/vendor-prefixed/mpdf/psr-http-message-shim/src/Request.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/psr-http-message-shim/src/Response.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/psr-http-message-shim/src/Stream.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/psr-http-message-shim/src/Uri.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/psr-log-aware-trait (added)
-
tags/1.12.0/vendor-prefixed/mpdf/psr-log-aware-trait/src (added)
-
tags/1.12.0/vendor-prefixed/mpdf/psr-log-aware-trait/src/MpdfPsrLogAwareTrait.php (added)
-
tags/1.12.0/vendor-prefixed/mpdf/psr-log-aware-trait/src/PsrLogAwareTrait.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/DeepCopy.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Exception (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Exception/PropertyException.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Filter (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Filter/ChainableFilter.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Matcher (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Reflection (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/TypeFilter (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DatePeriodFilter.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedList.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/SplDoublyLinkedListFilter.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/TypeMatcher (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/TypeMatcher/TypeMatcher.php (added)
-
tags/1.12.0/vendor-prefixed/myclabs/deep-copy/src/DeepCopy/deep_copy.php (added)
-
tags/1.12.0/vendor-prefixed/psr (added)
-
tags/1.12.0/vendor-prefixed/psr/http-message (added)
-
tags/1.12.0/vendor-prefixed/psr/http-message/src (added)
-
tags/1.12.0/vendor-prefixed/psr/http-message/src/MessageInterface.php (added)
-
tags/1.12.0/vendor-prefixed/psr/http-message/src/RequestInterface.php (added)
-
tags/1.12.0/vendor-prefixed/psr/http-message/src/ResponseInterface.php (added)
-
tags/1.12.0/vendor-prefixed/psr/http-message/src/ServerRequestInterface.php (added)
-
tags/1.12.0/vendor-prefixed/psr/http-message/src/StreamInterface.php (added)
-
tags/1.12.0/vendor-prefixed/psr/http-message/src/UploadedFileInterface.php (added)
-
tags/1.12.0/vendor-prefixed/psr/http-message/src/UriInterface.php (added)
-
tags/1.12.0/vendor-prefixed/psr/log (added)
-
tags/1.12.0/vendor-prefixed/psr/log/src (added)
-
tags/1.12.0/vendor-prefixed/psr/log/src/AbstractLogger.php (added)
-
tags/1.12.0/vendor-prefixed/psr/log/src/InvalidArgumentException.php (added)
-
tags/1.12.0/vendor-prefixed/psr/log/src/LogLevel.php (added)
-
tags/1.12.0/vendor-prefixed/psr/log/src/LoggerAwareInterface.php (added)
-
tags/1.12.0/vendor-prefixed/psr/log/src/LoggerAwareTrait.php (added)
-
tags/1.12.0/vendor-prefixed/psr/log/src/LoggerInterface.php (added)
-
tags/1.12.0/vendor-prefixed/psr/log/src/LoggerTrait.php (added)
-
tags/1.12.0/vendor-prefixed/psr/log/src/NullLogger.php (added)
-
tags/1.12.0/vendor-prefixed/setasign (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/FpdfTpl.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/FpdfTplTrait.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/FpdfTrait.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/Fpdi.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/FpdiException.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/FpdiTrait.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/GraphicsState.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/Math (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/Math/Matrix.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/Math/Vector.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/CrossReference (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/CrossReference/AbstractReader.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/CrossReference/CrossReference.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/CrossReference/CrossReferenceException.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/CrossReference/FixedReader.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/CrossReference/LineReader.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/CrossReference/ReaderInterface.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Filter (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Filter/Ascii85.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Filter/Ascii85Exception.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Filter/AsciiHex.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Filter/FilterException.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Filter/FilterInterface.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Filter/Flate.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Filter/FlateException.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Filter/Lzw.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Filter/LzwException.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/PdfParser.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/PdfParserException.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/StreamReader.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Tokenizer.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Type (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Type/PdfArray.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Type/PdfBoolean.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Type/PdfDictionary.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Type/PdfHexString.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Type/PdfIndirectObject.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Type/PdfIndirectObjectReference.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Type/PdfName.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Type/PdfNull.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Type/PdfNumeric.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Type/PdfStream.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Type/PdfString.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Type/PdfToken.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Type/PdfType.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfParser/Type/PdfTypeException.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfReader (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfReader/DataStructure (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfReader/DataStructure/Rectangle.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfReader/Page.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfReader/PageBoundaries.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfReader/PdfReader.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/PdfReader/PdfReaderException.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/Tcpdf (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/Tcpdf/Fpdi.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/TcpdfFpdi.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/Tfpdf (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/Tfpdf/FpdfTpl.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/Tfpdf/Fpdi.php (added)
-
tags/1.12.0/vendor-prefixed/setasign/fpdi/src/autoload.php (added)
-
trunk/assets/css (deleted)
-
trunk/assets/js (deleted)
-
trunk/billy.php (modified) (1 diff)
-
trunk/blocks/build/index.asset.php (modified) (1 diff)
-
trunk/blocks/build/index.js (modified) (1 diff)
-
trunk/blocks/package-lock.json (deleted)
-
trunk/build (added)
-
trunk/build/main-rtl.css (added)
-
trunk/build/main.asset.php (added)
-
trunk/build/main.css (added)
-
trunk/build/main.js (added)
-
trunk/inc/class-billy.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
billy/trunk/billy.php
r3355121 r3361573 4 4 * Plugin URI: https://wordpress.org/plugins/billy 5 5 * Description: A business-oriented billing suite powered by WordPress. 6 * Version: 1.1 1.16 * Version: 1.12.0 7 7 * Author: them.es 8 8 * Author URI: https://them.es/plugins/billy -
billy/trunk/blocks/build/index.asset.php
r3355121 r3361573 1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-server-side-render'), 'version' => ' 8fa277e056564a026ca5');1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-server-side-render'), 'version' => '216e6eebeefb7f42f3cf'); -
billy/trunk/blocks/build/index.js
r3355121 r3361573 1 (()=>{"use strict";var e={n:t=>{var l=t&&t.__esModule?()=>t.default:()=>t;return e.d(l,{a:l}),l},d:(t,l)=>{for(var s in l)e.o(l,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:l[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.blocks,l=window.wp.i18n,s=window.wp.blockEditor,a=window.wp.components,n=window.wp.serverSideRender;var i=e.n(n);const r=window.ReactJSXRuntime;(0,t.registerBlockType)("billy-blocks/header",{title:(0,l.__)("Header","billy"),icon:"editor-table",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:()=>({"data-align":"wide"}),edit: e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsxs)(a.PanelBody,{title:(0,l.__)("Info","billy"),children:[(0,r.jsx)("div",{className:"components-notice",children:(0,r.jsx)("div",{className:"components-notice__content",children:(0,r.jsx)("a",{href:globalDataBilly.wpAdmin+"edit.php?post_type=wp_block",children:(0,l.sprintf)((0,l.__)("Edit the %s layout","billy"),(0,l.__)("Header","billy"))})})}),(0,r.jsx)("div",{className:"components-notice",children:(0,r.jsx)("div",{className:"components-notice__content",children:(0,l.sprintf)((0,l.__)("The %s values can be modified in the Theme Customizer.","billy"),(0,l.__)("Header","billy"))})})]})}),(0,r.jsx)(a.Disabled,{children:(0,r.jsx)(i(),{block:"billy-blocks/header"})})]}),save:e=>null});const c=window.wp.data;(0,t.registerBlockType)("billy-blocks/invoice-actions",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Invoice","billy"),(0,l.__)("Actions","billy")),icon:"menu-alt",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)(e=>({postModifiedDate:e("core/editor").getEditedPostAttribute("modified")}))(e=>{const{postModifiedDate:t}=e,a=(0,s.useBlockProps)({className:"components-placeholder",style:{minHeight:"auto"}});return(0,r.jsx)("div",{...a,children:(0,r.jsx)("small",{children:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Last modified","billy"),new Date(t).toLocaleString())})})}),save:()=>null});const o=window.wp.element;(0,t.registerBlockType)("billy-blocks/invoice-meta",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Invoice","billy"),(0,l.__)("Meta","billy")),icon:"editor-textcolor",category:"billy-blocks",attributes:{label:{type:"string",default:""},text:{type:"string",default:""}},supports:{inserter:!1,reusable:!1,html:!1,className:!0},edit:e=>{const{className:t,attributes:{label:n,text:i},setAttributes:c}=e,d=(0,s.useBlockProps)({className:t?" "+t:""});return(0,r.jsxs)("div",{...d,children:[(0,r.jsxs)(s.InspectorControls,{children:[(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Label","billy"),children:(0,r.jsx)(a.TextControl,{type:"text",className:"label",value:null!=n?n:"",onChange:e=>{c({label:e})}})}),(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Text","billy"),children:(0,r.jsx)(a.TextControl,{type:"text",className:"text",value:null!=i?i:"",onChange:e=>{c({text:e})}})})]}),(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)('<div class="label">%1$s</div> <div class="text">%2$s</div>',"billy"),n||"",i||(0,l.__)("N/A","billy"))})]})},save:e=>{const{className:t,attributes:{label:a,text:n}}=e,i=s.useBlockProps.save({className:t?" "+t:""});return n&&(0,r.jsx)("div",{...i,children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)('<div class="label">%1$s</div> <div class="text">%2$s</div>',"billy"),a||"",n||(0,l.__)("N/A","billy"))})})},deprecated:[{attributes:{label:{type:"string",default:""},text:{type:"string",default:""}},save:e=>{const{className:t,attributes:{label:s,text:a}}=e;return a&&(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)('<div class="label">%1$s</div> <div class="text">%2$s</div>',"billy"),s||"",a||(0,l.__)("N/A","billy"))})})}},{attributes:{label:{type:"string",default:""},text:{type:"string",default:""}},save:e=>{const{className:t,attributes:{label:s,text:a}}=e;return a&&(0,r.jsx)("p",{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)("<p>"+(0,l.__)("<strong>%1$s</strong> <span>%2$s</span>","billy")+"</p>",s||"",a||(0,l.__)("N/A","billy"))})})}}]}),(0,t.registerBlockType)("billy-blocks/invoice-date",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Invoice","billy"),(0,l.__)("Date","billy")),icon:"calendar-alt",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},edit:()=>{const e=(0,s.useBlockProps)();return(0,r.jsxs)("div",{...e,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Info","billy"),children:(0,r.jsx)("div",{className:"components-notice is-warning",children:(0,r.jsx)("div",{className:"components-notice__content",children:(0,l.sprintf)((0,l.__)("Due to legal requirements in some countries, autogenerated data like %s can't be modified anymore after an invoice has been created in the system!","billy"),(0,l.__)("Date","billy"))})})})}),(0,r.jsx)(a.Disabled,{children:(0,r.jsx)(i(),{block:"billy-blocks/invoice-date"})})]})},save:()=>null}),(0,t.registerBlockType)("billy-blocks/invoice-duedate",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Invoice","billy"),(0,l.__)("Due Date","billy")),icon:"calendar-alt",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},edit:()=>{const e=(0,s.useBlockProps)();return(0,r.jsxs)("div",{...e,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Info","billy"),children:(0,r.jsx)("div",{className:"components-notice",children:(0,r.jsx)("div",{className:"components-notice__content",children:(0,l.sprintf)((0,l.__)("The %s values can be modified in the Theme Customizer.","billy"),(0,l.__)("Payment due days","billy"))})})})}),(0,r.jsx)(a.Disabled,{children:(0,r.jsx)(i(),{block:"billy-blocks/invoice-duedate"})})]})},save:()=>null}),(0,t.registerBlockType)("billy-blocks/invoice-number",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Invoice","billy"),(0,l.__)("Number","billy")),icon:"editor-ol",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},edit:()=>{const e=(0,s.useBlockProps)();return(0,r.jsxs)("div",{...e,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsxs)(a.PanelBody,{title:(0,l.__)("Info","billy"),children:[(0,r.jsx)("div",{className:"components-notice",children:(0,r.jsx)("div",{className:"components-notice__content",children:(0,l.sprintf)((0,l.__)("The %s values can be modified in the Theme Customizer.","billy"),(0,l.__)("Invoice number: Prefix","billy"))})}),(0,r.jsx)("div",{className:"components-notice is-warning",children:(0,r.jsx)("div",{className:"components-notice__content",children:(0,l.sprintf)((0,l.__)("Due to legal requirements in some countries, autogenerated data like %s can't be modified anymore after an invoice has been created in the system!","billy"),(0,l.__)("Invoice number","billy"))})})]})}),(0,r.jsx)(a.Disabled,{children:(0,r.jsx)(i(),{block:"billy-blocks/invoice-number"})})]})},save:()=>null}),(0,t.registerBlockType)("billy-blocks/invoice-paymentinformation",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Invoice","billy"),(0,l.__)("Payment Information","billy")),icon:"info",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},edit:()=>{const e=(0,s.useBlockProps)();return(0,r.jsxs)("div",{...e,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Info","billy"),children:(0,r.jsx)("div",{className:"components-notice",children:(0,r.jsx)("div",{className:"components-notice__content",children:(0,l.sprintf)((0,l.__)("The %s values can be modified in the Theme Customizer.","billy"),(0,l.__)("Payment Information","billy"))})})})}),(0,r.jsx)(a.Disabled,{children:(0,r.jsx)(i(),{block:"billy-blocks/invoice-paymentinformation"})})]})},save:()=>null});const d=(e,t=void 0)=>e.toLocaleString(t,{minimumFractionDigits:2,maximumFractionDigits:2}),u=e=>parseFloat(e)/100,b=e=>(e=new Date(e)||new Date,[1,2,3,4][Math.floor(e.getMonth()/3)]),x=[{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountSubtotal:{type:"number",default:""},amountTotal:{type:"number",default:""},taxRates:{type:"string",default:""},taxRatesTotal:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountSubtotal:i,amountTotal:c,taxRates:b,taxRatesTotal:x}}=e,p=s.useBlockProps.save({className:"invoicetable-block alignwide"+(t?" "+t:"")});return(0,r.jsx)("div",{...p,children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Amount","billy")}),b&&x>0&&(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Tax","billy")})]})}),(0,r.jsx)("tbody",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[i>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("th",{colSpan:"2",children:c>i?(0,l.__)("Subtotal","billy"):(0,l.__)("Total","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))})]}),b&&x>0&&(0,r.jsxs)("tr",{className:"taxrates",children:[(0,r.jsx)("th",{colSpan:"2",children:(0,l.__)("Tax","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:JSON.parse(b).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),a,d(e.amount,n),"<small>("+e.taxRate+")</small><br>")},t)})})]}),c>i&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("th",{colSpan:"2",children:(0,l.__)("Total","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]})]})]})})}},{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountSubtotal:{type:"number",default:""},amountTotal:{type:"number",default:""},taxRates:{type:"string",default:""},taxRatesTotal:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountSubtotal:i,amountTotal:c,taxRates:b,taxRatesTotal:x}}=e;return(0,r.jsx)("div",{className:"invoicetable-block alignwide"+(t?" "+t:""),children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Amount","billy")}),b&&x>0&&(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Tax","billy")})]})}),(0,r.jsx)("tbody",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[i>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("td",{colSpan:"2",className:"align-right",children:c>i?(0,l.__)("Subtotal","billy"):(0,l.__)("Total","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))})]}),b&&x>0&&(0,r.jsxs)("tr",{className:"taxrates",children:[(0,r.jsx)("td",{colSpan:"2",className:"align-right",children:(0,l.__)("Tax","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:JSON.parse(b).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),a,d(e.amount,n),"<small>("+e.taxRate+")</small><br>")},t)})})]}),c>i&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("td",{colSpan:"2",className:"align-right",children:(0,l.__)("Total","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]})]})]})})}},{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountSubtotal:{type:"number",default:""},amountTotal:{type:"number",default:""},taxRates:{type:"string",default:""},taxRatesTotal:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountSubtotal:i,amountTotal:c,taxRates:b,taxRatesTotal:x}}=e;return(0,r.jsx)("div",{className:"invoicetable-block alignwide"+(t?" "+t:""),children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Amount","billy")}),b&&x>0&&(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Tax","billy")})]})}),(0,r.jsx)("tbody",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[i>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("td",{colSpan:"2",align:"right",children:c>i?(0,l.__)("Subtotal","billy"):(0,l.__)("Total","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))})]}),b&&x>0&&(0,r.jsxs)("tr",{className:"taxrates",children:[(0,r.jsx)("td",{colSpan:"2",align:"right",children:(0,l.__)("Tax","billy")}),(0,r.jsx)("td",{children:JSON.parse(b).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),a,d(e.amount,n),"<small>("+e.taxRate+")</small><br>")},t)})})]}),c>i&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("td",{colSpan:"2",align:"right",children:(0,l.__)("Total","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]})]})]})})}}],p=[{attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},description:{type:"string",default:""},taxRate:{type:"string",default:""},amount:{type:"number",default:""},amountIncl:{type:"number",default:""},quantity:{type:"number",default:""},quantityRate:{type:"number",default:""}},save:e=>{const{className:t,attributes:{index:a,locale:n,taxRate:i,amount:c}}=e;return(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"row",children:a&&a}),(0,r.jsx)("td",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsx)("td",{children:c&&d(c,n)}),i&&u(i)*c>0&&(0,r.jsx)("td",{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),d(u(i)*c,n),"<small>("+i+")</small>")})})]})}},{attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},description:{type:"string",default:""},taxRate:{type:"string",default:""},amount:{type:"number",default:""},amountIncl:{type:"number",default:""},quantity:{type:"number",default:""},quantityRate:{type:"number",default:""}},save:e=>{const{className:t,attributes:{index:s,locale:a,description:n,taxRate:i,amount:c}}=e;return(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"row",children:s&&s}),(0,r.jsx)("td",{children:n&&(0,r.jsx)(o.RawHTML,{children:n})}),(0,r.jsx)("td",{children:c&&d(c,a)}),i&&u(i)*c>0&&(0,r.jsx)("td",{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),d(u(i)*c,a),"<small>("+i+")</small>")})})]})}}];let y;(0,t.registerBlockType)("billy-blocks/invoice-table",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Invoice","billy"),(0,l.__)("Table","billy")),icon:"menu-alt",category:"billy-blocks",attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountSubtotal:{type:"number",default:""},amountTotal:{type:"number",default:""},taxRates:{type:"string",default:""},taxRatesTotal:{type:"number",default:""}},supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)((e,{clientId:t})=>{const{getBlocksByClientId:l}=e("core/block-editor");return{childBlocks:l(t)[0].innerBlocks}})(e=>{const{className:t,childBlocks:n,attributes:{currency:i,locale:c,amountSubtotal:b,amountTotal:x,taxRates:p,taxRatesTotal:h},setAttributes:m}=e,_=(0,s.useBlockProps)({className:"invoicetable-block"+(t?" "+t:"")});return y=()=>{let e=0,t=0,l=0,s=[],a=[];m({currency:globalDataBilly.currency,locale:globalDataBilly.locale}),n&&n.length>0&&(n.forEach(l=>{const a=Number(l.attributes.amount),n=u(l.attributes.taxRate);e+=a,t+=a+n*a,s.push({taxRate:l.attributes.taxRate,amount:n*a})}),s.length>0&&(l=s.reduce((e,t)=>e+t.amount,0),l=Number(l.toFixed(2)),s.reduce((e,t)=>(e[t.taxRate]||(e[t.taxRate]={taxRate:t.taxRate,amount:0},a.push(e[t.taxRate])),e[t.taxRate].amount+=t.amount,e),{})),m({taxRatesTotal:l,taxRates:JSON.stringify(a),amountSubtotal:e,amountTotal:t}))},(0,o.useEffect)(()=>{y()},[n]),(0,r.jsxs)("div",{..._,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Actions","billy"),children:(0,r.jsx)("button",{id:"updatetotals",className:"components-button is-secondary is-button",onClick:y,children:(0,l.__)("Update Totals","billy")})})}),(0,r.jsx)(s.InnerBlocks,{templateLock:!1,template:[["billy-blocks/invoice-tablerow"]],allowedBlocks:["billy-blocks/invoice-tablerow"],renderAppender:()=>(0,r.jsx)(s.InnerBlocks.ButtonBlockAppender,{})}),b>0&&(0,r.jsx)("table",{className:"totals",children:(0,r.jsxs)("tbody",{children:[b>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("th",{style:{width:"50%"},children:x>b?(0,l.__)("Subtotal","billy"):(0,l.__)("Total","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(b,c))})]}),p&&h>0&&(0,r.jsxs)("tr",{className:"taxRates",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.__)("Tax","billy")}),(0,r.jsx)("td",{children:JSON.parse(p).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),i,d(e.amount,c),"<small>("+e.taxRate+")</small><br>")},t)})})]}),x>b&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.__)("Total","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(x,c))})]})]})})]})}),save:e=>{const{className:t,attributes:{currency:a,locale:n,amountSubtotal:i,amountTotal:c,taxRates:b,taxRatesTotal:x}}=e,p=s.useBlockProps.save({className:"invoicetable-block alignwide"+(t?" "+t:"")});return(0,r.jsx)("div",{...p,children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col","data-label":"title"}),(0,r.jsx)("th",{scope:"col","data-label":"description"}),(0,r.jsx)("th",{scope:"col","data-label":"amount"}),b&&x>0&&(0,r.jsx)("th",{scope:"col","data-label":"tax"})]})}),(0,r.jsx)("tbody",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[i>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("th",{colSpan:"2","data-label":c>i?"subtotal":"total"}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))})]}),b&&x>0&&(0,r.jsxs)("tr",{className:"taxrates",children:[(0,r.jsx)("th",{colSpan:"2","data-label":"tax"}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:JSON.parse(b).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),a,d(e.amount,n),"<small>("+e.taxRate+")</small><br>")},t)})})]}),c>i&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("th",{colSpan:"2","data-label":"total"}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]})]})]})})},deprecated:x}),(0,t.registerBlockType)("billy-blocks/invoice-tablerow",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Invoice","billy"),(0,l.__)("Table Row","billy")),icon:"menu-alt",category:"billy-blocks",parent:["billy-blocks/invoice-table"],attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},taxRate:{type:"string",default:""},amount:{type:"number",default:""},amountIncl:{type:"number",default:""},quantity:{type:"number",default:""},quantityRate:{type:"number",default:""}},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)((e,{clientId:t})=>{const{getBlockRootClientId:l,getBlockIndex:s}=e("core/block-editor");return{i:s(t,l(t))+1}})(e=>{const{i:t,attributes:{index:n,currency:i,locale:c,description:d,taxRate:b,amount:x,amountIncl:p,quantity:h,quantityRate:m},setAttributes:_}=e,j=(0,s.useBlockProps)();(0,o.useEffect)(()=>{_({index:t,currency:globalDataBilly.currency,locale:globalDataBilly.locale}),""===b&&_({taxRate:0===globalDataBilly.taxOptions.length?"0%":globalDataBilly.taxOptions[0].value})},[b]);const f=e=>{_({amountIncl:e>0?Number(e):""}),y()},g=e=>{_({amount:e>0?Number(e):""}),f(Number(e)+Number(e)*u(b))};return(0,r.jsxs)("div",{...j,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsxs)(a.PanelBody,{title:(0,l.__)("Quantity/Rate Calculator","billy"),children:[(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.__)("Quantity","billy"),placeholder:(0,l.__)("0","billy"),value:null!=h?h:"",onChange:e=>{_({quantity:e>0?Number(e):""}),g(Number(e)*Number(m))}}),(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Rate","billy"),i),placeholder:(0,l.__)("0","billy"),value:null!=m?m:"",onChange:e=>{_({quantityRate:e>0?Number(e):""}),g(Number(h)*Number(e))}})]})}),(0,r.jsx)("table",{children:(0,r.jsx)("tbody",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"index",children:n&&n}),(0,r.jsx)("td",{style:{width:"30vw",minWidth:"200px"},children:(0,r.jsx)(s.InnerBlocks,{template:[["core/paragraph",{content:d||""}]],allowedBlocks:["core/block","core/heading","core/paragraph","core/list","core/html"]})}),(0,r.jsx)("td",{children:(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Amount","billy"),i),className:"amount",placeholder:(0,l.__)("0","billy"),value:null!=x?x:"",onChange:g})}),(0,r.jsx)("td",{children:(0,r.jsx)(a.SelectControl,{className:"taxrate",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Tax","billy"),"%"),value:null!=b?b:"",options:0!==globalDataBilly.taxOptions.length?globalDataBilly.taxOptions:"0%"!==b&&0===globalDataBilly.taxOptions.length?[{label:b,value:b},{label:"0%",value:"0%"}]:"",onChange:e=>{_({taxRate:e}),f(Number(x)+Number(x)*u(e))}})}),(0,r.jsx)("td",{children:(0,r.jsx)(a.TextControl,{type:"number",disabled:"disabled",label:i,className:"amount-tax",placeholder:(0,l.__)("0","billy"),value:null!=p?p:""})})]})})})]})}),save:e=>{const{attributes:{index:t,locale:a,taxRate:n,amount:i}}=e;return(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"row",children:t&&t}),(0,r.jsx)("td",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsx)("td",{children:i&&d(i,a)}),n&&u(n)*i>0&&(0,r.jsx)("td",{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),d(u(n)*i,a),"<small>("+n+")</small>")})})]})},deprecated:p}),(0,t.registerBlockType)("billy-blocks/quote-actions",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Quote","billy"),(0,l.__)("Actions","billy")),icon:"menu-alt",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)(e=>({postModifiedDate:e("core/editor").getEditedPostAttribute("modified")}))(e=>{const{postModifiedDate:t}=e,a=(0,s.useBlockProps)({className:"components-placeholder",style:{minHeight:"auto"}});return(0,r.jsx)("div",{...a,children:(0,r.jsx)("small",{children:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Last modified","billy"),new Date(t).toLocaleString())})})}),save:()=>null}),(0,t.registerBlockType)("billy-blocks/quote-meta",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Quote","billy"),(0,l.__)("Meta","billy")),icon:"editor-textcolor",category:"billy-blocks",attributes:{label:{type:"string",default:""},text:{type:"string",default:""}},supports:{inserter:!1,reusable:!1,html:!1,className:!0},edit:e=>{const{className:t,attributes:{label:n,text:i},setAttributes:c}=e,d=(0,s.useBlockProps)({className:t?" "+t:""});return(0,r.jsxs)("div",{...d,children:[(0,r.jsxs)(s.InspectorControls,{children:[(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Label","billy"),children:(0,r.jsx)(a.TextControl,{type:"text",className:"label",value:null!=n?n:"",onChange:e=>{c({label:e})}})}),(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Text","billy"),children:(0,r.jsx)(a.TextControl,{type:"text",className:"text",value:null!=i?i:"",onChange:e=>{c({text:e})}})})]}),(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)('<div class="label">%1$s</div> <div class="text">%2$s</div>',"billy"),n||"",i||(0,l.__)("N/A","billy"))})]})},save:e=>{const{className:t,attributes:{label:a,text:n}}=e,i=s.useBlockProps.save({className:t?" "+t:""});return n&&(0,r.jsx)("div",{...i,children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)('<div class="label">%1$s</div> <div class="text">%2$s</div>',"billy"),a||"",n||(0,l.__)("N/A","billy"))})})},deprecated:[{attributes:{label:{type:"string",default:""},text:{type:"string",default:""}},save:e=>{const{attributes:{label:t,text:s}}=e;return s&&(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)('<div class="label">%1$s</div> <div class="text">%2$s</div>',"billy"),t||"",s||(0,l.__)("N/A","billy"))})})}},{attributes:{label:{type:"string",default:""},text:{type:"string",default:""}},save:e=>{const{attributes:{label:t,text:s}}=e;return s&&(0,r.jsx)("p",{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)("<p>"+(0,l.__)("<strong>%1$s</strong> <span>%2$s</span>","billy")+"</p>",t||"",s||(0,l.__)("N/A","billy"))})})}}]}),(0,t.registerBlockType)("billy-blocks/quote-date",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Quote","billy"),(0,l.__)("Date","billy")),icon:"calendar-alt",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},edit:()=>{const e=(0,s.useBlockProps)();return(0,r.jsx)("div",{...e,children:(0,r.jsx)(a.Disabled,{children:(0,r.jsx)(i(),{block:"billy-blocks/quote-date"})})})},save:()=>null}),(0,t.registerBlockType)("billy-blocks/quote-information",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Quote","billy"),(0,l.__)("Information","billy")),icon:"info",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},edit:()=>{const e=(0,s.useBlockProps)();return(0,r.jsxs)("div",{...e,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Info","billy"),children:(0,r.jsx)("div",{className:"components-notice",children:(0,r.jsx)("div",{className:"components-notice__content",children:(0,l.sprintf)((0,l.__)("The %s values can be modified in the Theme Customizer.","billy"),(0,l.__)("Quote Information","billy"))})})})}),(0,r.jsx)(i(),{block:"billy-blocks/quote-information"})]})},save:()=>null});const h=[{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountSubtotal:{type:"number",default:""},amountTotal:{type:"number",default:""},taxRates:{type:"string",default:""},taxRatesTotal:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountSubtotal:i,amountTotal:c,taxRates:b,taxRatesTotal:x}}=e,p=s.useBlockProps.save({className:"quotetable-block alignwide"+(t?" "+t:"")});return(0,r.jsx)("div",{...p,children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Amount","billy")}),b&&x>0&&(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Tax","billy")})]})}),(0,r.jsx)("tbody",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[i>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("th",{colSpan:"2",children:c>i?(0,l.__)("Subtotal","billy"):(0,l.__)("Total","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))})]}),b&&x>0&&(0,r.jsxs)("tr",{className:"taxrates",children:[(0,r.jsx)("th",{colSpan:"2",children:(0,l.__)("Tax","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:JSON.parse(b).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),a,d(e.amount,n),"<small>("+e.taxRate+")</small><br>")},t)})})]}),c>i&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("th",{colSpan:"2",children:(0,l.__)("Total","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]})]})]})})}},{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountSubtotal:{type:"number",default:""},amountTotal:{type:"number",default:""},taxRates:{type:"string",default:""},taxRatesTotal:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountSubtotal:i,amountTotal:c,taxRates:b,taxRatesTotal:x}}=e;return(0,r.jsx)("div",{className:"quotetable-block alignwide"+(t?" "+t:""),children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Amount","billy")}),b&&x>0&&(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Tax","billy")})]})}),(0,r.jsx)("tbody",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[i>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("td",{colSpan:"2",className:"align-right",children:c>i?(0,l.__)("Subtotal","billy"):(0,l.__)("Total","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))})]}),b&&x>0&&(0,r.jsxs)("tr",{className:"taxrates",children:[(0,r.jsx)("td",{colSpan:"2",className:"align-right",children:(0,l.__)("Tax","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:JSON.parse(b).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),a,d(e.amount,n),"<small>("+e.taxRate+")</small><br>")},t)})})]}),c>i&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("td",{colSpan:"2",className:"align-right",children:(0,l.__)("Total","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]})]})]})})}},{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountSubtotal:{type:"number",default:""},amountTotal:{type:"number",default:""},taxRates:{type:"string",default:""},taxRatesTotal:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountSubtotal:i,amountTotal:c,taxRates:b,taxRatesTotal:x}}=e;return(0,r.jsx)("div",{className:"quotetable-block alignwide"+(t?" "+t:""),children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Amount","billy")}),b&&x>0&&(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Tax","billy")})]})}),(0,r.jsx)("tbody",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[i>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("td",{colSpan:"2",align:"right",children:c>i?(0,l.__)("Subtotal","billy"):(0,l.__)("Total","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))})]}),b&&x>0&&(0,r.jsxs)("tr",{className:"taxrates",children:[(0,r.jsx)("td",{colSpan:"2",align:"right",children:(0,l.__)("Tax","billy")}),(0,r.jsx)("td",{children:JSON.parse(b).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),a,d(e.amount,n),"<small>("+e.taxRate+")</small><br>")},t)})})]}),c>i&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("td",{colSpan:"2",align:"right",children:(0,l.__)("Total","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]})]})]})})}}],m=[{attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},description:{type:"string",default:""},taxRate:{type:"string",default:""},amount:{type:"number",default:""},amountIncl:{type:"number",default:""},quantity:{type:"number",default:""},quantityRate:{type:"number",default:""}},save:e=>{const{className:t,attributes:{index:a,locale:n,taxRate:i,amount:c}}=e;return(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"row",children:a&&a}),(0,r.jsx)("td",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsx)("td",{children:c&&d(c,n)}),i&&u(i)*c>0&&(0,r.jsx)("td",{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),d(u(i)*c,n),"<small>("+i+")</small>")})})]})}},{attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},description:{type:"string",default:""},taxRate:{type:"string",default:""},amount:{type:"number",default:""},amountIncl:{type:"number",default:""},quantity:{type:"number",default:""},quantityRate:{type:"number",default:""}},save:e=>{const{className:t,attributes:{index:s,locale:a,description:n,taxRate:i,amount:c}}=e;return(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"row",children:s&&s}),(0,r.jsx)("td",{children:n&&(0,r.jsx)(o.RawHTML,{children:n})}),(0,r.jsx)("td",{children:c&&d(c,a)}),i&&u(i)*c>0&&(0,r.jsx)("td",{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),d(u(i)*c,a),"<small>("+i+")</small>")})})]})}}];let _;(0,t.registerBlockType)("billy-blocks/quote-table",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Quote","billy"),(0,l.__)("Table","billy")),icon:"menu-alt",category:"billy-blocks",attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountSubtotal:{type:"number",default:""},amountTotal:{type:"number",default:""},taxRates:{type:"string",default:""},taxRatesTotal:{type:"number",default:""}},supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)((e,{clientId:t})=>{const{getBlocksByClientId:l}=e("core/block-editor");return{childBlocks:l(t)[0].innerBlocks}})(e=>{const{className:t,childBlocks:n,attributes:{currency:i,locale:c,amountSubtotal:b,amountTotal:x,taxRates:p,taxRatesTotal:y},setAttributes:h}=e,m=(0,s.useBlockProps)({className:"quotetable-block"+(t?" "+t:"")});return _=()=>{let e=0,t=0,l=0,s=[],a=[];h({currency:globalDataBilly.currency,locale:globalDataBilly.locale}),n&&n.length>0&&(n.forEach(l=>{const a=Number(l.attributes.amount),n=u(l.attributes.taxRate);e+=a,t+=a+n*a,s.push({taxRate:l.attributes.taxRate,amount:n*a})}),s.length>0&&(l=s.reduce((e,t)=>e+t.amount,0),l=Number(l.toFixed(2)),s.reduce((e,t)=>(e[t.taxRate]||(e[t.taxRate]={taxRate:t.taxRate,amount:0},a.push(e[t.taxRate])),e[t.taxRate].amount+=t.amount,e),{})),h({taxRatesTotal:l,taxRates:JSON.stringify(a),amountSubtotal:e,amountTotal:t}))},(0,o.useEffect)(()=>{_()},[n]),(0,r.jsxs)("div",{...m,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Actions","billy"),children:(0,r.jsx)("button",{id:"updatetotals",className:"components-button is-secondary is-button",onClick:_,children:(0,l.__)("Update Totals","billy")})})}),(0,r.jsx)(s.InnerBlocks,{templateLock:!1,template:[["billy-blocks/quote-tablerow"]],allowedBlocks:["billy-blocks/quote-tablerow"],renderAppender:()=>(0,r.jsx)(s.InnerBlocks.ButtonBlockAppender,{})}),b>0&&(0,r.jsx)("table",{className:"totals",children:(0,r.jsxs)("tbody",{children:[b>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("th",{style:{width:"50%"},children:x>b?(0,l.__)("Subtotal","billy"):(0,l.__)("Total","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(b,c))})]}),p&&y>0&&(0,r.jsxs)("tr",{className:"taxRates",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.__)("Tax","billy")}),(0,r.jsx)("td",{children:JSON.parse(p).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),i,d(e.amount,c),"<small>("+e.taxRate+")</small><br>")},t)})})]}),x>b&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.__)("Total","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(x,c))})]})]})})]})}),save:e=>{const{className:t,attributes:{currency:a,locale:n,amountSubtotal:i,amountTotal:c,taxRates:b,taxRatesTotal:x}}=e,p=s.useBlockProps.save({className:"quotetable-block alignwide"+(t?" "+t:"")});return(0,r.jsx)("div",{...p,children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col","data-label":"title"}),(0,r.jsx)("th",{scope:"col","data-label":"description"}),(0,r.jsx)("th",{scope:"col","data-label":"amount"}),b&&x>0&&(0,r.jsx)("th",{scope:"col","data-label":"tax"})]})}),(0,r.jsx)("tbody",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[i>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("th",{colSpan:"2","data-label":c>i?"subtotal":"total"}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))})]}),b&&x>0&&(0,r.jsxs)("tr",{className:"taxrates",children:[(0,r.jsx)("th",{colSpan:"2","data-label":"tax"}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:JSON.parse(b).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),a,d(e.amount,n),"<small>("+e.taxRate+")</small><br>")},t)})})]}),c>i&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("th",{colSpan:"2","data-label":"total"}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]})]})]})})},deprecated:h}),(0,t.registerBlockType)("billy-blocks/quote-tablerow",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Quote","billy"),(0,l.__)("Table Row","billy")),icon:"menu-alt",category:"billy-blocks",parent:["billy-blocks/quote-table"],attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},taxRate:{type:"string",default:""},amount:{type:"number",default:""},amountIncl:{type:"number",default:""},quantity:{type:"number",default:""},quantityRate:{type:"number",default:""}},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)((e,{clientId:t})=>{const{getBlockRootClientId:l,getBlockIndex:s}=e("core/block-editor");return{i:s(t,l(t))+1}})(e=>{const{i:t,attributes:{index:n,currency:i,locale:c,description:d,taxRate:b,amount:x,amountIncl:p,quantity:y,quantityRate:h},setAttributes:m}=e,j=(0,s.useBlockProps)();(0,o.useEffect)(()=>{m({index:t,currency:globalDataBilly.currency,locale:globalDataBilly.locale}),""===b&&m({taxRate:0===globalDataBilly.taxOptions.length?"0%":globalDataBilly.taxOptions[0].value})},[b]);const f=e=>{m({amountIncl:e>0?Number(e):""}),_()},g=e=>{m({amount:e>0?Number(e):""}),f(Number(e)+Number(e)*u(b))};return(0,r.jsxs)("div",{...j,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsxs)(a.PanelBody,{title:(0,l.__)("Quantity/Rate Calculator","billy"),children:[(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.__)("Quantity","billy"),placeholder:(0,l.__)("0","billy"),value:null!=y?y:"",onChange:e=>{m({quantity:e>0?Number(e):""}),g(Number(e)*Number(h))}}),(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Rate","billy"),i),placeholder:(0,l.__)("0","billy"),value:null!=h?h:"",onChange:e=>{m({quantityRate:e>0?Number(e):""}),g(Number(y)*Number(e))}})]})}),(0,r.jsx)("table",{children:(0,r.jsx)("tbody",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"index",children:n&&n}),(0,r.jsx)("td",{style:{width:"30vw",minWidth:"200px"},children:(0,r.jsx)(s.InnerBlocks,{template:[["core/paragraph",{content:d||""}]],allowedBlocks:["core/block","core/heading","core/paragraph","core/list","core/html"]})}),(0,r.jsx)("td",{children:(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Amount","billy"),i),className:"amount",placeholder:(0,l.__)("0","billy"),value:null!=x?x:"",onChange:g})}),(0,r.jsx)("td",{children:(0,r.jsx)(a.SelectControl,{className:"taxrate",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Tax","billy"),"%"),value:null!=b?b:"",options:0!==globalDataBilly.taxOptions.length?globalDataBilly.taxOptions:"0%"!==b&&0===globalDataBilly.taxOptions.length?[{label:b,value:b},{label:"0%",value:"0%"}]:"",onChange:e=>{m({taxRate:e}),f(Number(x)+Number(x)*u(e))}})}),(0,r.jsx)("td",{children:(0,r.jsx)(a.TextControl,{type:"number",disabled:"disabled",label:i,className:"amount-tax",placeholder:(0,l.__)("0","billy"),value:null!=p?p:""})})]})})})]})}),save:e=>{const{attributes:{index:t,locale:a,taxRate:n,amount:i}}=e;return(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"row",children:t&&t}),(0,r.jsx)("td",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsx)("td",{children:i&&d(i,a)}),n&&u(n)*i>0&&(0,r.jsx)("td",{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),d(u(n)*i,a),"<small>("+n+")</small>")})})]})},deprecated:m}),(0,t.registerBlockType)("billy-blocks/quote-validuntildate",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Quote","billy"),(0,l.__)("Valid Until","billy")),icon:"calendar-alt",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},edit:()=>{const e=(0,s.useBlockProps)();return(0,r.jsx)("div",{...e,children:(0,r.jsx)(a.Disabled,{children:(0,r.jsx)(i(),{block:"billy-blocks/quote-validuntildate"})})})},save:()=>null});const j=[{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountTotalEarnings:{type:"number",default:""},amountTotalExpenses:{type:"number",default:""},amountTaxEarnings:{type:"number",default:""},amountTaxExpenses:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountTotalEarnings:i,amountTotalExpenses:c,amountTaxEarnings:o,amountTaxExpenses:u}}=e;return(0,r.jsx)("div",{className:"alignwide"+(t?" "+t:""),children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"index",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"date",children:(0,l.__)("Date","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"description",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"reference",children:(0,l.__)("Reference","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort earnings","data-sort":"earning",children:(0,l.__)("Earnings","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort expenses","data-sort":"expense",children:(0,l.__)("Expenses","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"tax",children:(0,l.__)("Taxes","billy")})]})}),(0,r.jsx)("tbody",{className:"list",children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{colSpan:"5",children:(0,l.sprintf)((0,l.__)("%1$s / %2$s","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))}),(0,r.jsx)("td",{className:"sum expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]}),(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{colSpan:"5",children:(0,l.__)("Profit","billy")}),(0,r.jsx)("td",{colSpan:"2",className:"profit",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i-c,n))})]}),(o>0||u>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{colSpan:"5",children:(0,l.sprintf)((0,l.__)("%1$s (%2$s / %3$s)","billy"),(0,l.__)("Taxes","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum tax-earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(o,n))}),(0,r.jsx)("td",{className:"sum tax-expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(u,n))})]})]})]})})}},{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountTotalEarnings:{type:"number",default:""},amountTotalExpenses:{type:"number",default:""},amountTaxEarnings:{type:"number",default:""},amountTaxExpenses:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountTotalEarnings:i,amountTotalExpenses:c,amountTaxEarnings:o,amountTaxExpenses:u}}=e;return(0,r.jsx)("div",{className:"alignwide"+(t?" "+t:""),children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"index",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"date",children:(0,l.__)("Date","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"description",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"reference",children:(0,l.__)("Reference","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort earnings","data-sort":"earning",children:(0,l.__)("Earnings","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort expenses","data-sort":"expense",children:(0,l.__)("Expenses","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"tax",children:(0,l.__)("Taxes","billy")})]})}),(0,r.jsx)("tbody",{className:"list",children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"5",className:"alignright",children:(0,l.sprintf)((0,l.__)("%1$s / %2$s","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))}),(0,r.jsx)("td",{className:"sum expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]}),(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"5",className:"alignright",children:(0,l.__)("Profit","billy")}),(0,r.jsx)("td",{colSpan:"2",className:"profit",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i-c,n))})]}),(o>0||u>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"5",className:"alignright",children:(0,l.sprintf)((0,l.__)("%1$s (%2$s / %3$s)","billy"),(0,l.__)("Taxes","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum tax-earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(o,n))}),(0,r.jsx)("td",{className:"sum tax-expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(u,n))})]})]})]})})}},{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountTotalEarnings:{type:"number",default:""},amountTotalExpenses:{type:"number",default:""},amountTaxEarnings:{type:"number",default:""},amountTaxExpenses:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountTotalEarnings:i,amountTotalExpenses:c,amountTaxEarnings:o,amountTaxExpenses:u}}=e;return(0,r.jsx)("div",{className:"alignwide"+(t?" "+t:""),children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"index",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"date",children:(0,l.__)("Date","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"description",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"reference",children:(0,l.__)("Reference","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort earnings","data-sort":"earning",children:(0,l.__)("Earnings","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort expenses","data-sort":"expense",children:(0,l.__)("Expenses","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"tax",children:(0,l.__)("Tax","billy")})]})}),(0,r.jsx)("tbody",{className:"list",children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"4",align:"right",children:(0,l.sprintf)((0,l.__)("%1$s / %2$s","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))}),(0,r.jsx)("td",{className:"sum expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]}),(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"4",align:"right",children:(0,l.__)("Profit","billy")}),(0,r.jsx)("td",{colSpan:"2",className:"profit",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i-c,n))})]}),(o>0||u>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"4",align:"right",children:(0,l.sprintf)((0,l.__)("%1$s (%2$s / %3$s)","billy"),(0,l.__)("Taxes","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum tax-earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(o,n))}),(0,r.jsx)("td",{className:"sum tax-expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(u,n))})]})]})]})})}},{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountTotalEarnings:{type:"number",default:""},amountTotalExpenses:{type:"number",default:""},amountTaxEarnings:{type:"number",default:""},amountTaxExpenses:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountTotalEarnings:i,amountTotalExpenses:c,amountTaxEarnings:o,amountTaxExpenses:u}}=e;return(0,r.jsx)("div",{className:"alignwide"+(t?" "+t:""),children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"index",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"date",children:(0,l.__)("Date","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"description",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"reference",children:(0,l.__)("Reference","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort earnings","data-sort":"earning",children:(0,l.__)("Earning","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort expenses","data-sort":"expense",children:(0,l.__)("Expense","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"tax",children:(0,l.__)("Tax","billy")})]})}),(0,r.jsx)("tbody",{className:"list",children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"4",align:"right",children:(0,l.sprintf)((0,l.__)("%1$s / %2$s","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))}),(0,r.jsx)("td",{className:"sum expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]}),(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"4",align:"right",children:(0,l.__)("Profit","billy")}),(0,r.jsx)("td",{colSpan:"2",className:"profit",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i-c,n))})]}),(o>0||u>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"4",align:"right",children:(0,l.sprintf)((0,l.__)("%1$s (%2$s / %3$s)","billy"),(0,l.__)("Taxes","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum tax-earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(o,n))}),(0,r.jsx)("td",{className:"sum tax-expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(u,n))})]})]})]})})}}],f=[{attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},date:{type:"string",default:""},quarter:{type:"number",default:""},reference:{type:"string",default:""},earning:{type:"number",default:""},expense:{type:"number",default:""},tax:{type:"number",default:""},postUUID:{type:"string",default:""},postTitle:{type:"string",default:""},postLink:{type:"string",default:""},postType:{type:"string",default:""}},save:e=>{const{className:t,attributes:{index:a,locale:n,date:i,quarter:c,earning:o,expense:u,tax:b,reference:x,postLink:p}}=e;return(0,r.jsxs)("tr",{"data-date":i&&new Date(i).toISOString().substring(0,10),"data-quarter":c&&(0,l.sprintf)((0,l.__)("Q%s","billy"),c),"data-reference":x&&x,"data-earning":o>0?o:null,"data-expense":u>0?u:null,"data-tax":b>0?b:null,children:[(0,r.jsx)("th",{className:"index",scope:"row",children:a&&a}),(0,r.jsxs)("td",{className:"date","data-value":i&&new Date(i).toISOString().substring(0,10),children:[i&&new Date(i).toISOString().substring(0,10),(0,r.jsx)("sub",{children:c&&(0,l.sprintf)((0,l.__)("Q%s","billy"),c)})]}),(0,r.jsx)("td",{className:"description",children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("td",{className:"reference",children:[x&&!p&&x,x&&p&&(0,r.jsx)("a",{href:p,children:x})]}),(0,r.jsx)("td",{className:"amount earning","data-value":o>0?o:null,children:o&&o>0&&d(o,n)}),(0,r.jsx)("td",{className:"amount expense","data-value":u>0?u:null,children:u&&u>0&&d(u,n)}),b&&b>0&&(0,r.jsx)("td",{className:"amount tax","data-value":b,children:d(b,n)})]})}},{attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},date:{type:"string",default:""},quarter:{type:"number",default:""},reference:{type:"string",default:""},earning:{type:"number",default:""},expense:{type:"number",default:""},tax:{type:"number",default:""},postUUID:{type:"string",default:""},postTitle:{type:"string",default:""},postLink:{type:"string",default:""},postType:{type:"string",default:""}},save:e=>{const{className:t,attributes:{index:a,locale:n,date:i,quarter:c,earning:o,expense:u,tax:b,reference:x,postLink:p}}=e;return(0,r.jsxs)("tr",{"data-date":i&&new Date(i).toISOString().substring(0,10),"data-quarter":c&&(0,l.sprintf)((0,l.__)("Q%s","billy"),c),"data-reference":x&&x,"data-earning":o>0?o:null,"data-expense":u>0?u:null,"data-tax":b>0?b:null,children:[(0,r.jsx)("th",{className:"index",scope:"row",children:a&&a}),(0,r.jsxs)("td",{className:"date","data-value":i&&new Date(i).toISOString().substring(0,10),children:[i&&new Date(i).toISOString().substring(0,10),(0,r.jsx)("sub",{children:c&&(0,l.sprintf)((0,l.__)("Q%s","billy"),c)})]}),(0,r.jsx)("td",{className:"description",children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("td",{className:"reference",children:[x&&!p&&x,x&&p&&(0,r.jsx)("a",{href:p,children:x})]}),(0,r.jsx)("td",{className:"amount earning","data-value":o>0?o:null,children:o&&o>0&&d(o,n)}),(0,r.jsx)("td",{className:"amount expense","data-value":u>0?u:null,children:u&&u>0&&d(u,n)}),(0,r.jsx)("td",{className:"amount tax","data-value":b>0?b:null,children:b&&b>0&&d(b,n)})]})}},{attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},date:{type:"string",default:""},quarter:{type:"number",default:""},reference:{type:"string",default:""},description:{type:"string",default:""},earning:{type:"number",default:""},expense:{type:"number",default:""},tax:{type:"number",default:""},postUUID:{type:"string",default:""},postTitle:{type:"string",default:""},postLink:{type:"string",default:""},postType:{type:"string",default:""}},save:e=>{const{className:t,attributes:{index:s,locale:a,date:n,quarter:i,description:c,earning:o,expense:u,tax:b,reference:x,postLink:p}}=e;return(0,r.jsxs)("tr",{"data-date":n&&new Date(n).toISOString().substring(0,10),"data-quarter":i&&(0,l.sprintf)((0,l.__)("Q%s","billy"),i),"data-reference":x&&x,"data-earning":o>0?o:null,"data-expense":u>0?u:null,"data-tax":b>0?b:null,children:[(0,r.jsx)("th",{className:"index",scope:"row",children:s&&s}),(0,r.jsxs)("td",{className:"date","data-value":n&&new Date(n).toISOString().substring(0,10),children:[n&&new Date(n).toISOString().substring(0,10),(0,r.jsx)("sub",{children:i&&(0,l.sprintf)((0,l.__)("Q%s","billy"),i)})]}),(0,r.jsx)("td",{className:"description",children:c&&c}),(0,r.jsxs)("td",{className:"reference",children:[x&&!p&&x,x&&p&&(0,r.jsx)("a",{href:p,children:x})]}),(0,r.jsx)("td",{className:"amount earning","data-value":o>0?o:null,children:o&&o>0&&d(o,a)}),(0,r.jsx)("td",{className:"amount expense","data-value":u>0?u:null,children:u&&u>0&&d(u,a)}),(0,r.jsx)("td",{className:"amount tax","data-value":b>0?b:null,children:b&&b>0&&d(b,a)})]})}}];let g;(0,t.registerBlockType)("billy-blocks/accounting-table",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Accounting","billy"),(0,l.__)("Table","billy")),icon:"menu-alt",category:"billy-blocks",attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountTotalEarnings:{type:"number",default:""},amountTotalExpenses:{type:"number",default:""},amountTaxEarnings:{type:"number",default:""},amountTaxExpenses:{type:"number",default:""}},supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)((e,{clientId:t})=>{const{getBlocksByClientId:l}=e("core/block-editor"),s=l(t)[0].innerBlocks;return s.sort((e,t)=>new Date(e.attributes.date)-new Date(t.attributes.date)),{childBlocks:s}})(e=>{const{className:t,childBlocks:n,attributes:{currency:i,locale:c,amountTotalEarnings:u,amountTotalExpenses:b,amountTaxEarnings:x,amountTaxExpenses:p},setAttributes:y}=e,h=(0,s.useBlockProps)({className:"accountingtable-block"+(t?" "+t:"")});return g=()=>{let e=0,t=0,l=0,s=0;y({currency:globalDataBilly.currency,locale:globalDataBilly.locale}),n&&n.length>0&&n.forEach(a=>{const n=Number(a.attributes.tax);e+=Number(a.attributes.earning),t+=Number(a.attributes.expense),a.attributes.earning&&(l+=n),a.attributes.expense&&(s+=n)}),y({amountTotalEarnings:e,amountTotalExpenses:t,amountTaxEarnings:l,amountTaxExpenses:s})},(0,o.useEffect)(()=>{g()},[n]),(0,r.jsxs)("div",{...h,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Actions","billy"),children:(0,r.jsx)("button",{id:"updatetotals",className:"components-button is-secondary is-button",onClick:g,children:(0,l.__)("Update Totals","billy")})})}),(0,r.jsx)(s.InnerBlocks,{templateLock:!1,template:[["billy-blocks/accounting-tablerow"]],allowedBlocks:["billy-blocks/accounting-tablerow"],renderAppender:()=>(0,r.jsx)(s.InnerBlocks.ButtonBlockAppender,{})}),(0,r.jsx)("table",{className:"totals",children:(0,r.jsxs)("tbody",{children:[u>0&&(0,r.jsxs)("tr",{className:"earnings",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.__)("Earnings","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(u,c))})]}),b>0&&(0,r.jsxs)("tr",{className:"expenses",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.__)("Expenses","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(b,c))})]}),(u>0||b>0)&&(0,r.jsxs)("tr",{className:"profit",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.__)("Profit","billy")}),(0,r.jsx)("td",{style:{borderTop:"2px solid"},children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(u-b,c))})]}),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("tr",{className:"taxes-earnings",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.sprintf)((0,l.__)("Taxes (%s)","billy"),(0,l.__)("Earnings","billy"))}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(x,c))})]}),(0,r.jsxs)("tr",{className:"taxes-expenses",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.sprintf)((0,l.__)("Taxes (%s)","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(p,c))})]})]})]})})]})}),save:e=>{const{className:t,attributes:{currency:a,locale:n,amountTotalEarnings:i,amountTotalExpenses:c,amountTaxEarnings:o,amountTaxExpenses:u}}=e,b=s.useBlockProps.save({className:"alignwide"+(t?" "+t:"")});return(0,r.jsx)("div",{...b,children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"index",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"date",children:(0,l.__)("Date","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"description",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"reference",children:(0,l.__)("Reference","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort earnings","data-sort":"earning",children:(0,l.__)("Earnings","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort expenses","data-sort":"expense",children:(0,l.__)("Expenses","billy")}),(o>0||u>0)&&(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"tax",children:(0,l.__)("Taxes","billy")})]})}),(0,r.jsx)("tbody",{className:"list",children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{colSpan:"4",children:(0,l.sprintf)((0,l.__)("%1$s / %2$s","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))}),(0,r.jsx)("td",{className:"sum expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]}),(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{colSpan:"4",children:(0,l.__)("Profit","billy")}),(0,r.jsx)("td",{colSpan:"2",className:"profit",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i-c,n))})]}),(o>0||u>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{colSpan:"4",children:(0,l.sprintf)((0,l.__)("%1$s (%2$s / %3$s)","billy"),(0,l.__)("Taxes","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum tax-earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(o,n))}),(0,r.jsx)("td",{className:"sum tax-expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(u,n))})]})]})]})})},deprecated:j}),(0,t.registerBlockType)("billy-blocks/accounting-tablerow",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Accounting","billy"),(0,l.__)("Table Row","billy")),icon:"menu-alt",category:"billy-blocks",parent:["billy-blocks/accounting-table"],attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},date:{type:"string",default:""},quarter:{type:"number",default:""},reference:{type:"string",default:""},earning:{type:"number",default:""},expense:{type:"number",default:""},tax:{type:"number",default:""},postUUID:{type:"string",default:""},postTitle:{type:"string",default:""},postLink:{type:"string",default:""},postType:{type:"string",default:""}},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)((e,{clientId:t})=>{const{getBlockRootClientId:l,getBlockIndex:s}=e("core/block-editor");return{clientId:t,rootClientId:l(t),i:s(t,l(t))+1}})(e=>{const{clientId:t,rootClientId:n,i,attributes:{index:d,currency:u,locale:x,description:p,date:y,quarter:h,earning:m,expense:_,tax:j,reference:f,postUUID:N,postTitle:$,postLink:k,postType:T},setAttributes:v}=e,w=(0,s.useBlockProps)();return(0,o.useEffect)(()=>{v({index:i,currency:globalDataBilly.currency,locale:globalDataBilly.locale}),""===y&&v({date:(new Date).toISOString().substring(0,10),quarter:b((new Date).toISOString().substring(0,10))})},[]),(0,r.jsxs)("div",{...w,children:[(0,r.jsxs)(s.InspectorControls,{children:[!N&&(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Date","billy"),children:(0,r.jsx)(a.DatePicker,{currentDate:y,onChange:e=>{v({date:e}),(e=>{v({quarter:Number(b(e))})})(e),(0,c.dispatch)("core/block-editor").moveBlockToPosition(t,n,n,i)}})}),N&&k&&(0,r.jsx)(a.PanelBody,{title:(0,l.sprintf)((0,l.__)("Reference: %s","billy"),T?T.charAt(0).toUpperCase()+T.substring(1):(0,l.__)("Post","billy")),children:(0,r.jsx)("p",{children:(0,r.jsx)("a",{href:k,children:$||k})})})]}),(0,r.jsx)("table",{children:(0,r.jsx)("tbody",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"index",children:d&&d}),(0,r.jsxs)("td",{className:"date",children:[y&&new Date(y).toISOString().substring(0,10),(0,r.jsx)("sub",{children:h&&(0,l.sprintf)((0,l.__)("Q%s","billy"),h)})]}),(0,r.jsx)("td",{className:"description",style:{minWidth:"200px"},children:(0,r.jsx)(s.InnerBlocks,{template:[["core/paragraph",{content:p||""}]],allowedBlocks:["core/block","core/heading","core/paragraph","core/list","core/html"]})}),(0,r.jsx)("td",{className:"reference",children:(0,r.jsx)(a.TextControl,{type:"text",label:(0,l.__)("Reference","billy"),placeholder:"",value:null!=f?f:"",onChange:e=>{v({reference:e})}})}),(0,r.jsx)("td",{className:"amount earning",children:(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Earning","billy"),u),placeholder:(0,l.__)("0","billy"),value:null!=m?m:"",onChange:e=>{v({expense:"",earning:e>0?Number(e):""}),g()}})}),(0,r.jsx)("td",{className:"amount expense",children:(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Expense","billy"),u),placeholder:(0,l.__)("0","billy"),value:null!=_?_:"",onChange:e=>{v({earning:"",expense:e>0?Number(e):""}),g()}})}),(0,r.jsx)("td",{className:"amount tax",children:(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Tax","billy"),u),placeholder:(0,l.__)("0","billy"),value:null!=j?j:"",onChange:e=>{v({tax:e>0?Number(e):""}),g()}})})]})})})]})}),save:e=>{const{attributes:{index:t,locale:a,date:n,quarter:i,earning:c,expense:o,tax:u,reference:b,postLink:x}}=e;return(0,r.jsxs)("tr",{"data-date":n&&new Date(n).toISOString().substring(0,10),"data-quarter":i&&(0,l.sprintf)((0,l.__)("Q%s","billy"),i),"data-reference":b&&b,"data-earning":c>0?c:null,"data-expense":o>0?o:null,"data-tax":u>0?u:null,children:[(0,r.jsx)("th",{className:"index",scope:"row",children:t&&t}),(0,r.jsxs)("td",{className:"date","data-value":n&&new Date(n).toISOString().substring(0,10),children:[n&&new Date(n).toISOString().substring(0,10),(0,r.jsx)("sub",{children:i&&(0,l.sprintf)((0,l.__)("Q%s","billy"),i)})]}),(0,r.jsx)("td",{className:"description",children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("td",{className:"reference",children:[b&&!x&&b,b&&x&&(0,r.jsx)("a",{href:x,children:b})]}),(0,r.jsx)("td",{className:"amount earning","data-value":c>0?c:null,children:c&&c>0&&d(c,a)}),(0,r.jsx)("td",{className:"amount expense","data-value":o>0?o:null,children:o&&o>0&&d(o,a)}),u&&u>0&&(0,r.jsx)("td",{className:"amount tax","data-value":u,children:d(u,a)})]})},deprecated:f}),(0,t.registerBlockType)("billy-blocks/accounting-actions",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Accounting","billy"),(0,l.__)("Actions","billy")),icon:"menu-alt",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)(e=>({postModifiedDate:e("core/editor").getEditedPostAttribute("modified")}))(e=>{const{postModifiedDate:t}=e,a=(0,s.useBlockProps)({className:"components-placeholder",style:{minHeight:"auto"}});return(0,r.jsx)("div",{...a,children:(0,r.jsx)("small",{children:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Last modified","billy"),new Date(t).toLocaleString())})})}),save:()=>null});const N=window.wp.plugins,$=window.wp.editor;(0,N.registerPlugin)("billy-setup",{render:()=>(0,r.jsxs)($.PluginDocumentSettingPanel,{name:"billy-setup",title:(0,l.__)("Billy Setup","billy"),className:"my-document-setting-plugin",children:[(0,r.jsx)("p",{children:(0,r.jsx)("a",{href:globalDataBilly.wpAdmin+"customize.php?autofocus[panel]=billy_setup_panel",children:(0,l.__)("Settings (Theme Customizer)","billy")})}),(0,r.jsxs)("ul",{className:"ul code",children:[(0,r.jsx)("li",{title:(0,l.__)("Invoice number","billy"),children:(0,r.jsx)(i(),{block:"billy-blocks/invoice-number"})}),(0,r.jsx)("li",{title:(0,l.__)("Quote number","billy"),children:(0,r.jsx)(i(),{block:"billy-blocks/quote-number"})}),(0,r.jsx)("li",{title:(0,l.__)("Name","billy"),children:(0,r.jsx)(i(),{block:"billy-blocks/theme-mod",attributes:{themeMod:"name"}})}),(0,r.jsx)("li",{title:(0,l.__)("Address","billy"),children:(0,r.jsx)(i(),{block:"billy-blocks/theme-mod",attributes:{themeMod:"address"}})}),(0,r.jsx)("li",{title:(0,l.__)("VAT","billy"),children:(0,r.jsx)(i(),{block:"billy-blocks/theme-mod",attributes:{themeMod:"vat"}})}),(0,r.jsx)("li",{title:(0,l.__)("Currency","billy"),children:(0,r.jsx)(i(),{block:"billy-blocks/theme-mod",attributes:{themeMod:"currency"}})}),(0,r.jsx)("li",{title:(0,l.__)("Taxes","billy"),children:(0,r.jsx)(i(),{block:"billy-blocks/theme-mod",attributes:{themeMod:"taxrates"}})})]})]})}),(0,t.registerBlockType)("billy-blocks/theme-mod",{apiVersion:2,title:(0,l.__)("Theme Mod","billy"),icon:"admin-generic",category:"billy-blocks",attributes:{themeMod:{type:"string",default:""}},supports:{inserter:!1,reusable:!1,html:!1},edit:e=>{const{attributes:{themeMod:t},setAttributes:n}=e,c=(0,s.useBlockProps)();return(0,r.jsxs)("div",{...c,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Theme Mod","billy"),children:(0,r.jsx)(a.SelectControl,{label:(0,l.__)("Setting","billy"),help:(0,l.__)("Modify the value in the Theme Customizer.","billy"),options:globalDataBilly.themeModOptions,value:null!=t?t:"",onChange:e=>{n({themeMod:e})}})})}),(0,r.jsx)(a.Disabled,{children:(0,r.jsx)(i(),{block:"billy-blocks/theme-mod",attributes:e.attributes})})]})},save:()=>null})})();1 (()=>{"use strict";var e={n:t=>{var l=t&&t.__esModule?()=>t.default:()=>t;return e.d(l,{a:l}),l},d:(t,l)=>{for(var s in l)e.o(l,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:l[s]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.blocks,l=window.wp.i18n,s=window.wp.blockEditor,a=window.wp.components,n=window.wp.serverSideRender;var i=e.n(n);const r=window.ReactJSXRuntime;(0,t.registerBlockType)("billy-blocks/header",{title:(0,l.__)("Header","billy"),icon:"editor-table",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:()=>({"data-align":"wide"}),edit:()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsxs)(a.PanelBody,{title:(0,l.__)("Info","billy"),children:[(0,r.jsx)("div",{className:"components-notice",children:(0,r.jsx)("div",{className:"components-notice__content",children:(0,r.jsx)("a",{href:globalDataBilly.wpAdmin+"edit.php?post_type=wp_block",children:(0,l.sprintf)((0,l.__)("Edit the %s layout","billy"),(0,l.__)("Header","billy"))})})}),(0,r.jsx)("div",{className:"components-notice",children:(0,r.jsx)("div",{className:"components-notice__content",children:(0,l.sprintf)((0,l.__)("The %s values can be modified in the Theme Customizer.","billy"),(0,l.__)("Header","billy"))})})]})}),(0,r.jsx)(a.Disabled,{children:(0,r.jsx)(i(),{block:"billy-blocks/header"})})]}),save:()=>null});const c=window.wp.data;(0,t.registerBlockType)("billy-blocks/invoice-actions",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Invoice","billy"),(0,l.__)("Actions","billy")),icon:"menu-alt",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)(e=>({postModifiedDate:e("core/editor").getEditedPostAttribute("modified")}))(e=>{const{postModifiedDate:t}=e,a=(0,s.useBlockProps)({className:"components-placeholder",style:{minHeight:"auto"}});return(0,r.jsx)("div",{...a,children:(0,r.jsx)("small",{children:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Last modified","billy"),new Date(t).toLocaleString())})})}),save:()=>null});const o=window.wp.element;(0,t.registerBlockType)("billy-blocks/invoice-meta",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Invoice","billy"),(0,l.__)("Meta","billy")),icon:"editor-textcolor",category:"billy-blocks",attributes:{label:{type:"string",default:""},text:{type:"string",default:""}},supports:{inserter:!1,reusable:!1,html:!1,className:!0},edit:e=>{const{className:t,attributes:{label:n,text:i},setAttributes:c}=e,d=(0,s.useBlockProps)({className:t?" "+t:""});return(0,r.jsxs)("div",{...d,children:[(0,r.jsxs)(s.InspectorControls,{children:[(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Label","billy"),children:(0,r.jsx)(a.TextControl,{type:"text",className:"label",value:null!=n?n:"",onChange:e=>{c({label:e})}})}),(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Text","billy"),children:(0,r.jsx)(a.TextControl,{type:"text",className:"text",value:null!=i?i:"",onChange:e=>{c({text:e})}})})]}),(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)('<div class="label">%1$s</div> <div class="text">%2$s</div>',"billy"),n||"",i||(0,l.__)("N/A","billy"))})]})},save:e=>{const{className:t,attributes:{label:a,text:n}}=e,i=s.useBlockProps.save({className:t?" "+t:""});return n&&(0,r.jsx)("div",{...i,children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)('<div class="label">%1$s</div> <div class="text">%2$s</div>',"billy"),a||"",n||(0,l.__)("N/A","billy"))})})},deprecated:[{attributes:{label:{type:"string",default:""},text:{type:"string",default:""}},save:e=>{const{className:t,attributes:{label:s,text:a}}=e;return a&&(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)('<div class="label">%1$s</div> <div class="text">%2$s</div>',"billy"),s||"",a||(0,l.__)("N/A","billy"))})})}},{attributes:{label:{type:"string",default:""},text:{type:"string",default:""}},save:e=>{const{className:t,attributes:{label:s,text:a}}=e;return a&&(0,r.jsx)("p",{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)("<p>"+(0,l.__)("<strong>%1$s</strong> <span>%2$s</span>","billy")+"</p>",s||"",a||(0,l.__)("N/A","billy"))})})}}]}),(0,t.registerBlockType)("billy-blocks/invoice-date",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Invoice","billy"),(0,l.__)("Date","billy")),icon:"calendar-alt",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},edit:()=>{const e=(0,s.useBlockProps)();return(0,r.jsxs)("div",{...e,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Info","billy"),children:(0,r.jsx)("div",{className:"components-notice is-warning",children:(0,r.jsx)("div",{className:"components-notice__content",children:(0,l.sprintf)((0,l.__)("Due to legal requirements in some countries, autogenerated data like %s can't be modified anymore after an invoice has been created in the system!","billy"),(0,l.__)("Date","billy"))})})})}),(0,r.jsx)(a.Disabled,{children:(0,r.jsx)(i(),{block:"billy-blocks/invoice-date"})})]})},save:()=>null}),(0,t.registerBlockType)("billy-blocks/invoice-duedate",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Invoice","billy"),(0,l.__)("Due Date","billy")),icon:"calendar-alt",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},edit:()=>{const e=(0,s.useBlockProps)();return(0,r.jsxs)("div",{...e,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Info","billy"),children:(0,r.jsx)("div",{className:"components-notice",children:(0,r.jsx)("div",{className:"components-notice__content",children:(0,l.sprintf)((0,l.__)("The %s values can be modified in the Theme Customizer.","billy"),(0,l.__)("Payment due days","billy"))})})})}),(0,r.jsx)(a.Disabled,{children:(0,r.jsx)(i(),{block:"billy-blocks/invoice-duedate"})})]})},save:()=>null}),(0,t.registerBlockType)("billy-blocks/invoice-number",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Invoice","billy"),(0,l.__)("Number","billy")),icon:"editor-ol",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},edit:()=>{const e=(0,s.useBlockProps)();return(0,r.jsxs)("div",{...e,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsxs)(a.PanelBody,{title:(0,l.__)("Info","billy"),children:[(0,r.jsx)("div",{className:"components-notice",children:(0,r.jsx)("div",{className:"components-notice__content",children:(0,l.sprintf)((0,l.__)("The %s values can be modified in the Theme Customizer.","billy"),(0,l.__)("Invoice number: Prefix","billy"))})}),(0,r.jsx)("div",{className:"components-notice is-warning",children:(0,r.jsx)("div",{className:"components-notice__content",children:(0,l.sprintf)((0,l.__)("Due to legal requirements in some countries, autogenerated data like %s can't be modified anymore after an invoice has been created in the system!","billy"),(0,l.__)("Invoice number","billy"))})})]})}),(0,r.jsx)(a.Disabled,{children:(0,r.jsx)(i(),{block:"billy-blocks/invoice-number"})})]})},save:()=>null}),(0,t.registerBlockType)("billy-blocks/invoice-paymentinformation",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Invoice","billy"),(0,l.__)("Payment Information","billy")),icon:"info",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},edit:()=>{const e=(0,s.useBlockProps)();return(0,r.jsxs)("div",{...e,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Info","billy"),children:(0,r.jsx)("div",{className:"components-notice",children:(0,r.jsx)("div",{className:"components-notice__content",children:(0,l.sprintf)((0,l.__)("The %s values can be modified in the Theme Customizer.","billy"),(0,l.__)("Payment Information","billy"))})})})}),(0,r.jsx)(a.Disabled,{children:(0,r.jsx)(i(),{block:"billy-blocks/invoice-paymentinformation"})})]})},save:()=>null});const d=(e,t=void 0)=>e.toLocaleString(t,{minimumFractionDigits:2,maximumFractionDigits:2}),u=e=>parseFloat(e)/100,b=e=>{const t=new Date(e)||new Date;return[1,2,3,4][Math.floor(t.getMonth()/3)]},x=[{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountSubtotal:{type:"number",default:""},amountTotal:{type:"number",default:""},taxRates:{type:"string",default:""},taxRatesTotal:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountSubtotal:i,amountTotal:c,taxRates:b,taxRatesTotal:x}}=e,p=s.useBlockProps.save({className:"invoicetable-block alignwide"+(t?" "+t:"")});return(0,r.jsx)("div",{...p,children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Amount","billy")}),b&&x>0&&(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Tax","billy")})]})}),(0,r.jsx)("tbody",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[i>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("th",{colSpan:"2",children:c>i?(0,l.__)("Subtotal","billy"):(0,l.__)("Total","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))})]}),b&&x>0&&(0,r.jsxs)("tr",{className:"taxrates",children:[(0,r.jsx)("th",{colSpan:"2",children:(0,l.__)("Tax","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:JSON.parse(b).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),a,d(e.amount,n),"<small>("+e.taxRate+")</small><br>")},t)})})]}),c>i&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("th",{colSpan:"2",children:(0,l.__)("Total","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]})]})]})})}},{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountSubtotal:{type:"number",default:""},amountTotal:{type:"number",default:""},taxRates:{type:"string",default:""},taxRatesTotal:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountSubtotal:i,amountTotal:c,taxRates:b,taxRatesTotal:x}}=e;return(0,r.jsx)("div",{className:"invoicetable-block alignwide"+(t?" "+t:""),children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Amount","billy")}),b&&x>0&&(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Tax","billy")})]})}),(0,r.jsx)("tbody",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[i>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("td",{colSpan:"2",className:"align-right",children:c>i?(0,l.__)("Subtotal","billy"):(0,l.__)("Total","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))})]}),b&&x>0&&(0,r.jsxs)("tr",{className:"taxrates",children:[(0,r.jsx)("td",{colSpan:"2",className:"align-right",children:(0,l.__)("Tax","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:JSON.parse(b).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),a,d(e.amount,n),"<small>("+e.taxRate+")</small><br>")},t)})})]}),c>i&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("td",{colSpan:"2",className:"align-right",children:(0,l.__)("Total","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]})]})]})})}},{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountSubtotal:{type:"number",default:""},amountTotal:{type:"number",default:""},taxRates:{type:"string",default:""},taxRatesTotal:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountSubtotal:i,amountTotal:c,taxRates:b,taxRatesTotal:x}}=e;return(0,r.jsx)("div",{className:"invoicetable-block alignwide"+(t?" "+t:""),children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Amount","billy")}),b&&x>0&&(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Tax","billy")})]})}),(0,r.jsx)("tbody",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[i>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("td",{colSpan:"2",align:"right",children:c>i?(0,l.__)("Subtotal","billy"):(0,l.__)("Total","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))})]}),b&&x>0&&(0,r.jsxs)("tr",{className:"taxrates",children:[(0,r.jsx)("td",{colSpan:"2",align:"right",children:(0,l.__)("Tax","billy")}),(0,r.jsx)("td",{children:JSON.parse(b).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),a,d(e.amount,n),"<small>("+e.taxRate+")</small><br>")},t)})})]}),c>i&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("td",{colSpan:"2",align:"right",children:(0,l.__)("Total","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]})]})]})})}}],p=[{attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},description:{type:"string",default:""},taxRate:{type:"string",default:""},amount:{type:"number",default:""},amountIncl:{type:"number",default:""},quantity:{type:"number",default:""},quantityRate:{type:"number",default:""}},save:e=>{const{className:t,attributes:{index:a,locale:n,taxRate:i,amount:c}}=e;return(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"row",children:a&&a}),(0,r.jsx)("td",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsx)("td",{children:c&&d(c,n)}),i&&u(i)*c>0&&(0,r.jsx)("td",{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),d(u(i)*c,n),"<small>("+i+")</small>")})})]})}},{attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},description:{type:"string",default:""},taxRate:{type:"string",default:""},amount:{type:"number",default:""},amountIncl:{type:"number",default:""},quantity:{type:"number",default:""},quantityRate:{type:"number",default:""}},save:e=>{const{className:t,attributes:{index:s,locale:a,description:n,taxRate:i,amount:c}}=e;return(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"row",children:s&&s}),(0,r.jsx)("td",{children:n&&(0,r.jsx)(o.RawHTML,{children:n})}),(0,r.jsx)("td",{children:c&&d(c,a)}),i&&u(i)*c>0&&(0,r.jsx)("td",{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),d(u(i)*c,a),"<small>("+i+")</small>")})})]})}}];let y;(0,t.registerBlockType)("billy-blocks/invoice-table",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Invoice","billy"),(0,l.__)("Table","billy")),icon:"menu-alt",category:"billy-blocks",attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountSubtotal:{type:"number",default:""},amountTotal:{type:"number",default:""},taxRates:{type:"string",default:""},taxRatesTotal:{type:"number",default:""}},supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)((e,{clientId:t})=>{const{getBlocksByClientId:l}=e("core/block-editor");return{childBlocks:l(t)[0].innerBlocks}})(e=>{const{className:t,childBlocks:n,attributes:{currency:i,locale:c,amountSubtotal:b,amountTotal:x,taxRates:p,taxRatesTotal:h},setAttributes:m}=e,_=(0,s.useBlockProps)({className:"invoicetable-block"+(t?" "+t:"")});return y=()=>{let e=0,t=0,l=0,s=[],a=[];m({currency:globalDataBilly.currency,locale:globalDataBilly.locale}),n&&n.length>0&&(n.forEach(l=>{const a=Number(l.attributes.amount),n=u(l.attributes.taxRate);e+=a,t+=a+n*a,s.push({taxRate:l.attributes.taxRate,amount:n*a})}),s.length>0&&(l=s.reduce((e,t)=>e+t.amount,0),l=Number(l.toFixed(2)),s.reduce((e,t)=>(e[t.taxRate]||(e[t.taxRate]={taxRate:t.taxRate,amount:0},a.push(e[t.taxRate])),e[t.taxRate].amount+=t.amount,e),{})),m({taxRatesTotal:l,taxRates:JSON.stringify(a),amountSubtotal:e,amountTotal:t}))},(0,o.useEffect)(()=>{y()},[n]),(0,r.jsxs)("div",{..._,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Actions","billy"),children:(0,r.jsx)("button",{id:"updatetotals",className:"components-button is-secondary is-button",onClick:y,children:(0,l.__)("Update Totals","billy")})})}),(0,r.jsx)(s.InnerBlocks,{templateLock:!1,template:[["billy-blocks/invoice-tablerow"]],allowedBlocks:["billy-blocks/invoice-tablerow"],renderAppender:()=>(0,r.jsx)(s.InnerBlocks.ButtonBlockAppender,{})}),b>0&&(0,r.jsx)("table",{className:"totals",children:(0,r.jsxs)("tbody",{children:[b>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("th",{style:{width:"50%"},children:x>b?(0,l.__)("Subtotal","billy"):(0,l.__)("Total","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(b,c))})]}),p&&h>0&&(0,r.jsxs)("tr",{className:"taxRates",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.__)("Tax","billy")}),(0,r.jsx)("td",{children:JSON.parse(p).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),i,d(e.amount,c),"<small>("+e.taxRate+")</small><br>")},t)})})]}),x>b&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.__)("Total","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(x,c))})]})]})})]})}),save:e=>{const{className:t,attributes:{currency:a,locale:n,amountSubtotal:i,amountTotal:c,taxRates:b,taxRatesTotal:x}}=e,p=s.useBlockProps.save({className:"invoicetable-block alignwide"+(t?" "+t:"")});return(0,r.jsx)("div",{...p,children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col","data-label":"title"}),(0,r.jsx)("th",{scope:"col","data-label":"description"}),(0,r.jsx)("th",{scope:"col","data-label":"amount"}),b&&x>0&&(0,r.jsx)("th",{scope:"col","data-label":"tax"})]})}),(0,r.jsx)("tbody",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[i>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("th",{colSpan:"2","data-label":c>i?"subtotal":"total"}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))})]}),b&&x>0&&(0,r.jsxs)("tr",{className:"taxrates",children:[(0,r.jsx)("th",{colSpan:"2","data-label":"tax"}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:JSON.parse(b).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),a,d(e.amount,n),"<small>("+e.taxRate+")</small><br>")},t)})})]}),c>i&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("th",{colSpan:"2","data-label":"total"}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]})]})]})})},deprecated:x}),(0,t.registerBlockType)("billy-blocks/invoice-tablerow",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Invoice","billy"),(0,l.__)("Table Row","billy")),icon:"menu-alt",category:"billy-blocks",parent:["billy-blocks/invoice-table"],attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},taxRate:{type:"string",default:""},amount:{type:"number",default:""},amountIncl:{type:"number",default:""},quantity:{type:"number",default:""},quantityRate:{type:"number",default:""}},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)((e,{clientId:t})=>{const{getBlockRootClientId:l,getBlockIndex:s}=e("core/block-editor");return{i:s(t,l(t))+1}})(e=>{const{i:t,attributes:{index:n,currency:i,locale:c,description:d,taxRate:b,amount:x,amountIncl:p,quantity:h,quantityRate:m},setAttributes:_}=e,j=(0,s.useBlockProps)();(0,o.useEffect)(()=>{_({index:t,currency:globalDataBilly.currency,locale:globalDataBilly.locale}),""===b&&_({taxRate:0===globalDataBilly.taxOptions.length?"0%":globalDataBilly.taxOptions[0].value})},[b]);const f=e=>{_({amountIncl:e>0?Number(e):""}),y()},g=e=>{_({amount:e>0?Number(e):""}),f(Number(e)+Number(e)*u(b))};return(0,r.jsxs)("div",{...j,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsxs)(a.PanelBody,{title:(0,l.__)("Quantity/Rate Calculator","billy"),children:[(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.__)("Quantity","billy"),placeholder:(0,l.__)("0","billy"),value:null!=h?h:"",onChange:e=>{_({quantity:e>0?Number(e):""}),g(Number(e)*Number(m))}}),(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Rate","billy"),i),placeholder:(0,l.__)("0","billy"),value:null!=m?m:"",onChange:e=>{_({quantityRate:e>0?Number(e):""}),g(Number(h)*Number(e))}})]})}),(0,r.jsx)("table",{children:(0,r.jsx)("tbody",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"index",children:n&&n}),(0,r.jsx)("td",{style:{width:"30vw",minWidth:"200px"},children:(0,r.jsx)(s.InnerBlocks,{template:[["core/paragraph",{content:d||""}]],allowedBlocks:["core/block","core/heading","core/paragraph","core/list","core/html"]})}),(0,r.jsx)("td",{children:(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Amount","billy"),i),className:"amount",placeholder:(0,l.__)("0","billy"),value:null!=x?x:"",onChange:g})}),(0,r.jsx)("td",{children:(0,r.jsx)(a.SelectControl,{className:"taxrate",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Tax","billy"),"%"),value:null!=b?b:"",options:0!==globalDataBilly.taxOptions.length?globalDataBilly.taxOptions:"0%"!==b&&0===globalDataBilly.taxOptions.length?[{label:b,value:b},{label:"0%",value:"0%"}]:"",onChange:e=>{_({taxRate:e}),f(Number(x)+Number(x)*u(e))}})}),(0,r.jsx)("td",{children:(0,r.jsx)(a.TextControl,{type:"number",disabled:"disabled",label:i,className:"amount-tax",placeholder:(0,l.__)("0","billy"),value:null!=p?p:""})})]})})})]})}),save:e=>{const{attributes:{index:t,locale:a,taxRate:n,amount:i}}=e;return(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"row",children:t&&t}),(0,r.jsx)("td",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsx)("td",{children:i&&d(i,a)}),n&&u(n)*i>0&&(0,r.jsx)("td",{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),d(u(n)*i,a),"<small>("+n+")</small>")})})]})},deprecated:p}),(0,t.registerBlockType)("billy-blocks/quote-actions",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Quote","billy"),(0,l.__)("Actions","billy")),icon:"menu-alt",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)(e=>({postModifiedDate:e("core/editor").getEditedPostAttribute("modified")}))(e=>{const{postModifiedDate:t}=e,a=(0,s.useBlockProps)({className:"components-placeholder",style:{minHeight:"auto"}});return(0,r.jsx)("div",{...a,children:(0,r.jsx)("small",{children:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Last modified","billy"),new Date(t).toLocaleString())})})}),save:()=>null}),(0,t.registerBlockType)("billy-blocks/quote-meta",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Quote","billy"),(0,l.__)("Meta","billy")),icon:"editor-textcolor",category:"billy-blocks",attributes:{label:{type:"string",default:""},text:{type:"string",default:""}},supports:{inserter:!1,reusable:!1,html:!1,className:!0},edit:e=>{const{className:t,attributes:{label:n,text:i},setAttributes:c}=e,d=(0,s.useBlockProps)({className:t?" "+t:""});return(0,r.jsxs)("div",{...d,children:[(0,r.jsxs)(s.InspectorControls,{children:[(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Label","billy"),children:(0,r.jsx)(a.TextControl,{type:"text",className:"label",value:null!=n?n:"",onChange:e=>{c({label:e})}})}),(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Text","billy"),children:(0,r.jsx)(a.TextControl,{type:"text",className:"text",value:null!=i?i:"",onChange:e=>{c({text:e})}})})]}),(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)('<div class="label">%1$s</div> <div class="text">%2$s</div>',"billy"),n||"",i||(0,l.__)("N/A","billy"))})]})},save:e=>{const{className:t,attributes:{label:a,text:n}}=e,i=s.useBlockProps.save({className:t?" "+t:""});return n&&(0,r.jsx)("div",{...i,children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)('<div class="label">%1$s</div> <div class="text">%2$s</div>',"billy"),a||"",n||(0,l.__)("N/A","billy"))})})},deprecated:[{attributes:{label:{type:"string",default:""},text:{type:"string",default:""}},save:e=>{const{attributes:{label:t,text:s}}=e;return s&&(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)('<div class="label">%1$s</div> <div class="text">%2$s</div>',"billy"),t||"",s||(0,l.__)("N/A","billy"))})})}},{attributes:{label:{type:"string",default:""},text:{type:"string",default:""}},save:e=>{const{attributes:{label:t,text:s}}=e;return s&&(0,r.jsx)("p",{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)("<p>"+(0,l.__)("<strong>%1$s</strong> <span>%2$s</span>","billy")+"</p>",t||"",s||(0,l.__)("N/A","billy"))})})}}]}),(0,t.registerBlockType)("billy-blocks/quote-date",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Quote","billy"),(0,l.__)("Date","billy")),icon:"calendar-alt",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},edit:()=>{const e=(0,s.useBlockProps)();return(0,r.jsx)("div",{...e,children:(0,r.jsx)(a.Disabled,{children:(0,r.jsx)(i(),{block:"billy-blocks/quote-date"})})})},save:()=>null}),(0,t.registerBlockType)("billy-blocks/quote-information",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Quote","billy"),(0,l.__)("Information","billy")),icon:"info",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},edit:()=>{const e=(0,s.useBlockProps)();return(0,r.jsxs)("div",{...e,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Info","billy"),children:(0,r.jsx)("div",{className:"components-notice",children:(0,r.jsx)("div",{className:"components-notice__content",children:(0,l.sprintf)((0,l.__)("The %s values can be modified in the Theme Customizer.","billy"),(0,l.__)("Quote Information","billy"))})})})}),(0,r.jsx)(i(),{block:"billy-blocks/quote-information"})]})},save:()=>null});const h=[{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountSubtotal:{type:"number",default:""},amountTotal:{type:"number",default:""},taxRates:{type:"string",default:""},taxRatesTotal:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountSubtotal:i,amountTotal:c,taxRates:b,taxRatesTotal:x}}=e,p=s.useBlockProps.save({className:"quotetable-block alignwide"+(t?" "+t:"")});return(0,r.jsx)("div",{...p,children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Amount","billy")}),b&&x>0&&(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Tax","billy")})]})}),(0,r.jsx)("tbody",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[i>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("th",{colSpan:"2",children:c>i?(0,l.__)("Subtotal","billy"):(0,l.__)("Total","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))})]}),b&&x>0&&(0,r.jsxs)("tr",{className:"taxrates",children:[(0,r.jsx)("th",{colSpan:"2",children:(0,l.__)("Tax","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:JSON.parse(b).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),a,d(e.amount,n),"<small>("+e.taxRate+")</small><br>")},t)})})]}),c>i&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("th",{colSpan:"2",children:(0,l.__)("Total","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]})]})]})})}},{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountSubtotal:{type:"number",default:""},amountTotal:{type:"number",default:""},taxRates:{type:"string",default:""},taxRatesTotal:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountSubtotal:i,amountTotal:c,taxRates:b,taxRatesTotal:x}}=e;return(0,r.jsx)("div",{className:"quotetable-block alignwide"+(t?" "+t:""),children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Amount","billy")}),b&&x>0&&(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Tax","billy")})]})}),(0,r.jsx)("tbody",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[i>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("td",{colSpan:"2",className:"align-right",children:c>i?(0,l.__)("Subtotal","billy"):(0,l.__)("Total","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))})]}),b&&x>0&&(0,r.jsxs)("tr",{className:"taxrates",children:[(0,r.jsx)("td",{colSpan:"2",className:"align-right",children:(0,l.__)("Tax","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:JSON.parse(b).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),a,d(e.amount,n),"<small>("+e.taxRate+")</small><br>")},t)})})]}),c>i&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("td",{colSpan:"2",className:"align-right",children:(0,l.__)("Total","billy")}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]})]})]})})}},{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountSubtotal:{type:"number",default:""},amountTotal:{type:"number",default:""},taxRates:{type:"string",default:""},taxRatesTotal:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountSubtotal:i,amountTotal:c,taxRates:b,taxRatesTotal:x}}=e;return(0,r.jsx)("div",{className:"quotetable-block alignwide"+(t?" "+t:""),children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Amount","billy")}),b&&x>0&&(0,r.jsx)("th",{scope:"col",children:(0,l.__)("Tax","billy")})]})}),(0,r.jsx)("tbody",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[i>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("td",{colSpan:"2",align:"right",children:c>i?(0,l.__)("Subtotal","billy"):(0,l.__)("Total","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))})]}),b&&x>0&&(0,r.jsxs)("tr",{className:"taxrates",children:[(0,r.jsx)("td",{colSpan:"2",align:"right",children:(0,l.__)("Tax","billy")}),(0,r.jsx)("td",{children:JSON.parse(b).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),a,d(e.amount,n),"<small>("+e.taxRate+")</small><br>")},t)})})]}),c>i&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("td",{colSpan:"2",align:"right",children:(0,l.__)("Total","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]})]})]})})}}],m=[{attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},description:{type:"string",default:""},taxRate:{type:"string",default:""},amount:{type:"number",default:""},amountIncl:{type:"number",default:""},quantity:{type:"number",default:""},quantityRate:{type:"number",default:""}},save:e=>{const{className:t,attributes:{index:a,locale:n,taxRate:i,amount:c}}=e;return(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"row",children:a&&a}),(0,r.jsx)("td",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsx)("td",{children:c&&d(c,n)}),i&&u(i)*c>0&&(0,r.jsx)("td",{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),d(u(i)*c,n),"<small>("+i+")</small>")})})]})}},{attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},description:{type:"string",default:""},taxRate:{type:"string",default:""},amount:{type:"number",default:""},amountIncl:{type:"number",default:""},quantity:{type:"number",default:""},quantityRate:{type:"number",default:""}},save:e=>{const{className:t,attributes:{index:s,locale:a,description:n,taxRate:i,amount:c}}=e;return(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"row",children:s&&s}),(0,r.jsx)("td",{children:n&&(0,r.jsx)(o.RawHTML,{children:n})}),(0,r.jsx)("td",{children:c&&d(c,a)}),i&&u(i)*c>0&&(0,r.jsx)("td",{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),d(u(i)*c,a),"<small>("+i+")</small>")})})]})}}];let _;(0,t.registerBlockType)("billy-blocks/quote-table",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Quote","billy"),(0,l.__)("Table","billy")),icon:"menu-alt",category:"billy-blocks",attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountSubtotal:{type:"number",default:""},amountTotal:{type:"number",default:""},taxRates:{type:"string",default:""},taxRatesTotal:{type:"number",default:""}},supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)((e,{clientId:t})=>{const{getBlocksByClientId:l}=e("core/block-editor");return{childBlocks:l(t)[0].innerBlocks}})(e=>{const{className:t,childBlocks:n,attributes:{currency:i,locale:c,amountSubtotal:b,amountTotal:x,taxRates:p,taxRatesTotal:y},setAttributes:h}=e,m=(0,s.useBlockProps)({className:"quotetable-block"+(t?" "+t:"")});return _=()=>{let e=0,t=0,l=0;const s=[],a=[];h({currency:globalDataBilly.currency,locale:globalDataBilly.locale}),n?.length&&(n.forEach(l=>{const a=Number(l.attributes.amount)||0,n=u(l.attributes.taxRate);e+=a,t+=a+n*a,s.push({taxRate:l.attributes.taxRate,amount:n*a})}),s.length&&(l=s.reduce((e,{amount:t})=>e+t,0),l=Number(l.toFixed(2)),s.forEach(({taxRate:e,amount:t})=>{const l=a.find(t=>t.taxRate===e);l?l.amount+=t:a.push({taxRate:e,amount:t})})),h({taxRatesTotal:l,taxRates:JSON.stringify(a),amountSubtotal:e,amountTotal:t}))},(0,o.useEffect)(()=>{_()},[n]),(0,r.jsxs)("div",{...m,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Actions","billy"),children:(0,r.jsx)("button",{id:"updatetotals",className:"components-button is-secondary is-button",onClick:_,children:(0,l.__)("Update Totals","billy")})})}),(0,r.jsx)(s.InnerBlocks,{templateLock:!1,template:[["billy-blocks/quote-tablerow"]],allowedBlocks:["billy-blocks/quote-tablerow"],renderAppender:()=>(0,r.jsx)(s.InnerBlocks.ButtonBlockAppender,{})}),b>0&&(0,r.jsx)("table",{className:"totals",children:(0,r.jsxs)("tbody",{children:[b>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("th",{style:{width:"50%"},children:x>b?(0,l.__)("Subtotal","billy"):(0,l.__)("Total","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(b,c))})]}),p&&y>0&&(0,r.jsxs)("tr",{className:"taxRates",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.__)("Tax","billy")}),(0,r.jsx)("td",{children:JSON.parse(p).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),i,d(e.amount,c),"<small>("+e.taxRate+")</small><br>")},t)})})]}),x>b&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.__)("Total","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(x,c))})]})]})})]})}),save:e=>{const{className:t,attributes:{currency:a,locale:n,amountSubtotal:i,amountTotal:c,taxRates:b,taxRatesTotal:x}}=e,p=s.useBlockProps.save({className:"quotetable-block alignwide"+(t?" "+t:"")});return(0,r.jsx)("div",{...p,children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col","data-label":"title"}),(0,r.jsx)("th",{scope:"col","data-label":"description"}),(0,r.jsx)("th",{scope:"col","data-label":"amount"}),b&&x>0&&(0,r.jsx)("th",{scope:"col","data-label":"tax"})]})}),(0,r.jsx)("tbody",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[i>0&&(0,r.jsxs)("tr",{className:"subtotal",children:[(0,r.jsx)("th",{colSpan:"2","data-label":c>i?"subtotal":"total"}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))})]}),b&&x>0&&(0,r.jsxs)("tr",{className:"taxrates",children:[(0,r.jsx)("th",{colSpan:"2","data-label":"tax"}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:JSON.parse(b).sort((e,t)=>u(e.taxRate)-u(t.taxRate)).map((e,t)=>{if(e.amount>0)return(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s %3$s","billy"),a,d(e.amount,n),"<small>("+e.taxRate+")</small><br>")},t)})})]}),c>i&&(0,r.jsxs)("tr",{className:"total",children:[(0,r.jsx)("th",{colSpan:"2","data-label":"total"}),(0,r.jsx)("td",{colSpan:b&&x>0?"2":null,children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]})]})]})})},deprecated:h}),(0,t.registerBlockType)("billy-blocks/quote-tablerow",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Quote","billy"),(0,l.__)("Table Row","billy")),icon:"menu-alt",category:"billy-blocks",parent:["billy-blocks/quote-table"],attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},taxRate:{type:"string",default:""},amount:{type:"number",default:""},amountIncl:{type:"number",default:""},quantity:{type:"number",default:""},quantityRate:{type:"number",default:""}},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)((e,{clientId:t})=>{const{getBlockRootClientId:l,getBlockIndex:s}=e("core/block-editor");return{i:s(t,l(t))+1}})(e=>{const{i:t,attributes:{index:n,currency:i,locale:c,description:d,taxRate:b,amount:x,amountIncl:p,quantity:y,quantityRate:h},setAttributes:m}=e,j=(0,s.useBlockProps)();(0,o.useEffect)(()=>{m({index:t,currency:globalDataBilly.currency,locale:globalDataBilly.locale}),""===b&&m({taxRate:0===globalDataBilly.taxOptions.length?"0%":globalDataBilly.taxOptions[0].value})},[b]);const f=e=>{m({amountIncl:e>0?Number(e):""}),_()},g=e=>{m({amount:e>0?Number(e):""}),f(Number(e)+Number(e)*u(b))};return(0,r.jsxs)("div",{...j,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsxs)(a.PanelBody,{title:(0,l.__)("Quantity/Rate Calculator","billy"),children:[(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.__)("Quantity","billy"),placeholder:(0,l.__)("0","billy"),value:null!=y?y:"",onChange:e=>{m({quantity:e>0?Number(e):""}),g(Number(e)*Number(h))}}),(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Rate","billy"),i),placeholder:(0,l.__)("0","billy"),value:null!=h?h:"",onChange:e=>{m({quantityRate:e>0?Number(e):""}),g(Number(y)*Number(e))}})]})}),(0,r.jsx)("table",{children:(0,r.jsx)("tbody",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"index",children:n&&n}),(0,r.jsx)("td",{style:{width:"30vw",minWidth:"200px"},children:(0,r.jsx)(s.InnerBlocks,{template:[["core/paragraph",{content:d||""}]],allowedBlocks:["core/block","core/heading","core/paragraph","core/list","core/html"]})}),(0,r.jsx)("td",{children:(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Amount","billy"),i),className:"amount",placeholder:(0,l.__)("0","billy"),value:null!=x?x:"",onChange:g})}),(0,r.jsx)("td",{children:(0,r.jsx)(a.SelectControl,{className:"taxrate",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Tax","billy"),"%"),value:null!=b?b:"",options:0!==globalDataBilly.taxOptions.length?globalDataBilly.taxOptions:"0%"!==b&&0===globalDataBilly.taxOptions.length?[{label:b,value:b},{label:"0%",value:"0%"}]:"",onChange:e=>{m({taxRate:e}),f(Number(x)+Number(x)*u(e))}})}),(0,r.jsx)("td",{children:(0,r.jsx)(a.TextControl,{type:"number",disabled:"disabled",label:i,className:"amount-tax",placeholder:(0,l.__)("0","billy"),value:null!=p?p:""})})]})})})]})}),save:e=>{const{attributes:{index:t,locale:a,taxRate:n,amount:i}}=e;return(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"row",children:t&&t}),(0,r.jsx)("td",{children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsx)("td",{children:i&&d(i,a)}),n&&u(n)*i>0&&(0,r.jsx)("td",{children:(0,r.jsx)(o.RawHTML,{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),d(u(n)*i,a),"<small>("+n+")</small>")})})]})},deprecated:m}),(0,t.registerBlockType)("billy-blocks/quote-validuntildate",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Quote","billy"),(0,l.__)("Valid Until","billy")),icon:"calendar-alt",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},edit:()=>{const e=(0,s.useBlockProps)();return(0,r.jsx)("div",{...e,children:(0,r.jsx)(a.Disabled,{children:(0,r.jsx)(i(),{block:"billy-blocks/quote-validuntildate"})})})},save:()=>null});const j=[{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountTotalEarnings:{type:"number",default:""},amountTotalExpenses:{type:"number",default:""},amountTaxEarnings:{type:"number",default:""},amountTaxExpenses:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountTotalEarnings:i,amountTotalExpenses:c,amountTaxEarnings:o,amountTaxExpenses:u}}=e;return(0,r.jsx)("div",{className:"alignwide"+(t?" "+t:""),children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"index",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"date",children:(0,l.__)("Date","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"description",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"reference",children:(0,l.__)("Reference","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort earnings","data-sort":"earning",children:(0,l.__)("Earnings","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort expenses","data-sort":"expense",children:(0,l.__)("Expenses","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"tax",children:(0,l.__)("Taxes","billy")})]})}),(0,r.jsx)("tbody",{className:"list",children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{colSpan:"5",children:(0,l.sprintf)((0,l.__)("%1$s / %2$s","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))}),(0,r.jsx)("td",{className:"sum expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]}),(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{colSpan:"5",children:(0,l.__)("Profit","billy")}),(0,r.jsx)("td",{colSpan:"2",className:"profit",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i-c,n))})]}),(o>0||u>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{colSpan:"5",children:(0,l.sprintf)((0,l.__)("%1$s (%2$s / %3$s)","billy"),(0,l.__)("Taxes","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum tax-earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(o,n))}),(0,r.jsx)("td",{className:"sum tax-expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(u,n))})]})]})]})})}},{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountTotalEarnings:{type:"number",default:""},amountTotalExpenses:{type:"number",default:""},amountTaxEarnings:{type:"number",default:""},amountTaxExpenses:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountTotalEarnings:i,amountTotalExpenses:c,amountTaxEarnings:o,amountTaxExpenses:u}}=e;return(0,r.jsx)("div",{className:"alignwide"+(t?" "+t:""),children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"index",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"date",children:(0,l.__)("Date","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"description",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"reference",children:(0,l.__)("Reference","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort earnings","data-sort":"earning",children:(0,l.__)("Earnings","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort expenses","data-sort":"expense",children:(0,l.__)("Expenses","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"tax",children:(0,l.__)("Taxes","billy")})]})}),(0,r.jsx)("tbody",{className:"list",children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"5",className:"alignright",children:(0,l.sprintf)((0,l.__)("%1$s / %2$s","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))}),(0,r.jsx)("td",{className:"sum expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]}),(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"5",className:"alignright",children:(0,l.__)("Profit","billy")}),(0,r.jsx)("td",{colSpan:"2",className:"profit",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i-c,n))})]}),(o>0||u>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"5",className:"alignright",children:(0,l.sprintf)((0,l.__)("%1$s (%2$s / %3$s)","billy"),(0,l.__)("Taxes","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum tax-earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(o,n))}),(0,r.jsx)("td",{className:"sum tax-expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(u,n))})]})]})]})})}},{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountTotalEarnings:{type:"number",default:""},amountTotalExpenses:{type:"number",default:""},amountTaxEarnings:{type:"number",default:""},amountTaxExpenses:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountTotalEarnings:i,amountTotalExpenses:c,amountTaxEarnings:o,amountTaxExpenses:u}}=e;return(0,r.jsx)("div",{className:"alignwide"+(t?" "+t:""),children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"index",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"date",children:(0,l.__)("Date","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"description",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"reference",children:(0,l.__)("Reference","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort earnings","data-sort":"earning",children:(0,l.__)("Earnings","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort expenses","data-sort":"expense",children:(0,l.__)("Expenses","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"tax",children:(0,l.__)("Tax","billy")})]})}),(0,r.jsx)("tbody",{className:"list",children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"4",align:"right",children:(0,l.sprintf)((0,l.__)("%1$s / %2$s","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))}),(0,r.jsx)("td",{className:"sum expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]}),(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"4",align:"right",children:(0,l.__)("Profit","billy")}),(0,r.jsx)("td",{colSpan:"2",className:"profit",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i-c,n))})]}),(o>0||u>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"4",align:"right",children:(0,l.sprintf)((0,l.__)("%1$s (%2$s / %3$s)","billy"),(0,l.__)("Taxes","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum tax-earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(o,n))}),(0,r.jsx)("td",{className:"sum tax-expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(u,n))})]})]})]})})}},{attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountTotalEarnings:{type:"number",default:""},amountTotalExpenses:{type:"number",default:""},amountTaxEarnings:{type:"number",default:""},amountTaxExpenses:{type:"number",default:""}},save:e=>{const{className:t,attributes:{currency:a,locale:n,amountTotalEarnings:i,amountTotalExpenses:c,amountTaxEarnings:o,amountTaxExpenses:u}}=e;return(0,r.jsx)("div",{className:"alignwide"+(t?" "+t:""),children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"index",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"date",children:(0,l.__)("Date","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"description",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"reference",children:(0,l.__)("Reference","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort earnings","data-sort":"earning",children:(0,l.__)("Earning","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort expenses","data-sort":"expense",children:(0,l.__)("Expense","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"tax",children:(0,l.__)("Tax","billy")})]})}),(0,r.jsx)("tbody",{className:"list",children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"4",align:"right",children:(0,l.sprintf)((0,l.__)("%1$s / %2$s","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))}),(0,r.jsx)("td",{className:"sum expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]}),(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"4",align:"right",children:(0,l.__)("Profit","billy")}),(0,r.jsx)("td",{colSpan:"2",className:"profit",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i-c,n))})]}),(o>0||u>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{colSpan:"4",align:"right",children:(0,l.sprintf)((0,l.__)("%1$s (%2$s / %3$s)","billy"),(0,l.__)("Taxes","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum tax-earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(o,n))}),(0,r.jsx)("td",{className:"sum tax-expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(u,n))})]})]})]})})}}],f=[{attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},date:{type:"string",default:""},quarter:{type:"number",default:""},reference:{type:"string",default:""},earning:{type:"number",default:""},expense:{type:"number",default:""},tax:{type:"number",default:""},postUUID:{type:"string",default:""},postTitle:{type:"string",default:""},postLink:{type:"string",default:""},postType:{type:"string",default:""}},save:e=>{const{className:t,attributes:{index:a,locale:n,date:i,quarter:c,earning:o,expense:u,tax:b,reference:x,postLink:p}}=e;return(0,r.jsxs)("tr",{"data-date":i&&new Date(i).toISOString().substring(0,10),"data-quarter":c&&(0,l.sprintf)((0,l.__)("Q%s","billy"),c),"data-reference":x&&x,"data-earning":o>0?o:null,"data-expense":u>0?u:null,"data-tax":b>0?b:null,children:[(0,r.jsx)("th",{className:"index",scope:"row",children:a&&a}),(0,r.jsxs)("td",{className:"date","data-value":i&&new Date(i).toISOString().substring(0,10),children:[i&&new Date(i).toISOString().substring(0,10),(0,r.jsx)("sub",{children:c&&(0,l.sprintf)((0,l.__)("Q%s","billy"),c)})]}),(0,r.jsx)("td",{className:"description",children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("td",{className:"reference",children:[x&&!p&&x,x&&p&&(0,r.jsx)("a",{href:p,children:x})]}),(0,r.jsx)("td",{className:"amount earning","data-value":o>0?o:null,children:o&&o>0&&d(o,n)}),(0,r.jsx)("td",{className:"amount expense","data-value":u>0?u:null,children:u&&u>0&&d(u,n)}),b&&b>0&&(0,r.jsx)("td",{className:"amount tax","data-value":b,children:d(b,n)})]})}},{attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},date:{type:"string",default:""},quarter:{type:"number",default:""},reference:{type:"string",default:""},earning:{type:"number",default:""},expense:{type:"number",default:""},tax:{type:"number",default:""},postUUID:{type:"string",default:""},postTitle:{type:"string",default:""},postLink:{type:"string",default:""},postType:{type:"string",default:""}},save:e=>{const{className:t,attributes:{index:a,locale:n,date:i,quarter:c,earning:o,expense:u,tax:b,reference:x,postLink:p}}=e;return(0,r.jsxs)("tr",{"data-date":i&&new Date(i).toISOString().substring(0,10),"data-quarter":c&&(0,l.sprintf)((0,l.__)("Q%s","billy"),c),"data-reference":x&&x,"data-earning":o>0?o:null,"data-expense":u>0?u:null,"data-tax":b>0?b:null,children:[(0,r.jsx)("th",{className:"index",scope:"row",children:a&&a}),(0,r.jsxs)("td",{className:"date","data-value":i&&new Date(i).toISOString().substring(0,10),children:[i&&new Date(i).toISOString().substring(0,10),(0,r.jsx)("sub",{children:c&&(0,l.sprintf)((0,l.__)("Q%s","billy"),c)})]}),(0,r.jsx)("td",{className:"description",children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("td",{className:"reference",children:[x&&!p&&x,x&&p&&(0,r.jsx)("a",{href:p,children:x})]}),(0,r.jsx)("td",{className:"amount earning","data-value":o>0?o:null,children:o&&o>0&&d(o,n)}),(0,r.jsx)("td",{className:"amount expense","data-value":u>0?u:null,children:u&&u>0&&d(u,n)}),(0,r.jsx)("td",{className:"amount tax","data-value":b>0?b:null,children:b&&b>0&&d(b,n)})]})}},{attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},date:{type:"string",default:""},quarter:{type:"number",default:""},reference:{type:"string",default:""},description:{type:"string",default:""},earning:{type:"number",default:""},expense:{type:"number",default:""},tax:{type:"number",default:""},postUUID:{type:"string",default:""},postTitle:{type:"string",default:""},postLink:{type:"string",default:""},postType:{type:"string",default:""}},save:e=>{const{className:t,attributes:{index:s,locale:a,date:n,quarter:i,description:c,earning:o,expense:u,tax:b,reference:x,postLink:p}}=e;return(0,r.jsxs)("tr",{"data-date":n&&new Date(n).toISOString().substring(0,10),"data-quarter":i&&(0,l.sprintf)((0,l.__)("Q%s","billy"),i),"data-reference":x&&x,"data-earning":o>0?o:null,"data-expense":u>0?u:null,"data-tax":b>0?b:null,children:[(0,r.jsx)("th",{className:"index",scope:"row",children:s&&s}),(0,r.jsxs)("td",{className:"date","data-value":n&&new Date(n).toISOString().substring(0,10),children:[n&&new Date(n).toISOString().substring(0,10),(0,r.jsx)("sub",{children:i&&(0,l.sprintf)((0,l.__)("Q%s","billy"),i)})]}),(0,r.jsx)("td",{className:"description",children:c&&c}),(0,r.jsxs)("td",{className:"reference",children:[x&&!p&&x,x&&p&&(0,r.jsx)("a",{href:p,children:x})]}),(0,r.jsx)("td",{className:"amount earning","data-value":o>0?o:null,children:o&&o>0&&d(o,a)}),(0,r.jsx)("td",{className:"amount expense","data-value":u>0?u:null,children:u&&u>0&&d(u,a)}),(0,r.jsx)("td",{className:"amount tax","data-value":b>0?b:null,children:b&&b>0&&d(b,a)})]})}}];let g;(0,t.registerBlockType)("billy-blocks/accounting-table",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Accounting","billy"),(0,l.__)("Table","billy")),icon:"menu-alt",category:"billy-blocks",attributes:{currency:{type:"string",default:""},locale:{type:"string",default:""},amountTotalEarnings:{type:"number",default:""},amountTotalExpenses:{type:"number",default:""},amountTaxEarnings:{type:"number",default:""},amountTaxExpenses:{type:"number",default:""}},supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)((e,{clientId:t})=>{const{getBlocksByClientId:l}=e("core/block-editor"),s=l(t)[0].innerBlocks;return s.sort((e,t)=>new Date(e.attributes.date)-new Date(t.attributes.date)),{childBlocks:s}})(e=>{const{className:t,childBlocks:n,attributes:{currency:i,locale:c,amountTotalEarnings:u,amountTotalExpenses:b,amountTaxEarnings:x,amountTaxExpenses:p},setAttributes:y}=e,h=(0,s.useBlockProps)({className:"accountingtable-block"+(t?" "+t:"")});return g=()=>{let e=0,t=0,l=0,s=0;y({currency:globalDataBilly.currency,locale:globalDataBilly.locale}),n?.length&&n.forEach(a=>{const n=Number(a.attributes.tax)||0,i=Number(a.attributes.earning)||0,r=Number(a.attributes.expense)||0;e+=i,t+=r,i&&(l+=n),r&&(s+=n)}),y({amountTotalEarnings:e,amountTotalExpenses:t,amountTaxEarnings:l,amountTaxExpenses:s})},(0,o.useEffect)(()=>{g()},[n]),(0,r.jsxs)("div",{...h,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Actions","billy"),children:(0,r.jsx)("button",{id:"updatetotals",className:"components-button is-secondary is-button",onClick:g,children:(0,l.__)("Update Totals","billy")})})}),(0,r.jsx)(s.InnerBlocks,{templateLock:!1,template:[["billy-blocks/accounting-tablerow"]],allowedBlocks:["billy-blocks/accounting-tablerow"],renderAppender:()=>(0,r.jsx)(s.InnerBlocks.ButtonBlockAppender,{})}),(0,r.jsx)("table",{className:"totals",children:(0,r.jsxs)("tbody",{children:[u>0&&(0,r.jsxs)("tr",{className:"earnings",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.__)("Earnings","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(u,c))})]}),b>0&&(0,r.jsxs)("tr",{className:"expenses",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.__)("Expenses","billy")}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(b,c))})]}),(u>0||b>0)&&(0,r.jsxs)("tr",{className:"profit",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.__)("Profit","billy")}),(0,r.jsx)("td",{style:{borderTop:"2px solid"},children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(u-b,c))})]}),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("tr",{className:"taxes-earnings",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.sprintf)((0,l.__)("Taxes (%s)","billy"),(0,l.__)("Earnings","billy"))}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(x,c))})]}),(0,r.jsxs)("tr",{className:"taxes-expenses",children:[(0,r.jsx)("th",{style:{width:"50%"},children:(0,l.sprintf)((0,l.__)("Taxes (%s)","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),i,d(p,c))})]})]})]})})]})}),save:e=>{const{className:t,attributes:{currency:a,locale:n,amountTotalEarnings:i,amountTotalExpenses:c,amountTaxEarnings:o,amountTaxExpenses:u}}=e,b=s.useBlockProps.save({className:"alignwide"+(t?" "+t:"")});return(0,r.jsx)("div",{...b,children:(0,r.jsxs)("table",{className:"table wp-block-table",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"index",children:(0,l.__)("#","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"date",children:(0,l.__)("Date","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"description",children:(0,l.__)("Description","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"reference",children:(0,l.__)("Reference","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort earnings","data-sort":"earning",children:(0,l.__)("Earnings","billy")}),(0,r.jsx)("th",{scope:"col",className:"sort expenses","data-sort":"expense",children:(0,l.__)("Expenses","billy")}),(o>0||u>0)&&(0,r.jsx)("th",{scope:"col",className:"sort","data-sort":"tax",children:(0,l.__)("Taxes","billy")})]})}),(0,r.jsx)("tbody",{className:"list",children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("tfoot",{children:[(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{colSpan:"4",children:(0,l.sprintf)((0,l.__)("%1$s / %2$s","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i,n))}),(0,r.jsx)("td",{className:"sum expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(c,n))})]}),(i>0||c>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{colSpan:"4",children:(0,l.__)("Profit","billy")}),(0,r.jsx)("td",{colSpan:"2",className:"profit",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(i-c,n))})]}),(o>0||u>0)&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{colSpan:"4",children:(0,l.sprintf)((0,l.__)("%1$s (%2$s / %3$s)","billy"),(0,l.__)("Taxes","billy"),(0,l.__)("Earnings","billy"),(0,l.__)("Expenses","billy"))}),(0,r.jsx)("td",{className:"sum tax-earnings",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(o,n))}),(0,r.jsx)("td",{className:"sum tax-expenses",children:(0,l.sprintf)((0,l.__)("%1$s %2$s","billy"),a,d(u,n))})]})]})]})})},deprecated:j}),(0,t.registerBlockType)("billy-blocks/accounting-tablerow",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Accounting","billy"),(0,l.__)("Table Row","billy")),icon:"menu-alt",category:"billy-blocks",parent:["billy-blocks/accounting-table"],attributes:{index:{type:"number",default:"0"},currency:{type:"string",default:""},locale:{type:"string",default:""},date:{type:"string",default:""},quarter:{type:"number",default:""},reference:{type:"string",default:""},earning:{type:"number",default:""},expense:{type:"number",default:""},tax:{type:"number",default:""},postUUID:{type:"string",default:""},postTitle:{type:"string",default:""},postLink:{type:"string",default:""},postType:{type:"string",default:""}},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)((e,{clientId:t})=>{const{getBlockRootClientId:l,getBlockIndex:s}=e("core/block-editor");return{clientId:t,rootClientId:l(t),i:s(t,l(t))+1}})(e=>{const{clientId:t,rootClientId:n,i,attributes:{index:d,currency:u,locale:x,description:p,date:y,quarter:h,earning:m,expense:_,tax:j,reference:f,postUUID:N,postTitle:$,postLink:k,postType:T},setAttributes:v}=e,w=(0,s.useBlockProps)();return(0,o.useEffect)(()=>{v({index:i,currency:globalDataBilly.currency,locale:globalDataBilly.locale}),""===y&&v({date:(new Date).toISOString().substring(0,10),quarter:b((new Date).toISOString().substring(0,10))})},[]),(0,r.jsxs)("div",{...w,children:[(0,r.jsxs)(s.InspectorControls,{children:[!N&&(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Date","billy"),children:(0,r.jsx)(a.DatePicker,{currentDate:y,onChange:e=>{v({date:e}),(e=>{v({quarter:Number(b(e))})})(e),(0,c.dispatch)("core/block-editor").moveBlockToPosition(t,n,n,i)}})}),N&&k&&(0,r.jsx)(a.PanelBody,{title:(0,l.sprintf)((0,l.__)("Reference: %s","billy"),T?T.charAt(0).toUpperCase()+T.substring(1):(0,l.__)("Post","billy")),children:(0,r.jsx)("p",{children:(0,r.jsx)("a",{href:k,children:$||k})})})]}),(0,r.jsx)("table",{children:(0,r.jsx)("tbody",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"index",children:d&&d}),(0,r.jsxs)("td",{className:"date",children:[y&&new Date(y).toISOString().substring(0,10),(0,r.jsx)("sub",{children:h&&(0,l.sprintf)((0,l.__)("Q%s","billy"),h)})]}),(0,r.jsx)("td",{className:"description",style:{minWidth:"200px"},children:(0,r.jsx)(s.InnerBlocks,{template:[["core/paragraph",{content:p||""}]],allowedBlocks:["core/block","core/heading","core/paragraph","core/list","core/html"]})}),(0,r.jsx)("td",{className:"reference",children:(0,r.jsx)(a.TextControl,{type:"text",label:(0,l.__)("Reference","billy"),placeholder:"",value:null!=f?f:"",onChange:e=>{v({reference:e})}})}),(0,r.jsx)("td",{className:"amount earning",children:(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Earning","billy"),u),placeholder:(0,l.__)("0","billy"),value:null!=m?m:"",onChange:e=>{v({expense:"",earning:e>0?Number(e):""}),g()}})}),(0,r.jsx)("td",{className:"amount expense",children:(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Expense","billy"),u),placeholder:(0,l.__)("0","billy"),value:null!=_?_:"",onChange:e=>{v({earning:"",expense:e>0?Number(e):""}),g()}})}),(0,r.jsx)("td",{className:"amount tax",children:(0,r.jsx)(a.TextControl,{type:"number",label:(0,l.sprintf)((0,l.__)("%1$s in %2$s","billy"),(0,l.__)("Tax","billy"),u),placeholder:(0,l.__)("0","billy"),value:null!=j?j:"",onChange:e=>{v({tax:e>0?Number(e):""}),g()}})})]})})})]})}),save:e=>{const{attributes:{index:t,locale:a,date:n,quarter:i,earning:c,expense:o,tax:u,reference:b,postLink:x}}=e;return(0,r.jsxs)("tr",{"data-date":n&&new Date(n).toISOString().substring(0,10),"data-quarter":i&&(0,l.sprintf)((0,l.__)("Q%s","billy"),i),"data-reference":b&&b,"data-earning":c>0?c:null,"data-expense":o>0?o:null,"data-tax":u>0?u:null,children:[(0,r.jsx)("th",{className:"index",scope:"row",children:t&&t}),(0,r.jsxs)("td",{className:"date","data-value":n&&new Date(n).toISOString().substring(0,10),children:[n&&new Date(n).toISOString().substring(0,10),(0,r.jsx)("sub",{children:i&&(0,l.sprintf)((0,l.__)("Q%s","billy"),i)})]}),(0,r.jsx)("td",{className:"description",children:(0,r.jsx)(s.InnerBlocks.Content,{})}),(0,r.jsxs)("td",{className:"reference",children:[b&&!x&&b,b&&x&&(0,r.jsx)("a",{href:x,children:b})]}),(0,r.jsx)("td",{className:"amount earning","data-value":c>0?c:null,children:c&&c>0&&d(c,a)}),(0,r.jsx)("td",{className:"amount expense","data-value":o>0?o:null,children:o&&o>0&&d(o,a)}),u&&u>0&&(0,r.jsx)("td",{className:"amount tax","data-value":u,children:d(u,a)})]})},deprecated:f}),(0,t.registerBlockType)("billy-blocks/accounting-actions",{apiVersion:2,title:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Accounting","billy"),(0,l.__)("Actions","billy")),icon:"menu-alt",category:"billy-blocks",supports:{inserter:!1,reusable:!1,html:!1},getEditWrapperProps:()=>({"data-align":"wide"}),edit:(0,c.withSelect)(e=>({postModifiedDate:e("core/editor").getEditedPostAttribute("modified")}))(e=>{const{postModifiedDate:t}=e,a=(0,s.useBlockProps)({className:"components-placeholder",style:{minHeight:"auto"}});return(0,r.jsx)("div",{...a,children:(0,r.jsx)("small",{children:(0,l.sprintf)((0,l.__)("%1$s: %2$s","billy"),(0,l.__)("Last modified","billy"),new Date(t).toLocaleString())})})}),save:()=>null});const N=window.wp.plugins,$=window.wp.editor;(0,N.registerPlugin)("billy-setup",{render:()=>(0,r.jsxs)($.PluginDocumentSettingPanel,{name:"billy-setup",title:(0,l.__)("Billy Setup","billy"),className:"my-document-setting-plugin",children:[(0,r.jsx)("p",{children:(0,r.jsx)("a",{href:globalDataBilly.wpAdmin+"customize.php?autofocus[panel]=billy_setup_panel",children:(0,l.__)("Settings (Theme Customizer)","billy")})}),(0,r.jsxs)("ul",{className:"ul code",children:[(0,r.jsx)("li",{title:(0,l.__)("Invoice number","billy"),children:(0,r.jsx)(i(),{block:"billy-blocks/invoice-number"})}),(0,r.jsx)("li",{title:(0,l.__)("Quote number","billy"),children:(0,r.jsx)(i(),{block:"billy-blocks/quote-number"})}),(0,r.jsx)("li",{title:(0,l.__)("Name","billy"),children:(0,r.jsx)(i(),{block:"billy-blocks/theme-mod",attributes:{themeMod:"name"}})}),(0,r.jsx)("li",{title:(0,l.__)("Address","billy"),children:(0,r.jsx)(i(),{block:"billy-blocks/theme-mod",attributes:{themeMod:"address"}})}),(0,r.jsx)("li",{title:(0,l.__)("VAT","billy"),children:(0,r.jsx)(i(),{block:"billy-blocks/theme-mod",attributes:{themeMod:"vat"}})}),(0,r.jsx)("li",{title:(0,l.__)("Currency","billy"),children:(0,r.jsx)(i(),{block:"billy-blocks/theme-mod",attributes:{themeMod:"currency"}})}),(0,r.jsx)("li",{title:(0,l.__)("Taxes","billy"),children:(0,r.jsx)(i(),{block:"billy-blocks/theme-mod",attributes:{themeMod:"taxrates"}})})]})]})}),(0,t.registerBlockType)("billy-blocks/theme-mod",{apiVersion:2,title:(0,l.__)("Theme Mod","billy"),icon:"admin-generic",category:"billy-blocks",attributes:{themeMod:{type:"string",default:""}},supports:{inserter:!1,reusable:!1,html:!1},edit:e=>{const{attributes:{themeMod:t},setAttributes:n}=e,c=(0,s.useBlockProps)();return(0,r.jsxs)("div",{...c,children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsx)(a.PanelBody,{title:(0,l.__)("Theme Mod","billy"),children:(0,r.jsx)(a.SelectControl,{label:(0,l.__)("Setting","billy"),help:(0,l.__)("Modify the value in the Theme Customizer.","billy"),options:globalDataBilly.themeModOptions,value:null!=t?t:"",onChange:e=>{n({themeMod:e})}})})}),(0,r.jsx)(a.Disabled,{children:(0,r.jsx)(i(),{block:"billy-blocks/theme-mod",attributes:e.attributes})})]})},save:()=>null})})(); -
billy/trunk/inc/class-billy.php
r3355121 r3361573 436 436 } 437 437 438 return '<div id="' . esc_attr( $post_type ) . '" class="' . esc_attr( $post_type ) . '-wrapper' . ( ! in_array( $post_type, array( 'billy-contact' ), true ) ? ' alignwide' : '' ) . '">' . $this->preheader_render_callback() . $content . '</div>';438 return '<div id="' . esc_attr( $post_type ) . '" class="' . esc_attr( $post_type ) . '-wrapper' . ( ! in_array( $post_type, array( 'billy-contact' ), true ) ? ' alignwide' : '' ) . '">' . ( ! in_array( $post_type, array( 'billy-contact' ), true ) ? $this->preheader_render_callback() : '' ) . $content . '</div>'; 439 439 } 440 440 … … 1552 1552 wp_enqueue_style( 'dashicons' ); 1553 1553 1554 wp_enqueue_style( 'billy-style', self::$plugin_url . ' assets/css/main.css', array(), self::$plugin_version );1554 wp_enqueue_style( 'billy-style', self::$plugin_url . 'build/main.css', array(), self::$plugin_version ); 1555 1555 if ( is_rtl() ) { 1556 wp_enqueue_style( 'billy-style-rtl', self::$plugin_url . ' assets/css/rtl.css', array(), self::$plugin_version );1556 wp_enqueue_style( 'billy-style-rtl', self::$plugin_url . 'build/main-rtl.css', array(), self::$plugin_version ); 1557 1557 } 1558 1558 1559 1559 // Scripts. 1560 wp_enqueue_script( 'billy-script', self::$plugin_url . ' assets/js/main.bundle.js', array(), self::$plugin_version, true );1560 wp_enqueue_script( 'billy-script', self::$plugin_url . 'build/main.js', array(), self::$plugin_version, true ); 1561 1561 wp_add_inline_script( 1562 1562 'billy-script', -
billy/trunk/readme.txt
r3355121 r3361573 5 5 Requires at least: 6.0 6 6 Tested up to: 6.8 7 Stable tag: 1.1 1.17 Stable tag: 1.12.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 151 151 == Changelog == 152 152 153 = 1.12.0 = 154 * Refactor frontend assets and blocks 155 * Drop gulp.js and only use @wordpress/scripts in the frontend assets build process 156 153 157 = 1.11.1 = 154 158 * Re-implement workaround to improve formatting of line spacing in PDF content
Note: See TracChangeset
for help on using the changeset viewer.