iobroker.shoppingroute 0.3.9 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +24 -3
- package/README_DE.md +24 -3
- package/admin/custom/review/assets/review-editor-components-BTvdTZmt.js +30 -0
- package/admin/custom/review/assets/{virtualExposes-BDTLizpE.js → virtualExposes-D12Gu9x5.js} +1 -1
- package/admin/custom/review/mf-manifest.json +1 -1
- package/admin/custom/review/mf-stats.json +1 -1
- package/admin/custom/review/reviewEditor.js +2 -2
- package/admin/custom/shoppingList/assets/shopping-list-editor-components-Dpx8GHcM.js +27 -0
- package/admin/custom/shoppingList/assets/{virtualExposes-DgzWcmof.js → virtualExposes-B87M9RDc.js} +1 -1
- package/admin/custom/shoppingList/mf-manifest.json +1 -1
- package/admin/custom/shoppingList/mf-stats.json +1 -1
- package/admin/custom/shoppingList/shoppingListEditor.js +2 -2
- package/admin/i18n/de.json +1 -1
- package/admin/i18n/en.json +1 -1
- package/admin/jsonConfig.json +1 -7
- package/build/lib/review-tools.js +15 -6
- package/build/lib/sorter.js +0 -3
- package/build/main.js +147 -75
- package/io-package.json +19 -28
- package/package.json +9 -9
- package/admin/custom/review/assets/review-editor-components-CWyNDqPF.js +0 -25
- package/admin/custom/shoppingList/assets/shopping-list-editor-components-MoJ1XKOp.js +0 -27
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
**Current version: 0.
|
|
5
|
+
**Current version: 0.4.0**
|
|
6
6
|
|
|
7
7
|
ShoppingRoute sorts Alexa shopping-list entries by market, product group and each store's individual walking route. It assigns visible two-digit keys such as `20> Bananas` and `40> ═════ ALDI ═════`; managed lists must therefore be set to **A–Z** in the Alexa app. ShoppingRoute reuses the local Alexa2 authentication for direct item updates, deletes and batch creates, while Alexa2 list states remain the external change trigger.
|
|
8
8
|
|
|
@@ -40,6 +40,27 @@ See `README_DE.md` for the detailed German documentation.
|
|
|
40
40
|
|
|
41
41
|
## Changelog
|
|
42
42
|
|
|
43
|
+
### 0.4.1 (2026-09-12)
|
|
44
|
+
|
|
45
|
+
- Validates shopping-list responses before rendering or replacing the current view. Incomplete responses show an error and a Reload button instead of crashing on `.map()`.
|
|
46
|
+
|
|
47
|
+
- Adds a Delete button for each shopping item. Deletes the selected Amazon ID and empty market headers through the exclusive, journaled transaction with direct final verification. Dry Run and the safety stop block deletion.
|
|
48
|
+
|
|
49
|
+
- Prevents duplicate shopping items from overlapping drag/drop events and concurrent direct writes. Reserves UI/backend operations synchronously and keeps move errors visible after refresh.
|
|
50
|
+
|
|
51
|
+
- Corrects checker #16 metadata: removes unpublished 0.3.8 from `common.news`, adds the existing npm maintainer email to author/copyright fields, links the MIT license and declares testing ^6.2.1. Local checker: no errors; repository admission remains pending in PR #6434.
|
|
52
|
+
|
|
53
|
+
- Updates the catalogue and removes accepted review rows in one Admin draft change, avoiding stale accepted rows after saving. Discarding restores the original draft. The reported errors were confirmed fixed by the user.
|
|
54
|
+
- Replaces the review queue’s native multi-select with independently clickable market checkboxes and a visible selection summary. Included in 0.4.1; not in the published 0.4.0.
|
|
55
|
+
|
|
56
|
+
### 0.4.0 (2026-09-12)
|
|
57
|
+
|
|
58
|
+
**Correction to the original acceptance claim:** The complete review workflow was not fixed. Accepted rows could remain visible in the Admin draft, and market selection still used a native multi-select. The original “end-to-end test” description was incorrect: tests covered editor/helper functions and serialization, not full Admin interaction.
|
|
59
|
+
|
|
60
|
+
- Persists startup cleanup of previously accepted review rows even without accepting another product.
|
|
61
|
+
- Normalizes legacy product-market strings to arrays at startup and preserves market arrays in acceptance functions.
|
|
62
|
+
- The additional local UI correction is listed under “0.4.1”; it is not part of the published 0.4.0 package.
|
|
63
|
+
|
|
43
64
|
### 0.3.9 (2026-09-11)
|
|
44
65
|
|
|
45
66
|
- Replaces incomplete 0.3.8 snapshots that may have been installed directly from GitHub with an unambiguous newer version.
|
|
@@ -121,6 +142,6 @@ Older releases: [CHANGELOG_OLD.md](CHANGELOG_OLD.md).
|
|
|
121
142
|
|
|
122
143
|
## License
|
|
123
144
|
|
|
124
|
-
Licensed under the MIT License. See LICENSE for the complete terms.
|
|
145
|
+
Licensed under the MIT License. See [LICENSE](LICENSE) for the complete terms.
|
|
125
146
|
|
|
126
|
-
Copyright (c) 2026 RaviniZib
|
|
147
|
+
Copyright (c) 2026 RaviniZib <zib@ravini.org>
|
package/README_DE.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
**Aktuelle Version: 0.
|
|
5
|
+
**Aktuelle Version: 0.4.0**
|
|
6
6
|
|
|
7
7
|
ShoppingRoute sortiert Alexa-Einkaufslisteneinträge nach Markt, Produktgruppe und dem individuellen Laufweg durch den jeweiligen Markt. Dazu vergibt es sichtbare zweistellige Schlüssel wie `20> Bananen` und `40> ═════ ALDI ═════`; verwaltete Listen müssen deshalb in der Alexa-App auf **A–Z** stehen. ShoppingRoute übernimmt lokal die Alexa2-Authentifizierung für direkte Updates, Deletes und Batch-Creates; Alexa2-Listenstates bleiben die Triggerquelle für externe Änderungen.
|
|
8
8
|
|
|
@@ -69,10 +69,31 @@ Anschließend kann 0.3.0 flexible Artikel marktübergreifend zusammenlegen, wenn
|
|
|
69
69
|
|
|
70
70
|
## Lizenz
|
|
71
71
|
|
|
72
|
-
ShoppingRoute wird unter der **MIT-Lizenz** veröffentlicht. Frühere bereits veröffentlichte Versionen bleiben unter der jeweils damals gültigen Lizenz.
|
|
72
|
+
ShoppingRoute wird unter der **[MIT-Lizenz](LICENSE)** veröffentlicht. Frühere bereits veröffentlichte Versionen bleiben unter der jeweils damals gültigen Lizenz.
|
|
73
73
|
|
|
74
74
|
## Changelog
|
|
75
75
|
|
|
76
|
+
### 0.4.1 (2026-09-12)
|
|
77
|
+
|
|
78
|
+
- Prüft Einkaufslistenantworten vor Anzeige und Übernahme. Unvollständige Antworten zeigen einen Fehler und „Erneut laden“, statt mit einem `.map()`-Fehler abzustürzen.
|
|
79
|
+
|
|
80
|
+
- Ergänzt eine Löschtaste pro Einkaufsartikel. Die gewählte Amazon-ID und leere Marktüberschriften werden über die exklusive, protokollierte Verarbeitung mit direkter Schlussprüfung entfernt. Dry Run und Sicherheitsstopp sperren das Löschen.
|
|
81
|
+
|
|
82
|
+
- Verhindert doppelte Einkaufsartikel durch weitergereichte Drop-Ereignisse und überlappende Schreibläufe. Reserviert Bedienbefehle und Backend-Läufe synchron; Verschiebefehler bleiben nach dem Nachladen sichtbar.
|
|
83
|
+
|
|
84
|
+
- Korrigiert die Metadaten aus Checker-Issue #16: unveröffentlichte 0.3.8 aus `common.news` entfernt, öffentliche npm-Maintaineradresse bei Autor/Copyright ergänzt, MIT-Lizenz verlinkt und testing ^6.2.1 deklariert. Lokaler Checker ohne Fehler; Repository-Aufnahme über PR #6434 bleibt offen.
|
|
85
|
+
|
|
86
|
+
- Übernahme und Entfernen der Prüfzeile erfolgen gemeinsam im Admin-Entwurf. Dadurch bleibt keine übernommene Zeile bis zur Server-Aktualisierung sichtbar. Speichern sichert die Änderung, Verwerfen stellt den ursprünglichen Entwurf wieder her. Die gemeldeten Fehler wurden vom Benutzer als behoben bestätigt.
|
|
87
|
+
- Ersetzt das native Mehrfachauswahlfeld der Prüfliste durch einzeln anklickbare Markt-Kästchen mit sichtbarer Auswahl. In 0.4.1 enthalten; nicht in der veröffentlichten 0.4.0.
|
|
88
|
+
|
|
89
|
+
### 0.4.0 (2026-09-12)
|
|
90
|
+
|
|
91
|
+
**Korrektur der ursprünglichen Freigabeaussage:** Der vollständige Prüflistenablauf war nicht behoben. Übernommene Zeilen konnten im Admin-Entwurf sichtbar bleiben; die Marktauswahl verwendete weiterhin ein natives Mehrfachauswahlfeld. Die ursprüngliche Bezeichnung „End-to-End-Test“ war falsch: Geprüft wurden Editor-/Hilfsfunktionen und Serialisierung, keine vollständige Admin-Bedienung.
|
|
92
|
+
|
|
93
|
+
- Speichert die serverseitige Startbereinigung bereits übernommener Prüfeinträge auch ohne erneute Artikelübernahme.
|
|
94
|
+
- Normalisiert ältere Artikelmarkt-Strings beim Start zu Arrays und erhält Markt-Arrays in den Übernahmefunktionen.
|
|
95
|
+
- Die ergänzende lokale Oberflächenkorrektur steht unter „0.4.1“; sie gehört nicht zum veröffentlichten 0.4.0-Paket.
|
|
96
|
+
|
|
76
97
|
### 0.3.9 (2026-09-11)
|
|
77
98
|
|
|
78
99
|
- Ersetzt unvollständige 0.3.8-Zwischenstände, die möglicherweise direkt von GitHub installiert wurden, durch eine eindeutig neuere Version.
|
|
@@ -152,4 +173,4 @@ ShoppingRoute wird unter der **MIT-Lizenz** veröffentlicht. Frühere bereits ve
|
|
|
152
173
|
|
|
153
174
|
Ältere Versionen: [CHANGELOG_OLD.md](CHANGELOG_OLD.md).
|
|
154
175
|
|
|
155
|
-
Copyright (c) 2026 RaviniZib
|
|
176
|
+
Copyright (c) 2026 RaviniZib <zib@ravini.org>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import"../reviewEditor.js";import{_ as I,a as N}from"./_virtual_mf___mfe_internal__ShoppingRouteReviewSet__mf_owner__1__loadShare__react__loadShare__.js-DDD1Hp7v.js";import"./vite-preload-helper-Dp1pzeXC.js";import"./index-2HOz3j7B.js";var v={exports:{}};const A=I||N,i=A.createElement,l=(r,e)=>(typeof navigator<"u"?String(navigator.language||"").toLowerCase():"de").startsWith("de")?r:e,d=r=>String(r||"").trim().toLocaleLowerCase("de"),P=r=>String(r||"").trim().toLocaleLowerCase("de").normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/ß/g,"ss").replace(/[^a-z0-9]+/g," ").trim();function S(r){let e=P(r).replace(/\s+/g,"");return(e.length>6&&e.endsWith("en")||e.length>6&&e.endsWith("n"))&&(e=e.slice(0,-1)),e}function h(r){const e=Array.isArray(r)?r:String(r||"").split(/[;,]/),t=new Set;return e.map(n=>String(n||"").trim()).filter(n=>{const o=d(n);return!o||t.has(o)?!1:(t.add(o),!0)})}function R(r){const e=[],t=new Set;for(const n of Array.isArray(r==null?void 0:r.markets)?r.markets:[]){if(!n||n.enabled===!1)continue;const o=String(n.name||"").trim(),a=d(o);!o||t.has(a)||(t.add(a),e.push(o))}return e.sort((n,o)=>n.localeCompare(o,"de",{sensitivity:"base"}))}function $(r){const e=new Set;return(Array.isArray(r==null?void 0:r.productGroups)?r.productGroups:[]).map(t=>String((t==null?void 0:t.name)||"").trim()).filter(t=>{const n=d(t);return!n||e.has(n)?!1:(e.add(n),!0)}).sort((t,n)=>t.localeCompare(n,"de",{sensitivity:"base"}))}function z(r){return[r==null?void 0:r.name,...String((r==null?void 0:r.aliases)||"").split(/[;,]/)].map(S).filter(Boolean)}function C(r,e){const t=S(e);return t?r.findIndex(n=>z(n).includes(t)):-1}function D(r,e){const t=[],n=new Set;for(const o of`${r||""},${e||""}`.split(/[;,]/)){const a=String(o||"").trim(),c=d(a);!a||n.has(c)||(n.add(c),t.push(a))}return t.join(",")}function y(r,e,t){const n=(Array.isArray(r==null?void 0:r.reviewItems)?r.reviewItems:[]).map((o,a)=>a===e?{...o,...t}:{...o});return{...r||{},reviewItems:n}}function f(r,e){const t=new Set(e),n=new Set,o=(Array.isArray(r==null?void 0:r.products)?r.products:[]).map(c=>({...c})),a=(Array.isArray(r==null?void 0:r.reviewItems)?r.reviewItems:[]).map(c=>({...c}));for(let c=0;c<a.length;c++){if(!t.has(c))continue;const s=a[c],u=String(s.product||"").trim();if(!u)continue;const m=C(o,u);if(m>=0){const g={...o[m]};s.category&&(g.category=String(s.category)),s.defaultMarket!==void 0&&(g.defaultMarket=String(s.defaultMarket||"")),s.availableMarkets!==void 0&&(g.availableMarkets=h(s.availableMarkets)),s.aliases&&(g.aliases=D(g.aliases,s.aliases)),o[m]=g}else o.push({name:u,aliases:String(s.aliases||""),category:String(s.category||s.guessedCategory||"Sonstiges"),defaultMarket:String(s.defaultMarket||""),availableMarkets:h(s.availableMarkets)});n.add(c)}return o.sort((c,s)=>String(c.name||"").localeCompare(String(s.name||""),"de",{sensitivity:"base"})),{...r||{},products:o,reviewItems:a.filter((c,s)=>!n.has(s))}}const E=`
|
|
2
|
+
.shoppingroute-review-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 14px}
|
|
3
|
+
.shoppingroute-review-button{min-height:38px;padding:7px 16px;border:1px solid currentColor;border-radius:5px;background:transparent;color:inherit;cursor:pointer;font-weight:600}
|
|
4
|
+
.shoppingroute-review-button:disabled{opacity:.45;cursor:default}
|
|
5
|
+
.shoppingroute-review-list{display:flex;flex-direction:column;border:1px solid currentColor;border-radius:8px;overflow:hidden}
|
|
6
|
+
.shoppingroute-review-row{display:grid;grid-template-columns:minmax(190px,1.35fr) minmax(150px,1fr) minmax(125px,.8fr) minmax(155px,1fr) minmax(150px,1fr) minmax(130px,.8fr) 34px;gap:9px;align-items:center;padding:9px 10px;border-bottom:1px solid currentColor}
|
|
7
|
+
.shoppingroute-review-row:last-child{border-bottom:0}
|
|
8
|
+
.shoppingroute-review-row input,.shoppingroute-review-row select{width:100%;min-width:0;min-height:36px;box-sizing:border-box;border:1px solid currentColor;border-radius:4px;background:transparent;color:inherit;padding:6px 8px}
|
|
9
|
+
.shoppingroute-review-row> *{min-width:0}
|
|
10
|
+
.shoppingroute-review-markets{min-width:0;border:1px solid currentColor;border-radius:4px}
|
|
11
|
+
.shoppingroute-review-markets summary{min-height:44px;box-sizing:border-box;padding:10px 8px;cursor:pointer;overflow-wrap:anywhere}
|
|
12
|
+
.shoppingroute-review-market-options{max-height:220px;overflow-y:auto;padding:0 8px 8px}
|
|
13
|
+
.shoppingroute-review-market-option{display:flex;align-items:center;gap:8px;min-height:44px;cursor:pointer;overflow-wrap:anywhere}
|
|
14
|
+
.shoppingroute-review-market-option input[type=checkbox]{width:20px;height:20px;min-height:20px;flex:0 0 20px;margin:0;padding:0;accent-color:#1976d2}
|
|
15
|
+
.shoppingroute-review-product small{display:block;opacity:.65;margin-top:3px;word-break:break-word}
|
|
16
|
+
.shoppingroute-review-delete{width:32px;height:32px;border:1px solid currentColor;border-radius:4px;background:transparent;color:inherit;cursor:pointer}
|
|
17
|
+
.shoppingroute-review-head{font-size:.78rem;font-weight:700;opacity:.68;padding-top:6px;padding-bottom:6px}
|
|
18
|
+
@media(max-width:900px){
|
|
19
|
+
.shoppingroute-review-head{display:none}
|
|
20
|
+
.shoppingroute-review-row{grid-template-columns:1fr 1fr;padding:12px}
|
|
21
|
+
.shoppingroute-review-product{grid-column:1/-1}
|
|
22
|
+
.shoppingroute-review-delete{justify-self:end}
|
|
23
|
+
}
|
|
24
|
+
@media(max-width:600px){
|
|
25
|
+
.shoppingroute-review-row{grid-template-columns:1fr}
|
|
26
|
+
.shoppingroute-review-product,.shoppingroute-review-delete{grid-column:auto}
|
|
27
|
+
.shoppingroute-review-delete{justify-self:start}
|
|
28
|
+
.shoppingroute-review-button{width:100%}
|
|
29
|
+
}
|
|
30
|
+
`;class K extends A.Component{change(e){this.props.onChange(e,!0)}update(e,t){this.change(y(this.props.data||{},e,t))}accept(e){const t=y(this.props.data||{},e,{action:"accept"});this.change(f(t,[e]))}acceptAll(){var n;const e=Array.isArray((n=this.props.data)==null?void 0:n.reviewItems)?this.props.data.reviewItems:[],t=e.map((o,a)=>a).filter(o=>{var a;return((a=e[o])==null?void 0:a.action)!=="accepted"});t.length&&this.change(f(this.props.data||{},t))}remove(e){const t=this.props.data||{},n=(Array.isArray(t.reviewItems)?t.reviewItems:[]).filter((o,a)=>a!==e).map(o=>({...o}));this.change({...t,reviewItems:n})}renderRow(e,t,n,o){const a=h(e.availableMarkets),c=new Set(a.map(d)),s=h([...o,...a]),u=e.action==="accepted",m=[i("option",{key:"pending",value:"pending"},l("Offen","Pending")),i("option",{key:"accept",value:"accept"},l("Übernehmen","Accept")),u?i("option",{key:"accepted",value:"accepted"},l("Übernommen","Accepted")):null,i("option",{key:"ignore",value:"ignore"},l("Ignorieren","Ignore"))].filter(Boolean),g=u?{opacity:.78}:void 0;return i("div",{key:`${e.key||e.product||"review"}-${t}`,className:"shoppingroute-review-row",style:g},[i("div",{key:"product",className:"shoppingroute-review-product"},[i("input",{key:"input",value:String(e.product||""),"aria-label":l("Artikel","Product"),onChange:p=>this.update(t,{product:p.target.value,action:u?"pending":e.action})}),i("small",{key:"source"},String(e.text||""))]),i("select",{key:"category",value:String(e.category||e.guessedCategory||""),"aria-label":l("Produktgruppe","Product group"),onChange:p=>this.update(t,{category:p.target.value,action:u?"pending":e.action})},[...new Set([String(e.category||e.guessedCategory||""),...n].filter(Boolean))].map(p=>i("option",{key:p,value:p},p))),i("select",{key:"defaultMarket",value:String(e.defaultMarket||""),"aria-label":l("Standardmarkt","Default market"),onChange:p=>this.update(t,{defaultMarket:p.target.value,action:u?"pending":e.action})},[i("option",{key:"__none__",value:""},"—"),...o.map(p=>i("option",{key:p,value:p},p))]),i("details",{key:"availableMarkets",className:"shoppingroute-review-markets"},[i("summary",{key:"summary"},`${l("Verfügbare Märkte","Available markets")}: ${a.length?a.join(", "):l("Keine ausgewählt","None selected")}`),i("div",{key:"options",className:"shoppingroute-review-market-options",role:"group","aria-label":l("Verfügbare Märkte","Available markets")},s.map(p=>i("label",{key:d(p),className:"shoppingroute-review-market-option"},[i("input",{key:"checkbox",type:"checkbox",checked:c.has(d(p)),onChange:_=>{var w,x,b;const k=h((b=(x=(w=this.props.data)==null?void 0:w.reviewItems)==null?void 0:x[t])==null?void 0:b.availableMarkets);this.update(t,{availableMarkets:_.target.checked?h([...k,p]):k.filter(M=>d(M)!==d(p)),action:u?"pending":e.action})}}),i("span",{key:"name"},p)])))]),i("input",{key:"aliases",value:String(e.aliases||""),placeholder:l("Aliase","Aliases"),"aria-label":l("Aliase","Aliases"),onChange:p=>this.update(t,{aliases:p.target.value,action:u?"pending":e.action})}),i("select",{key:"action",value:String(e.action||"pending"),"aria-label":l("Aktion","Action"),onChange:p=>{p.target.value==="accept"?this.accept(t):this.update(t,{action:p.target.value})}},m),i("button",{key:"delete",type:"button",className:"shoppingroute-review-delete",title:l("Aus Prüfliste entfernen","Remove from review list"),onClick:()=>this.remove(t)},"×")])}render(){const e=this.props.data||{},t=Array.isArray(e.reviewItems)?e.reviewItems:[],n=$(e),o=R(e),a=t.filter(s=>(s==null?void 0:s.action)!=="accepted").length,c=[i("style",{key:"styles"},E)];return c.push(i("div",{key:"toolbar",className:"shoppingroute-review-toolbar"},[i("button",{key:"acceptAll",type:"button",className:"shoppingroute-review-button",disabled:a===0,onClick:()=>this.acceptAll()},a?l(`Alle übernehmen (${a})`,`Accept all (${a})`):l("Alles übernommen","All accepted")),i("span",{key:"hint",style:{opacity:.7}},l("„Übernehmen“ verschiebt den Artikel in den Artikelstamm und entfernt die Prüfzeile. Danach speichern; Verwerfen macht die Änderung rückgängig.","“Accept” moves the product into the catalogue and removes the review row. Then save; discarding undoes the change."))])),t.length?(c.push(i("div",{key:"list",className:"shoppingroute-review-list"},[i("div",{key:"head",className:"shoppingroute-review-row shoppingroute-review-head"},[i("div",{key:"product"},l("Artikel / Alexa-Text","Product / Alexa text")),i("div",{key:"group"},l("Produktgruppe","Product group")),i("div",{key:"default"},l("Standardmarkt","Default market")),i("div",{key:"available"},l("Verfügbare Märkte","Available markets")),i("div",{key:"aliases"},l("Aliase","Aliases")),i("div",{key:"action"},l("Status","Status")),i("div",{key:"delete"},"")]),...t.map((s,u)=>this.renderRow(s||{},u,n,o))])),i("div",{style:{width:"100%"}},c)):(c.push(i("div",{key:"empty",style:{opacity:.7,padding:"12px 0"}},l("Keine unbekannten Artikel vorhanden.","No unknown products."))),i("div",{style:{width:"100%"}},c))}}v.exports={Components:{ReviewEditor:K},ReviewEditorModel:{normalizeMarketSelection:h,updateReviewRow:y,acceptReviewRows:f,findProductIndex:C}};const L=(v.exports==null?{}:v.exports).default||v.exports,G=L.Components;export{G as default};
|
package/admin/custom/review/assets/{virtualExposes-BDTLizpE.js → virtualExposes-D12Gu9x5.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
const c={},i=new Set,r=new Map;function m(t,n){let e=r.get(t);return e||(e=Promise.resolve().then(n).catch(o=>{throw r.delete(t),o}),r.set(t,e)),e}async function u(t){if(typeof document>"u")return;const n=c[t]||[];await Promise.all(n.map(e=>{const o=new URL(e,import.meta.url).href;return i.has(o)||(i.add(o),document.querySelector(`link[rel="stylesheet"][href="${o}"]`))?Promise.resolve():new Promise((a,l)=>{const s=document.createElement("link");s.rel="stylesheet",s.href=o,s.onload=()=>a(),s.onerror=()=>l(new Error(`[Module Federation] Failed to load CSS asset: ${o}`)),document.head.appendChild(s)})}))}const f={"./Components":async()=>{await u("./Components"),await Promise.all([]);const t=await m("./Components",()=>import("./review-editor-components-
|
|
1
|
+
const c={},i=new Set,r=new Map;function m(t,n){let e=r.get(t);return e||(e=Promise.resolve().then(n).catch(o=>{throw r.delete(t),o}),r.set(t,e)),e}async function u(t){if(typeof document>"u")return;const n=c[t]||[];await Promise.all(n.map(e=>{const o=new URL(e,import.meta.url).href;return i.has(o)||(i.add(o),document.querySelector(`link[rel="stylesheet"][href="${o}"]`))?Promise.resolve():new Promise((a,l)=>{const s=document.createElement("link");s.rel="stylesheet",s.href=o,s.onload=()=>a(),s.onerror=()=>l(new Error(`[Module Federation] Failed to load CSS asset: ${o}`)),document.head.appendChild(s)})}))}const f={"./Components":async()=>{await u("./Components"),await Promise.all([]);const t=await m("./Components",()=>import("./review-editor-components-BTvdTZmt.js")),n=t&&t.__mf_remote_dependency_pending;n&&typeof n.then=="function"&&await n;const e={};return Object.assign(e,t),Object.defineProperty(e,"__esModule",{value:!0,enumerable:!1}),e}};export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"ShoppingRouteReviewSet","name":"ShoppingRouteReviewSet","metaData":{"name":"ShoppingRouteReviewSet","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"ShoppingRouteReviewSet"},"remoteEntry":{"name":"reviewEditor.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"reviewEditor.ssr.js","path":"","type":"module"},"types":{"path":"","name":""},"globalName":"ShoppingRouteReviewSet","pluginVersion":"0.2.5","publicPath":"auto"},"shared":[{"id":"ShoppingRouteReviewSet:react","name":"react","version":"18.3.1","singleton":true,"requiredVersion":">=18","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__ShoppingRouteReviewSet__mf_owner__1__loadShare__react__loadShare__.js-DDD1Hp7v.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[{"id":"ShoppingRouteReviewSet:Components","name":"Components","assets":{"js":{"async":[],"sync":["assets/vite-preload-helper-Dp1pzeXC.js","assets/index-2HOz3j7B.js","assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteReviewSet__mf_owner__1-DXSRuGUo.js","assets/virtualExposes-
|
|
1
|
+
{"id":"ShoppingRouteReviewSet","name":"ShoppingRouteReviewSet","metaData":{"name":"ShoppingRouteReviewSet","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"ShoppingRouteReviewSet"},"remoteEntry":{"name":"reviewEditor.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"reviewEditor.ssr.js","path":"","type":"module"},"types":{"path":"","name":""},"globalName":"ShoppingRouteReviewSet","pluginVersion":"0.2.5","publicPath":"auto"},"shared":[{"id":"ShoppingRouteReviewSet:react","name":"react","version":"18.3.1","singleton":true,"requiredVersion":">=18","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__ShoppingRouteReviewSet__mf_owner__1__loadShare__react__loadShare__.js-DDD1Hp7v.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[{"id":"ShoppingRouteReviewSet:Components","name":"Components","assets":{"js":{"async":[],"sync":["assets/vite-preload-helper-Dp1pzeXC.js","assets/index-2HOz3j7B.js","assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteReviewSet__mf_owner__1-DXSRuGUo.js","assets/virtualExposes-D12Gu9x5.js","assets/review-editor-components-BTvdTZmt.js","reviewEditor.js","assets/_virtual_mf___mfe_internal__ShoppingRouteReviewSet__mf_owner__1__loadShare__react__loadShare__.js-DDD1Hp7v.js"]},"css":{"async":[],"sync":[]}},"path":"./Components"}]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"ShoppingRouteReviewSet","name":"ShoppingRouteReviewSet","metaData":{"name":"ShoppingRouteReviewSet","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"ShoppingRouteReviewSet"},"remoteEntry":{"name":"reviewEditor.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"reviewEditor.ssr.js","path":"","type":"module"},"types":{"path":"","name":""},"globalName":"ShoppingRouteReviewSet","pluginVersion":"0.2.5","publicPath":"auto"},"shared":[{"id":"ShoppingRouteReviewSet:react","name":"react","version":"18.3.1","singleton":true,"requiredVersion":">=18","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__ShoppingRouteReviewSet__mf_owner__1__loadShare__react__loadShare__.js-DDD1Hp7v.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[{"id":"ShoppingRouteReviewSet:Components","name":"Components","assets":{"js":{"async":[],"sync":["assets/vite-preload-helper-Dp1pzeXC.js","assets/index-2HOz3j7B.js","assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteReviewSet__mf_owner__1-DXSRuGUo.js","assets/virtualExposes-
|
|
1
|
+
{"id":"ShoppingRouteReviewSet","name":"ShoppingRouteReviewSet","metaData":{"name":"ShoppingRouteReviewSet","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"ShoppingRouteReviewSet"},"remoteEntry":{"name":"reviewEditor.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"reviewEditor.ssr.js","path":"","type":"module"},"types":{"path":"","name":""},"globalName":"ShoppingRouteReviewSet","pluginVersion":"0.2.5","publicPath":"auto"},"shared":[{"id":"ShoppingRouteReviewSet:react","name":"react","version":"18.3.1","singleton":true,"requiredVersion":">=18","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__ShoppingRouteReviewSet__mf_owner__1__loadShare__react__loadShare__.js-DDD1Hp7v.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[{"id":"ShoppingRouteReviewSet:Components","name":"Components","assets":{"js":{"async":[],"sync":["assets/vite-preload-helper-Dp1pzeXC.js","assets/index-2HOz3j7B.js","assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteReviewSet__mf_owner__1-DXSRuGUo.js","assets/virtualExposes-D12Gu9x5.js","assets/review-editor-components-BTvdTZmt.js","reviewEditor.js","assets/_virtual_mf___mfe_internal__ShoppingRouteReviewSet__mf_owner__1__loadShare__react__loadShare__.js-DDD1Hp7v.js"]},"css":{"async":[],"sync":[]}},"path":"./Components"}],"buildOutput":[{"fileName":"reviewEditor.js","type":"chunk","isEntry":false,"size":18701},{"fileName":"assets/vite-preload-helper-Dp1pzeXC.js","type":"chunk","isEntry":false,"size":1266},{"fileName":"assets/_virtual_mf___mfe_internal__ShoppingRouteReviewSet__mf_owner__1__loadShare__react__loadShare__.js-DDD1Hp7v.js","type":"chunk","isEntry":false,"size":11509},{"fileName":"assets/hostInit-BfEpvyuX.js","type":"chunk","isEntry":false,"size":2478},{"fileName":"assets/review-editor-components-BTvdTZmt.js","type":"chunk","isEntry":true,"size":10697},{"fileName":"assets/virtualExposes-D12Gu9x5.js","type":"chunk","isEntry":false,"size":1070},{"fileName":"assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteReviewSet__mf_owner__1-DXSRuGUo.js","type":"chunk","isEntry":false,"size":727},{"fileName":"assets/index-2HOz3j7B.js","type":"chunk","isEntry":false,"size":66321},{"fileName":"mf-manifest.json","type":"asset","isEntry":false,"size":1329}],"assetAnalysis":{"./src-admin/review-editor-components.mjs":{"js":{"sync":["assets/vite-preload-helper-Dp1pzeXC.js","assets/index-2HOz3j7B.js","assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteReviewSet__mf_owner__1-DXSRuGUo.js","assets/virtualExposes-D12Gu9x5.js","assets/review-editor-components-BTvdTZmt.js","reviewEditor.js","assets/_virtual_mf___mfe_internal__ShoppingRouteReviewSet__mf_owner__1__loadShare__react__loadShare__.js-DDD1Hp7v.js"],"async":[]},"css":{"sync":[],"async":[]}},"react":{"js":{"sync":["assets/_virtual_mf___mfe_internal__ShoppingRouteReviewSet__mf_owner__1__loadShare__react__loadShare__.js-DDD1Hp7v.js"],"async":[]},"css":{"sync":[],"async":[]}}}}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{h as ct,i as lt}from"./assets/index-2HOz3j7B.js";const dt=ct.share;typeof __VUE_HMR_RUNTIME__>"u"&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});const Ne="__mf_init__virtual:mf:__mfe_internal__ShoppingRouteReviewSet__mf_owner__1__mf_v__runtimeInit__mf_v__.js__";let de=globalThis[Ne];if(!de){let s,f;const u=new Promise((h,C)=>{s=h,f=C});de=globalThis[Ne]={initPromise:u,initResolve:s,initReject:f}}const ut=de.initResolve,ne="__mf_module_cache__";globalThis[ne]||={share:{},remote:{}};globalThis[ne].share||={};globalThis[ne].remote||={};const d=globalThis[ne];for(const s of Object.keys(d.share))if(s.startsWith("default:")){const f=s.slice(8);d.share[f]===void 0&&(d.share[f]=d.share[s])}else if(!s.includes(":")){const f="default:"+s;d.share[f]===void 0&&(d.share[f]=d.share[s])}const Te={},mt=Array.isArray("default")?"default":["default"],Fe="default",D="ShoppingRouteReviewSet",ce=[["react"]];let ee,te,ue;async function _e(s){for(let f=0;;f++)try{return await s()}catch(u){throw u}}const Le=Symbol("mf.originalSharedProvider"),_t={emit:s=>s},ht=(s,f)=>{if(f!=="version-first")return s;const u={};for(const[h,C]of Object.entries(s))u[h]=Object.assign({},C,{[Le]:C});return u},le=(s,f)=>{if(!f)return;const u=Object.entries(s||{}),h=u.find(([,p])=>p===f);if(h)return{version:h[0],provider:f,registered:!0};if(typeof f.version=="string"&&f.version)return{version:f.version,provider:f,registered:!1};const C=u.filter(([,p])=>p===f||!!(f.from&&(p==null?void 0:p.from)===f.from));if(C.length===1)return{version:C[0][0],provider:f,registered:!1}},me=(s,f,u,h)=>{var E;if(!s||!u)return;const C=Array.isArray(u.scope)?u.scope:[u.scope||"default"],p=ht(s,h),x={};for(const N of C)x[N||"default"]={[f]:p};const P=(E=dt.getRegisteredShare(x,f,{...u,scope:C,strategy:h},_t))==null?void 0:E.shared;return(P==null?void 0:P[Le])||P},U=(s,f,u,h)=>{var P;const C=E=>z(E,u),p=Object.fromEntries(Object.entries(s||{}).filter(([,E])=>{var N;return!C(E)&&((N=E==null?void 0:E.shareConfig)==null?void 0:N.import)!==!1}));u!=null&&u.version&&((P=u.shareConfig)==null?void 0:P.import)!==!1&&(p[u.version]||(p[u.version]=u));const x=me(p,f,u,h);return C(x)?void 0:x},z=(s,f)=>s===f||!!(f!=null&&f.from&&(s==null?void 0:s.from)===f.from),gt=(s,f,u,h,C,p,x,P,E)=>{var B,J,W;if(!P)return;const N=(J=(B=f==null?void 0:f.options)==null?void 0:B.shared)==null?void 0:J[C],K=Array.isArray(N)?N.find(L=>(L==null?void 0:L.version)===p):void 0,V=((P==null?void 0:P.from)===((W=f==null?void 0:f.options)==null?void 0:W.name)?P:void 0)||(z(K,P)?K:f?void 0:P);return V&&s.some(L=>{var q,M;return L!==f&&((q=L==null?void 0:L.options)==null?void 0:q.name)===(x==null?void 0:x.from)&&((M=L==null?void 0:L.shareScopeMap)==null?void 0:M[h])===u})?V:void 0},bt=(s,f,u,h,C,p,x,P,E)=>{const N=p.registered?gt(s,f,u,h,C,p.version,p.provider,P):void 0,K=N||x;if(K&&!(p.registered&&!z(K,P)))return{provider:K,scopeRootProvider:N}};async function yt(){return ee||(ee=_e(()=>import("./assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteReviewSet__mf_owner__1-DXSRuGUo.js")).catch(s=>{throw ee=void 0,s})),ee}async function St(){return te||(te=_e(()=>import("./assets/virtualExposes-BDTLizpE.js")).then(s=>s.default??s).catch(s=>{throw te=void 0,s})),te}async function Pt(s={},f=[]){var we,je,Re,Ce,Ee;const u=(t,e,n,r)=>{const o=(Array.isArray(r)?r[0]:r)||"default",c=e||!n?t:t+"@"+n,a={canonical:o+":"+c};return o==="default"&&(a.aliases=[c]),a},h=(t,e)=>{const n=t[e.canonical];if(n!==void 0)return n;const r=e.aliases||[];for(const i of r){if(!Object.prototype.hasOwnProperty.call(t,i))continue;const o=t[i];if(o!==void 0)return t[e.canonical]=o,o}},C=Symbol.for("module-federation.shared-cache-listeners"),p=Symbol.for("module-federation.shared-cache-owners"),x=t=>{let e=t[p];return e===void 0&&(e=Object.create(null),Object.defineProperty(t,p,{value:e,enumerable:!1,configurable:!1,writable:!1})),e},P=(t,e)=>{var n;return(n=t[p])==null?void 0:n[e.canonical]},E=(t,e,n,r)=>{var a;t[e.canonical]=n;const i=e.aliases||[];for(const l of i)Object.defineProperty(t,l,{value:n,enumerable:!0,configurable:!0,writable:!0});const o=t[p];r===void 0?o&&delete o[e.canonical]:x(t)[e.canonical]=r;const c=(a=t[C])==null?void 0:a[e.canonical];if(c)for(const l of c)l(n);return n},N=Symbol.for("module-federation.tree-shaking-shared-cache"),K=t=>{let e=t[N];return e===void 0&&(e=Object.create(null),Object.defineProperty(t,N,{value:e,enumerable:!1,configurable:!1,writable:!1})),e},he=(t,e,n,r)=>{if(!Array.isArray(n))return r;const i=[...new Set(n)].sort(),o=K(t),c=o[e.canonical]||=[],a=c.find(l=>l.providedExports.length===i.length&&l.providedExports.every((y,m)=>y===i[m]));return a?a.value=r:c.push({providedExports:i,value:r}),r},V=Symbol.for("module-federation.tree-shaking-shared-selection-cache"),ge=t=>{let e=t[V];return e===void 0&&(e=Object.create(null),Object.defineProperty(t,V,{value:e,enumerable:!1,configurable:!1,writable:!1})),e},B=(t,e,n)=>{var i,o;const r=h(t,e);return r!==void 0?r:(o=(i=t[V])==null?void 0:i[e.canonical])==null?void 0:o[n]},J=(t,e,n,r)=>{const i=ge(t),o=i[e.canonical]||=Object.create(null);return o[n]=r,r},W=((we=globalThis.__FEDERATION__)==null?void 0:we.__INSTANCES__)||[],L=(je=f.find(t=>t==null?void 0:t.from))==null?void 0:je.from,q=W.find(t=>{var e,n;return((e=t==null?void 0:t.options)==null?void 0:e.name)===L&&((n=t==null?void 0:t.shareScopeMap)==null?void 0:n.default)===s})||W.find(t=>{var e,n;return((e=t==null?void 0:t.options)==null?void 0:e.name)!==D&&((n=t==null?void 0:t.shareScopeMap)==null?void 0:n.default)===s}),M=Object.create(null),Ae=t=>{const e=Object.create(null);for(const[n,r]of Object.entries(t||{}))e[n]=Object.assign(Object.create(null),r);return e},De=(t,e)=>{const n=!q&&Object.values(e||{}).some(i=>Object.values(i||{}).some(Q)),r=n?Ae(e):e;return M[t]={host:e,runtime:r,isWebpackScope:n},r},ze=()=>{const t=Object.values(M).filter(({isWebpackScope:e})=>e);if(t.length!==0)for(const{host:e,runtime:n}of t)for(const[r,i]of Object.entries(e||{})){const o=n[r]||=Object.create(null);for(const[c,a]of Object.entries(i||{}))o[c]=a}},k=Object.create(null);for(const[t,e]of Object.entries(s)){const n=k[t]=Object.create(null);for(const[r,i]of Object.entries(e))n[r]=Object.assign({},i)}const{usedShared:I,usedRemotes:ke}=await yt();function Q(t){if(typeof(t==null?void 0:t.get)!="function")return!1;const e=Function.prototype.toString.call(t.get);return e.includes("__webpack_require__")||/\.\s*e\s*\([^)]*\)\s*\.then\s*\(/.test(e)}const Ke=Object.values(k).some(t=>Object.values(t||{}).some(Q)),Be=t=>{const e=t.split("/");return t.startsWith("@")?e.slice(0,2).join("/"):e[0]},re=(t,e,n)=>{if(typeof U!="function")return;const r=Be(t),i=r===t?[[t,e]]:[[t,e],[r,I[r]]];for(const[o,c]of i){if(!c)continue;const a=n?o===t?n:k[o]:s[o],l=U(a,o,c,"version-first");if(l&&Q(l)&&!l.lib&&!l.loaded)return l}};var X=Te[Fe];if(X||(X=Te[Fe]={from:D}),f.indexOf(X)>=0)return;f.push(X);const be=t=>{let e=t;for(let n=0;n<5;n++){const r=e==null?void 0:e.default;if(!r||typeof r!="object"||Object.keys(r).length===0)break;const i=Object.keys(e).filter(o=>o!=="default").map(o=>e[o]);if(i.length>0&&i.some(o=>o!==void 0))break;e=r}return e},Ge=[],Ve=typeof globalThis.window>"u"?await Promise.all([]):[],oe="__mf_vite_runtime_share_load_id__";let We=0;const ie=new Map,se=new Map,H=lt({name:D,remotes:ke,shared:I,plugins:[He(),Ue(),...Ge,...Ve],shareStrategy:"version-first"});H.initShareScopeMap("default",De("default",s));function He(){return{name:"vite-share-pin-lifecycle-plugin",resolveShare(t){var i;const e=(i=t.shareInfo)==null?void 0:i[oe],n=e===void 0?void 0:se.get(e);if(!n)return t;const r=t.resolver;return t.resolver=(...o)=>(n.pinned.reapply(),r(...o)),n.pinned.reveal(),t}}}function Ue(){return{name:"vite-real-name-snapshot-plugin",afterLoadSnapshot(t){const e=t&&t.remoteSnapshot,n=e&&e.globalName,r=e&&e.version;if(!n||!r||!e.remoteEntry)return t;const i=globalThis.__FEDERATION__&&globalThis.__FEDERATION__.moduleInfo,o=n+":"+r;return i&&!i[o]&&(i[o]=e),t}}}const qe=H.sharedHandler.hooks.lifecycle.resolveShare,Y=new WeakMap;qe.on(t=>{var i;const e=(i=t.shareInfo)==null?void 0:i[oe],n=t.resolver;if(typeof n!="function")return t;const r=(...o)=>{const c=n(...o),a=c==null?void 0:c.shared;return a&&(typeof a=="object"||typeof a=="function")&&!Y.has(a)&&Y.set(a,{from:a.from}),e!==void 0&&a&&ie.set(e,a),c};return t.resolver=r,t});const Me=(t,e,n,r)=>{if(!t||t[e]!==n)return;const i=Object.assign({},r,{version:r.version??e,scope:r.scope??(n==null?void 0:n.scope)??["default"],strategy:"loaded-first"}),o=r.from;t[e]=i;const c=()=>n===void 0?t[e]===void 0:t[e]===n;return{provider:i,reveal(){return t[e]!==i?!1:(n===void 0?delete t[e]:t[e]=n,!0)},reapply(){return c()?(t[e]=i,!0):!1},release(a,l=!0){return r.from=o,t[e]!==i?!l&&c():l?a?(i.from=o,a&&i.lib&&(i.loaded=!0),r.strategy===void 0?delete i.strategy:i.strategy=r.strategy,!0):(n===void 0?delete t[e]:t[e]=n,!1):(n===void 0?delete t[e]:t[e]=n,!0)}}},Je=t=>Object.entries(t||{}).map(([e,n])=>({provider:n,version:e,from:n.from,registered:!0})),Qe=(t,e)=>{if(e===void 0)return;let n;for(const r of t){const i=r.provider,o=i.treeShaking||i;if(!(r.loadedFactory!==e&&i.lib!==e&&o.lib!==e)){if(n)return;n=r}}return n},Xe=async(t,e,n)=>{const r=++We;se.set(r,{pinned:n});try{const i=await H.loadShare(t,{customShareInfo:{shareConfig:e,[oe]:r}});return{factory:i===!1?void 0:i,selectedProvider:ie.get(r)}}finally{ie.delete(r),se.delete(r)}},ye=async(t,e,n,r,i,o,c=!0)=>{const a=o.from,l=Me(n,r,i,o);if(!l)return;let y;try{y=await Xe(t,e,l)}catch(j){throw l.release(!1),j}const m=y==null?void 0:y.factory;if(m===void 0){l.release(!1);return}const _=Je(n),g=l.provider.treeShaking||l.provider,R=l.provider.lib===m||g.lib===m;if(!c&&R){const j=_.findIndex(v=>v.provider===l.provider);j!==-1&&_.splice(j,1)}!c&&!_.some(j=>j.provider===o)&&_.push({provider:o,version:r,from:a,registered:!1,loadedFactory:R?m:void 0});const O=!c&&y.selectedProvider===l.provider&&R?o:y.selectedProvider;if(O&&!_.some(j=>j.provider===O)){const j=Y.get(O),v=typeof O.version=="string"&&O.version?O.version:r;_.push({provider:O,version:v,from:j?j.from:O.from,registered:(n==null?void 0:n[v])===O,loadedFactory:m})}const b=_.find(j=>j.provider===O)??Qe(_,m);if(!l.release(!0,(b==null?void 0:b.provider)===l.provider)||!b)return;const S=Y.get(b.provider);b.from=b.provider===o?a:S?S.from:b.provider.from,S&&(b.provider.from=S.from);const A=typeof m=="function"?m():m,w=await Promise.resolve(A);if(!(b.registered&&(n==null?void 0:n[b.version])!==b.provider))return{provider:b.provider,selection:b,resolved:w}},fe=new Set,ae=new Map,Ye=async(t,e,n)=>{var i;const r=!!((i=e.shareConfig)!=null&&i.singleton);if(!r&&e.canLiveRebind!==!1)try{const o=U(n,t,e,"version-first"),c=le(n,o);if(!c)return;const{version:a}=c;if(!r&&a!==e.version||!o.lib&&!o.loading&&!(o.loaded&&typeof o.get=="function"))return;const l=u(t,r,e.version,e.scope);if(h(d.share,l)!==void 0)return;const y=s[t],m=y==null?void 0:y[a];if(c.registered&&!z(m,o))return;let _,g=o.lib;if(!g&&Q(o)||(!g&&o.loading&&(g=await o.loading),!g&&o.loaded&&typeof o.get=="function"&&(g=await o.get()),!g))return;const R=typeof g=="function"?g():g,O=await Promise.resolve(R),b=c.registered?m:o;_={provider:b,selection:{provider:b,version:a,from:o.from,registered:c.registered},resolved:O};const T=_==null?void 0:_.provider,S=_==null?void 0:_.selection;if(!S)return;const A=_==null?void 0:_.resolved;if(A===void 0||h(d.share,l)!==void 0||S.registered&&(y==null?void 0:y[S.version])!==T)return;E(d.share,l,be(A),S.from),fe.add(T)}catch(o){console.error('[Module Federation] Failed to bridge materialized shared module "'+t+'"',o)}},Se=async(t,e,n,r,i)=>{var o,c;try{const a=u(t,(o=e.shareConfig)==null?void 0:o.singleton,e.version,e.scope),l=h(d.share,a),y=P(d.share,a),m=U(n,t,e,"version-first"),_=m||me(n,t,e,"version-first")||e,g=le(n,_);if(!g)return;const R=z(_,e),{version:O}=g;if(!((c=e.shareConfig)!=null&&c.singleton)&&O!==e.version)return;const b=r==null?void 0:r[O],T=bt(W,q,s,"default",t,g,m,b,"version-first");if(!T&&!R)return;const{provider:S,scopeRootProvider:A}=T||{provider:_,scopeRootProvider:void 0};if(e.canLiveRebind===!1||l!==void 0&&y!==D)return;const w=s[t],j=w==null?void 0:w[O];if(g.registered&&!A&&!z(j,S))return;const v=await ye(t,e.shareConfig,w,O,j,S,g.registered&&!R),G=v==null?void 0:v.provider,F=v==null?void 0:v.selection;if(!F||z(G,e)||i&&(i.version!==F.version||!z({from:F.from},i.provider))||fe.has(G))return;const Ie=v==null?void 0:v.resolved;if(Ie===void 0)return;const st=h(d.share,a),ft=P(d.share,a);if(st!==void 0&&ft!==D||F.registered&&(w==null?void 0:w[F.version])!==G)return;i||ae.set(t,{version:F.version,provider:{from:F.from}}),fe.add(G);const at=be(Ie);E(d.share,a,at,F.from)}catch(a){console.error('[Module Federation] Failed to bridge external shared module "'+t+'"',a)}};for(const t of ce)await Promise.all(t.map(async e=>{const n=I[e];!n||n.materialize===!1||n.treeShaking||await Ye(e,n,k[e])}));for(const[t,e]of Object.entries(I)){if(e.treeShaking)continue;const n=u(t,(Re=e.shareConfig)==null?void 0:Re.singleton,e.version,e.scope);if(h(d.share,n)!==void 0)continue;const r=u(t,!0,e.version,e.scope),i=h(d.share,r);i!==void 0&&E(d.share,n,i,P(d.share,r))}const Ze=["react"],$e=[["react"]],Z=Ze.filter(t=>{var e;return I[t]&&(I[t].materialize!==!1||((e=I[t].shareConfig)==null?void 0:e.import)===!1)});d.providerInit||=new Map;const et=(t,e)=>{const n=d.providerInit.get(t);if(n)return n;const r=Promise.resolve().then(e);return d.providerInit.set(t,r),r.catch(()=>d.providerInit.delete(t)),r};var ve=async t=>{const e=new Set(t);for(const n of $e)await Promise.all(n.filter(r=>e.has(r)).map(async r=>{var O,b;const i=I[r],o=u(r,(O=i.shareConfig)==null?void 0:O.singleton,i.version,i.scope);if(((b=i.shareConfig)==null?void 0:b.import)===!1||i.treeShaking||h(d.share,o)!==void 0)return;const c=u(r,!0,i.version,i.scope),a=h(d.share,c);if(a!==void 0){E(d.share,o,a,P(d.share,c));return}const l=typeof re=="function"?re(r,i):void 0;if(l&&!l.lib&&!l.loaded)return;const y=o.canonical,m=await et(y,async()=>{const T=await i.get(),S=typeof T=="function"?T():T;return Promise.resolve(S)}),g=(T=>{let S=T;for(let A=0;A<5;A++){const w=S==null?void 0:S.default;if(!w||typeof w!="object"||Object.keys(w).length===0)break;const j=Object.keys(S).filter(v=>v!=="default").map(v=>S[v]);if(j.length>0&&j.some(v=>v!==void 0))break;S=w}return S})(m),R=g===m?{...m}:g;R.__esModule!==!0&&Object.defineProperty(R,"__esModule",{value:!0,enumerable:!1}),E(d.share,o,R,D)}))};const pe=t=>{var r,i;const e=I[t];if(!e.treeShaking&&((r=e.shareConfig)==null?void 0:r.import)!==!1)return!1;const n=u(t,(i=e.shareConfig)==null?void 0:i.singleton,e.version,e.scope);return e.treeShaking?B(d.share,n,D)===void 0&&h(d.share,n)===void 0:h(d.share,n)===void 0},tt=t=>{var i,o;const e=I[t],n=u(t,(i=e.shareConfig)==null?void 0:i.singleton,e.version,e.scope);return(e.treeShaking?B(d.share,n,D)??h(d.share,n):h(d.share,n))!==void 0?!1:e.treeShaking||((o=e.shareConfig)==null?void 0:o.import)===!1?!0:typeof U!="function"?!1:!!U(k[t],t,e,"version-first")},$=Z.findIndex(tt),nt=$===-1?Z:Z.slice(0,$);var rt=$===-1?[]:Z.slice($);await ve(nt);try{await _e(async()=>{await Promise.all(await H.initializeSharing("default",{strategy:"version-first",from:"build",initScope:f}))})}catch(t){console.error("[Module Federation]",t)}ze();const Pe=async()=>{for(const t of ce)await Promise.all(t.map(async e=>{const n=I[e];!n||n.materialize===!1||n.treeShaking||await Se(e,n,s[e],k[e],void 0)}))};await Pe(),Ke&&(ue=Pe);try{const t=(Ce=globalThis.__FEDERATION__)==null?void 0:Ce.__SHARE__,e=Object.create(null);if(t)for(const[,n]of Object.entries(t))for(const r of mt){const i=n==null?void 0:n[r];if(i)for(const[o,c]of Object.entries(i)){const a=I==null?void 0:I[o],l=k[o],y=ae.get(o);if(!a||!l||!y||a.treeShaking)continue;const m=e[o]||(e[o]=Object.create(null));for(const[_,g]of Object.entries(c)){if(!g.lib||y.version!==_||!z(g,y.provider))continue;const R=l[_];(g===R||R!=null&&R.from&&g.from===R.from)&&(g===a||a.from&&g.from===a.from||m[_]===void 0&&(m[_]=g))}}}for(const n of ce)await Promise.all(n.map(async r=>{const i=e[r];i&&await Se(r,I[r],i,k[r],ae.get(r))}))}catch(t){console.error("[Module Federation] Failed to bridge external shared modules",t)}const ot=async()=>{},it=async(t,e)=>{var T,S;const n=u(t,(T=e.shareConfig)==null?void 0:T.singleton,e.version,e.scope),r=e.treeShaking?B(d.share,n,D):h(d.share,n);if(((S=e.shareConfig)==null?void 0:S.import)!==!1||r!==void 0||re(t,e,k[t]))return;const i=A=>{let w=A;for(let j=0;j<5;j++){const v=w==null?void 0:w.default;if(!v||typeof v!="object"||Object.keys(v).length===0)break;const G=Object.keys(w).filter(F=>F!=="default").map(F=>w[F]);if(G.length>0&&G.some(F=>F!==void 0))break;w=v}return w},o=s==null?void 0:s[t],c=me(o,t,e,"version-first")||e,a=le(o,c);if(!a)return;const{version:l}=a,y=o==null?void 0:o[l],m=await ye(t,e.shareConfig,o,l,y,c,a.registered&&!z(c,e)),_=m==null?void 0:m.selection,g=m==null?void 0:m.provider,R=m==null?void 0:m.resolved;if(!_||z(g,e)||R===void 0||(e.treeShaking?B(d.share,n,D):h(d.share,n))!==void 0||_.registered&&(o==null?void 0:o[_.version])!==g)return;const b=i(R);if(e.treeShaking){const A=e.treeShaking.providedExports??e.treeShaking.usedExports??[];he(d.share,n,A,b),J(d.share,n,D,b)}else E(d.share,n,b,_.from)},Oe=[];for(const t of rt){const e=I[t];if(pe(t))try{e.treeShaking?await ot(t,e):((Ee=e.shareConfig)==null?void 0:Ee.import)===!1&&await it(t,e)}catch(n){console.error(`[Module Federation] Failed to resolve runtime-only shared module "${t}"`,n);break}if(pe(t))break;Oe.push(t)}return await ve(Oe),ut(H),H}async function Ot(s){const f=await St();if(!(s in f))throw new Error(`[Module Federation] Module ${s} does not exist in container.`);return ue&&await ue(),d.pendingShareLoads&&await Promise.all(d.pendingShareLoads),f[s]().then(u=>()=>u)}export{Ot as get,Pt as init};
|
|
1
|
+
import{h as ct,i as lt}from"./assets/index-2HOz3j7B.js";const dt=ct.share;typeof __VUE_HMR_RUNTIME__>"u"&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});const Ne="__mf_init__virtual:mf:__mfe_internal__ShoppingRouteReviewSet__mf_owner__1__mf_v__runtimeInit__mf_v__.js__";let de=globalThis[Ne];if(!de){let s,f;const u=new Promise((h,C)=>{s=h,f=C});de=globalThis[Ne]={initPromise:u,initResolve:s,initReject:f}}const ut=de.initResolve,ne="__mf_module_cache__";globalThis[ne]||={share:{},remote:{}};globalThis[ne].share||={};globalThis[ne].remote||={};const d=globalThis[ne];for(const s of Object.keys(d.share))if(s.startsWith("default:")){const f=s.slice(8);d.share[f]===void 0&&(d.share[f]=d.share[s])}else if(!s.includes(":")){const f="default:"+s;d.share[f]===void 0&&(d.share[f]=d.share[s])}const Te={},mt=Array.isArray("default")?"default":["default"],Fe="default",D="ShoppingRouteReviewSet",ce=[["react"]];let ee,te,ue;async function _e(s){for(let f=0;;f++)try{return await s()}catch(u){throw u}}const Le=Symbol("mf.originalSharedProvider"),_t={emit:s=>s},ht=(s,f)=>{if(f!=="version-first")return s;const u={};for(const[h,C]of Object.entries(s))u[h]=Object.assign({},C,{[Le]:C});return u},le=(s,f)=>{if(!f)return;const u=Object.entries(s||{}),h=u.find(([,p])=>p===f);if(h)return{version:h[0],provider:f,registered:!0};if(typeof f.version=="string"&&f.version)return{version:f.version,provider:f,registered:!1};const C=u.filter(([,p])=>p===f||!!(f.from&&(p==null?void 0:p.from)===f.from));if(C.length===1)return{version:C[0][0],provider:f,registered:!1}},me=(s,f,u,h)=>{var E;if(!s||!u)return;const C=Array.isArray(u.scope)?u.scope:[u.scope||"default"],p=ht(s,h),x={};for(const N of C)x[N||"default"]={[f]:p};const P=(E=dt.getRegisteredShare(x,f,{...u,scope:C,strategy:h},_t))==null?void 0:E.shared;return(P==null?void 0:P[Le])||P},U=(s,f,u,h)=>{var P;const C=E=>z(E,u),p=Object.fromEntries(Object.entries(s||{}).filter(([,E])=>{var N;return!C(E)&&((N=E==null?void 0:E.shareConfig)==null?void 0:N.import)!==!1}));u!=null&&u.version&&((P=u.shareConfig)==null?void 0:P.import)!==!1&&(p[u.version]||(p[u.version]=u));const x=me(p,f,u,h);return C(x)?void 0:x},z=(s,f)=>s===f||!!(f!=null&&f.from&&(s==null?void 0:s.from)===f.from),gt=(s,f,u,h,C,p,x,P,E)=>{var B,J,W;if(!P)return;const N=(J=(B=f==null?void 0:f.options)==null?void 0:B.shared)==null?void 0:J[C],K=Array.isArray(N)?N.find(L=>(L==null?void 0:L.version)===p):void 0,V=((P==null?void 0:P.from)===((W=f==null?void 0:f.options)==null?void 0:W.name)?P:void 0)||(z(K,P)?K:f?void 0:P);return V&&s.some(L=>{var q,M;return L!==f&&((q=L==null?void 0:L.options)==null?void 0:q.name)===(x==null?void 0:x.from)&&((M=L==null?void 0:L.shareScopeMap)==null?void 0:M[h])===u})?V:void 0},bt=(s,f,u,h,C,p,x,P,E)=>{const N=p.registered?gt(s,f,u,h,C,p.version,p.provider,P):void 0,K=N||x;if(K&&!(p.registered&&!z(K,P)))return{provider:K,scopeRootProvider:N}};async function yt(){return ee||(ee=_e(()=>import("./assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteReviewSet__mf_owner__1-DXSRuGUo.js")).catch(s=>{throw ee=void 0,s})),ee}async function St(){return te||(te=_e(()=>import("./assets/virtualExposes-D12Gu9x5.js")).then(s=>s.default??s).catch(s=>{throw te=void 0,s})),te}async function Pt(s={},f=[]){var we,je,Re,Ce,Ee;const u=(t,e,n,r)=>{const o=(Array.isArray(r)?r[0]:r)||"default",c=e||!n?t:t+"@"+n,a={canonical:o+":"+c};return o==="default"&&(a.aliases=[c]),a},h=(t,e)=>{const n=t[e.canonical];if(n!==void 0)return n;const r=e.aliases||[];for(const i of r){if(!Object.prototype.hasOwnProperty.call(t,i))continue;const o=t[i];if(o!==void 0)return t[e.canonical]=o,o}},C=Symbol.for("module-federation.shared-cache-listeners"),p=Symbol.for("module-federation.shared-cache-owners"),x=t=>{let e=t[p];return e===void 0&&(e=Object.create(null),Object.defineProperty(t,p,{value:e,enumerable:!1,configurable:!1,writable:!1})),e},P=(t,e)=>{var n;return(n=t[p])==null?void 0:n[e.canonical]},E=(t,e,n,r)=>{var a;t[e.canonical]=n;const i=e.aliases||[];for(const l of i)Object.defineProperty(t,l,{value:n,enumerable:!0,configurable:!0,writable:!0});const o=t[p];r===void 0?o&&delete o[e.canonical]:x(t)[e.canonical]=r;const c=(a=t[C])==null?void 0:a[e.canonical];if(c)for(const l of c)l(n);return n},N=Symbol.for("module-federation.tree-shaking-shared-cache"),K=t=>{let e=t[N];return e===void 0&&(e=Object.create(null),Object.defineProperty(t,N,{value:e,enumerable:!1,configurable:!1,writable:!1})),e},he=(t,e,n,r)=>{if(!Array.isArray(n))return r;const i=[...new Set(n)].sort(),o=K(t),c=o[e.canonical]||=[],a=c.find(l=>l.providedExports.length===i.length&&l.providedExports.every((y,m)=>y===i[m]));return a?a.value=r:c.push({providedExports:i,value:r}),r},V=Symbol.for("module-federation.tree-shaking-shared-selection-cache"),ge=t=>{let e=t[V];return e===void 0&&(e=Object.create(null),Object.defineProperty(t,V,{value:e,enumerable:!1,configurable:!1,writable:!1})),e},B=(t,e,n)=>{var i,o;const r=h(t,e);return r!==void 0?r:(o=(i=t[V])==null?void 0:i[e.canonical])==null?void 0:o[n]},J=(t,e,n,r)=>{const i=ge(t),o=i[e.canonical]||=Object.create(null);return o[n]=r,r},W=((we=globalThis.__FEDERATION__)==null?void 0:we.__INSTANCES__)||[],L=(je=f.find(t=>t==null?void 0:t.from))==null?void 0:je.from,q=W.find(t=>{var e,n;return((e=t==null?void 0:t.options)==null?void 0:e.name)===L&&((n=t==null?void 0:t.shareScopeMap)==null?void 0:n.default)===s})||W.find(t=>{var e,n;return((e=t==null?void 0:t.options)==null?void 0:e.name)!==D&&((n=t==null?void 0:t.shareScopeMap)==null?void 0:n.default)===s}),M=Object.create(null),Ae=t=>{const e=Object.create(null);for(const[n,r]of Object.entries(t||{}))e[n]=Object.assign(Object.create(null),r);return e},De=(t,e)=>{const n=!q&&Object.values(e||{}).some(i=>Object.values(i||{}).some(Q)),r=n?Ae(e):e;return M[t]={host:e,runtime:r,isWebpackScope:n},r},ze=()=>{const t=Object.values(M).filter(({isWebpackScope:e})=>e);if(t.length!==0)for(const{host:e,runtime:n}of t)for(const[r,i]of Object.entries(e||{})){const o=n[r]||=Object.create(null);for(const[c,a]of Object.entries(i||{}))o[c]=a}},k=Object.create(null);for(const[t,e]of Object.entries(s)){const n=k[t]=Object.create(null);for(const[r,i]of Object.entries(e))n[r]=Object.assign({},i)}const{usedShared:I,usedRemotes:ke}=await yt();function Q(t){if(typeof(t==null?void 0:t.get)!="function")return!1;const e=Function.prototype.toString.call(t.get);return e.includes("__webpack_require__")||/\.\s*e\s*\([^)]*\)\s*\.then\s*\(/.test(e)}const Ke=Object.values(k).some(t=>Object.values(t||{}).some(Q)),Be=t=>{const e=t.split("/");return t.startsWith("@")?e.slice(0,2).join("/"):e[0]},re=(t,e,n)=>{if(typeof U!="function")return;const r=Be(t),i=r===t?[[t,e]]:[[t,e],[r,I[r]]];for(const[o,c]of i){if(!c)continue;const a=n?o===t?n:k[o]:s[o],l=U(a,o,c,"version-first");if(l&&Q(l)&&!l.lib&&!l.loaded)return l}};var X=Te[Fe];if(X||(X=Te[Fe]={from:D}),f.indexOf(X)>=0)return;f.push(X);const be=t=>{let e=t;for(let n=0;n<5;n++){const r=e==null?void 0:e.default;if(!r||typeof r!="object"||Object.keys(r).length===0)break;const i=Object.keys(e).filter(o=>o!=="default").map(o=>e[o]);if(i.length>0&&i.some(o=>o!==void 0))break;e=r}return e},Ge=[],Ve=typeof globalThis.window>"u"?await Promise.all([]):[],oe="__mf_vite_runtime_share_load_id__";let We=0;const ie=new Map,se=new Map,H=lt({name:D,remotes:ke,shared:I,plugins:[He(),Ue(),...Ge,...Ve],shareStrategy:"version-first"});H.initShareScopeMap("default",De("default",s));function He(){return{name:"vite-share-pin-lifecycle-plugin",resolveShare(t){var i;const e=(i=t.shareInfo)==null?void 0:i[oe],n=e===void 0?void 0:se.get(e);if(!n)return t;const r=t.resolver;return t.resolver=(...o)=>(n.pinned.reapply(),r(...o)),n.pinned.reveal(),t}}}function Ue(){return{name:"vite-real-name-snapshot-plugin",afterLoadSnapshot(t){const e=t&&t.remoteSnapshot,n=e&&e.globalName,r=e&&e.version;if(!n||!r||!e.remoteEntry)return t;const i=globalThis.__FEDERATION__&&globalThis.__FEDERATION__.moduleInfo,o=n+":"+r;return i&&!i[o]&&(i[o]=e),t}}}const qe=H.sharedHandler.hooks.lifecycle.resolveShare,Y=new WeakMap;qe.on(t=>{var i;const e=(i=t.shareInfo)==null?void 0:i[oe],n=t.resolver;if(typeof n!="function")return t;const r=(...o)=>{const c=n(...o),a=c==null?void 0:c.shared;return a&&(typeof a=="object"||typeof a=="function")&&!Y.has(a)&&Y.set(a,{from:a.from}),e!==void 0&&a&&ie.set(e,a),c};return t.resolver=r,t});const Me=(t,e,n,r)=>{if(!t||t[e]!==n)return;const i=Object.assign({},r,{version:r.version??e,scope:r.scope??(n==null?void 0:n.scope)??["default"],strategy:"loaded-first"}),o=r.from;t[e]=i;const c=()=>n===void 0?t[e]===void 0:t[e]===n;return{provider:i,reveal(){return t[e]!==i?!1:(n===void 0?delete t[e]:t[e]=n,!0)},reapply(){return c()?(t[e]=i,!0):!1},release(a,l=!0){return r.from=o,t[e]!==i?!l&&c():l?a?(i.from=o,a&&i.lib&&(i.loaded=!0),r.strategy===void 0?delete i.strategy:i.strategy=r.strategy,!0):(n===void 0?delete t[e]:t[e]=n,!1):(n===void 0?delete t[e]:t[e]=n,!0)}}},Je=t=>Object.entries(t||{}).map(([e,n])=>({provider:n,version:e,from:n.from,registered:!0})),Qe=(t,e)=>{if(e===void 0)return;let n;for(const r of t){const i=r.provider,o=i.treeShaking||i;if(!(r.loadedFactory!==e&&i.lib!==e&&o.lib!==e)){if(n)return;n=r}}return n},Xe=async(t,e,n)=>{const r=++We;se.set(r,{pinned:n});try{const i=await H.loadShare(t,{customShareInfo:{shareConfig:e,[oe]:r}});return{factory:i===!1?void 0:i,selectedProvider:ie.get(r)}}finally{ie.delete(r),se.delete(r)}},ye=async(t,e,n,r,i,o,c=!0)=>{const a=o.from,l=Me(n,r,i,o);if(!l)return;let y;try{y=await Xe(t,e,l)}catch(j){throw l.release(!1),j}const m=y==null?void 0:y.factory;if(m===void 0){l.release(!1);return}const _=Je(n),g=l.provider.treeShaking||l.provider,R=l.provider.lib===m||g.lib===m;if(!c&&R){const j=_.findIndex(v=>v.provider===l.provider);j!==-1&&_.splice(j,1)}!c&&!_.some(j=>j.provider===o)&&_.push({provider:o,version:r,from:a,registered:!1,loadedFactory:R?m:void 0});const O=!c&&y.selectedProvider===l.provider&&R?o:y.selectedProvider;if(O&&!_.some(j=>j.provider===O)){const j=Y.get(O),v=typeof O.version=="string"&&O.version?O.version:r;_.push({provider:O,version:v,from:j?j.from:O.from,registered:(n==null?void 0:n[v])===O,loadedFactory:m})}const b=_.find(j=>j.provider===O)??Qe(_,m);if(!l.release(!0,(b==null?void 0:b.provider)===l.provider)||!b)return;const S=Y.get(b.provider);b.from=b.provider===o?a:S?S.from:b.provider.from,S&&(b.provider.from=S.from);const A=typeof m=="function"?m():m,w=await Promise.resolve(A);if(!(b.registered&&(n==null?void 0:n[b.version])!==b.provider))return{provider:b.provider,selection:b,resolved:w}},fe=new Set,ae=new Map,Ye=async(t,e,n)=>{var i;const r=!!((i=e.shareConfig)!=null&&i.singleton);if(!r&&e.canLiveRebind!==!1)try{const o=U(n,t,e,"version-first"),c=le(n,o);if(!c)return;const{version:a}=c;if(!r&&a!==e.version||!o.lib&&!o.loading&&!(o.loaded&&typeof o.get=="function"))return;const l=u(t,r,e.version,e.scope);if(h(d.share,l)!==void 0)return;const y=s[t],m=y==null?void 0:y[a];if(c.registered&&!z(m,o))return;let _,g=o.lib;if(!g&&Q(o)||(!g&&o.loading&&(g=await o.loading),!g&&o.loaded&&typeof o.get=="function"&&(g=await o.get()),!g))return;const R=typeof g=="function"?g():g,O=await Promise.resolve(R),b=c.registered?m:o;_={provider:b,selection:{provider:b,version:a,from:o.from,registered:c.registered},resolved:O};const T=_==null?void 0:_.provider,S=_==null?void 0:_.selection;if(!S)return;const A=_==null?void 0:_.resolved;if(A===void 0||h(d.share,l)!==void 0||S.registered&&(y==null?void 0:y[S.version])!==T)return;E(d.share,l,be(A),S.from),fe.add(T)}catch(o){console.error('[Module Federation] Failed to bridge materialized shared module "'+t+'"',o)}},Se=async(t,e,n,r,i)=>{var o,c;try{const a=u(t,(o=e.shareConfig)==null?void 0:o.singleton,e.version,e.scope),l=h(d.share,a),y=P(d.share,a),m=U(n,t,e,"version-first"),_=m||me(n,t,e,"version-first")||e,g=le(n,_);if(!g)return;const R=z(_,e),{version:O}=g;if(!((c=e.shareConfig)!=null&&c.singleton)&&O!==e.version)return;const b=r==null?void 0:r[O],T=bt(W,q,s,"default",t,g,m,b,"version-first");if(!T&&!R)return;const{provider:S,scopeRootProvider:A}=T||{provider:_,scopeRootProvider:void 0};if(e.canLiveRebind===!1||l!==void 0&&y!==D)return;const w=s[t],j=w==null?void 0:w[O];if(g.registered&&!A&&!z(j,S))return;const v=await ye(t,e.shareConfig,w,O,j,S,g.registered&&!R),G=v==null?void 0:v.provider,F=v==null?void 0:v.selection;if(!F||z(G,e)||i&&(i.version!==F.version||!z({from:F.from},i.provider))||fe.has(G))return;const Ie=v==null?void 0:v.resolved;if(Ie===void 0)return;const st=h(d.share,a),ft=P(d.share,a);if(st!==void 0&&ft!==D||F.registered&&(w==null?void 0:w[F.version])!==G)return;i||ae.set(t,{version:F.version,provider:{from:F.from}}),fe.add(G);const at=be(Ie);E(d.share,a,at,F.from)}catch(a){console.error('[Module Federation] Failed to bridge external shared module "'+t+'"',a)}};for(const t of ce)await Promise.all(t.map(async e=>{const n=I[e];!n||n.materialize===!1||n.treeShaking||await Ye(e,n,k[e])}));for(const[t,e]of Object.entries(I)){if(e.treeShaking)continue;const n=u(t,(Re=e.shareConfig)==null?void 0:Re.singleton,e.version,e.scope);if(h(d.share,n)!==void 0)continue;const r=u(t,!0,e.version,e.scope),i=h(d.share,r);i!==void 0&&E(d.share,n,i,P(d.share,r))}const Ze=["react"],$e=[["react"]],Z=Ze.filter(t=>{var e;return I[t]&&(I[t].materialize!==!1||((e=I[t].shareConfig)==null?void 0:e.import)===!1)});d.providerInit||=new Map;const et=(t,e)=>{const n=d.providerInit.get(t);if(n)return n;const r=Promise.resolve().then(e);return d.providerInit.set(t,r),r.catch(()=>d.providerInit.delete(t)),r};var ve=async t=>{const e=new Set(t);for(const n of $e)await Promise.all(n.filter(r=>e.has(r)).map(async r=>{var O,b;const i=I[r],o=u(r,(O=i.shareConfig)==null?void 0:O.singleton,i.version,i.scope);if(((b=i.shareConfig)==null?void 0:b.import)===!1||i.treeShaking||h(d.share,o)!==void 0)return;const c=u(r,!0,i.version,i.scope),a=h(d.share,c);if(a!==void 0){E(d.share,o,a,P(d.share,c));return}const l=typeof re=="function"?re(r,i):void 0;if(l&&!l.lib&&!l.loaded)return;const y=o.canonical,m=await et(y,async()=>{const T=await i.get(),S=typeof T=="function"?T():T;return Promise.resolve(S)}),g=(T=>{let S=T;for(let A=0;A<5;A++){const w=S==null?void 0:S.default;if(!w||typeof w!="object"||Object.keys(w).length===0)break;const j=Object.keys(S).filter(v=>v!=="default").map(v=>S[v]);if(j.length>0&&j.some(v=>v!==void 0))break;S=w}return S})(m),R=g===m?{...m}:g;R.__esModule!==!0&&Object.defineProperty(R,"__esModule",{value:!0,enumerable:!1}),E(d.share,o,R,D)}))};const pe=t=>{var r,i;const e=I[t];if(!e.treeShaking&&((r=e.shareConfig)==null?void 0:r.import)!==!1)return!1;const n=u(t,(i=e.shareConfig)==null?void 0:i.singleton,e.version,e.scope);return e.treeShaking?B(d.share,n,D)===void 0&&h(d.share,n)===void 0:h(d.share,n)===void 0},tt=t=>{var i,o;const e=I[t],n=u(t,(i=e.shareConfig)==null?void 0:i.singleton,e.version,e.scope);return(e.treeShaking?B(d.share,n,D)??h(d.share,n):h(d.share,n))!==void 0?!1:e.treeShaking||((o=e.shareConfig)==null?void 0:o.import)===!1?!0:typeof U!="function"?!1:!!U(k[t],t,e,"version-first")},$=Z.findIndex(tt),nt=$===-1?Z:Z.slice(0,$);var rt=$===-1?[]:Z.slice($);await ve(nt);try{await _e(async()=>{await Promise.all(await H.initializeSharing("default",{strategy:"version-first",from:"build",initScope:f}))})}catch(t){console.error("[Module Federation]",t)}ze();const Pe=async()=>{for(const t of ce)await Promise.all(t.map(async e=>{const n=I[e];!n||n.materialize===!1||n.treeShaking||await Se(e,n,s[e],k[e],void 0)}))};await Pe(),Ke&&(ue=Pe);try{const t=(Ce=globalThis.__FEDERATION__)==null?void 0:Ce.__SHARE__,e=Object.create(null);if(t)for(const[,n]of Object.entries(t))for(const r of mt){const i=n==null?void 0:n[r];if(i)for(const[o,c]of Object.entries(i)){const a=I==null?void 0:I[o],l=k[o],y=ae.get(o);if(!a||!l||!y||a.treeShaking)continue;const m=e[o]||(e[o]=Object.create(null));for(const[_,g]of Object.entries(c)){if(!g.lib||y.version!==_||!z(g,y.provider))continue;const R=l[_];(g===R||R!=null&&R.from&&g.from===R.from)&&(g===a||a.from&&g.from===a.from||m[_]===void 0&&(m[_]=g))}}}for(const n of ce)await Promise.all(n.map(async r=>{const i=e[r];i&&await Se(r,I[r],i,k[r],ae.get(r))}))}catch(t){console.error("[Module Federation] Failed to bridge external shared modules",t)}const ot=async()=>{},it=async(t,e)=>{var T,S;const n=u(t,(T=e.shareConfig)==null?void 0:T.singleton,e.version,e.scope),r=e.treeShaking?B(d.share,n,D):h(d.share,n);if(((S=e.shareConfig)==null?void 0:S.import)!==!1||r!==void 0||re(t,e,k[t]))return;const i=A=>{let w=A;for(let j=0;j<5;j++){const v=w==null?void 0:w.default;if(!v||typeof v!="object"||Object.keys(v).length===0)break;const G=Object.keys(w).filter(F=>F!=="default").map(F=>w[F]);if(G.length>0&&G.some(F=>F!==void 0))break;w=v}return w},o=s==null?void 0:s[t],c=me(o,t,e,"version-first")||e,a=le(o,c);if(!a)return;const{version:l}=a,y=o==null?void 0:o[l],m=await ye(t,e.shareConfig,o,l,y,c,a.registered&&!z(c,e)),_=m==null?void 0:m.selection,g=m==null?void 0:m.provider,R=m==null?void 0:m.resolved;if(!_||z(g,e)||R===void 0||(e.treeShaking?B(d.share,n,D):h(d.share,n))!==void 0||_.registered&&(o==null?void 0:o[_.version])!==g)return;const b=i(R);if(e.treeShaking){const A=e.treeShaking.providedExports??e.treeShaking.usedExports??[];he(d.share,n,A,b),J(d.share,n,D,b)}else E(d.share,n,b,_.from)},Oe=[];for(const t of rt){const e=I[t];if(pe(t))try{e.treeShaking?await ot(t,e):((Ee=e.shareConfig)==null?void 0:Ee.import)===!1&&await it(t,e)}catch(n){console.error(`[Module Federation] Failed to resolve runtime-only shared module "${t}"`,n);break}if(pe(t))break;Oe.push(t)}return await ve(Oe),ut(H),H}async function Ot(s){const f=await St();if(!(s in f))throw new Error(`[Module Federation] Module ${s} does not exist in container.`);return ue&&await ue(),d.pendingShareLoads&&await Promise.all(d.pendingShareLoads),f[s]().then(u=>()=>u)}export{Ot as get,Pt as init};
|
|
2
2
|
|
|
3
3
|
if (typeof document !== 'undefined' && document.head) {
|
|
4
4
|
try {
|
|
5
|
-
for (const __mfWarmupPath of ["assets/virtualExposes-
|
|
5
|
+
for (const __mfWarmupPath of ["assets/virtualExposes-D12Gu9x5.js","assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteReviewSet__mf_owner__1-DXSRuGUo.js","assets/vite-preload-helper-Dp1pzeXC.js","assets/index-2HOz3j7B.js"]) {
|
|
6
6
|
const __mfWarmupLink = document.createElement('link');
|
|
7
7
|
__mfWarmupLink.rel = 'modulepreload';
|
|
8
8
|
__mfWarmupLink.crossOrigin = '';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import"../shoppingListEditor.js";import{_ as w,a as S}from"./_virtual_mf___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1__loadShare__react__loadShare__.js-DKxc1wk0.js";import"./vite-preload-helper-Dp1pzeXC.js";import"./index-2HOz3j7B.js";var m={exports:{}};const b=w||S,r=b.createElement,a=(s,t)=>(typeof navigator<"u"?String(navigator.language||"").toLowerCase():"de").startsWith("de")?s:t,y=s=>String(s||"").trim().toLocaleLowerCase("de");function u(s){let t=String(s||"").trim();for(let e=0;e<16;e++){const i=t.match(/^(?:\d{2}>|\[\d{2}\])\s+(.+)$/s);if(!(i!=null&&i[1]))break;t=String(i[1]).trim()}return t}function k(s,t){const e=u(s),i=[/^═{5}\s+(.+?)\s+═{5}$/,/^\*\*\*\*\s+(.+?)\s+\*\*\*\*$/,/^[—–-]{1,5}\s+(.+?)\s+[—–-]{1,5}$/];let l="";for(const n of i){const p=e.match(n);if(p!=null&&p[1]){l=String(p[1]).trim();break}}return l?(Array.isArray(t)?t:[]).find(n=>y(n)===y(l))||l:""}function x(s){const t=Array.isArray(s==null?void 0:s.markets)?s.markets:[];return(Array.isArray(s==null?void 0:s.items)?s.items:[]).filter(e=>(e==null?void 0:e.id)&&!k(e.text,t)).map(e=>({...e,text:u(e.text)}))}function v(s){return!!(s&&typeof s.listName=="string"&&Array.isArray(s.lists)&&s.lists.every(t=>typeof t=="string")&&Array.isArray(s.markets)&&s.markets.every(t=>typeof t=="string")&&Array.isArray(s.items)&&s.items.every(t=>t&&typeof t.id=="string"&&typeof t.text=="string"&&typeof t.market=="string"))}function g(s){if(!v(s))throw new Error(a("Die Einkaufslistendaten sind unvollständig. Bitte erneut laden.","The shopping-list data is incomplete. Please reload."));return s}const N=`
|
|
2
|
+
.shoppingroute-list-toolbar{display:flex;flex-wrap:wrap;gap:9px;align-items:center;margin-bottom:14px}
|
|
3
|
+
.shoppingroute-list-toolbar select,.shoppingroute-list-toolbar button{min-height:36px;box-sizing:border-box}
|
|
4
|
+
.shoppingroute-list-toolbar select{min-width:150px;padding:5px 8px}
|
|
5
|
+
.shoppingroute-market-grid{display:flex;flex-direction:column;gap:0}
|
|
6
|
+
.shoppingroute-market-column{min-width:0;border:1px solid currentColor;border-radius:8px;overflow:hidden}
|
|
7
|
+
.shoppingroute-market-title{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:9px 11px;font-weight:700;border-bottom:1px solid currentColor}
|
|
8
|
+
.shoppingroute-market-count{font-size:.82rem;opacity:.65;font-weight:500}
|
|
9
|
+
.shoppingroute-item-list{display:flex;flex-direction:column}
|
|
10
|
+
.shoppingroute-item-row{display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:8px;align-items:center;padding:7px 9px;border-bottom:1px solid currentColor}
|
|
11
|
+
.shoppingroute-item-row:last-child{border-bottom:0}
|
|
12
|
+
.shoppingroute-drag-handle{font-size:16px;opacity:.5;cursor:grab;user-select:none;text-align:center}
|
|
13
|
+
.shoppingroute-item-name{font-weight:600;word-break:break-word}
|
|
14
|
+
.shoppingroute-item-meta{font-size:.78rem;opacity:.62;margin-top:2px}
|
|
15
|
+
.shoppingroute-item-actions{display:flex;gap:4px;align-items:center;justify-content:flex-end}
|
|
16
|
+
.shoppingroute-list-button{min-width:30px;min-height:30px;padding:4px 8px;border:1px solid currentColor;border-radius:4px;background:transparent;color:inherit;cursor:pointer}
|
|
17
|
+
.shoppingroute-list-button:disabled{cursor:default;opacity:.35}
|
|
18
|
+
.shoppingroute-item-actions select{min-width:92px;max-width:125px;min-height:30px;border:1px solid currentColor;border-radius:4px;background:transparent;color:inherit;padding:3px 5px}
|
|
19
|
+
.shoppingroute-empty{opacity:.58;padding:18px 11px;text-align:center}
|
|
20
|
+
@media (max-width: 600px) {
|
|
21
|
+
.shoppingroute-list-toolbar>*{width:100%;max-width:none}
|
|
22
|
+
.shoppingroute-item-row{grid-template-columns:18px minmax(0,1fr)}
|
|
23
|
+
.shoppingroute-item-actions{grid-column:2;justify-content:flex-start;flex-wrap:wrap;margin-top:3px}
|
|
24
|
+
.shoppingroute-item-actions select{flex:1 1 120px;max-width:none}
|
|
25
|
+
.shoppingroute-drag-handle{cursor:default}
|
|
26
|
+
}
|
|
27
|
+
`;class f extends b.Component{constructor(t){super(t),this.state={view:null,loading:!0,busy:"",error:""},this.commandPending=!1}componentDidMount(){this.load()}instanceName(){const t=String(this.props.adapterName||"shoppingroute"),e=Number.isFinite(Number(this.props.instance))?Number(this.props.instance):0;return`${t}.${e}`}async send(t,e){var i;if(!((i=this.props.socket)!=null&&i.sendTo))throw new Error("Admin socket is unavailable.");return this.props.socket.sendTo(this.instanceName(),t,e||{})}async load(t){this.setState({loading:!0,error:""});try{const e=await this.send("getShoppingList",{listName:t});if(!e||e.error)throw new Error((e==null?void 0:e.error)||"Shopping list could not be loaded.");this.setState({view:g(e),loading:!1,busy:""})}catch(e){this.setState({loading:!1,busy:"",error:e instanceof Error?e.message:String(e)})}}async move(t,e,i){const l=this.state.view;if(!(!l||this.commandPending||this.state.busy)){this.commandPending=!0,this.setState({busy:t,error:""});try{const n=await this.send("moveShoppingItem",{listName:l.listName,itemId:t,targetMarket:e,targetPosition:i});if(n!=null&&n.view&&this.setState({view:g(n.view)}),!(n!=null&&n.ok))throw new Error((n==null?void 0:n.error)||"The item could not be moved.");this.setState({busy:""})}catch(n){const p=n instanceof Error?n.message:String(n);await this.load(l.listName),this.setState({busy:"",error:p})}finally{this.commandPending=!1}}}async remove(t){const e=this.state.view;if(!(!e||e.dryRun||this.commandPending||this.state.busy)){this.commandPending=!0,this.setState({busy:t,error:""});try{const i=await this.send("deleteShoppingItem",{listName:e.listName,itemId:t});if(i!=null&&i.view&&this.setState({view:g(i.view)}),!(i!=null&&i.ok))throw new Error((i==null?void 0:i.error)||"The item could not be deleted.");this.setState({busy:""})}catch(i){const l=i instanceof Error?i.message:String(i);await this.load(e.listName),this.setState({busy:"",error:l})}finally{this.commandPending=!1}}}async clearManual(){const t=this.state.view;if(!(!t||this.commandPending||this.state.busy)){this.commandPending=!0,this.setState({busy:"__clear__",error:""});try{const e=await this.send("clearManualShoppingOrder",{listName:t.listName});if(e!=null&&e.view&&this.setState({view:g(e.view)}),!(e!=null&&e.ok))throw new Error((e==null?void 0:e.error)||"Manual order could not be cleared.");this.setState({busy:""})}catch(e){const i=e instanceof Error?e.message:String(e);await this.load(t.listName),this.setState({busy:"",error:i})}finally{this.commandPending=!1}}}onDragStart(t,e){t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",e)}onDrop(t,e,i){t.preventDefault(),t.stopPropagation();const l=t.dataTransfer.getData("text/plain");l&&this.move(l,e,i)}renderRow(t,e,i,l,n){const p=!!this.state.busy;return r("div",{key:t.id,className:"shoppingroute-item-row",draggable:!p,onDragStart:o=>this.onDragStart(o,t.id),onDragOver:o=>o.preventDefault(),onDrop:o=>this.onDrop(o,t.market,i)},[r("div",{key:"drag",className:"shoppingroute-drag-handle",title:a("Ziehen","Drag"),"aria-hidden":!0},"⋮⋮"),r("div",{key:"main"},[r("div",{key:"name",className:"shoppingroute-item-name"},u(t.text)),t.category||t.manual?r("div",{key:"meta",className:"shoppingroute-item-meta"},[t.category||a("Ohne Produktgruppe","No product group"),t.manual?` · ${a("manuell","manual")}`:""]):null]),r("div",{key:"actions",className:"shoppingroute-item-actions"},[r("button",{key:"up",type:"button",className:"shoppingroute-list-button",disabled:p||i===0,title:a("Nach oben","Move up"),onClick:()=>void this.move(t.id,t.market,i-1)},"↑"),r("button",{key:"down",type:"button",className:"shoppingroute-list-button",disabled:p||i===e.length-1,title:a("Nach unten","Move down"),onClick:()=>void this.move(t.id,t.market,i+1)},"↓"),r("button",{key:"delete",type:"button",className:"shoppingroute-list-button",disabled:p||l.dryRun,title:a("Aus der Alexa-Einkaufsliste löschen","Delete from the Alexa shopping list"),"aria-label":`${a("Artikel löschen","Delete item")}: ${u(t.text)}`,onClick:()=>void this.remove(t.id)},a("Löschen","Delete")),r("select",{key:"market",value:t.market,disabled:p,title:a("Markt wechseln","Change market"),"aria-label":a("In einen anderen Markt verschieben","Move to another market"),onChange:o=>{const d=o.target.value,h=n.filter(c=>c.market===d&&c.id!==t.id).length;this.move(t.id,d,h)}},l.markets.map(o=>r("option",{key:o,value:o},o)))])])}render(){const t=v(this.state.view)?this.state.view:null,e=!!this.state.busy,i=[r("style",{key:"styles"},N)];if(i.push(r("div",{key:"intro",style:{marginBottom:"12px",lineHeight:1.4}},[r("strong",{key:"title"},a("Aktuelle Einkaufsliste","Current shopping list")),r("div",{key:"hint",style:{opacity:.7,marginTop:"3px"}},a("Ziehen verschiebt Artikel direkt. Pfeile und Marktauswahl sind die einfache Alternative für Maus und Handy.","Drag items directly. Arrows and the market selector are the simple alternative for mouse and phone."))])),this.state.error&&i.push(r("div",{key:"error",style:{padding:"9px",border:"1px solid currentColor",borderRadius:"6px",marginBottom:"10px"}},this.state.error)),this.state.loading)return i.push(r("div",{key:"loading"},a("Liste wird geladen …","Loading list …"))),r("div",{style:{width:"100%"}},i);if(!t)return this.state.error||i.push(r("div",{key:"invalid"},a("Die Einkaufslistendaten sind unvollständig.","The shopping-list data is incomplete."))),i.push(r("button",{key:"retry",type:"button",className:"shoppingroute-list-button",onClick:()=>this.load()},a("Erneut laden","Reload"))),r("div",{style:{width:"100%"}},i);const l=x(t);i.push(r("div",{key:"toolbar",className:"shoppingroute-list-toolbar"},[r("select",{key:"list",value:t.listName,disabled:e,onChange:o=>void this.load(o.target.value),"aria-label":a("Einkaufsliste auswählen","Select shopping list")},t.lists.map(o=>r("option",{key:o,value:o},o))),r("button",{key:"refresh",type:"button",className:"shoppingroute-list-button",disabled:e,onClick:()=>void this.load(t.listName)},a("Aktualisieren","Refresh")),r("button",{key:"clear",type:"button",className:"shoppingroute-list-button",disabled:e,onClick:()=>void this.clearManual()},a("Manuelle Reihenfolge zurücksetzen","Reset manual order")),t.dryRun?r("strong",{key:"dry",style:{marginLeft:"auto"}},a("Dry Run aktiv – Änderungen gesperrt","Dry Run active – changes are disabled")):null]));const n=t.markets.filter(o=>l.some(d=>d.market===o));if(!n.length)return i.push(r("div",{key:"empty-list",style:{opacity:.7,padding:"16px 0"}},a("Die Einkaufsliste ist leer.","The shopping list is empty."))),r("div",{style:{width:"100%"}},i);const p=n.map(o=>{const d=l.filter(h=>h.market===o);return r("section",{key:o,className:"shoppingroute-market-column",onDragOver:h=>h.preventDefault(),onDrop:h=>this.onDrop(h,o,d.length)},[r("div",{key:"title",className:"shoppingroute-market-title"},[r("span",{key:"name"},o),r("span",{key:"count",className:"shoppingroute-market-count"},String(d.length))]),d.length?r("div",{key:"items",className:"shoppingroute-item-list"},d.map((h,c)=>this.renderRow(h,d,c,t,l))):r("div",{key:"empty",className:"shoppingroute-empty"},a("Hierher ziehen","Drop here"))])});return i.push(r("div",{key:"grid",className:"shoppingroute-market-grid"},p)),r("div",{style:{width:"100%"}},i)}}m.exports={Components:{ShoppingListEditor:f},ShoppingListEditorModel:{stripVisiblePrefix:u,headerMarket:k,visibleItems:x},ShoppingListEditor:f};const D=(m.exports==null?{}:m.exports).default||m.exports,M=D.Components;export{M as default};
|
package/admin/custom/shoppingList/assets/{virtualExposes-DgzWcmof.js → virtualExposes-B87M9RDc.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
const c={},i=new Set,r=new Map;function m(t,n){let e=r.get(t);return e||(e=Promise.resolve().then(n).catch(o=>{throw r.delete(t),o}),r.set(t,e)),e}async function u(t){if(typeof document>"u")return;const n=c[t]||[];await Promise.all(n.map(e=>{const o=new URL(e,import.meta.url).href;return i.has(o)||(i.add(o),document.querySelector(`link[rel="stylesheet"][href="${o}"]`))?Promise.resolve():new Promise((a,l)=>{const s=document.createElement("link");s.rel="stylesheet",s.href=o,s.onload=()=>a(),s.onerror=()=>l(new Error(`[Module Federation] Failed to load CSS asset: ${o}`)),document.head.appendChild(s)})}))}const f={"./Components":async()=>{await u("./Components"),await Promise.all([]);const t=await m("./Components",()=>import("./shopping-list-editor-components-
|
|
1
|
+
const c={},i=new Set,r=new Map;function m(t,n){let e=r.get(t);return e||(e=Promise.resolve().then(n).catch(o=>{throw r.delete(t),o}),r.set(t,e)),e}async function u(t){if(typeof document>"u")return;const n=c[t]||[];await Promise.all(n.map(e=>{const o=new URL(e,import.meta.url).href;return i.has(o)||(i.add(o),document.querySelector(`link[rel="stylesheet"][href="${o}"]`))?Promise.resolve():new Promise((a,l)=>{const s=document.createElement("link");s.rel="stylesheet",s.href=o,s.onload=()=>a(),s.onerror=()=>l(new Error(`[Module Federation] Failed to load CSS asset: ${o}`)),document.head.appendChild(s)})}))}const f={"./Components":async()=>{await u("./Components"),await Promise.all([]);const t=await m("./Components",()=>import("./shopping-list-editor-components-Dpx8GHcM.js")),n=t&&t.__mf_remote_dependency_pending;n&&typeof n.then=="function"&&await n;const e={};return Object.assign(e,t),Object.defineProperty(e,"__esModule",{value:!0,enumerable:!1}),e}};export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"ShoppingRouteShoppingListSet","name":"ShoppingRouteShoppingListSet","metaData":{"name":"ShoppingRouteShoppingListSet","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"ShoppingRouteShoppingListSet"},"remoteEntry":{"name":"shoppingListEditor.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"shoppingListEditor.ssr.js","path":"","type":"module"},"types":{"path":"","name":""},"globalName":"ShoppingRouteShoppingListSet","pluginVersion":"0.2.5","publicPath":"auto"},"shared":[{"id":"ShoppingRouteShoppingListSet:react","name":"react","version":"18.3.1","singleton":true,"requiredVersion":">=18","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1__loadShare__react__loadShare__.js-DKxc1wk0.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[{"id":"ShoppingRouteShoppingListSet:Components","name":"Components","assets":{"js":{"async":[],"sync":["assets/vite-preload-helper-Dp1pzeXC.js","assets/index-2HOz3j7B.js","assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1-BkReJy06.js","assets/virtualExposes-
|
|
1
|
+
{"id":"ShoppingRouteShoppingListSet","name":"ShoppingRouteShoppingListSet","metaData":{"name":"ShoppingRouteShoppingListSet","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"ShoppingRouteShoppingListSet"},"remoteEntry":{"name":"shoppingListEditor.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"shoppingListEditor.ssr.js","path":"","type":"module"},"types":{"path":"","name":""},"globalName":"ShoppingRouteShoppingListSet","pluginVersion":"0.2.5","publicPath":"auto"},"shared":[{"id":"ShoppingRouteShoppingListSet:react","name":"react","version":"18.3.1","singleton":true,"requiredVersion":">=18","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1__loadShare__react__loadShare__.js-DKxc1wk0.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[{"id":"ShoppingRouteShoppingListSet:Components","name":"Components","assets":{"js":{"async":[],"sync":["assets/vite-preload-helper-Dp1pzeXC.js","assets/index-2HOz3j7B.js","assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1-BkReJy06.js","assets/virtualExposes-B87M9RDc.js","assets/shopping-list-editor-components-Dpx8GHcM.js","shoppingListEditor.js","assets/_virtual_mf___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1__loadShare__react__loadShare__.js-DKxc1wk0.js"]},"css":{"async":[],"sync":[]}},"path":"./Components"}]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"ShoppingRouteShoppingListSet","name":"ShoppingRouteShoppingListSet","metaData":{"name":"ShoppingRouteShoppingListSet","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"ShoppingRouteShoppingListSet"},"remoteEntry":{"name":"shoppingListEditor.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"shoppingListEditor.ssr.js","path":"","type":"module"},"types":{"path":"","name":""},"globalName":"ShoppingRouteShoppingListSet","pluginVersion":"0.2.5","publicPath":"auto"},"shared":[{"id":"ShoppingRouteShoppingListSet:react","name":"react","version":"18.3.1","singleton":true,"requiredVersion":">=18","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1__loadShare__react__loadShare__.js-DKxc1wk0.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[{"id":"ShoppingRouteShoppingListSet:Components","name":"Components","assets":{"js":{"async":[],"sync":["assets/vite-preload-helper-Dp1pzeXC.js","assets/index-2HOz3j7B.js","assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1-BkReJy06.js","assets/virtualExposes-
|
|
1
|
+
{"id":"ShoppingRouteShoppingListSet","name":"ShoppingRouteShoppingListSet","metaData":{"name":"ShoppingRouteShoppingListSet","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"ShoppingRouteShoppingListSet"},"remoteEntry":{"name":"shoppingListEditor.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"shoppingListEditor.ssr.js","path":"","type":"module"},"types":{"path":"","name":""},"globalName":"ShoppingRouteShoppingListSet","pluginVersion":"0.2.5","publicPath":"auto"},"shared":[{"id":"ShoppingRouteShoppingListSet:react","name":"react","version":"18.3.1","singleton":true,"requiredVersion":">=18","assets":{"js":{"async":[],"sync":["assets/_virtual_mf___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1__loadShare__react__loadShare__.js-DKxc1wk0.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[{"id":"ShoppingRouteShoppingListSet:Components","name":"Components","assets":{"js":{"async":[],"sync":["assets/vite-preload-helper-Dp1pzeXC.js","assets/index-2HOz3j7B.js","assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1-BkReJy06.js","assets/virtualExposes-B87M9RDc.js","assets/shopping-list-editor-components-Dpx8GHcM.js","shoppingListEditor.js","assets/_virtual_mf___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1__loadShare__react__loadShare__.js-DKxc1wk0.js"]},"css":{"async":[],"sync":[]}},"path":"./Components"}],"buildOutput":[{"fileName":"shoppingListEditor.js","type":"chunk","isEntry":false,"size":18725},{"fileName":"assets/vite-preload-helper-Dp1pzeXC.js","type":"chunk","isEntry":false,"size":1266},{"fileName":"assets/_virtual_mf___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1__loadShare__react__loadShare__.js-DKxc1wk0.js","type":"chunk","isEntry":false,"size":11515},{"fileName":"assets/hostInit-Bj93C5rF.js","type":"chunk","isEntry":false,"size":2502},{"fileName":"assets/shopping-list-editor-components-Dpx8GHcM.js","type":"chunk","isEntry":true,"size":11272},{"fileName":"assets/virtualExposes-B87M9RDc.js","type":"chunk","isEntry":false,"size":1077},{"fileName":"assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1-BkReJy06.js","type":"chunk","isEntry":false,"size":739},{"fileName":"assets/index-2HOz3j7B.js","type":"chunk","isEntry":false,"size":66321},{"fileName":"mf-manifest.json","type":"asset","isEntry":false,"size":1414}],"assetAnalysis":{"./src-admin/shopping-list-editor-components.mjs":{"js":{"sync":["assets/vite-preload-helper-Dp1pzeXC.js","assets/index-2HOz3j7B.js","assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1-BkReJy06.js","assets/virtualExposes-B87M9RDc.js","assets/shopping-list-editor-components-Dpx8GHcM.js","shoppingListEditor.js","assets/_virtual_mf___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1__loadShare__react__loadShare__.js-DKxc1wk0.js"],"async":[]},"css":{"sync":[],"async":[]}},"react":{"js":{"sync":["assets/_virtual_mf___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1__loadShare__react__loadShare__.js-DKxc1wk0.js"],"async":[]},"css":{"sync":[],"async":[]}}}}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{h as ct,i as lt}from"./assets/index-2HOz3j7B.js";const dt=ct.share;typeof __VUE_HMR_RUNTIME__>"u"&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});const xe="__mf_init__virtual:mf:__mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1__mf_v__runtimeInit__mf_v__.js__";let de=globalThis[xe];if(!de){let s,f;const u=new Promise((h,C)=>{s=h,f=C});de=globalThis[xe]={initPromise:u,initResolve:s,initReject:f}}const ut=de.initResolve,ne="__mf_module_cache__";globalThis[ne]||={share:{},remote:{}};globalThis[ne].share||={};globalThis[ne].remote||={};const d=globalThis[ne];for(const s of Object.keys(d.share))if(s.startsWith("default:")){const f=s.slice(8);d.share[f]===void 0&&(d.share[f]=d.share[s])}else if(!s.includes(":")){const f="default:"+s;d.share[f]===void 0&&(d.share[f]=d.share[s])}const Te={},mt=Array.isArray("default")?"default":["default"],Fe="default",D="ShoppingRouteShoppingListSet",ce=[["react"]];let ee,te,ue;async function _e(s){for(let f=0;;f++)try{return await s()}catch(u){throw u}}const Ne=Symbol("mf.originalSharedProvider"),_t={emit:s=>s},ht=(s,f)=>{if(f!=="version-first")return s;const u={};for(const[h,C]of Object.entries(s))u[h]=Object.assign({},C,{[Ne]:C});return u},le=(s,f)=>{if(!f)return;const u=Object.entries(s||{}),h=u.find(([,p])=>p===f);if(h)return{version:h[0],provider:f,registered:!0};if(typeof f.version=="string"&&f.version)return{version:f.version,provider:f,registered:!1};const C=u.filter(([,p])=>p===f||!!(f.from&&(p==null?void 0:p.from)===f.from));if(C.length===1)return{version:C[0][0],provider:f,registered:!1}},me=(s,f,u,h)=>{var E;if(!s||!u)return;const C=Array.isArray(u.scope)?u.scope:[u.scope||"default"],p=ht(s,h),L={};for(const x of C)L[x||"default"]={[f]:p};const P=(E=dt.getRegisteredShare(L,f,{...u,scope:C,strategy:h},_t))==null?void 0:E.shared;return(P==null?void 0:P[Ne])||P},U=(s,f,u,h)=>{var P;const C=E=>z(E,u),p=Object.fromEntries(Object.entries(s||{}).filter(([,E])=>{var x;return!C(E)&&((x=E==null?void 0:E.shareConfig)==null?void 0:x.import)!==!1}));u!=null&&u.version&&((P=u.shareConfig)==null?void 0:P.import)!==!1&&(p[u.version]||(p[u.version]=u));const L=me(p,f,u,h);return C(L)?void 0:L},z=(s,f)=>s===f||!!(f!=null&&f.from&&(s==null?void 0:s.from)===f.from),gt=(s,f,u,h,C,p,L,P,E)=>{var B,J,W;if(!P)return;const x=(J=(B=f==null?void 0:f.options)==null?void 0:B.shared)==null?void 0:J[C],K=Array.isArray(x)?x.find(N=>(N==null?void 0:N.version)===p):void 0,V=((P==null?void 0:P.from)===((W=f==null?void 0:f.options)==null?void 0:W.name)?P:void 0)||(z(K,P)?K:f?void 0:P);return V&&s.some(N=>{var q,M;return N!==f&&((q=N==null?void 0:N.options)==null?void 0:q.name)===(L==null?void 0:L.from)&&((M=N==null?void 0:N.shareScopeMap)==null?void 0:M[h])===u})?V:void 0},bt=(s,f,u,h,C,p,L,P,E)=>{const x=p.registered?gt(s,f,u,h,C,p.version,p.provider,P):void 0,K=x||L;if(K&&!(p.registered&&!z(K,P)))return{provider:K,scopeRootProvider:x}};async function yt(){return ee||(ee=_e(()=>import("./assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1-BkReJy06.js")).catch(s=>{throw ee=void 0,s})),ee}async function St(){return te||(te=_e(()=>import("./assets/virtualExposes-DgzWcmof.js")).then(s=>s.default??s).catch(s=>{throw te=void 0,s})),te}async function Pt(s={},f=[]){var we,je,Re,Ce,Ee;const u=(t,e,n,r)=>{const o=(Array.isArray(r)?r[0]:r)||"default",c=e||!n?t:t+"@"+n,a={canonical:o+":"+c};return o==="default"&&(a.aliases=[c]),a},h=(t,e)=>{const n=t[e.canonical];if(n!==void 0)return n;const r=e.aliases||[];for(const i of r){if(!Object.prototype.hasOwnProperty.call(t,i))continue;const o=t[i];if(o!==void 0)return t[e.canonical]=o,o}},C=Symbol.for("module-federation.shared-cache-listeners"),p=Symbol.for("module-federation.shared-cache-owners"),L=t=>{let e=t[p];return e===void 0&&(e=Object.create(null),Object.defineProperty(t,p,{value:e,enumerable:!1,configurable:!1,writable:!1})),e},P=(t,e)=>{var n;return(n=t[p])==null?void 0:n[e.canonical]},E=(t,e,n,r)=>{var a;t[e.canonical]=n;const i=e.aliases||[];for(const l of i)Object.defineProperty(t,l,{value:n,enumerable:!0,configurable:!0,writable:!0});const o=t[p];r===void 0?o&&delete o[e.canonical]:L(t)[e.canonical]=r;const c=(a=t[C])==null?void 0:a[e.canonical];if(c)for(const l of c)l(n);return n},x=Symbol.for("module-federation.tree-shaking-shared-cache"),K=t=>{let e=t[x];return e===void 0&&(e=Object.create(null),Object.defineProperty(t,x,{value:e,enumerable:!1,configurable:!1,writable:!1})),e},he=(t,e,n,r)=>{if(!Array.isArray(n))return r;const i=[...new Set(n)].sort(),o=K(t),c=o[e.canonical]||=[],a=c.find(l=>l.providedExports.length===i.length&&l.providedExports.every((y,m)=>y===i[m]));return a?a.value=r:c.push({providedExports:i,value:r}),r},V=Symbol.for("module-federation.tree-shaking-shared-selection-cache"),ge=t=>{let e=t[V];return e===void 0&&(e=Object.create(null),Object.defineProperty(t,V,{value:e,enumerable:!1,configurable:!1,writable:!1})),e},B=(t,e,n)=>{var i,o;const r=h(t,e);return r!==void 0?r:(o=(i=t[V])==null?void 0:i[e.canonical])==null?void 0:o[n]},J=(t,e,n,r)=>{const i=ge(t),o=i[e.canonical]||=Object.create(null);return o[n]=r,r},W=((we=globalThis.__FEDERATION__)==null?void 0:we.__INSTANCES__)||[],N=(je=f.find(t=>t==null?void 0:t.from))==null?void 0:je.from,q=W.find(t=>{var e,n;return((e=t==null?void 0:t.options)==null?void 0:e.name)===N&&((n=t==null?void 0:t.shareScopeMap)==null?void 0:n.default)===s})||W.find(t=>{var e,n;return((e=t==null?void 0:t.options)==null?void 0:e.name)!==D&&((n=t==null?void 0:t.shareScopeMap)==null?void 0:n.default)===s}),M=Object.create(null),Ae=t=>{const e=Object.create(null);for(const[n,r]of Object.entries(t||{}))e[n]=Object.assign(Object.create(null),r);return e},De=(t,e)=>{const n=!q&&Object.values(e||{}).some(i=>Object.values(i||{}).some(Q)),r=n?Ae(e):e;return M[t]={host:e,runtime:r,isWebpackScope:n},r},ze=()=>{const t=Object.values(M).filter(({isWebpackScope:e})=>e);if(t.length!==0)for(const{host:e,runtime:n}of t)for(const[r,i]of Object.entries(e||{})){const o=n[r]||=Object.create(null);for(const[c,a]of Object.entries(i||{}))o[c]=a}},k=Object.create(null);for(const[t,e]of Object.entries(s)){const n=k[t]=Object.create(null);for(const[r,i]of Object.entries(e))n[r]=Object.assign({},i)}const{usedShared:I,usedRemotes:ke}=await yt();function Q(t){if(typeof(t==null?void 0:t.get)!="function")return!1;const e=Function.prototype.toString.call(t.get);return e.includes("__webpack_require__")||/\.\s*e\s*\([^)]*\)\s*\.then\s*\(/.test(e)}const Ke=Object.values(k).some(t=>Object.values(t||{}).some(Q)),Be=t=>{const e=t.split("/");return t.startsWith("@")?e.slice(0,2).join("/"):e[0]},re=(t,e,n)=>{if(typeof U!="function")return;const r=Be(t),i=r===t?[[t,e]]:[[t,e],[r,I[r]]];for(const[o,c]of i){if(!c)continue;const a=n?o===t?n:k[o]:s[o],l=U(a,o,c,"version-first");if(l&&Q(l)&&!l.lib&&!l.loaded)return l}};var X=Te[Fe];if(X||(X=Te[Fe]={from:D}),f.indexOf(X)>=0)return;f.push(X);const be=t=>{let e=t;for(let n=0;n<5;n++){const r=e==null?void 0:e.default;if(!r||typeof r!="object"||Object.keys(r).length===0)break;const i=Object.keys(e).filter(o=>o!=="default").map(o=>e[o]);if(i.length>0&&i.some(o=>o!==void 0))break;e=r}return e},Ge=[],Ve=typeof globalThis.window>"u"?await Promise.all([]):[],oe="__mf_vite_runtime_share_load_id__";let We=0;const ie=new Map,se=new Map,H=lt({name:D,remotes:ke,shared:I,plugins:[He(),Ue(),...Ge,...Ve],shareStrategy:"version-first"});H.initShareScopeMap("default",De("default",s));function He(){return{name:"vite-share-pin-lifecycle-plugin",resolveShare(t){var i;const e=(i=t.shareInfo)==null?void 0:i[oe],n=e===void 0?void 0:se.get(e);if(!n)return t;const r=t.resolver;return t.resolver=(...o)=>(n.pinned.reapply(),r(...o)),n.pinned.reveal(),t}}}function Ue(){return{name:"vite-real-name-snapshot-plugin",afterLoadSnapshot(t){const e=t&&t.remoteSnapshot,n=e&&e.globalName,r=e&&e.version;if(!n||!r||!e.remoteEntry)return t;const i=globalThis.__FEDERATION__&&globalThis.__FEDERATION__.moduleInfo,o=n+":"+r;return i&&!i[o]&&(i[o]=e),t}}}const qe=H.sharedHandler.hooks.lifecycle.resolveShare,Y=new WeakMap;qe.on(t=>{var i;const e=(i=t.shareInfo)==null?void 0:i[oe],n=t.resolver;if(typeof n!="function")return t;const r=(...o)=>{const c=n(...o),a=c==null?void 0:c.shared;return a&&(typeof a=="object"||typeof a=="function")&&!Y.has(a)&&Y.set(a,{from:a.from}),e!==void 0&&a&&ie.set(e,a),c};return t.resolver=r,t});const Me=(t,e,n,r)=>{if(!t||t[e]!==n)return;const i=Object.assign({},r,{version:r.version??e,scope:r.scope??(n==null?void 0:n.scope)??["default"],strategy:"loaded-first"}),o=r.from;t[e]=i;const c=()=>n===void 0?t[e]===void 0:t[e]===n;return{provider:i,reveal(){return t[e]!==i?!1:(n===void 0?delete t[e]:t[e]=n,!0)},reapply(){return c()?(t[e]=i,!0):!1},release(a,l=!0){return r.from=o,t[e]!==i?!l&&c():l?a?(i.from=o,a&&i.lib&&(i.loaded=!0),r.strategy===void 0?delete i.strategy:i.strategy=r.strategy,!0):(n===void 0?delete t[e]:t[e]=n,!1):(n===void 0?delete t[e]:t[e]=n,!0)}}},Je=t=>Object.entries(t||{}).map(([e,n])=>({provider:n,version:e,from:n.from,registered:!0})),Qe=(t,e)=>{if(e===void 0)return;let n;for(const r of t){const i=r.provider,o=i.treeShaking||i;if(!(r.loadedFactory!==e&&i.lib!==e&&o.lib!==e)){if(n)return;n=r}}return n},Xe=async(t,e,n)=>{const r=++We;se.set(r,{pinned:n});try{const i=await H.loadShare(t,{customShareInfo:{shareConfig:e,[oe]:r}});return{factory:i===!1?void 0:i,selectedProvider:ie.get(r)}}finally{ie.delete(r),se.delete(r)}},ye=async(t,e,n,r,i,o,c=!0)=>{const a=o.from,l=Me(n,r,i,o);if(!l)return;let y;try{y=await Xe(t,e,l)}catch(j){throw l.release(!1),j}const m=y==null?void 0:y.factory;if(m===void 0){l.release(!1);return}const _=Je(n),g=l.provider.treeShaking||l.provider,R=l.provider.lib===m||g.lib===m;if(!c&&R){const j=_.findIndex(v=>v.provider===l.provider);j!==-1&&_.splice(j,1)}!c&&!_.some(j=>j.provider===o)&&_.push({provider:o,version:r,from:a,registered:!1,loadedFactory:R?m:void 0});const O=!c&&y.selectedProvider===l.provider&&R?o:y.selectedProvider;if(O&&!_.some(j=>j.provider===O)){const j=Y.get(O),v=typeof O.version=="string"&&O.version?O.version:r;_.push({provider:O,version:v,from:j?j.from:O.from,registered:(n==null?void 0:n[v])===O,loadedFactory:m})}const b=_.find(j=>j.provider===O)??Qe(_,m);if(!l.release(!0,(b==null?void 0:b.provider)===l.provider)||!b)return;const S=Y.get(b.provider);b.from=b.provider===o?a:S?S.from:b.provider.from,S&&(b.provider.from=S.from);const A=typeof m=="function"?m():m,w=await Promise.resolve(A);if(!(b.registered&&(n==null?void 0:n[b.version])!==b.provider))return{provider:b.provider,selection:b,resolved:w}},fe=new Set,ae=new Map,Ye=async(t,e,n)=>{var i;const r=!!((i=e.shareConfig)!=null&&i.singleton);if(!r&&e.canLiveRebind!==!1)try{const o=U(n,t,e,"version-first"),c=le(n,o);if(!c)return;const{version:a}=c;if(!r&&a!==e.version||!o.lib&&!o.loading&&!(o.loaded&&typeof o.get=="function"))return;const l=u(t,r,e.version,e.scope);if(h(d.share,l)!==void 0)return;const y=s[t],m=y==null?void 0:y[a];if(c.registered&&!z(m,o))return;let _,g=o.lib;if(!g&&Q(o)||(!g&&o.loading&&(g=await o.loading),!g&&o.loaded&&typeof o.get=="function"&&(g=await o.get()),!g))return;const R=typeof g=="function"?g():g,O=await Promise.resolve(R),b=c.registered?m:o;_={provider:b,selection:{provider:b,version:a,from:o.from,registered:c.registered},resolved:O};const T=_==null?void 0:_.provider,S=_==null?void 0:_.selection;if(!S)return;const A=_==null?void 0:_.resolved;if(A===void 0||h(d.share,l)!==void 0||S.registered&&(y==null?void 0:y[S.version])!==T)return;E(d.share,l,be(A),S.from),fe.add(T)}catch(o){console.error('[Module Federation] Failed to bridge materialized shared module "'+t+'"',o)}},Se=async(t,e,n,r,i)=>{var o,c;try{const a=u(t,(o=e.shareConfig)==null?void 0:o.singleton,e.version,e.scope),l=h(d.share,a),y=P(d.share,a),m=U(n,t,e,"version-first"),_=m||me(n,t,e,"version-first")||e,g=le(n,_);if(!g)return;const R=z(_,e),{version:O}=g;if(!((c=e.shareConfig)!=null&&c.singleton)&&O!==e.version)return;const b=r==null?void 0:r[O],T=bt(W,q,s,"default",t,g,m,b,"version-first");if(!T&&!R)return;const{provider:S,scopeRootProvider:A}=T||{provider:_,scopeRootProvider:void 0};if(e.canLiveRebind===!1||l!==void 0&&y!==D)return;const w=s[t],j=w==null?void 0:w[O];if(g.registered&&!A&&!z(j,S))return;const v=await ye(t,e.shareConfig,w,O,j,S,g.registered&&!R),G=v==null?void 0:v.provider,F=v==null?void 0:v.selection;if(!F||z(G,e)||i&&(i.version!==F.version||!z({from:F.from},i.provider))||fe.has(G))return;const Ie=v==null?void 0:v.resolved;if(Ie===void 0)return;const st=h(d.share,a),ft=P(d.share,a);if(st!==void 0&&ft!==D||F.registered&&(w==null?void 0:w[F.version])!==G)return;i||ae.set(t,{version:F.version,provider:{from:F.from}}),fe.add(G);const at=be(Ie);E(d.share,a,at,F.from)}catch(a){console.error('[Module Federation] Failed to bridge external shared module "'+t+'"',a)}};for(const t of ce)await Promise.all(t.map(async e=>{const n=I[e];!n||n.materialize===!1||n.treeShaking||await Ye(e,n,k[e])}));for(const[t,e]of Object.entries(I)){if(e.treeShaking)continue;const n=u(t,(Re=e.shareConfig)==null?void 0:Re.singleton,e.version,e.scope);if(h(d.share,n)!==void 0)continue;const r=u(t,!0,e.version,e.scope),i=h(d.share,r);i!==void 0&&E(d.share,n,i,P(d.share,r))}const Ze=["react"],$e=[["react"]],Z=Ze.filter(t=>{var e;return I[t]&&(I[t].materialize!==!1||((e=I[t].shareConfig)==null?void 0:e.import)===!1)});d.providerInit||=new Map;const et=(t,e)=>{const n=d.providerInit.get(t);if(n)return n;const r=Promise.resolve().then(e);return d.providerInit.set(t,r),r.catch(()=>d.providerInit.delete(t)),r};var ve=async t=>{const e=new Set(t);for(const n of $e)await Promise.all(n.filter(r=>e.has(r)).map(async r=>{var O,b;const i=I[r],o=u(r,(O=i.shareConfig)==null?void 0:O.singleton,i.version,i.scope);if(((b=i.shareConfig)==null?void 0:b.import)===!1||i.treeShaking||h(d.share,o)!==void 0)return;const c=u(r,!0,i.version,i.scope),a=h(d.share,c);if(a!==void 0){E(d.share,o,a,P(d.share,c));return}const l=typeof re=="function"?re(r,i):void 0;if(l&&!l.lib&&!l.loaded)return;const y=o.canonical,m=await et(y,async()=>{const T=await i.get(),S=typeof T=="function"?T():T;return Promise.resolve(S)}),g=(T=>{let S=T;for(let A=0;A<5;A++){const w=S==null?void 0:S.default;if(!w||typeof w!="object"||Object.keys(w).length===0)break;const j=Object.keys(S).filter(v=>v!=="default").map(v=>S[v]);if(j.length>0&&j.some(v=>v!==void 0))break;S=w}return S})(m),R=g===m?{...m}:g;R.__esModule!==!0&&Object.defineProperty(R,"__esModule",{value:!0,enumerable:!1}),E(d.share,o,R,D)}))};const pe=t=>{var r,i;const e=I[t];if(!e.treeShaking&&((r=e.shareConfig)==null?void 0:r.import)!==!1)return!1;const n=u(t,(i=e.shareConfig)==null?void 0:i.singleton,e.version,e.scope);return e.treeShaking?B(d.share,n,D)===void 0&&h(d.share,n)===void 0:h(d.share,n)===void 0},tt=t=>{var i,o;const e=I[t],n=u(t,(i=e.shareConfig)==null?void 0:i.singleton,e.version,e.scope);return(e.treeShaking?B(d.share,n,D)??h(d.share,n):h(d.share,n))!==void 0?!1:e.treeShaking||((o=e.shareConfig)==null?void 0:o.import)===!1?!0:typeof U!="function"?!1:!!U(k[t],t,e,"version-first")},$=Z.findIndex(tt),nt=$===-1?Z:Z.slice(0,$);var rt=$===-1?[]:Z.slice($);await ve(nt);try{await _e(async()=>{await Promise.all(await H.initializeSharing("default",{strategy:"version-first",from:"build",initScope:f}))})}catch(t){console.error("[Module Federation]",t)}ze();const Pe=async()=>{for(const t of ce)await Promise.all(t.map(async e=>{const n=I[e];!n||n.materialize===!1||n.treeShaking||await Se(e,n,s[e],k[e],void 0)}))};await Pe(),Ke&&(ue=Pe);try{const t=(Ce=globalThis.__FEDERATION__)==null?void 0:Ce.__SHARE__,e=Object.create(null);if(t)for(const[,n]of Object.entries(t))for(const r of mt){const i=n==null?void 0:n[r];if(i)for(const[o,c]of Object.entries(i)){const a=I==null?void 0:I[o],l=k[o],y=ae.get(o);if(!a||!l||!y||a.treeShaking)continue;const m=e[o]||(e[o]=Object.create(null));for(const[_,g]of Object.entries(c)){if(!g.lib||y.version!==_||!z(g,y.provider))continue;const R=l[_];(g===R||R!=null&&R.from&&g.from===R.from)&&(g===a||a.from&&g.from===a.from||m[_]===void 0&&(m[_]=g))}}}for(const n of ce)await Promise.all(n.map(async r=>{const i=e[r];i&&await Se(r,I[r],i,k[r],ae.get(r))}))}catch(t){console.error("[Module Federation] Failed to bridge external shared modules",t)}const ot=async()=>{},it=async(t,e)=>{var T,S;const n=u(t,(T=e.shareConfig)==null?void 0:T.singleton,e.version,e.scope),r=e.treeShaking?B(d.share,n,D):h(d.share,n);if(((S=e.shareConfig)==null?void 0:S.import)!==!1||r!==void 0||re(t,e,k[t]))return;const i=A=>{let w=A;for(let j=0;j<5;j++){const v=w==null?void 0:w.default;if(!v||typeof v!="object"||Object.keys(v).length===0)break;const G=Object.keys(w).filter(F=>F!=="default").map(F=>w[F]);if(G.length>0&&G.some(F=>F!==void 0))break;w=v}return w},o=s==null?void 0:s[t],c=me(o,t,e,"version-first")||e,a=le(o,c);if(!a)return;const{version:l}=a,y=o==null?void 0:o[l],m=await ye(t,e.shareConfig,o,l,y,c,a.registered&&!z(c,e)),_=m==null?void 0:m.selection,g=m==null?void 0:m.provider,R=m==null?void 0:m.resolved;if(!_||z(g,e)||R===void 0||(e.treeShaking?B(d.share,n,D):h(d.share,n))!==void 0||_.registered&&(o==null?void 0:o[_.version])!==g)return;const b=i(R);if(e.treeShaking){const A=e.treeShaking.providedExports??e.treeShaking.usedExports??[];he(d.share,n,A,b),J(d.share,n,D,b)}else E(d.share,n,b,_.from)},Oe=[];for(const t of rt){const e=I[t];if(pe(t))try{e.treeShaking?await ot(t,e):((Ee=e.shareConfig)==null?void 0:Ee.import)===!1&&await it(t,e)}catch(n){console.error(`[Module Federation] Failed to resolve runtime-only shared module "${t}"`,n);break}if(pe(t))break;Oe.push(t)}return await ve(Oe),ut(H),H}async function Ot(s){const f=await St();if(!(s in f))throw new Error(`[Module Federation] Module ${s} does not exist in container.`);return ue&&await ue(),d.pendingShareLoads&&await Promise.all(d.pendingShareLoads),f[s]().then(u=>()=>u)}export{Ot as get,Pt as init};
|
|
1
|
+
import{h as ct,i as lt}from"./assets/index-2HOz3j7B.js";const dt=ct.share;typeof __VUE_HMR_RUNTIME__>"u"&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});const xe="__mf_init__virtual:mf:__mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1__mf_v__runtimeInit__mf_v__.js__";let de=globalThis[xe];if(!de){let s,f;const u=new Promise((h,C)=>{s=h,f=C});de=globalThis[xe]={initPromise:u,initResolve:s,initReject:f}}const ut=de.initResolve,ne="__mf_module_cache__";globalThis[ne]||={share:{},remote:{}};globalThis[ne].share||={};globalThis[ne].remote||={};const d=globalThis[ne];for(const s of Object.keys(d.share))if(s.startsWith("default:")){const f=s.slice(8);d.share[f]===void 0&&(d.share[f]=d.share[s])}else if(!s.includes(":")){const f="default:"+s;d.share[f]===void 0&&(d.share[f]=d.share[s])}const Te={},mt=Array.isArray("default")?"default":["default"],Fe="default",D="ShoppingRouteShoppingListSet",ce=[["react"]];let ee,te,ue;async function _e(s){for(let f=0;;f++)try{return await s()}catch(u){throw u}}const Ne=Symbol("mf.originalSharedProvider"),_t={emit:s=>s},ht=(s,f)=>{if(f!=="version-first")return s;const u={};for(const[h,C]of Object.entries(s))u[h]=Object.assign({},C,{[Ne]:C});return u},le=(s,f)=>{if(!f)return;const u=Object.entries(s||{}),h=u.find(([,p])=>p===f);if(h)return{version:h[0],provider:f,registered:!0};if(typeof f.version=="string"&&f.version)return{version:f.version,provider:f,registered:!1};const C=u.filter(([,p])=>p===f||!!(f.from&&(p==null?void 0:p.from)===f.from));if(C.length===1)return{version:C[0][0],provider:f,registered:!1}},me=(s,f,u,h)=>{var E;if(!s||!u)return;const C=Array.isArray(u.scope)?u.scope:[u.scope||"default"],p=ht(s,h),L={};for(const x of C)L[x||"default"]={[f]:p};const P=(E=dt.getRegisteredShare(L,f,{...u,scope:C,strategy:h},_t))==null?void 0:E.shared;return(P==null?void 0:P[Ne])||P},U=(s,f,u,h)=>{var P;const C=E=>z(E,u),p=Object.fromEntries(Object.entries(s||{}).filter(([,E])=>{var x;return!C(E)&&((x=E==null?void 0:E.shareConfig)==null?void 0:x.import)!==!1}));u!=null&&u.version&&((P=u.shareConfig)==null?void 0:P.import)!==!1&&(p[u.version]||(p[u.version]=u));const L=me(p,f,u,h);return C(L)?void 0:L},z=(s,f)=>s===f||!!(f!=null&&f.from&&(s==null?void 0:s.from)===f.from),gt=(s,f,u,h,C,p,L,P,E)=>{var B,J,W;if(!P)return;const x=(J=(B=f==null?void 0:f.options)==null?void 0:B.shared)==null?void 0:J[C],K=Array.isArray(x)?x.find(N=>(N==null?void 0:N.version)===p):void 0,V=((P==null?void 0:P.from)===((W=f==null?void 0:f.options)==null?void 0:W.name)?P:void 0)||(z(K,P)?K:f?void 0:P);return V&&s.some(N=>{var q,M;return N!==f&&((q=N==null?void 0:N.options)==null?void 0:q.name)===(L==null?void 0:L.from)&&((M=N==null?void 0:N.shareScopeMap)==null?void 0:M[h])===u})?V:void 0},bt=(s,f,u,h,C,p,L,P,E)=>{const x=p.registered?gt(s,f,u,h,C,p.version,p.provider,P):void 0,K=x||L;if(K&&!(p.registered&&!z(K,P)))return{provider:K,scopeRootProvider:x}};async function yt(){return ee||(ee=_e(()=>import("./assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1-BkReJy06.js")).catch(s=>{throw ee=void 0,s})),ee}async function St(){return te||(te=_e(()=>import("./assets/virtualExposes-B87M9RDc.js")).then(s=>s.default??s).catch(s=>{throw te=void 0,s})),te}async function Pt(s={},f=[]){var we,je,Re,Ce,Ee;const u=(t,e,n,r)=>{const o=(Array.isArray(r)?r[0]:r)||"default",c=e||!n?t:t+"@"+n,a={canonical:o+":"+c};return o==="default"&&(a.aliases=[c]),a},h=(t,e)=>{const n=t[e.canonical];if(n!==void 0)return n;const r=e.aliases||[];for(const i of r){if(!Object.prototype.hasOwnProperty.call(t,i))continue;const o=t[i];if(o!==void 0)return t[e.canonical]=o,o}},C=Symbol.for("module-federation.shared-cache-listeners"),p=Symbol.for("module-federation.shared-cache-owners"),L=t=>{let e=t[p];return e===void 0&&(e=Object.create(null),Object.defineProperty(t,p,{value:e,enumerable:!1,configurable:!1,writable:!1})),e},P=(t,e)=>{var n;return(n=t[p])==null?void 0:n[e.canonical]},E=(t,e,n,r)=>{var a;t[e.canonical]=n;const i=e.aliases||[];for(const l of i)Object.defineProperty(t,l,{value:n,enumerable:!0,configurable:!0,writable:!0});const o=t[p];r===void 0?o&&delete o[e.canonical]:L(t)[e.canonical]=r;const c=(a=t[C])==null?void 0:a[e.canonical];if(c)for(const l of c)l(n);return n},x=Symbol.for("module-federation.tree-shaking-shared-cache"),K=t=>{let e=t[x];return e===void 0&&(e=Object.create(null),Object.defineProperty(t,x,{value:e,enumerable:!1,configurable:!1,writable:!1})),e},he=(t,e,n,r)=>{if(!Array.isArray(n))return r;const i=[...new Set(n)].sort(),o=K(t),c=o[e.canonical]||=[],a=c.find(l=>l.providedExports.length===i.length&&l.providedExports.every((y,m)=>y===i[m]));return a?a.value=r:c.push({providedExports:i,value:r}),r},V=Symbol.for("module-federation.tree-shaking-shared-selection-cache"),ge=t=>{let e=t[V];return e===void 0&&(e=Object.create(null),Object.defineProperty(t,V,{value:e,enumerable:!1,configurable:!1,writable:!1})),e},B=(t,e,n)=>{var i,o;const r=h(t,e);return r!==void 0?r:(o=(i=t[V])==null?void 0:i[e.canonical])==null?void 0:o[n]},J=(t,e,n,r)=>{const i=ge(t),o=i[e.canonical]||=Object.create(null);return o[n]=r,r},W=((we=globalThis.__FEDERATION__)==null?void 0:we.__INSTANCES__)||[],N=(je=f.find(t=>t==null?void 0:t.from))==null?void 0:je.from,q=W.find(t=>{var e,n;return((e=t==null?void 0:t.options)==null?void 0:e.name)===N&&((n=t==null?void 0:t.shareScopeMap)==null?void 0:n.default)===s})||W.find(t=>{var e,n;return((e=t==null?void 0:t.options)==null?void 0:e.name)!==D&&((n=t==null?void 0:t.shareScopeMap)==null?void 0:n.default)===s}),M=Object.create(null),Ae=t=>{const e=Object.create(null);for(const[n,r]of Object.entries(t||{}))e[n]=Object.assign(Object.create(null),r);return e},De=(t,e)=>{const n=!q&&Object.values(e||{}).some(i=>Object.values(i||{}).some(Q)),r=n?Ae(e):e;return M[t]={host:e,runtime:r,isWebpackScope:n},r},ze=()=>{const t=Object.values(M).filter(({isWebpackScope:e})=>e);if(t.length!==0)for(const{host:e,runtime:n}of t)for(const[r,i]of Object.entries(e||{})){const o=n[r]||=Object.create(null);for(const[c,a]of Object.entries(i||{}))o[c]=a}},k=Object.create(null);for(const[t,e]of Object.entries(s)){const n=k[t]=Object.create(null);for(const[r,i]of Object.entries(e))n[r]=Object.assign({},i)}const{usedShared:I,usedRemotes:ke}=await yt();function Q(t){if(typeof(t==null?void 0:t.get)!="function")return!1;const e=Function.prototype.toString.call(t.get);return e.includes("__webpack_require__")||/\.\s*e\s*\([^)]*\)\s*\.then\s*\(/.test(e)}const Ke=Object.values(k).some(t=>Object.values(t||{}).some(Q)),Be=t=>{const e=t.split("/");return t.startsWith("@")?e.slice(0,2).join("/"):e[0]},re=(t,e,n)=>{if(typeof U!="function")return;const r=Be(t),i=r===t?[[t,e]]:[[t,e],[r,I[r]]];for(const[o,c]of i){if(!c)continue;const a=n?o===t?n:k[o]:s[o],l=U(a,o,c,"version-first");if(l&&Q(l)&&!l.lib&&!l.loaded)return l}};var X=Te[Fe];if(X||(X=Te[Fe]={from:D}),f.indexOf(X)>=0)return;f.push(X);const be=t=>{let e=t;for(let n=0;n<5;n++){const r=e==null?void 0:e.default;if(!r||typeof r!="object"||Object.keys(r).length===0)break;const i=Object.keys(e).filter(o=>o!=="default").map(o=>e[o]);if(i.length>0&&i.some(o=>o!==void 0))break;e=r}return e},Ge=[],Ve=typeof globalThis.window>"u"?await Promise.all([]):[],oe="__mf_vite_runtime_share_load_id__";let We=0;const ie=new Map,se=new Map,H=lt({name:D,remotes:ke,shared:I,plugins:[He(),Ue(),...Ge,...Ve],shareStrategy:"version-first"});H.initShareScopeMap("default",De("default",s));function He(){return{name:"vite-share-pin-lifecycle-plugin",resolveShare(t){var i;const e=(i=t.shareInfo)==null?void 0:i[oe],n=e===void 0?void 0:se.get(e);if(!n)return t;const r=t.resolver;return t.resolver=(...o)=>(n.pinned.reapply(),r(...o)),n.pinned.reveal(),t}}}function Ue(){return{name:"vite-real-name-snapshot-plugin",afterLoadSnapshot(t){const e=t&&t.remoteSnapshot,n=e&&e.globalName,r=e&&e.version;if(!n||!r||!e.remoteEntry)return t;const i=globalThis.__FEDERATION__&&globalThis.__FEDERATION__.moduleInfo,o=n+":"+r;return i&&!i[o]&&(i[o]=e),t}}}const qe=H.sharedHandler.hooks.lifecycle.resolveShare,Y=new WeakMap;qe.on(t=>{var i;const e=(i=t.shareInfo)==null?void 0:i[oe],n=t.resolver;if(typeof n!="function")return t;const r=(...o)=>{const c=n(...o),a=c==null?void 0:c.shared;return a&&(typeof a=="object"||typeof a=="function")&&!Y.has(a)&&Y.set(a,{from:a.from}),e!==void 0&&a&&ie.set(e,a),c};return t.resolver=r,t});const Me=(t,e,n,r)=>{if(!t||t[e]!==n)return;const i=Object.assign({},r,{version:r.version??e,scope:r.scope??(n==null?void 0:n.scope)??["default"],strategy:"loaded-first"}),o=r.from;t[e]=i;const c=()=>n===void 0?t[e]===void 0:t[e]===n;return{provider:i,reveal(){return t[e]!==i?!1:(n===void 0?delete t[e]:t[e]=n,!0)},reapply(){return c()?(t[e]=i,!0):!1},release(a,l=!0){return r.from=o,t[e]!==i?!l&&c():l?a?(i.from=o,a&&i.lib&&(i.loaded=!0),r.strategy===void 0?delete i.strategy:i.strategy=r.strategy,!0):(n===void 0?delete t[e]:t[e]=n,!1):(n===void 0?delete t[e]:t[e]=n,!0)}}},Je=t=>Object.entries(t||{}).map(([e,n])=>({provider:n,version:e,from:n.from,registered:!0})),Qe=(t,e)=>{if(e===void 0)return;let n;for(const r of t){const i=r.provider,o=i.treeShaking||i;if(!(r.loadedFactory!==e&&i.lib!==e&&o.lib!==e)){if(n)return;n=r}}return n},Xe=async(t,e,n)=>{const r=++We;se.set(r,{pinned:n});try{const i=await H.loadShare(t,{customShareInfo:{shareConfig:e,[oe]:r}});return{factory:i===!1?void 0:i,selectedProvider:ie.get(r)}}finally{ie.delete(r),se.delete(r)}},ye=async(t,e,n,r,i,o,c=!0)=>{const a=o.from,l=Me(n,r,i,o);if(!l)return;let y;try{y=await Xe(t,e,l)}catch(j){throw l.release(!1),j}const m=y==null?void 0:y.factory;if(m===void 0){l.release(!1);return}const _=Je(n),g=l.provider.treeShaking||l.provider,R=l.provider.lib===m||g.lib===m;if(!c&&R){const j=_.findIndex(v=>v.provider===l.provider);j!==-1&&_.splice(j,1)}!c&&!_.some(j=>j.provider===o)&&_.push({provider:o,version:r,from:a,registered:!1,loadedFactory:R?m:void 0});const O=!c&&y.selectedProvider===l.provider&&R?o:y.selectedProvider;if(O&&!_.some(j=>j.provider===O)){const j=Y.get(O),v=typeof O.version=="string"&&O.version?O.version:r;_.push({provider:O,version:v,from:j?j.from:O.from,registered:(n==null?void 0:n[v])===O,loadedFactory:m})}const b=_.find(j=>j.provider===O)??Qe(_,m);if(!l.release(!0,(b==null?void 0:b.provider)===l.provider)||!b)return;const S=Y.get(b.provider);b.from=b.provider===o?a:S?S.from:b.provider.from,S&&(b.provider.from=S.from);const A=typeof m=="function"?m():m,w=await Promise.resolve(A);if(!(b.registered&&(n==null?void 0:n[b.version])!==b.provider))return{provider:b.provider,selection:b,resolved:w}},fe=new Set,ae=new Map,Ye=async(t,e,n)=>{var i;const r=!!((i=e.shareConfig)!=null&&i.singleton);if(!r&&e.canLiveRebind!==!1)try{const o=U(n,t,e,"version-first"),c=le(n,o);if(!c)return;const{version:a}=c;if(!r&&a!==e.version||!o.lib&&!o.loading&&!(o.loaded&&typeof o.get=="function"))return;const l=u(t,r,e.version,e.scope);if(h(d.share,l)!==void 0)return;const y=s[t],m=y==null?void 0:y[a];if(c.registered&&!z(m,o))return;let _,g=o.lib;if(!g&&Q(o)||(!g&&o.loading&&(g=await o.loading),!g&&o.loaded&&typeof o.get=="function"&&(g=await o.get()),!g))return;const R=typeof g=="function"?g():g,O=await Promise.resolve(R),b=c.registered?m:o;_={provider:b,selection:{provider:b,version:a,from:o.from,registered:c.registered},resolved:O};const T=_==null?void 0:_.provider,S=_==null?void 0:_.selection;if(!S)return;const A=_==null?void 0:_.resolved;if(A===void 0||h(d.share,l)!==void 0||S.registered&&(y==null?void 0:y[S.version])!==T)return;E(d.share,l,be(A),S.from),fe.add(T)}catch(o){console.error('[Module Federation] Failed to bridge materialized shared module "'+t+'"',o)}},Se=async(t,e,n,r,i)=>{var o,c;try{const a=u(t,(o=e.shareConfig)==null?void 0:o.singleton,e.version,e.scope),l=h(d.share,a),y=P(d.share,a),m=U(n,t,e,"version-first"),_=m||me(n,t,e,"version-first")||e,g=le(n,_);if(!g)return;const R=z(_,e),{version:O}=g;if(!((c=e.shareConfig)!=null&&c.singleton)&&O!==e.version)return;const b=r==null?void 0:r[O],T=bt(W,q,s,"default",t,g,m,b,"version-first");if(!T&&!R)return;const{provider:S,scopeRootProvider:A}=T||{provider:_,scopeRootProvider:void 0};if(e.canLiveRebind===!1||l!==void 0&&y!==D)return;const w=s[t],j=w==null?void 0:w[O];if(g.registered&&!A&&!z(j,S))return;const v=await ye(t,e.shareConfig,w,O,j,S,g.registered&&!R),G=v==null?void 0:v.provider,F=v==null?void 0:v.selection;if(!F||z(G,e)||i&&(i.version!==F.version||!z({from:F.from},i.provider))||fe.has(G))return;const Ie=v==null?void 0:v.resolved;if(Ie===void 0)return;const st=h(d.share,a),ft=P(d.share,a);if(st!==void 0&&ft!==D||F.registered&&(w==null?void 0:w[F.version])!==G)return;i||ae.set(t,{version:F.version,provider:{from:F.from}}),fe.add(G);const at=be(Ie);E(d.share,a,at,F.from)}catch(a){console.error('[Module Federation] Failed to bridge external shared module "'+t+'"',a)}};for(const t of ce)await Promise.all(t.map(async e=>{const n=I[e];!n||n.materialize===!1||n.treeShaking||await Ye(e,n,k[e])}));for(const[t,e]of Object.entries(I)){if(e.treeShaking)continue;const n=u(t,(Re=e.shareConfig)==null?void 0:Re.singleton,e.version,e.scope);if(h(d.share,n)!==void 0)continue;const r=u(t,!0,e.version,e.scope),i=h(d.share,r);i!==void 0&&E(d.share,n,i,P(d.share,r))}const Ze=["react"],$e=[["react"]],Z=Ze.filter(t=>{var e;return I[t]&&(I[t].materialize!==!1||((e=I[t].shareConfig)==null?void 0:e.import)===!1)});d.providerInit||=new Map;const et=(t,e)=>{const n=d.providerInit.get(t);if(n)return n;const r=Promise.resolve().then(e);return d.providerInit.set(t,r),r.catch(()=>d.providerInit.delete(t)),r};var ve=async t=>{const e=new Set(t);for(const n of $e)await Promise.all(n.filter(r=>e.has(r)).map(async r=>{var O,b;const i=I[r],o=u(r,(O=i.shareConfig)==null?void 0:O.singleton,i.version,i.scope);if(((b=i.shareConfig)==null?void 0:b.import)===!1||i.treeShaking||h(d.share,o)!==void 0)return;const c=u(r,!0,i.version,i.scope),a=h(d.share,c);if(a!==void 0){E(d.share,o,a,P(d.share,c));return}const l=typeof re=="function"?re(r,i):void 0;if(l&&!l.lib&&!l.loaded)return;const y=o.canonical,m=await et(y,async()=>{const T=await i.get(),S=typeof T=="function"?T():T;return Promise.resolve(S)}),g=(T=>{let S=T;for(let A=0;A<5;A++){const w=S==null?void 0:S.default;if(!w||typeof w!="object"||Object.keys(w).length===0)break;const j=Object.keys(S).filter(v=>v!=="default").map(v=>S[v]);if(j.length>0&&j.some(v=>v!==void 0))break;S=w}return S})(m),R=g===m?{...m}:g;R.__esModule!==!0&&Object.defineProperty(R,"__esModule",{value:!0,enumerable:!1}),E(d.share,o,R,D)}))};const pe=t=>{var r,i;const e=I[t];if(!e.treeShaking&&((r=e.shareConfig)==null?void 0:r.import)!==!1)return!1;const n=u(t,(i=e.shareConfig)==null?void 0:i.singleton,e.version,e.scope);return e.treeShaking?B(d.share,n,D)===void 0&&h(d.share,n)===void 0:h(d.share,n)===void 0},tt=t=>{var i,o;const e=I[t],n=u(t,(i=e.shareConfig)==null?void 0:i.singleton,e.version,e.scope);return(e.treeShaking?B(d.share,n,D)??h(d.share,n):h(d.share,n))!==void 0?!1:e.treeShaking||((o=e.shareConfig)==null?void 0:o.import)===!1?!0:typeof U!="function"?!1:!!U(k[t],t,e,"version-first")},$=Z.findIndex(tt),nt=$===-1?Z:Z.slice(0,$);var rt=$===-1?[]:Z.slice($);await ve(nt);try{await _e(async()=>{await Promise.all(await H.initializeSharing("default",{strategy:"version-first",from:"build",initScope:f}))})}catch(t){console.error("[Module Federation]",t)}ze();const Pe=async()=>{for(const t of ce)await Promise.all(t.map(async e=>{const n=I[e];!n||n.materialize===!1||n.treeShaking||await Se(e,n,s[e],k[e],void 0)}))};await Pe(),Ke&&(ue=Pe);try{const t=(Ce=globalThis.__FEDERATION__)==null?void 0:Ce.__SHARE__,e=Object.create(null);if(t)for(const[,n]of Object.entries(t))for(const r of mt){const i=n==null?void 0:n[r];if(i)for(const[o,c]of Object.entries(i)){const a=I==null?void 0:I[o],l=k[o],y=ae.get(o);if(!a||!l||!y||a.treeShaking)continue;const m=e[o]||(e[o]=Object.create(null));for(const[_,g]of Object.entries(c)){if(!g.lib||y.version!==_||!z(g,y.provider))continue;const R=l[_];(g===R||R!=null&&R.from&&g.from===R.from)&&(g===a||a.from&&g.from===a.from||m[_]===void 0&&(m[_]=g))}}}for(const n of ce)await Promise.all(n.map(async r=>{const i=e[r];i&&await Se(r,I[r],i,k[r],ae.get(r))}))}catch(t){console.error("[Module Federation] Failed to bridge external shared modules",t)}const ot=async()=>{},it=async(t,e)=>{var T,S;const n=u(t,(T=e.shareConfig)==null?void 0:T.singleton,e.version,e.scope),r=e.treeShaking?B(d.share,n,D):h(d.share,n);if(((S=e.shareConfig)==null?void 0:S.import)!==!1||r!==void 0||re(t,e,k[t]))return;const i=A=>{let w=A;for(let j=0;j<5;j++){const v=w==null?void 0:w.default;if(!v||typeof v!="object"||Object.keys(v).length===0)break;const G=Object.keys(w).filter(F=>F!=="default").map(F=>w[F]);if(G.length>0&&G.some(F=>F!==void 0))break;w=v}return w},o=s==null?void 0:s[t],c=me(o,t,e,"version-first")||e,a=le(o,c);if(!a)return;const{version:l}=a,y=o==null?void 0:o[l],m=await ye(t,e.shareConfig,o,l,y,c,a.registered&&!z(c,e)),_=m==null?void 0:m.selection,g=m==null?void 0:m.provider,R=m==null?void 0:m.resolved;if(!_||z(g,e)||R===void 0||(e.treeShaking?B(d.share,n,D):h(d.share,n))!==void 0||_.registered&&(o==null?void 0:o[_.version])!==g)return;const b=i(R);if(e.treeShaking){const A=e.treeShaking.providedExports??e.treeShaking.usedExports??[];he(d.share,n,A,b),J(d.share,n,D,b)}else E(d.share,n,b,_.from)},Oe=[];for(const t of rt){const e=I[t];if(pe(t))try{e.treeShaking?await ot(t,e):((Ee=e.shareConfig)==null?void 0:Ee.import)===!1&&await it(t,e)}catch(n){console.error(`[Module Federation] Failed to resolve runtime-only shared module "${t}"`,n);break}if(pe(t))break;Oe.push(t)}return await ve(Oe),ut(H),H}async function Ot(s){const f=await St();if(!(s in f))throw new Error(`[Module Federation] Module ${s} does not exist in container.`);return ue&&await ue(),d.pendingShareLoads&&await Promise.all(d.pendingShareLoads),f[s]().then(u=>()=>u)}export{Ot as get,Pt as init};
|
|
2
2
|
|
|
3
3
|
if (typeof document !== 'undefined' && document.head) {
|
|
4
4
|
try {
|
|
5
|
-
for (const __mfWarmupPath of ["assets/virtualExposes-
|
|
5
|
+
for (const __mfWarmupPath of ["assets/virtualExposes-B87M9RDc.js","assets/_virtual_mf-localSharedImportMap___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1-BkReJy06.js","assets/vite-preload-helper-Dp1pzeXC.js","assets/index-2HOz3j7B.js"]) {
|
|
6
6
|
const __mfWarmupLink = document.createElement('link');
|
|
7
7
|
__mfWarmupLink.rel = 'modulepreload';
|
|
8
8
|
__mfWarmupLink.crossOrigin = '';
|
package/admin/i18n/de.json
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"ui.items.productstab.items.products.items.3.title": "Standardmarkt",
|
|
50
50
|
"ui.items.productstab.items.products.items.4.title": "Verfügbare Märkte",
|
|
51
51
|
"ui.items.reviewtab.label": "Prüfliste",
|
|
52
|
-
"ui.items.reviewtab.items.reviewhelp.text": "Im Prüfmodus erscheinen unbekannte Artikel hier. Artikelname, Produktgruppe, Standardmarkt oder Aliase korrigieren
|
|
52
|
+
"ui.items.reviewtab.items.reviewhelp.text": "Im Prüfmodus erscheinen unbekannte Artikel hier. Artikelname, Produktgruppe, Standardmarkt, verfügbare Märkte oder Aliase korrigieren. Übernehmen verschiebt den Artikel sofort in den Artikelstamm und entfernt die Prüfzeile im Entwurf. Danach normal speichern; Verwerfen macht ungespeicherte Änderungen rückgängig.",
|
|
53
53
|
"ui.items.reviewtab.items.reviewitems.label": "Unbekannte Artikel prüfen",
|
|
54
54
|
"ui.items.reviewtab.items.reviewitems.items.1.title": "Alexa-Text",
|
|
55
55
|
"ui.items.reviewtab.items.reviewitems.items.5.title": "Aktion",
|
package/admin/i18n/en.json
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"ui.items.productstab.items.products.items.3.title": "Default market",
|
|
50
50
|
"ui.items.productstab.items.products.items.4.title": "Available markets",
|
|
51
51
|
"ui.items.reviewtab.label": "Review",
|
|
52
|
-
"ui.items.reviewtab.items.reviewhelp.text": "Unknown products appear here in review mode. Correct product, product group, default market or aliases
|
|
52
|
+
"ui.items.reviewtab.items.reviewhelp.text": "Unknown products appear here in review mode. Correct the product, product group, default market, available markets or aliases. Accept immediately moves the product into the catalogue and removes its review row in the draft. Then save normally; discarding undoes unsaved changes.",
|
|
53
53
|
"ui.items.reviewtab.items.reviewitems.label": "Unknown products",
|
|
54
54
|
"ui.items.reviewtab.items.reviewitems.items.1.title": "Alexa text",
|
|
55
55
|
"ui.items.reviewtab.items.reviewitems.items.5.title": "Action",
|
package/admin/jsonConfig.json
CHANGED
|
@@ -572,10 +572,7 @@
|
|
|
572
572
|
"sm": 12,
|
|
573
573
|
"md": 12,
|
|
574
574
|
"lg": 12,
|
|
575
|
-
"xl": 12
|
|
576
|
-
"onChange": {
|
|
577
|
-
"calculateFunc": "(data.products || []).map(row => ({...row,availableMarkets:Array.isArray(row.availableMarkets)?row.availableMarkets.map(v=>typeof v==='string'?v.trim():'').filter(Boolean).join(','):String(row.availableMarkets || '')}))"
|
|
578
|
-
}
|
|
575
|
+
"xl": 12
|
|
579
576
|
}
|
|
580
577
|
}
|
|
581
578
|
},
|
|
@@ -706,9 +703,6 @@
|
|
|
706
703
|
"md": 12,
|
|
707
704
|
"lg": 12,
|
|
708
705
|
"xl": 12,
|
|
709
|
-
"onChange": {
|
|
710
|
-
"calculateFunc": "(data.reviewItems || []).map(row => ({...row,availableMarkets:Array.isArray(row.availableMarkets)?row.availableMarkets.map(v=>typeof v==='string'?v.trim():'').filter(Boolean).join(','):String(row.availableMarkets || '')}))"
|
|
711
|
-
},
|
|
712
706
|
"hidden": "true"
|
|
713
707
|
}
|
|
714
708
|
}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeAvailableMarkets = normalizeAvailableMarkets;
|
|
4
|
+
exports.normalizeProductAvailableMarkets = normalizeProductAvailableMarkets;
|
|
3
5
|
exports.markAllReviewItemsAccept = markAllReviewItemsAccept;
|
|
6
|
+
function normalizeAvailableMarkets(value) {
|
|
7
|
+
const values = Array.isArray(value) ? value : typeof value === 'string' ? value.split(/[;,]/) : [];
|
|
8
|
+
return [...new Set(values
|
|
9
|
+
.map(entry => typeof entry === 'string' ? entry.trim() : '')
|
|
10
|
+
.filter(Boolean))];
|
|
11
|
+
}
|
|
12
|
+
function normalizeProductAvailableMarkets(products) {
|
|
13
|
+
return products.map(product => ({
|
|
14
|
+
...product,
|
|
15
|
+
availableMarkets: normalizeAvailableMarkets(product.availableMarkets),
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
4
18
|
/**
|
|
5
19
|
* Apply the Admin review-table bulk action without dropping any row fields.
|
|
6
20
|
*
|
|
@@ -9,12 +23,7 @@ exports.markAllReviewItemsAccept = markAllReviewItemsAccept;
|
|
|
9
23
|
function markAllReviewItemsAccept(rows) {
|
|
10
24
|
return rows.map(item => ({
|
|
11
25
|
...item,
|
|
12
|
-
availableMarkets:
|
|
13
|
-
? item.availableMarkets
|
|
14
|
-
.map(value => typeof value === 'string' ? value.trim() : '')
|
|
15
|
-
.filter(Boolean)
|
|
16
|
-
.join(',')
|
|
17
|
-
: String(item.availableMarkets || ''),
|
|
26
|
+
availableMarkets: normalizeAvailableMarkets(item.availableMarkets),
|
|
18
27
|
action: 'accept',
|
|
19
28
|
}));
|
|
20
29
|
}
|
package/build/lib/sorter.js
CHANGED
|
@@ -110,7 +110,6 @@ function applyReviewActions(products, reviewItems) {
|
|
|
110
110
|
const remaining = [];
|
|
111
111
|
for (const review of reviewItems) {
|
|
112
112
|
if (review.action === 'accepted') {
|
|
113
|
-
remaining.push({ ...review });
|
|
114
113
|
continue;
|
|
115
114
|
}
|
|
116
115
|
if (review.action !== 'accept') {
|
|
@@ -138,7 +137,6 @@ function applyReviewActions(products, reviewItems) {
|
|
|
138
137
|
existing.aliases = [...aliases].join(',');
|
|
139
138
|
}
|
|
140
139
|
accepted.push({ ...existing });
|
|
141
|
-
remaining.push({ ...review, action: 'accepted' });
|
|
142
140
|
continue;
|
|
143
141
|
}
|
|
144
142
|
const product = {
|
|
@@ -152,7 +150,6 @@ function applyReviewActions(products, reviewItems) {
|
|
|
152
150
|
};
|
|
153
151
|
merged.push(product);
|
|
154
152
|
accepted.push(product);
|
|
155
|
-
remaining.push({ ...review, action: 'accepted' });
|
|
156
153
|
}
|
|
157
154
|
return {
|
|
158
155
|
products: merged.sort((a, b) => a.name.localeCompare(b.name, 'de', { sensitivity: 'base' })),
|
package/build/main.js
CHANGED
|
@@ -49,7 +49,7 @@ const review_tools_1 = require("./lib/review-tools");
|
|
|
49
49
|
const manual_order_1 = require("./lib/manual-order");
|
|
50
50
|
const state_change_1 = require("./lib/state-change");
|
|
51
51
|
const direct_sort_lifecycle_1 = require("./lib/direct-sort-lifecycle");
|
|
52
|
-
const VERSION = '0.
|
|
52
|
+
const VERSION = '0.4.1';
|
|
53
53
|
const COLLECT_WINDOW_MS = 5000;
|
|
54
54
|
const MAX_ACTIVE_ITEMS = 99;
|
|
55
55
|
const OWN_REFRESH_MAX_MS = 30000;
|
|
@@ -107,6 +107,7 @@ function englishRuntimeError(error) {
|
|
|
107
107
|
class ShoppingRoute extends utils.Adapter {
|
|
108
108
|
listStates = new Map();
|
|
109
109
|
applyingListName = '';
|
|
110
|
+
manualCommandPending = false;
|
|
110
111
|
directClient = null;
|
|
111
112
|
directClientPromise = null;
|
|
112
113
|
directListIds = new Map();
|
|
@@ -195,9 +196,11 @@ class ShoppingRoute extends utils.Adapter {
|
|
|
195
196
|
return state;
|
|
196
197
|
}
|
|
197
198
|
async onReady() {
|
|
198
|
-
|
|
199
|
-
.filter(product => product?.name).map(product => ({ ...product }))
|
|
199
|
+
const configuredProducts = (Array.isArray(this.cfg.products) ? this.cfg.products : [])
|
|
200
|
+
.filter(product => product?.name).map(product => ({ ...product }));
|
|
201
|
+
this.runtimeProducts = (0, review_tools_1.normalizeProductAvailableMarkets)(configuredProducts)
|
|
200
202
|
.sort((a, b) => a.name.localeCompare(b.name, 'de', { sensitivity: 'base' }));
|
|
203
|
+
this.productsDirty = JSON.stringify(this.runtimeProducts) !== JSON.stringify(configuredProducts);
|
|
201
204
|
this.runtimeReviews = (Array.isArray(this.cfg.reviewItems) ? this.cfg.reviewItems : []).map(item => ({ ...item }));
|
|
202
205
|
this.runtimeRoutes = (0, config_tools_1.normalizeRoutesForAdmin)(Array.isArray(this.cfg.routes) ? this.cfg.routes.filter(Boolean) : []);
|
|
203
206
|
this.routesDirty = JSON.stringify(this.runtimeRoutes) !== JSON.stringify(Array.isArray(this.cfg.routes) ? this.cfg.routes : []);
|
|
@@ -205,13 +208,17 @@ class ShoppingRoute extends utils.Adapter {
|
|
|
205
208
|
await this.loadStatistics();
|
|
206
209
|
await this.loadManualOverrides();
|
|
207
210
|
const reviewResult = (0, sorter_1.applyReviewActions)(this.runtimeProducts, this.runtimeReviews);
|
|
208
|
-
|
|
211
|
+
const reviewQueueChanged = JSON.stringify(reviewResult.remainingReviews) !== JSON.stringify(this.runtimeReviews);
|
|
212
|
+
if (reviewResult.accepted.length || reviewQueueChanged) {
|
|
209
213
|
this.runtimeProducts = reviewResult.products;
|
|
210
214
|
this.runtimeReviews = reviewResult.remainingReviews;
|
|
211
|
-
|
|
215
|
+
if (reviewResult.accepted.length)
|
|
216
|
+
this.productsDirty = true;
|
|
212
217
|
this.reviewsDirty = true;
|
|
213
|
-
|
|
214
|
-
|
|
218
|
+
if (reviewResult.accepted.length) {
|
|
219
|
+
this.statistics.reviewAccepted += reviewResult.accepted.length;
|
|
220
|
+
await this.persistStatistics();
|
|
221
|
+
}
|
|
215
222
|
}
|
|
216
223
|
await this.ensureProductGroupsConfig();
|
|
217
224
|
await this.updateTemporaryMarketStateOptions();
|
|
@@ -358,69 +365,118 @@ class ShoppingRoute extends utils.Adapter {
|
|
|
358
365
|
state.externalDirty = false;
|
|
359
366
|
state.newIds.clear();
|
|
360
367
|
}
|
|
368
|
+
async runManualShoppingCommand(operation) {
|
|
369
|
+
// Reserve synchronously: UI events and timer callbacks may arrive before the first await finishes.
|
|
370
|
+
if (this.manualCommandPending || this.applyingListName) {
|
|
371
|
+
throw new Error('A shopping-list update is already running. Please try again.');
|
|
372
|
+
}
|
|
373
|
+
this.manualCommandPending = true;
|
|
374
|
+
try {
|
|
375
|
+
return await operation();
|
|
376
|
+
}
|
|
377
|
+
finally {
|
|
378
|
+
this.manualCommandPending = false;
|
|
379
|
+
for (const [listName, state] of this.listStates) {
|
|
380
|
+
if (!this.isUnloading && state.phase === 'COLLECTING' && !state.timer) {
|
|
381
|
+
this.armCollectionDeadline(listName, state, state.firstEventAt + COLLECT_WINDOW_MS);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
361
386
|
async applyManualMove(message) {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
await this.setStateAsync('info.lastError', '', true);
|
|
392
|
-
this.prepareImmediateApply(listName);
|
|
393
|
-
await this.startApply(listName);
|
|
394
|
-
const error = String((await this.getStateAsync('info.lastError'))?.val || '');
|
|
395
|
-
if (error) {
|
|
396
|
-
this.manualOverrides = previous;
|
|
387
|
+
return this.runManualShoppingCommand(async () => {
|
|
388
|
+
const listName = this.configuredListName(message?.listName);
|
|
389
|
+
const before = await this.buildShoppingListView(listName);
|
|
390
|
+
if (this.dryRun)
|
|
391
|
+
return { ok: false, error: 'Dry Run is active. Disable Dry Run before changing the Alexa list.', view: before };
|
|
392
|
+
if (!(await this.isEnabled()))
|
|
393
|
+
return { ok: false, error: 'ShoppingRoute is disabled.', view: before };
|
|
394
|
+
if (this.applyingListName)
|
|
395
|
+
return { ok: false, error: 'A shopping-list update is already running. Please try again.', view: before };
|
|
396
|
+
const itemId = String(message?.itemId || '').trim();
|
|
397
|
+
const item = before.items.find(entry => entry.id === itemId);
|
|
398
|
+
if (!item)
|
|
399
|
+
return { ok: false, error: 'The selected shopping-list item no longer exists.', view: before };
|
|
400
|
+
const targetMarket = String(message?.targetMarket || '').trim();
|
|
401
|
+
if (!before.markets.some(market => market.toLocaleLowerCase('de') === targetMarket.toLocaleLowerCase('de'))) {
|
|
402
|
+
return { ok: false, error: 'The selected target market is not available.', view: before };
|
|
403
|
+
}
|
|
404
|
+
const targetCount = before.items.filter(entry => entry.market === targetMarket && entry.id !== itemId).length;
|
|
405
|
+
const targetPosition = Math.max(0, Math.min(targetCount, Math.floor(Number(message?.targetPosition) || 0)));
|
|
406
|
+
const previous = this.manualOverrides.map(entry => ({ ...entry }));
|
|
407
|
+
this.manualOverrides = (0, manual_order_1.moveManualOverride)(this.manualOverrides, {
|
|
408
|
+
listName,
|
|
409
|
+
itemId,
|
|
410
|
+
originalText: item.text,
|
|
411
|
+
fromMarket: item.market,
|
|
412
|
+
fromPosition: item.position,
|
|
413
|
+
toMarket: targetMarket,
|
|
414
|
+
toPosition: targetPosition,
|
|
415
|
+
});
|
|
397
416
|
await this.persistManualOverrides();
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
417
|
+
await this.setStateAsync('info.lastError', '', true);
|
|
418
|
+
this.prepareImmediateApply(listName);
|
|
419
|
+
await this.startApply(listName, true);
|
|
420
|
+
const error = String((await this.getStateAsync('info.lastError'))?.val || '');
|
|
421
|
+
if (error) {
|
|
422
|
+
this.manualOverrides = previous;
|
|
423
|
+
await this.persistManualOverrides();
|
|
424
|
+
return { ok: false, error, view: await this.buildShoppingListView(listName, true) };
|
|
425
|
+
}
|
|
426
|
+
return { ok: true, view: await this.buildShoppingListView(listName) };
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
async deleteShoppingItem(message) {
|
|
430
|
+
return this.runManualShoppingCommand(async () => {
|
|
431
|
+
const listName = String(message?.listName || '').trim();
|
|
432
|
+
if (!this.listConfigs.some(list => list.name === listName))
|
|
433
|
+
throw new Error('The selected shopping list is not configured.');
|
|
434
|
+
const before = await this.buildShoppingListView(listName);
|
|
435
|
+
if (this.dryRun)
|
|
436
|
+
return { ok: false, error: 'Dry Run is active. Disable Dry Run before changing the Alexa list.', view: before };
|
|
437
|
+
if (!(await this.isEnabled()))
|
|
438
|
+
return { ok: false, error: 'ShoppingRoute is disabled.', view: before };
|
|
439
|
+
const itemId = String(message?.itemId || '').trim();
|
|
440
|
+
if (!before.items.some(item => item.id === itemId)) {
|
|
441
|
+
return { ok: false, error: 'The selected shopping-list item no longer exists.', view: before };
|
|
442
|
+
}
|
|
443
|
+
await this.setStateAsync('info.lastError', '', true);
|
|
444
|
+
this.prepareImmediateApply(listName);
|
|
445
|
+
await this.startApply(listName, true, itemId);
|
|
446
|
+
const view = await this.buildShoppingListView(listName, true);
|
|
447
|
+
const error = String((await this.getStateAsync('info.lastError'))?.val || '');
|
|
448
|
+
if (error)
|
|
449
|
+
return { ok: false, error, view };
|
|
450
|
+
if (view.items.some(item => item.id === itemId)) {
|
|
451
|
+
return { ok: false, error: 'The deletion was not confirmed. Refresh the list before trying again.', view };
|
|
452
|
+
}
|
|
453
|
+
return { ok: true, view };
|
|
454
|
+
});
|
|
401
455
|
}
|
|
402
456
|
async clearManualShoppingOrder(message) {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
await this.setStateAsync('info.lastError', '', true);
|
|
415
|
-
this.prepareImmediateApply(listName);
|
|
416
|
-
await this.startApply(listName);
|
|
417
|
-
const error = String((await this.getStateAsync('info.lastError'))?.val || '');
|
|
418
|
-
if (error) {
|
|
419
|
-
this.manualOverrides = previous;
|
|
457
|
+
return this.runManualShoppingCommand(async () => {
|
|
458
|
+
const listName = this.configuredListName(message?.listName);
|
|
459
|
+
const before = await this.buildShoppingListView(listName);
|
|
460
|
+
if (this.dryRun)
|
|
461
|
+
return { ok: false, error: 'Dry Run is active. Disable Dry Run before changing the Alexa list.', view: before };
|
|
462
|
+
if (!(await this.isEnabled()))
|
|
463
|
+
return { ok: false, error: 'ShoppingRoute is disabled.', view: before };
|
|
464
|
+
if (this.applyingListName)
|
|
465
|
+
return { ok: false, error: 'A shopping-list update is already running. Please try again.', view: before };
|
|
466
|
+
const previous = this.manualOverrides.map(entry => ({ ...entry }));
|
|
467
|
+
this.manualOverrides = (0, manual_order_1.clearManualOverridesForList)(this.manualOverrides, listName);
|
|
420
468
|
await this.persistManualOverrides();
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
469
|
+
await this.setStateAsync('info.lastError', '', true);
|
|
470
|
+
this.prepareImmediateApply(listName);
|
|
471
|
+
await this.startApply(listName, true);
|
|
472
|
+
const error = String((await this.getStateAsync('info.lastError'))?.val || '');
|
|
473
|
+
if (error) {
|
|
474
|
+
this.manualOverrides = previous;
|
|
475
|
+
await this.persistManualOverrides();
|
|
476
|
+
return { ok: false, error, view: await this.buildShoppingListView(listName, true) };
|
|
477
|
+
}
|
|
478
|
+
return { ok: true, view: await this.buildShoppingListView(listName) };
|
|
479
|
+
});
|
|
424
480
|
}
|
|
425
481
|
async onMessage(obj) {
|
|
426
482
|
if (!obj?.callback)
|
|
@@ -444,6 +500,15 @@ class ShoppingRoute extends utils.Adapter {
|
|
|
444
500
|
}
|
|
445
501
|
return;
|
|
446
502
|
}
|
|
503
|
+
if (obj.command === 'deleteShoppingItem') {
|
|
504
|
+
try {
|
|
505
|
+
this.sendTo(obj.from, obj.command, await this.deleteShoppingItem(obj.message), obj.callback);
|
|
506
|
+
}
|
|
507
|
+
catch (error) {
|
|
508
|
+
this.sendTo(obj.from, obj.command, { ok: false, error: error instanceof Error ? error.message : String(error) }, obj.callback);
|
|
509
|
+
}
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
447
512
|
if (obj.command === 'clearManualShoppingOrder') {
|
|
448
513
|
try {
|
|
449
514
|
this.sendTo(obj.from, obj.command, await this.clearManualShoppingOrder(obj.message), obj.callback);
|
|
@@ -698,18 +763,17 @@ class ShoppingRoute extends utils.Adapter {
|
|
|
698
763
|
this.armCollectionDeadline(list.name, state, delay === 0 ? now : collected.deadline);
|
|
699
764
|
}
|
|
700
765
|
}
|
|
701
|
-
async startApply(listName) {
|
|
766
|
+
async startApply(listName, manualCommand = false, deleteItemId) {
|
|
702
767
|
const state = this.getListState(listName);
|
|
703
768
|
if (this.isUnloading || state.phase !== 'COLLECTING')
|
|
704
769
|
return;
|
|
770
|
+
if (this.manualCommandPending && !manualCommand)
|
|
771
|
+
return;
|
|
705
772
|
if (this.applyingListName) {
|
|
706
773
|
// The active list's finally block arms every other collected list exactly once.
|
|
707
774
|
return;
|
|
708
775
|
}
|
|
709
|
-
|
|
710
|
-
state.phase = 'IDLE';
|
|
711
|
-
return;
|
|
712
|
-
}
|
|
776
|
+
// Acquire before reading control.enabled, otherwise two callers can both pass the guard.
|
|
713
777
|
Object.assign(state, (0, direct_sort_lifecycle_1.beginDirectApply)(state));
|
|
714
778
|
this.applyingListName = listName;
|
|
715
779
|
const runtime = {
|
|
@@ -726,7 +790,9 @@ class ShoppingRoute extends utils.Adapter {
|
|
|
726
790
|
rebuildFrom: null,
|
|
727
791
|
};
|
|
728
792
|
try {
|
|
729
|
-
await this.
|
|
793
|
+
if (this.isUnloading || !(await this.isEnabled()))
|
|
794
|
+
return;
|
|
795
|
+
await this.applyDirectSort(listName, state, runtime, deleteItemId);
|
|
730
796
|
}
|
|
731
797
|
catch (error) {
|
|
732
798
|
const message = englishRuntimeError(error);
|
|
@@ -829,7 +895,7 @@ class ShoppingRoute extends utils.Adapter {
|
|
|
829
895
|
const client = await this.initializeDirectClient();
|
|
830
896
|
return (0, alexa_direct_1.toAlexaListItems)(await this.amazonCall(runtime, () => client.getItems(listId)));
|
|
831
897
|
}
|
|
832
|
-
async applyDirectSort(listName, state, runtime) {
|
|
898
|
+
async applyDirectSort(listName, state, runtime, deleteItemId) {
|
|
833
899
|
await this.ensureTrafficDay();
|
|
834
900
|
this.traffic.localChecks += 1;
|
|
835
901
|
await this.persistTrafficMetrics();
|
|
@@ -838,7 +904,12 @@ class ShoppingRoute extends utils.Adapter {
|
|
|
838
904
|
const snapshot = await this.readDirectItems(listId, runtime);
|
|
839
905
|
if ((0, sorter_1.activeItems)(snapshot).length > MAX_ACTIVE_ITEMS)
|
|
840
906
|
throw new Error(`${listName}: more than 99 active entries.`);
|
|
841
|
-
|
|
907
|
+
if (deleteItemId && !(0, sorter_1.activeItems)(snapshot).some(item => String(item.id) === deleteItemId && !(0, market_plan_1.isMarketHeader)((0, prefix_sort_1.stripSortPrefix)(item.value), this.markets))) {
|
|
908
|
+
throw new Error('The item selected for deletion is no longer active.');
|
|
909
|
+
}
|
|
910
|
+
// Keep the full snapshot for versioned DELETEs and verification; plan the route without this one ID.
|
|
911
|
+
const routeItems = deleteItemId ? snapshot.filter(item => String(item.id) !== deleteItemId) : snapshot;
|
|
912
|
+
const logical = this.prefixFreeItems(routeItems);
|
|
842
913
|
await this.recordNewItems(listName, logical);
|
|
843
914
|
await this.updateLearningAndDiagnostics(listName, logical);
|
|
844
915
|
const priority = this.priorityMarketForList(listName);
|
|
@@ -847,7 +918,7 @@ class ShoppingRoute extends utils.Adapter {
|
|
|
847
918
|
this.manualOverrides = reconciledOverrides;
|
|
848
919
|
await this.persistManualOverrides();
|
|
849
920
|
}
|
|
850
|
-
const desired = (0, prefix_sort_1.buildPrefixTargets)(
|
|
921
|
+
const desired = (0, prefix_sort_1.buildPrefixTargets)(routeItems, this.markets, this.routes, this.products, this.fallbackMarket, priority, this.minimumItemsPerMarket, this.marketHeadersEnabled, this.manualOverrides, listName);
|
|
851
922
|
const plan = (0, prefix_sort_1.createPrefixSortPlan)(snapshot, desired);
|
|
852
923
|
runtime.fallback = plan.fallback;
|
|
853
924
|
runtime.rebuildFrom = plan.rebuildFrom;
|
|
@@ -1000,7 +1071,8 @@ class ShoppingRoute extends utils.Adapter {
|
|
|
1000
1071
|
}
|
|
1001
1072
|
catch { /* preserve the last journal payload */ }
|
|
1002
1073
|
await this.setStateAsync('control.enabled', false, true);
|
|
1003
|
-
const
|
|
1074
|
+
const detail = reason.startsWith(`${listName}: `) ? reason.slice(listName.length + 2) : reason;
|
|
1075
|
+
const message = `${listName}: ${detail} SAFETY STOP: further direct writes are disabled; no automatic retry.`;
|
|
1004
1076
|
await this.setError(message);
|
|
1005
1077
|
this.log.error(message);
|
|
1006
1078
|
}
|
package/io-package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "shoppingroute",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.1",
|
|
5
5
|
"titleLang": {
|
|
6
6
|
"en": "ShoppingRoute",
|
|
7
7
|
"de": "ShoppingRoute",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"zh-cn": "按商店、商品组和个性化店内路线智能整理 Alexa 购物清单。包含学习、审核队列、多清单支持和 API 保护。"
|
|
30
30
|
},
|
|
31
31
|
"authors": [
|
|
32
|
-
"RaviniZib"
|
|
32
|
+
"RaviniZib <zib@ravini.org>"
|
|
33
33
|
],
|
|
34
34
|
"keywords": [
|
|
35
35
|
"alexa",
|
|
@@ -60,6 +60,23 @@
|
|
|
60
60
|
"icon": "shoppingroute.png",
|
|
61
61
|
"tier": 3,
|
|
62
62
|
"news": {
|
|
63
|
+
"0.4.1": {
|
|
64
|
+
"en": "Fixes review acceptance and market selection, prevents concurrent shopping-list writes and duplicates, adds verified item deletion, handles incomplete Admin responses, and resolves repository checker metadata findings.",
|
|
65
|
+
"de": "Korrigiert Prüflistenübernahme und Marktauswahl, verhindert parallele Schreibläufe und Duplikate, ergänzt geprüftes Löschen, behandelt unvollständige Admin-Antworten und behebt Metadaten-Beanstandungen des Repository-Checkers."
|
|
66
|
+
},
|
|
67
|
+
"0.4.0": {
|
|
68
|
+
"en": "Persists startup review cleanup and normalizes market arrays. Correction: the complete Admin review workflow was not fixed; accepted rows could remain visible and multi-market selection still had UI defects.",
|
|
69
|
+
"de": "Speichert die Prüflistenbereinigung beim Start und normalisiert Markt-Arrays. Korrektur: Der vollständige Admin-Prüflistenablauf war nicht behoben; übernommene Zeilen konnten sichtbar bleiben und die Marktauswahl hatte weiterhin Bedienfehler.",
|
|
70
|
+
"ru": "Сохраняет очистку очереди проверки при запуске и нормализует массивы магазинов. Уточнение: полный процесс в Admin не был исправлен; принятые строки могли оставаться видимыми, а выбор магазинов имел ошибки интерфейса.",
|
|
71
|
+
"pt": "Guarda a limpeza da revisão no arranque e normaliza arrays de lojas. Correção: o processo completo no Admin não foi corrigido; linhas aceites podiam continuar visíveis e a seleção de lojas ainda tinha problemas de interface.",
|
|
72
|
+
"nl": "Slaat opschoning van de controlelijst bij het opstarten op en normaliseert winkelarrays. Correctie: de volledige Admin-werkwijze was niet hersteld; geaccepteerde regels konden zichtbaar blijven en de winkelselectie had nog bedieningsproblemen.",
|
|
73
|
+
"fr": "Enregistre le nettoyage de la liste de vérification au démarrage et normalise les tableaux de magasins. Rectification : le processus complet dans Admin restait défectueux ; des lignes acceptées pouvaient rester visibles et la sélection des magasins présentait encore des problèmes.",
|
|
74
|
+
"it": "Salva la pulizia della coda di revisione all’avvio e normalizza gli array dei negozi. Rettifica: il processo completo in Admin non era corretto; le righe accettate potevano restare visibili e la selezione dei negozi presentava ancora problemi.",
|
|
75
|
+
"es": "Guarda la limpieza de la lista de revisión al iniciar y normaliza los arrays de tiendas. Corrección: el proceso completo en Admin no estaba corregido; las filas aceptadas podían seguir visibles y la selección de tiendas aún tenía problemas de interfaz.",
|
|
76
|
+
"pl": "Zapisuje czyszczenie kolejki przy uruchomieniu i normalizuje tablice sklepów. Sprostowanie: pełny proces w Admin nie został naprawiony; zaakceptowane wiersze mogły pozostać widoczne, a wybór sklepów nadal miał błędy interfejsu.",
|
|
77
|
+
"uk": "Зберігає очищення черги перевірки під час запуску та нормалізує масиви магазинів. Уточнення: повний процес в Admin не було виправлено; прийняті рядки могли залишатися видимими, а вибір магазинів мав помилки інтерфейсу.",
|
|
78
|
+
"zh-cn": "保存启动时的审核队列清理结果并规范商店数组。更正:Admin 中的完整审核流程并未修复;已接受的行仍可能显示,商店多选界面仍存在问题。"
|
|
79
|
+
},
|
|
63
80
|
"0.3.9": {
|
|
64
81
|
"en": "Replaces incomplete GitHub-installed 0.3.8 snapshots. Normalizes available-market selections, removes accepted review rows and orphaned market headings, and delivers the corrected single-column shopping-list view.",
|
|
65
82
|
"de": "Ersetzt unvollständige, direkt von GitHub installierte 0.3.8-Zwischenstände. Vereinheitlicht verfügbare Märkte, entfernt übernommene Prüflistenzeilen und verwaiste Marktüberschriften und liefert die korrigierte einspaltige Einkaufslistenansicht.",
|
|
@@ -73,19 +90,6 @@
|
|
|
73
90
|
"uk": "Замінює неповні версії 0.3.8, установлені безпосередньо з GitHub. Нормалізує доступні магазини, видаляє прийняті рядки перевірки й осиротілі заголовки та виправляє одноколонковий список покупок.",
|
|
74
91
|
"zh-cn": "替换直接从 GitHub 安装的不完整 0.3.8 版本。统一可用商店选择,删除已接受的审核行和孤立商店标题,并修正单列购物清单视图。"
|
|
75
92
|
},
|
|
76
|
-
"0.3.8": {
|
|
77
|
-
"en": "Fixes the review queue so accepted items immediately update the article catalogue and remain “Accepted”, filters legacy market headers and nested sort prefixes, simplifies the current shopping-list Admin view, and updates CI/checker compatibility.",
|
|
78
|
-
"de": "Behebt die Prüfliste: Übernommene Einträge aktualisieren den Artikelstamm sofort und bleiben „Übernommen“. Außerdem werden alte Marktüberschriften und verschachtelte Sortierpräfixe gefiltert, die aktuelle Einkaufsliste im Admin vereinfacht und CI/Checker-Kompatibilität aktualisiert.",
|
|
79
|
-
"ru": "Исправлена очередь проверки: принятые позиции сразу обновляют каталог товаров и сохраняют статус «Принято». Также фильтруются старые заголовки магазинов и вложенные префиксы сортировки, упрощено отображение текущего списка покупок в Admin и обновлена совместимость CI/проверок.",
|
|
80
|
-
"pt": "Corrige a fila de revisão: os itens aceites atualizam imediatamente o catálogo de artigos e mantêm o estado “Aceite”. Também filtra cabeçalhos de mercado antigos e prefixos de ordenação aninhados, simplifica a lista de compras atual no Admin e atualiza a compatibilidade de CI/verificador.",
|
|
81
|
-
"nl": "Verbetert de controlelijst: geaccepteerde items werken de artikelcatalogus direct bij en blijven op “Overgenomen”. Ook worden oude winkelkoppen en geneste sorteerprefixen gefilterd, de actuele boodschappenlijst in Admin vereenvoudigd en de CI/checker-compatibiliteit bijgewerkt.",
|
|
82
|
-
"fr": "Corrige la file de vérification : les éléments acceptés mettent immédiatement à jour le catalogue et conservent l’état « Accepté ». Filtre aussi les anciens en-têtes de magasin et les préfixes de tri imbriqués, simplifie la liste de courses actuelle dans Admin et met à jour la compatibilité CI/vérificateur.",
|
|
83
|
-
"it": "Corregge la coda di revisione: gli elementi accettati aggiornano subito il catalogo e mantengono lo stato “Accettato”. Filtra inoltre le vecchie intestazioni dei negozi e i prefissi di ordinamento annidati, semplifica la lista della spesa corrente in Admin e aggiorna la compatibilità CI/checker.",
|
|
84
|
-
"es": "Corrige la cola de revisión: los elementos aceptados actualizan inmediatamente el catálogo y conservan el estado «Aceptado». También filtra encabezados antiguos de tiendas y prefijos de ordenación anidados, simplifica la lista de compra actual en Admin y actualiza la compatibilidad de CI/verificador.",
|
|
85
|
-
"pl": "Naprawia kolejkę weryfikacji: zaakceptowane pozycje natychmiast aktualizują katalog artykułów i zachowują status „Zaakceptowano”. Filtruje też stare nagłówki sklepów i zagnieżdżone prefiksy sortowania, upraszcza bieżącą listę zakupów w Adminie oraz aktualizuje zgodność CI/checkera.",
|
|
86
|
-
"uk": "Виправлено чергу перевірки: прийняті позиції одразу оновлюють каталог товарів і зберігають статус «Прийнято». Також фільтруються старі заголовки магазинів і вкладені префікси сортування, спрощено поточний список покупок в Admin та оновлено сумісність CI/перевірок.",
|
|
87
|
-
"zh-cn": "修复审核队列:已接受的条目会立即更新商品目录并保持“已接受”状态。同时过滤旧版商店标题和嵌套排序前缀,简化 Admin 中的当前购物清单视图,并更新 CI/检查器兼容性。"
|
|
88
|
-
},
|
|
89
93
|
"0.3.7": {
|
|
90
94
|
"en": "Adds an interactive Admin shopping list with drag-and-drop/manual movement between markets, persistent per-item manual overrides, responsive Admin improvements, and a retained “accepted” review status after normal Save.",
|
|
91
95
|
"de": "Ergänzt eine interaktive Einkaufsliste im Admin mit Drag&Drop/manuellem Verschieben zwischen Märkten, dauerhaften manuellen Artikel-Overrides, Responsive-Verbesserungen und einem erhaltenen Status „Übernommen“ nach normalem Speichern.",
|
|
@@ -137,19 +141,6 @@
|
|
|
137
141
|
"pl": "Dodano zgodność niestandardowych komponentów panelu z Admin 8, poprawiono opcjonalny dziennik podsumowania sortowania i nagłówki sklepów, naprawiono akcję „Zaakceptuj wszystko” w kolejce weryfikacji, wprowadzono wymóg potwierdzonych wartości dla zewnętrznych stanów Alexa2 oraz usunięto przestarzałą konfigurację, wewnętrzne sprawdzanie npm i zaciemnianie kodu dla lepszej zgodności z repozytorium.",
|
|
138
142
|
"uk": "Додано сумісність користувацьких компонентів Admin з Admin 8, покращено необов’язковий підсумковий журнал сортування та заголовки магазинів, виправлено дію «Прийняти все» в черзі перевірки, для зовнішніх станів Alexa2 тепер потрібні підтверджені значення, а застарілі налаштування, внутрішню перевірку npm і обфускацію коду видалено для кращої сумісності з репозиторієм.",
|
|
139
143
|
"zh-cn": "新增自定义管理组件的 Admin 8 兼容性,改进可选排序摘要日志和商店标题,修复审核队列的“全部接受”操作,要求外部 Alexa2 状态使用已确认值,并移除过时配置、内部 npm 检查和代码混淆,以提高仓库兼容性。"
|
|
140
|
-
},
|
|
141
|
-
"0.3.3": {
|
|
142
|
-
"en": "New direct 00>–99> prefix sorting for Alexa lists in A–Z, with very fast incremental insertion into free number gaps, suffix rebuilds only when a gap is exhausted, direct Amazon confirmation and final verification.",
|
|
143
|
-
"de": "Neue direkte 00>–99>-Präfixsortierung für Alexa-Listen in A–Z mit sehr schnellen inkrementellen Einfügungen in freie Nummernlücken, Suffix-Rebuild nur bei ausgeschöpfter Lücke, direkter Amazon-Bestätigung und abschließender Verifikation.",
|
|
144
|
-
"ru": "Новая прямая сортировка по префиксам 00>–99> для списков Alexa в режиме A–Z: очень быстрая поэтапная вставка в свободные числовые промежутки, перестроение суффикса только при отсутствии места, прямое подтверждение Amazon и итоговая проверка.",
|
|
145
|
-
"pt": "Nova ordenação direta por prefixos 00>–99> para listas Alexa em A–Z, com inserções incrementais muito rápidas em intervalos numéricos livres, reconstrução do sufixo apenas quando o intervalo se esgota, confirmação direta da Amazon e verificação final.",
|
|
146
|
-
"nl": "Nieuwe directe 00>–99>-prefixsortering voor Alexa-lijsten in A–Z, met zeer snelle incrementele invoegingen in vrije nummergaten, alleen een suffix-rebuild als een gat vol is, directe Amazon-bevestiging en eindcontrole.",
|
|
147
|
-
"fr": "Nouveau tri direct par préfixes 00>–99> pour les listes Alexa en A–Z, avec insertions incrémentales très rapides dans les intervalles numériques libres, reconstruction du suffixe uniquement quand l’intervalle est épuisé, confirmation Amazon directe et vérification finale.",
|
|
148
|
-
"it": "Nuovo ordinamento diretto con prefissi 00>–99> per le liste Alexa in A–Z, con inserimenti incrementali molto rapidi negli intervalli numerici liberi, ricostruzione del suffisso solo quando lo spazio è esaurito, conferma Amazon diretta e verifica finale.",
|
|
149
|
-
"es": "Nueva ordenación directa por prefijos 00>–99> para listas Alexa en A–Z, con inserciones incrementales muy rápidas en huecos numéricos libres, reconstrucción del sufijo solo cuando se agota el hueco, confirmación directa de Amazon y verificación final.",
|
|
150
|
-
"pl": "Nowe bezpośrednie sortowanie prefiksami 00>–99> dla list Alexa w trybie A–Z, z bardzo szybkim wstawianiem przyrostowym w wolne luki numeracji, przebudową sufiksu tylko po wyczerpaniu luki, bezpośrednim potwierdzeniem Amazon i końcową weryfikacją.",
|
|
151
|
-
"uk": "Нове пряме сортування за префіксами 00>–99> для списків Alexa в режимі A–Z: дуже швидке інкрементне вставлення у вільні числові проміжки, перебудова суфікса лише за відсутності місця, пряме підтвердження Amazon і фінальна перевірка.",
|
|
152
|
-
"zh-cn": "全新的 Alexa A–Z 列表直接 00>–99> 前缀排序:可快速增量插入空闲编号间隙,仅在间隙耗尽时重建后缀,并使用 Amazon 直接确认和最终校验。"
|
|
153
144
|
}
|
|
154
145
|
},
|
|
155
146
|
"extIcon": "https://raw.githubusercontent.com/RaviniZib/ioBroker.shoppingroute/main/admin/shoppingroute.png",
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.shoppingroute",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Smart Alexa shopping-list routing by market, product group and individual store walking route with learning, multi-list support and API protection.",
|
|
5
|
-
"author": "RaviniZib",
|
|
5
|
+
"author": "RaviniZib <zib@ravini.org>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/RaviniZib/ioBroker.shoppingroute",
|
|
8
8
|
"repository": {
|
|
@@ -49,19 +49,19 @@
|
|
|
49
49
|
"@iobroker/adapter-core": "^3.4.3"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
+
"@alcalzone/release-script": "^5.2.1",
|
|
53
|
+
"@alcalzone/release-script-plugin-iobroker": "^5.2.0",
|
|
54
|
+
"@alcalzone/release-script-plugin-license": "^5.2.2",
|
|
55
|
+
"@alcalzone/release-script-plugin-manual-review": "^5.2.0",
|
|
56
|
+
"@iobroker/adapter-dev": "^1.5.0",
|
|
52
57
|
"@iobroker/eslint-config": "^2.3.4",
|
|
53
|
-
"@iobroker/testing": "^6.1
|
|
58
|
+
"@iobroker/testing": "^6.2.1",
|
|
54
59
|
"@module-federation/vite": "^1.4.1",
|
|
55
60
|
"@tsconfig/node22": "^22.0.5",
|
|
56
61
|
"@types/node": "^22.15.0",
|
|
57
62
|
"react": "^18.3.1",
|
|
58
63
|
"typescript": "^5.8.3",
|
|
59
64
|
"vite": "^6.3.5",
|
|
60
|
-
"vite-plugin-commonjs": "^0.10.4"
|
|
61
|
-
"@alcalzone/release-script": "^5.2.1",
|
|
62
|
-
"@alcalzone/release-script-plugin-iobroker": "^5.2.0",
|
|
63
|
-
"@alcalzone/release-script-plugin-license": "^5.2.2",
|
|
64
|
-
"@alcalzone/release-script-plugin-manual-review": "^5.2.0",
|
|
65
|
-
"@iobroker/adapter-dev": "^1.5.0"
|
|
65
|
+
"vite-plugin-commonjs": "^0.10.4"
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import"../reviewEditor.js";import{_ as x,a as A}from"./_virtual_mf___mfe_internal__ShoppingRouteReviewSet__mf_owner__1__loadShare__react__loadShare__.js-DDD1Hp7v.js";import"./vite-preload-helper-Dp1pzeXC.js";import"./index-2HOz3j7B.js";var g={exports:{}};const y=x||A,s=y.createElement,p=(t,e)=>(typeof navigator<"u"?String(navigator.language||"").toLowerCase():"de").startsWith("de")?t:e,d=t=>String(t||"").trim().toLocaleLowerCase("de"),S=t=>String(t||"").trim().toLocaleLowerCase("de").normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/ß/g,"ss").replace(/[^a-z0-9]+/g," ").trim();function f(t){let e=S(t).replace(/\s+/g,"");return(e.length>6&&e.endsWith("en")||e.length>6&&e.endsWith("n"))&&(e=e.slice(0,-1)),e}function m(t){const e=Array.isArray(t)?t:String(t||"").split(/[;,]/),r=new Set;return e.map(i=>String(i||"").trim()).filter(i=>{const l=d(i);return!l||r.has(l)?!1:(r.add(l),!0)}).join(",")}function C(t){const e=[],r=new Set;for(const i of Array.isArray(t==null?void 0:t.markets)?t.markets:[]){if(!i||i.enabled===!1)continue;const l=String(i.name||"").trim(),o=d(l);!l||r.has(o)||(r.add(o),e.push(l))}return e.sort((i,l)=>i.localeCompare(l,"de",{sensitivity:"base"}))}function _(t){const e=new Set;return(Array.isArray(t==null?void 0:t.productGroups)?t.productGroups:[]).map(r=>String((r==null?void 0:r.name)||"").trim()).filter(r=>{const i=d(r);return!i||e.has(i)?!1:(e.add(i),!0)}).sort((r,i)=>r.localeCompare(i,"de",{sensitivity:"base"}))}function M(t){return[t==null?void 0:t.name,...String((t==null?void 0:t.aliases)||"").split(/[;,]/)].map(f).filter(Boolean)}function k(t,e){const r=f(e);return r?t.findIndex(i=>M(i).includes(r)):-1}function I(t,e){const r=[],i=new Set;for(const l of`${t||""},${e||""}`.split(/[;,]/)){const o=String(l||"").trim(),n=d(o);!o||i.has(n)||(i.add(n),r.push(o))}return r.join(",")}function h(t,e,r){const i=(Array.isArray(t==null?void 0:t.reviewItems)?t.reviewItems:[]).map((l,o)=>o===e?{...l,...r}:{...l});return{...t||{},reviewItems:i}}function v(t,e){const r=new Set(e),i=(Array.isArray(t==null?void 0:t.products)?t.products:[]).map(o=>({...o})),l=(Array.isArray(t==null?void 0:t.reviewItems)?t.reviewItems:[]).map(o=>({...o}));for(let o=0;o<l.length;o++){if(!r.has(o))continue;const n=l[o],c=String(n.product||"").trim();if(!c)continue;const u=k(i,c);if(u>=0){const a={...i[u]};n.category&&(a.category=String(n.category)),n.defaultMarket!==void 0&&(a.defaultMarket=String(n.defaultMarket||"")),n.availableMarkets!==void 0&&(a.availableMarkets=m(n.availableMarkets)),n.aliases&&(a.aliases=I(a.aliases,n.aliases)),i[u]=a}else i.push({name:c,aliases:String(n.aliases||""),category:String(n.category||n.guessedCategory||"Sonstiges"),defaultMarket:String(n.defaultMarket||""),availableMarkets:m(n.availableMarkets)});l[o]={...n,availableMarkets:m(n.availableMarkets),action:"accepted"}}return i.sort((o,n)=>String(o.name||"").localeCompare(String(n.name||""),"de",{sensitivity:"base"})),{...t||{},products:i,reviewItems:l}}const P=`
|
|
2
|
-
.shoppingroute-review-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 14px}
|
|
3
|
-
.shoppingroute-review-button{min-height:38px;padding:7px 16px;border:1px solid currentColor;border-radius:5px;background:transparent;color:inherit;cursor:pointer;font-weight:600}
|
|
4
|
-
.shoppingroute-review-button:disabled{opacity:.45;cursor:default}
|
|
5
|
-
.shoppingroute-review-list{display:flex;flex-direction:column;border:1px solid currentColor;border-radius:8px;overflow:hidden}
|
|
6
|
-
.shoppingroute-review-row{display:grid;grid-template-columns:minmax(190px,1.35fr) minmax(150px,1fr) minmax(125px,.8fr) minmax(155px,1fr) minmax(150px,1fr) minmax(130px,.8fr) 34px;gap:9px;align-items:center;padding:9px 10px;border-bottom:1px solid currentColor}
|
|
7
|
-
.shoppingroute-review-row:last-child{border-bottom:0}
|
|
8
|
-
.shoppingroute-review-row input,.shoppingroute-review-row select{width:100%;min-width:0;min-height:36px;box-sizing:border-box;border:1px solid currentColor;border-radius:4px;background:transparent;color:inherit;padding:6px 8px}
|
|
9
|
-
.shoppingroute-review-row select[multiple]{min-height:58px}
|
|
10
|
-
.shoppingroute-review-product small{display:block;opacity:.65;margin-top:3px;word-break:break-word}
|
|
11
|
-
.shoppingroute-review-delete{width:32px;height:32px;border:1px solid currentColor;border-radius:4px;background:transparent;color:inherit;cursor:pointer}
|
|
12
|
-
.shoppingroute-review-head{font-size:.78rem;font-weight:700;opacity:.68;padding-top:6px;padding-bottom:6px}
|
|
13
|
-
@media(max-width:900px){
|
|
14
|
-
.shoppingroute-review-head{display:none}
|
|
15
|
-
.shoppingroute-review-row{grid-template-columns:1fr 1fr;padding:12px}
|
|
16
|
-
.shoppingroute-review-product{grid-column:1/-1}
|
|
17
|
-
.shoppingroute-review-delete{justify-self:end}
|
|
18
|
-
}
|
|
19
|
-
@media(max-width:600px){
|
|
20
|
-
.shoppingroute-review-row{grid-template-columns:1fr}
|
|
21
|
-
.shoppingroute-review-product,.shoppingroute-review-delete{grid-column:auto}
|
|
22
|
-
.shoppingroute-review-delete{justify-self:start}
|
|
23
|
-
.shoppingroute-review-button{width:100%}
|
|
24
|
-
}
|
|
25
|
-
`;class R extends y.Component{change(e){this.props.onChange(e,!0)}update(e,r){this.change(h(this.props.data||{},e,r))}accept(e){const r=h(this.props.data||{},e,{action:"accept"});this.change(v(r,[e]))}acceptAll(){var i;const e=Array.isArray((i=this.props.data)==null?void 0:i.reviewItems)?this.props.data.reviewItems:[],r=e.map((l,o)=>o).filter(l=>{var o;return((o=e[l])==null?void 0:o.action)!=="accepted"});r.length&&this.change(v(this.props.data||{},r))}remove(e){const r=this.props.data||{},i=(Array.isArray(r.reviewItems)?r.reviewItems:[]).filter((l,o)=>o!==e).map(l=>({...l}));this.change({...r,reviewItems:i})}renderRow(e,r,i,l){const o=new Set(String(e.availableMarkets||"").split(/[;,]/).map(a=>d(a)).filter(Boolean)),n=e.action==="accepted",c=[s("option",{key:"pending",value:"pending"},p("Offen","Pending")),s("option",{key:"accept",value:"accept"},p("Übernehmen","Accept")),n?s("option",{key:"accepted",value:"accepted"},p("Übernommen","Accepted")):null,s("option",{key:"ignore",value:"ignore"},p("Ignorieren","Ignore"))].filter(Boolean),u=n?{opacity:.78}:void 0;return s("div",{key:`${e.key||e.product||"review"}-${r}`,className:"shoppingroute-review-row",style:u},[s("div",{key:"product",className:"shoppingroute-review-product"},[s("input",{key:"input",value:String(e.product||""),"aria-label":p("Artikel","Product"),onChange:a=>this.update(r,{product:a.target.value,action:n?"pending":e.action})}),s("small",{key:"source"},String(e.text||""))]),s("select",{key:"category",value:String(e.category||e.guessedCategory||""),"aria-label":p("Produktgruppe","Product group"),onChange:a=>this.update(r,{category:a.target.value,action:n?"pending":e.action})},[...new Set([String(e.category||e.guessedCategory||""),...i].filter(Boolean))].map(a=>s("option",{key:a,value:a},a))),s("select",{key:"defaultMarket",value:String(e.defaultMarket||""),"aria-label":p("Standardmarkt","Default market"),onChange:a=>this.update(r,{defaultMarket:a.target.value,action:n?"pending":e.action})},[s("option",{key:"__none__",value:""},"—"),...l.map(a=>s("option",{key:a,value:a},a))]),s("select",{key:"availableMarkets",multiple:!0,value:l.filter(a=>o.has(d(a))),"aria-label":p("Verfügbare Märkte","Available markets"),onChange:a=>{const w=[...a.target.selectedOptions].map(b=>b.value);this.update(r,{availableMarkets:w.join(","),action:n?"pending":e.action})}},l.map(a=>s("option",{key:a,value:a},a))),s("input",{key:"aliases",value:String(e.aliases||""),placeholder:p("Aliase","Aliases"),"aria-label":p("Aliase","Aliases"),onChange:a=>this.update(r,{aliases:a.target.value,action:n?"pending":e.action})}),s("select",{key:"action",value:String(e.action||"pending"),"aria-label":p("Aktion","Action"),onChange:a=>{a.target.value==="accept"?this.accept(r):this.update(r,{action:a.target.value})}},c),s("button",{key:"delete",type:"button",className:"shoppingroute-review-delete",title:p("Aus Prüfliste entfernen","Remove from review list"),onClick:()=>this.remove(r)},"×")])}render(){const e=this.props.data||{},r=Array.isArray(e.reviewItems)?e.reviewItems:[],i=_(e),l=C(e),o=r.filter(c=>(c==null?void 0:c.action)!=="accepted").length,n=[s("style",{key:"styles"},P)];return n.push(s("div",{key:"toolbar",className:"shoppingroute-review-toolbar"},[s("button",{key:"acceptAll",type:"button",className:"shoppingroute-review-button",disabled:o===0,onClick:()=>this.acceptAll()},o?p(`Alle übernehmen (${o})`,`Accept all (${o})`):p("Alles übernommen","All accepted")),s("span",{key:"hint",style:{opacity:.7}},p("„Übernehmen“ aktualisiert Artikelstamm und Status sofort; danach normal speichern.","“Accept” updates catalogue and status immediately; then save normally."))])),r.length?(n.push(s("div",{key:"list",className:"shoppingroute-review-list"},[s("div",{key:"head",className:"shoppingroute-review-row shoppingroute-review-head"},[s("div",{key:"product"},p("Artikel / Alexa-Text","Product / Alexa text")),s("div",{key:"group"},p("Produktgruppe","Product group")),s("div",{key:"default"},p("Standardmarkt","Default market")),s("div",{key:"available"},p("Verfügbare Märkte","Available markets")),s("div",{key:"aliases"},p("Aliase","Aliases")),s("div",{key:"action"},p("Status","Status")),s("div",{key:"delete"},"")]),...r.map((c,u)=>this.renderRow(c||{},u,i,l))])),s("div",{style:{width:"100%"}},n)):(n.push(s("div",{key:"empty",style:{opacity:.7,padding:"12px 0"}},p("Keine unbekannten Artikel vorhanden.","No unknown products."))),s("div",{style:{width:"100%"}},n))}}g.exports={Components:{ReviewEditor:R},ReviewEditorModel:{normalizeMarketCsv:m,updateReviewRow:h,acceptReviewRows:v,findProductIndex:k}};const N=(g.exports==null?{}:g.exports).default||g.exports,L=N.Components;export{L as default};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import"../shoppingListEditor.js";import{_ as k,a as v}from"./_virtual_mf___mfe_internal__ShoppingRouteShoppingListSet__mf_owner__1__loadShare__react__loadShare__.js-DKxc1wk0.js";import"./vite-preload-helper-Dp1pzeXC.js";import"./index-2HOz3j7B.js";var c={exports:{}};const b=k||v,r=b.createElement,p=(n,t)=>(typeof navigator<"u"?String(navigator.language||"").toLowerCase():"de").startsWith("de")?n:t,m=n=>String(n||"").trim().toLocaleLowerCase("de");function g(n){let t=String(n||"").trim();for(let e=0;e<16;e++){const o=t.match(/^(?:\d{2}>|\[\d{2}\])\s+(.+)$/s);if(!(o!=null&&o[1]))break;t=String(o[1]).trim()}return t}function f(n,t){const e=g(n),o=[/^═{5}\s+(.+?)\s+═{5}$/,/^\*\*\*\*\s+(.+?)\s+\*\*\*\*$/,/^[—–-]{1,5}\s+(.+?)\s+[—–-]{1,5}$/];let a="";for(const s of o){const l=e.match(s);if(l!=null&&l[1]){a=String(l[1]).trim();break}}return a?(Array.isArray(t)?t:[]).find(s=>m(s)===m(a))||a:""}function x(n){const t=Array.isArray(n==null?void 0:n.markets)?n.markets:[];return(Array.isArray(n==null?void 0:n.items)?n.items:[]).filter(e=>(e==null?void 0:e.id)&&!f(e.text,t)).map(e=>({...e,text:g(e.text)}))}const w=`
|
|
2
|
-
.shoppingroute-list-toolbar{display:flex;flex-wrap:wrap;gap:9px;align-items:center;margin-bottom:14px}
|
|
3
|
-
.shoppingroute-list-toolbar select,.shoppingroute-list-toolbar button{min-height:36px;box-sizing:border-box}
|
|
4
|
-
.shoppingroute-list-toolbar select{min-width:150px;padding:5px 8px}
|
|
5
|
-
.shoppingroute-market-grid{display:flex;flex-direction:column;gap:0}
|
|
6
|
-
.shoppingroute-market-column{min-width:0;border:1px solid currentColor;border-radius:8px;overflow:hidden}
|
|
7
|
-
.shoppingroute-market-title{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:9px 11px;font-weight:700;border-bottom:1px solid currentColor}
|
|
8
|
-
.shoppingroute-market-count{font-size:.82rem;opacity:.65;font-weight:500}
|
|
9
|
-
.shoppingroute-item-list{display:flex;flex-direction:column}
|
|
10
|
-
.shoppingroute-item-row{display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:8px;align-items:center;padding:7px 9px;border-bottom:1px solid currentColor}
|
|
11
|
-
.shoppingroute-item-row:last-child{border-bottom:0}
|
|
12
|
-
.shoppingroute-drag-handle{font-size:16px;opacity:.5;cursor:grab;user-select:none;text-align:center}
|
|
13
|
-
.shoppingroute-item-name{font-weight:600;word-break:break-word}
|
|
14
|
-
.shoppingroute-item-meta{font-size:.78rem;opacity:.62;margin-top:2px}
|
|
15
|
-
.shoppingroute-item-actions{display:flex;gap:4px;align-items:center;justify-content:flex-end}
|
|
16
|
-
.shoppingroute-list-button{min-width:30px;min-height:30px;padding:4px 8px;border:1px solid currentColor;border-radius:4px;background:transparent;color:inherit;cursor:pointer}
|
|
17
|
-
.shoppingroute-list-button:disabled{cursor:default;opacity:.35}
|
|
18
|
-
.shoppingroute-item-actions select{min-width:92px;max-width:125px;min-height:30px;border:1px solid currentColor;border-radius:4px;background:transparent;color:inherit;padding:3px 5px}
|
|
19
|
-
.shoppingroute-empty{opacity:.58;padding:18px 11px;text-align:center}
|
|
20
|
-
@media (max-width: 600px) {
|
|
21
|
-
.shoppingroute-list-toolbar>*{width:100%;max-width:none}
|
|
22
|
-
.shoppingroute-item-row{grid-template-columns:18px minmax(0,1fr)}
|
|
23
|
-
.shoppingroute-item-actions{grid-column:2;justify-content:flex-start;flex-wrap:wrap;margin-top:3px}
|
|
24
|
-
.shoppingroute-item-actions select{flex:1 1 120px;max-width:none}
|
|
25
|
-
.shoppingroute-drag-handle{cursor:default}
|
|
26
|
-
}
|
|
27
|
-
`;class y extends b.Component{constructor(t){super(t),this.state={view:null,loading:!0,busy:"",error:""}}componentDidMount(){this.load()}instanceName(){const t=String(this.props.adapterName||"shoppingroute"),e=Number.isFinite(Number(this.props.instance))?Number(this.props.instance):0;return`${t}.${e}`}async send(t,e){var o;if(!((o=this.props.socket)!=null&&o.sendTo))throw new Error("Admin socket is unavailable.");return this.props.socket.sendTo(this.instanceName(),t,e||{})}async load(t){this.setState({loading:!0,error:""});try{const e=await this.send("getShoppingList",{listName:t});if(!e||e.error)throw new Error((e==null?void 0:e.error)||"Shopping list could not be loaded.");this.setState({view:e,loading:!1,busy:""})}catch(e){this.setState({loading:!1,busy:"",error:e instanceof Error?e.message:String(e)})}}async move(t,e,o){const a=this.state.view;if(!(!a||this.state.busy)){this.setState({busy:t,error:""});try{const s=await this.send("moveShoppingItem",{listName:a.listName,itemId:t,targetMarket:e,targetPosition:o});if(s!=null&&s.view&&this.setState({view:s.view}),!(s!=null&&s.ok))throw new Error((s==null?void 0:s.error)||"The item could not be moved.");this.setState({busy:""})}catch(s){this.setState({busy:"",error:s instanceof Error?s.message:String(s)}),await this.load(a.listName)}}}async clearManual(){const t=this.state.view;if(!(!t||this.state.busy)){this.setState({busy:"__clear__",error:""});try{const e=await this.send("clearManualShoppingOrder",{listName:t.listName});if(e!=null&&e.view&&this.setState({view:e.view}),!(e!=null&&e.ok))throw new Error((e==null?void 0:e.error)||"Manual order could not be cleared.");this.setState({busy:""})}catch(e){this.setState({busy:"",error:e instanceof Error?e.message:String(e)}),await this.load(t.listName)}}}onDragStart(t,e){t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",e)}onDrop(t,e,o){t.preventDefault();const a=t.dataTransfer.getData("text/plain");a&&this.move(a,e,o)}renderRow(t,e,o,a,s){const l=!!this.state.busy;return r("div",{key:t.id,className:"shoppingroute-item-row",draggable:!l,onDragStart:i=>this.onDragStart(i,t.id),onDragOver:i=>i.preventDefault(),onDrop:i=>this.onDrop(i,t.market,o)},[r("div",{key:"drag",className:"shoppingroute-drag-handle",title:p("Ziehen","Drag"),"aria-hidden":!0},"⋮⋮"),r("div",{key:"main"},[r("div",{key:"name",className:"shoppingroute-item-name"},g(t.text)),t.category||t.manual?r("div",{key:"meta",className:"shoppingroute-item-meta"},[t.category||p("Ohne Produktgruppe","No product group"),t.manual?` · ${p("manuell","manual")}`:""]):null]),r("div",{key:"actions",className:"shoppingroute-item-actions"},[r("button",{key:"up",type:"button",className:"shoppingroute-list-button",disabled:l||o===0,title:p("Nach oben","Move up"),onClick:()=>void this.move(t.id,t.market,o-1)},"↑"),r("button",{key:"down",type:"button",className:"shoppingroute-list-button",disabled:l||o===e.length-1,title:p("Nach unten","Move down"),onClick:()=>void this.move(t.id,t.market,o+1)},"↓"),r("select",{key:"market",value:t.market,disabled:l,title:p("Markt wechseln","Change market"),"aria-label":p("In einen anderen Markt verschieben","Move to another market"),onChange:i=>{const d=i.target.value,u=s.filter(h=>h.market===d&&h.id!==t.id).length;this.move(t.id,d,u)}},a.markets.map(i=>r("option",{key:i,value:i},i)))])])}render(){const t=this.state.view,e=!!this.state.busy,o=[r("style",{key:"styles"},w)];if(o.push(r("div",{key:"intro",style:{marginBottom:"12px",lineHeight:1.4}},[r("strong",{key:"title"},p("Aktuelle Einkaufsliste","Current shopping list")),r("div",{key:"hint",style:{opacity:.7,marginTop:"3px"}},p("Ziehen verschiebt Artikel direkt. Pfeile und Marktauswahl sind die einfache Alternative für Maus und Handy.","Drag items directly. Arrows and the market selector are the simple alternative for mouse and phone."))])),this.state.error&&o.push(r("div",{key:"error",style:{padding:"9px",border:"1px solid currentColor",borderRadius:"6px",marginBottom:"10px"}},this.state.error)),this.state.loading||!t)return o.push(r("div",{key:"loading"},p("Liste wird geladen …","Loading list …"))),r("div",{style:{width:"100%"}},o);const a=x(t);o.push(r("div",{key:"toolbar",className:"shoppingroute-list-toolbar"},[r("select",{key:"list",value:t.listName,disabled:e,onChange:i=>void this.load(i.target.value),"aria-label":p("Einkaufsliste auswählen","Select shopping list")},t.lists.map(i=>r("option",{key:i,value:i},i))),r("button",{key:"refresh",type:"button",className:"shoppingroute-list-button",disabled:e,onClick:()=>void this.load(t.listName)},p("Aktualisieren","Refresh")),r("button",{key:"clear",type:"button",className:"shoppingroute-list-button",disabled:e,onClick:()=>void this.clearManual()},p("Manuelle Reihenfolge zurücksetzen","Reset manual order")),t.dryRun?r("strong",{key:"dry",style:{marginLeft:"auto"}},p("Dry Run aktiv – Verschieben gesperrt","Dry Run active – moving is disabled")):null]));const s=t.markets.filter(i=>a.some(d=>d.market===i));if(!s.length)return o.push(r("div",{key:"empty-list",style:{opacity:.7,padding:"16px 0"}},p("Die Einkaufsliste ist leer.","The shopping list is empty."))),r("div",{style:{width:"100%"}},o);const l=s.map(i=>{const d=a.filter(u=>u.market===i);return r("section",{key:i,className:"shoppingroute-market-column",onDragOver:u=>u.preventDefault(),onDrop:u=>this.onDrop(u,i,d.length)},[r("div",{key:"title",className:"shoppingroute-market-title"},[r("span",{key:"name"},i),r("span",{key:"count",className:"shoppingroute-market-count"},String(d.length))]),d.length?r("div",{key:"items",className:"shoppingroute-item-list"},d.map((u,h)=>this.renderRow(u,d,h,t,a))):r("div",{key:"empty",className:"shoppingroute-empty"},p("Hierher ziehen","Drop here"))])});return o.push(r("div",{key:"grid",className:"shoppingroute-market-grid"},l)),r("div",{style:{width:"100%"}},o)}}c.exports={Components:{ShoppingListEditor:y},ShoppingListEditorModel:{stripVisiblePrefix:g,headerMarket:f,visibleItems:x},ShoppingListEditor:y};const S=(c.exports==null?{}:c.exports).default||c.exports,M=S.Components;export{M as default};
|