xml-explorer 0.1.0
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.
Potentially problematic release.
This version of xml-explorer might be problematic. Click here for more details.
- package/README.md +76 -0
- package/dist/TreeView.d.ts +11 -0
- package/dist/TreeView.d.ts.map +1 -0
- package/dist/XMLExplorer.d.ts +8 -0
- package/dist/XMLExplorer.d.ts.map +1 -0
- package/dist/assets/xmlExplorer.worker-CHTIePgi.js +4 -0
- package/dist/btTree.d.ts +19 -0
- package/dist/btTree.d.ts.map +1 -0
- package/dist/index.cjs +11 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2521 -0
- package/dist/treeCatalog.d.ts +5 -0
- package/dist/treeCatalog.d.ts.map +1 -0
- package/dist/useXmlExplorerEngine.d.ts +40 -0
- package/dist/useXmlExplorerEngine.d.ts.map +1 -0
- package/dist/xmlExplorer.worker.d.ts +2 -0
- package/dist/xmlExplorer.worker.d.ts.map +1 -0
- package/dist/xmlHighlighting.d.ts +11 -0
- package/dist/xmlHighlighting.d.ts.map +1 -0
- package/dist/xmlProtocol.d.ts +109 -0
- package/dist/xmlProtocol.d.ts.map +1 -0
- package/package.json +62 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),Pe=require("@monaco-editor/react"),Re=require("monaco-editor");var le=typeof document<"u"?document.currentScript:null;function De(r){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const i in r)if(i!=="default"){const t=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(a,i,t.get?t:{enumerable:!0,get:()=>r[i]})}}return a.default=r,Object.freeze(a)}const Ee=De(Re);var oe={exports:{}},se={};var pe;function Le(){if(pe)return se;pe=1;var r=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(t,d,c){var m=null;if(c!==void 0&&(m=""+c),d.key!==void 0&&(m=""+d.key),"key"in d){c={};for(var p in d)p!=="key"&&(c[p]=d[p])}else c=d;return d=c.ref,{$$typeof:r,type:t,key:m,ref:d!==void 0?d:null,props:c}}return se.Fragment=a,se.jsx=i,se.jsxs=i,se}var de={};var Te;function He(){return Te||(Te=1,process.env.NODE_ENV!=="production"&&(function(){function r(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===U?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $:return"Fragment";case Y:return"Profiler";case Q:return"StrictMode";case ee:return"Suspense";case M:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case G:return"Portal";case Z:return e.displayName||"Context";case N:return(e._context.displayName||"Context")+".Consumer";case V:var u=e.render;return e=e.displayName,e||(e=u.displayName||u.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ne:return u=e.displayName||null,u!==null?u:r(e.type)||"Memo";case O:u=e._payload,e=e._init;try{return r(e(u))}catch{}}return null}function a(e){return""+e}function i(e){try{a(e);var u=!1}catch{u=!0}if(u){u=console;var C=u.error,x=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return C.call(u,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",x),a(e)}}function t(e){if(e===$)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===O)return"<...>";try{var u=r(e);return u?"<"+u+">":"<...>"}catch{return"<...>"}}function d(){var e=S.A;return e===null?null:e.getOwner()}function c(){return Error("react-stack-top-frame")}function m(e){if(h.call(e,"key")){var u=Object.getOwnPropertyDescriptor(e,"key").get;if(u&&u.isReactWarning)return!1}return e.key!==void 0}function p(e,u){function C(){P||(P=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",u))}C.isReactWarning=!0,Object.defineProperty(e,"key",{get:C,configurable:!0})}function y(){var e=r(this.type);return L[e]||(L[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function b(e,u,C,x,re,n){var s=C.ref;return e={$$typeof:j,type:e,key:u,props:C,_owner:x},(s!==void 0?s:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:y}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:re}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:n}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function D(e,u,C,x,re,n){var s=u.children;if(s!==void 0)if(x)if(o(s)){for(x=0;x<s.length;x++)k(s[x]);Object.freeze&&Object.freeze(s)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else k(s);if(h.call(u,"key")){s=r(e);var A=Object.keys(u).filter(function(R){return R!=="key"});x=0<A.length?"{key: someKey, "+A.join(": ..., ")+": ...}":"{key: someKey}",ie[s+x]||(A=0<A.length?"{"+A.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
|
+
let props = %s;
|
|
3
|
+
<%s {...props} />
|
|
4
|
+
React keys must be passed directly to JSX without using spread:
|
|
5
|
+
let props = %s;
|
|
6
|
+
<%s key={someKey} {...props} />`,x,s,A,s),ie[s+x]=!0)}if(s=null,C!==void 0&&(i(C),s=""+C),m(u)&&(i(u.key),s=""+u.key),"key"in u){C={};for(var f in u)f!=="key"&&(C[f]=u[f])}else C=u;return s&&p(C,typeof e=="function"?e.displayName||e.name||"Unknown":e),b(e,s,C,d(),re,n)}function k(e){B(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===O&&(e._payload.status==="fulfilled"?B(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function B(e){return typeof e=="object"&&e!==null&&e.$$typeof===j}var v=l,j=Symbol.for("react.transitional.element"),G=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),Q=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),Z=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),U=Symbol.for("react.client.reference"),S=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,h=Object.prototype.hasOwnProperty,o=Array.isArray,I=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(e){return e()}};var P,L={},F=v.react_stack_bottom_frame.bind(v,c)(),_=I(t(c)),ie={};de.Fragment=$,de.jsx=function(e,u,C){var x=1e4>S.recentlyCreatedOwnerStacks++;return D(e,u,C,!1,x?Error("react-stack-top-frame"):F,x?I(t(e)):_)},de.jsxs=function(e,u,C){var x=1e4>S.recentlyCreatedOwnerStacks++;return D(e,u,C,!0,x?Error("react-stack-top-frame"):F,x?I(t(e)):_)}})()),de}var ye;function we(){return ye||(ye=1,process.env.NODE_ENV==="production"?oe.exports=Le():oe.exports=He()),oe.exports}var T=we();const Se={id:"EN16931",title:"EN16931 Business Terms",xpaths:{ubl:"/ubl:Invoice",cii:"/rsm:CrossIndustryInvoice"},children:[{id:"BT-1",title:"BT-1 Invoice number",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:ID"}},{id:"BT-2",title:"BT-2 Invoice issue date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString"}},{id:"BT-3",title:"BT-3 Invoice type code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:TypeCode"}},{id:"BT-5",title:"BT-5 Invoice currency code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode"}},{id:"BT-6",title:"BT-6 VAT accounting currency code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode"}},{id:"BT-7",title:"BT-7 Value added tax point date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:TaxPointDate/udt:DateString"}},{id:"BT-8",title:"BT-8 Value added tax point date code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:DueDateTypeCode"}},{id:"BT-9",title:"BT-9 Payment due date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:DueDateDateTime/udt:DateTimeString"}},{id:"BT-10",title:"BT-10 Buyer reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerReference"}},{id:"BT-11",title:"BT-11 Project reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SpecifiedProcuringProject/ram:ID"}},{id:"BT-12",title:"BT-12 Contract reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:ContractReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-13",title:"BT-13 Purchase order reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerOrderReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-14",title:"BT-14 Sales order reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerOrderReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-15",title:"BT-15 Receiving advice reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ReceivingAdviceReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-16",title:"BT-16 Despatch advice reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:DespatchAdviceReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-17",title:"BT-17 Tender or lot reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-18",title:"BT-18 Invoiced object identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID"},children:[{id:"BT-18-1",title:"BT-18-1 Scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:ReferenceTypeCode"}}]},{id:"BT-19",title:"BT-19 Buyer accounting reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ReceivableSpecifiedTradeAccountingAccount/ram:ID"}},{id:"BT-20",title:"BT-20 Payment terms",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:Description"}},{id:"BG-1",title:"BG-1 INVOICE NOTE",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote"},children:[{id:"BT-21",title:"BT-21 Invoice note subject code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote/ram:SubjectCode"}},{id:"BT-22",title:"BT-22 Invoice note",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote/ram:Content"}}]},{id:"BG-2",title:"BG-2 PROCESS CONTROL",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext"},children:[{id:"BT-23",title:"BT-23 Business process type",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram: BusinessProcessSpecifiedDocumentContextParameter/ram:ID"}},{id:"BT-24",title:"BT-24 Specification identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID"}}]},{id:"BG-3",title:"BG-3 PRECEDING INVOICE REFERENCE",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument"},children:[{id:"BT-25",title:"BT-25 Preceding Invoice number",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-26",title:"BT-26 Preceding Invoice issue date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument/ram:FormattedIssueDateTime/qdt:DateTimeString"}}]},{id:"BG-5",title:"BG-5 SELLER",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty"},children:[{id:"BT-35",title:"BT-35 Seller address line 1",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:LineOne"}},{id:"BT-36",title:"BT-36 Seller address line 2",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:LineTwo"}},{id:"BT-162",title:"BT-162 Seller address line 3",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:LineThree"}},{id:"BT-37",title:"BT-37 Seller city",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CityName"}},{id:"BT-38",title:"BT-38 Seller post code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:PostcodeCode"}},{id:"BT-39",title:"BT-39 Seller country subdivision",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountrySubDivisionName"}},{id:"BT-40",title:"BT-40 Seller country code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountryID"}},{id:"BG-6",title:"BG-6 SELLER CONTACT",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact"},children:[{id:"BT-41",title:"BT-41 Seller contact point",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact/ram:PersonName"}},{id:"BT-42",title:"BT-42 Seller contact telephone number",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact/ram:TelephoneUniversalCommunication/ram:CompleteNumber"}},{id:"BT-43",title:"BT-43 Seller contact email address",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:DefinedTradeContact/ram:EmailURIUniversalCommunication/ram:URIID"}}]}]},{id:"BG-7",title:"BG-7 BUYER",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty"},children:[{id:"BT-44",title:"BT-44 Buyer name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:Name"}},{id:"BT-45",title:"BT-45 Buyer trading name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:TradingBusinessName"}},{id:"BT-46",title:"BT-46 Buyer identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:ID"},children:[{id:"BT-46-1",title:"BT-46-1 Buyer identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:GlobalID/@schemeID"}}]},{id:"BT-47",title:"BT-47 Buyer legal registration identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID"},children:[{id:"BT-47-1",title:"BT-47-1 Buyer legal registration identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID/@schemeID"}}]},{id:"BT-48",title:"BT-48 Buyer VAT identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID"}},{id:"BT-49",title:"BT-49 Buyer electronic address",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication/ram:URIID"},children:[{id:"BT-49-1",title:"BT-49-1 Buyer electronic address identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication/ram:URIID/@schemeID"}}]},{id:"BG-8",title:"BG-8 BUYER POSTAL ADDRESS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress"},children:[{id:"BT-50",title:"BT-50 Buyer address line 1",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:LineOne"}},{id:"BT-51",title:"BT-51 Buyer address line 2",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:LineTwo"}},{id:"BT-163",title:"BT-163 Buyer address line 3",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:LineThree"}},{id:"BT-52",title:"BT-52 Buyer city",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CityName"}},{id:"BT-53",title:"BT-53 Buyer post code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:PostcodeCode"}},{id:"BT-54",title:"BT-54 Buyer country subdivision",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CountrySubDivisionName"}},{id:"BT-55",title:"BT-55 Buyer country code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CountryID"}}]},{id:"BG-9",title:"BG-9 BUYER CONTACT",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact"},children:[{id:"BT-56",title:"BT-56 Buyer contact point",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact/ram:PersonName"}},{id:"BT-57",title:"BT-57 Buyer contact telephone number",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact/ram:TelephoneUniversalCommunication/ram:CompleteNumber"}},{id:"BT-58",title:"BT-58 Buyer contact email address",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:DefinedTradeContact/ram:EmailURIUniversalCommunication/ram:URIID"}}]}]},{id:"BG-10",title:"BG-10 PAYEE",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty"},children:[{id:"BT-59",title:"BT-59 Payee name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:Name"}},{id:"BT-60",title:"BT-60 Payee identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:ID"},children:[{id:"BT-60-1",title:"BT-60-1 Payee identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:GlobalID/@schemeID"}}]},{id:"BT-61",title:"BT-61 Payee legal registration identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:SpecifiedLegalOrganization/ram:ID"},children:[{id:"BT-61-1",title:"BT-61-1 Payee legal registration identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:SpecifiedLegalOrganization/ram:ID/@schemeID"}}]}]},{id:"BG-11",title:"BG-11 SELLER TAX REPRESENTATIVE PARTY",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty"},children:[{id:"BT-62",title:"BT-62 Seller tax representa-tive name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:Name"}},{id:"BT-63",title:"BT-63 Seller tax representa-tive VAT identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID"}},{id:"BG-12",title:"BG-12 SELLER TAX REPRESENTATIVE POSTAL ADDRESS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress"},children:[{id:"BT-64",title:"BT-64 Tax representa-tive address line 1",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:LineOne"}},{id:"BT-65",title:"BT-65 Tax representa-tive address line 2",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:LineTwo"}},{id:"BT-164",title:"BT-164 Tax representative address line 3",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:LineThree"}},{id:"BT-66",title:"BT-66 Tax representa-tive city",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CityName"}},{id:"BT-67",title:"BT-67 Tax representa-tive post code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:PostcodeCode"}},{id:"BT-68",title:"BT-68 Tax representa-tive country subdivision",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CountrySubDivisionName"}},{id:"BT-69",title:"BT-69 Tax representa-tive country code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CountryID"}}]}]},{id:"BG-13",title:"BG-13 DELIVERY INFORMATION",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty"},children:[{id:"BT-70",title:"BT-70 Deliver to party name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:Name"}},{id:"BT-71",title:"BT-71 Deliver to location identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:ID"},children:[{id:"BT-71-1",title:"BT-71-1 Deliver to location identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:GlobalID/@schemeID"}}]},{id:"BT-72",title:"BT-72 Actual delivery date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ActualDeliverySupplyChainEvent/ram:OccurrenceDateTime/udt:DateTimeString"}},{id:"BG-14",title:"BG-14 DELIVERY OR INVOICE PERIOD",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod"},children:[{id:"BT-73",title:"BT-73 Invoicing period start date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod/ram:StartDateTime/udt:DateTimeString"}},{id:"BT-74",title:"BT-74 Invoicing period end date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod/ram:EndDateTime/udt:DateTimeString"}}]},{id:"BG-15",title:"BG-15 DELIVER TO ADDRESS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress"},children:[{id:"BT-75",title:"BT-75 Deliver to address line 1",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:LineOne"}},{id:"BT-76",title:"BT-76 Deliver to address line 2",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:LineTwo"}},{id:"BT-165",title:"BT-165 Deliver to address line 3",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:LineThree"}},{id:"BT-77",title:"BT-77 Deliver to city",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CityName"}},{id:"BT-78",title:"BT-78 Deliver to post code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:PostcodeCode"}},{id:"BT-79",title:"BT-79 Deliver to country subdivision",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountrySubDivisionName"}},{id:"BT-80",title:"BT-80 Deliver to country code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID"}}]}]},{id:"BG-16",title:"BG-16 PAYMENT INSTRUC-TIONS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans"},children:[{id:"BT-81",title:"BT-81 Payment means type code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:TypeCode"}},{id:"BT-82",title:"BT-82 Payment means text",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:Information"}},{id:"BT-83",title:"BT-83 Remittance information",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PaymentReference"}},{id:"BG-17",title:"BG-17 CREDIT TRANSFER",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeePartyCreditorFinancialAccount"},children:[{id:"BT-84",title:"BT-84 Payment account identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeePartyCreditorFinancialAccount/ram:IBANID"}},{id:"BT-85",title:"BT-85 Payment account name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayeePartyCreditorFinancialAccount/ram:AccountName"}},{id:"BT-86",title:"BT-86 Payment service provider identifier"}]},{id:"BG-18",title:"BG-18 PAYMENT CARD INFORMA-TION",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard"},children:[{id:"BT-87",title:"BT-87 Payment card primary account number",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard/ram:ID"}},{id:"BT-88",title:"BT-88 Payment card holder name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:ApplicableTradeSettlementFinancialCard/ram:CardholderName"}}]},{id:"BG-19",title:"BG-19 DIRECT DEBIT",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement"},children:[{id:"BT-89",title:"BT-89 Mandate reference identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:DirectDebitMandateID"}},{id:"BT-90",title:"BT-90 Bank assigned creditor identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:CreditorReferenceID"}},{id:"BT-91",title:"BT-91 Debited account identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:PayerPartyDebtorFinancialAccount/ram:IBANID"}}]}]},{id:"BG-20",title:"BG-20 DOCUMENT LEVEL ALLOW-ANCES",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge"},children:[{id:"BT-92",title:"BT-92 Document level allowance amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount"}},{id:"BT-93",title:"BT-93 Document level allowance base amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:BasisAmount"}},{id:"BT-94",title:"BT-94 Document level allowance percentage",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CalculationPercent"}},{id:"BT-95",title:"BT-95 Document level allowance VAT category code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:TypeCode"}},{id:"BT-96",title:"BT-96 Document level allowance VAT rate",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:RateApplicablePercent"}},{id:"BT-97",title:"BT-97 Document level allowance reason",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:Reason"}},{id:"BT-98",title:"BT-98 Document level allowance reason code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ReasonCode"}}]},{id:"BG-21",title:"BG-21 DOCUMENT LEVEL CHARGES",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge"},children:[{id:"BT-99",title:"BT-99 Document level charge amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount"}},{id:"BT-100",title:"BT-100 Document level charge base amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:BasisAmount"}},{id:"BT-101",title:"BT-101 Document level charge percentage",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CalculationPercent"}},{id:"BT-102",title:"BT-102 Document level charge VAT category code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:TypeCode"}},{id:"BT-103",title:"BT-103 Document level charge VAT rate",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:RateApplicablePercent"}},{id:"BT-104",title:"BT-104 Document level charge reason",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:Reason"}},{id:"BT-105",title:"BT-105 Document level charge reason code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ReasonCode"}}]},{id:"BG-22",title:"BG-22 DOCUMENT TOTALS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation"},children:[{id:"BT-106",title:"BT-106 Sum of Invoice line net amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:LineTotalAmount"}},{id:"BT-107",title:"BT-107 Sum of allowances on document level",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:AllowanceTotalAmount"}},{id:"BT-108",title:"BT-108 Sum of charges on document level",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount"}},{id:"BT-109",title:"BT-109 Invoice total amount without VAT",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxBasisTotalAmount"}},{id:"BT-110",title:"BT-110 Invoice total VAT amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount"}},{id:"BT-111",title:"BT-111 Invoice total VAT amount in accounting currency",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount"}},{id:"BT-112",title:"BT-112 Invoice total amount with VAT",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:GrandTotalAmount"}},{id:"BT-113",title:"BT-113 Paid amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TotalPrepaidAmount"}},{id:"BT-114",title:"BT-114 Rounding amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:RoundingAmount"}},{id:"BT-115",title:"BT-115 Amount due for payment",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:DuePayableAmount"}}]},{id:"BG-23",title:"BG-23 VAT BREAK-DOWN",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax"},children:[{id:"BT-116",title:"BT-116 VAT category taxable amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:BasisAmount"}},{id:"BT-117",title:"BT-117 VAT category tax amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:CalculatedAmount"}},{id:"BT-118",title:"BT-118 VAT category code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:TypeCode"}},{id:"BT-119",title:"BT-119 VAT category rate",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:RateApplicablePercent"}},{id:"BT-120",title:"BT-120 VAT exemption reason text",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:ExemptionReason"}},{id:"BT-121",title:"BT-121 VAT exemption reason code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:ExemptionReasonCode"}}]},{id:"BG-24",title:"BG-24 ADDITIONAL SUPPORTING DOCUMENTS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument"},children:[{id:"BT-122",title:"BT-122 Supporting document reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID"}},{id:"BT-123",title:"BT-123 Supporting document description",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:Name"}},{id:"BT-124",title:"BT-124 External document location",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:URIID"}},{id:"BT-125",title:"BT-125 Attached document",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject"},children:[{id:"BT-125-1",title:"BT-125-1 Attached document Mime code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject/@mimeCode"}},{id:"BT-125-2",title:"BT-125-2 Attached document Filename",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject/@filename"}}]}]},{id:"BG-25",title:"BG-25 INVOICE LINE",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem"},children:[{id:"BT-126",title:"BT-126 Invoice line identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument/ram:LineID"}},{id:"BT-127",title:"BT-127 Invoice line note",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument/ram:IncludedNote/ram:Content"}},{id:"BT-128",title:"BT-128 Invoice line object identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID"},children:[{id:"BT-128-1",title:"BT-128-1 Invoice line object identifier identification",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:AdditionalReferencedDocument/ram:ReferenceTypeCode"}}]},{id:"BT-129",title:"BT-129 Invoiced quantity",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity"}},{id:"BT-130",title:"BT-130 Invoiced quantity unit of measure",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode"}},{id:"BT-131",title:"BT-131 Invoice line net amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount"}},{id:"BT-132",title:"BT-132 Referenced purchase order line reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:BuyerOrderReferencedDocument/ram:LineID"}},{id:"BT-133",title:"BT-133 Invoice line Buyer accounting reference",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ReceivableSpecifiedTradeAccountingAccount/ram:ID"}},{id:"BG-26",title:"BG-26 INVOICE LINE PERIOD",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod"},children:[{id:"BT-134",title:"BT-134 Invoice line period start date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod/ram:StartDateTime/udt:DateTimeString"}},{id:"BT-135",title:"BT-135 Invoice line period end date",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod/ram:EndDateTime/udt:DateTimeString"}}]},{id:"BG-27",title:"BG-27 INVOICE LINE ALLOW-ANCES",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge"},children:[{id:"BT-136",title:"BT-136 Invoice line allowance amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount"}},{id:"BT-137",title:"BT-137 Invoice line allowance base amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:BasisAmount"}},{id:"BT-138",title:"BT-138 Invoice line allowance percentage",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CalculationPercent"}},{id:"BT-139",title:"BT-139 Invoice line allowance reason",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:Reason"}},{id:"BT-140",title:"BT-140 Invoice line allowance reason code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ReasonCode"}}]},{id:"BG-28",title:"BG-28 INVOICE LINE CHARGES",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge"},children:[{id:"BT-141",title:"BT-141 Invoice line charge amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ActualAmount"}},{id:"BT-142",title:"BT-142 Invoice line charge base amount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:BasisAmount"}},{id:"BT-143",title:"BT-143 Invoice line charge percentage",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CalculationPercent"}},{id:"BT-144",title:"BT-144 Invoice line charge reason",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:Reason"}},{id:"BT-145",title:"BT-145 Invoice line charge reason code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ReasonCode"}}]},{id:"BG-29",title:"BG-29 PRICE DETAILS",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement"},children:[{id:"BT-146",title:"BT-146 Item net price",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:ChargeAmount"}},{id:"BT-147",title:"BT-147 Item price discount",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:AppliedTradeAllowanceCharge/ram:ActualAmount"}},{id:"BT-148",title:"BT-148 Item gross price",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:ChargeAmount"}},{id:"BT-149",title:"BT-149 Item price base quantity",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:BasisQuantity"}},{id:"BT-150",title:"BT-150 Item price base quantity unit of measure code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:BasisQuantity/@unitCode"}}]},{id:"BG-30",title:"BG-30 LINE VAT INFORMA-TION",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax"},children:[{id:"BT-151",title:"BT-151 Invoiced item VAT category code",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:TypeCode"}},{id:"BT-152",title:"BT-152 Invoiced item VAT rate",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:RateApplicablePercent"}}]},{id:"BG-31",title:"BG-31 ITEM INFORMA-TION",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct"},children:[{id:"BT-153",title:"BT-153 Item name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:Name"}},{id:"BT-154",title:"BT-154 Item description",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:Description"}},{id:"BT-155",title:"BT-155 Item Seller's identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:SellerAssignedID"}},{id:"BT-156",title:"BT-156 Item Buyer's identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:BuyerAssignedID"}},{id:"BT-157",title:"BT-157 Item standard identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:GlobalID"},children:[{id:"BT-157-1",title:"BT-157-1 Item standard identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:GlobalID/@schemeID"}}]},{id:"BT-158",title:"BT-158 Item classification identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:DesignatedProductClassification/ram:ClassCode"},children:[{id:"BT-158-1",title:"BT-158-1 Item classification identifier identification scheme identifier",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:DesignatedProductClassification/ram:ClassCode/@listID"}},{id:"BT-158-2",title:"BT-158-2 Scheme version identifer",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:DesignatedProductClassification/ram:ClassCode/@listVersionID"}}]},{id:"BT-159",title:"BT-159 Item country of origin",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:OriginTradeCountry/ram:ID"}},{id:"BG-32",title:"BG-32 ITEM ATTRIBUTES",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic"},children:[{id:"BT-160",title:"BT-160 Item attribute name",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic/ram:Description"}},{id:"BT-161",title:"BT-161 Item attribute value",xpaths:{cii:"/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic/ram:Value"}}]}]}]}]};function ke(r){return r.replace(/\/@[^/]+$/,"")}function fe(r=Se){const a=(i,t)=>{const d={key:t,id:i.id,title:i.title,xpaths:i.xpaths};return i.children?.length&&(d.children=i.children.map((c,m)=>a(c,`${t}.${c.id}:${m}`))),d};return a(r,"EN16931:0")}function Be(r,a){const i=[],t=d=>{const c=d.xpaths?.[a];c&&i.push({key:d.key,id:d.id,xpath:c,cursorXpath:ke(c)}),d.children?.forEach(t)};return t(r),i}function Ne(r){const{root:a}=r;return T.jsx("div",{children:T.jsx(Ae,{node:a,depth:0,...r})})}function Ae(r){const{node:a,depth:i,expanded:t,selectedKey:d,onClickNode:c,getNodeXpath:m,getMatchCount:p}=r,y=!!a.children?.length,b=t[a.key]??!1,D=d===a.key,k=m(a),B=p(a);return T.jsxs("div",{children:[T.jsxs("div",{role:"button",tabIndex:0,"data-tree-key":a.key,onClick:()=>c(a),onKeyDown:v=>v.key==="Enter"&&c(a),style:{color:"black",display:"flex",alignItems:"center",gap:8,padding:"6px 8px",paddingLeft:i*12+8,borderRadius:6,cursor:"pointer",background:D?"rgba(0,0,0,0.06)":"transparent",userSelect:"none"},title:k||a.key,children:[T.jsx("span",{style:{width:16,display:"inline-block",textAlign:"center"},children:y?b?"▾":"▸":"•"}),T.jsx("span",{style:{fontFamily:"monospace",fontSize:12,opacity:.85},children:a.id}),T.jsx("span",{style:{fontSize:13},children:a.title}),k&&T.jsx(T.Fragment,{children:typeof B=="number"&&T.jsx("span",{style:{marginLeft:"auto",fontSize:11,fontFamily:"monospace",color:B===0?"#b91c1c":"#1f2937",background:B===0?"#fee2e2":"#e5e7eb",borderRadius:999,padding:"1px 7px"},children:B})})]}),y&&b&&T.jsx("div",{children:a.children.map(v=>T.jsx(Ae,{...r,node:v,depth:i+1},v.key))})]})}function Oe(){return typeof window<"u"&&window.localStorage.getItem("xmlExplorerDebug")==="1"}function Me(r){const{xmlText:a,syntax:i,mappings:t}=r,d=l.useRef(null),c=l.useRef(0),m=l.useRef(0),p=l.useRef(new Map),y=l.useRef(new Map),b=l.useRef(null),D=l.useRef(null),k=l.useRef("idle"),[B,v]=l.useState("idle"),[j,G]=l.useState(null),[$,Q]=l.useState({}),[Y,N]=l.useState(null),[Z,V]=l.useState(null),[ee,M]=l.useState(null);l.useEffect(()=>{k.current=B},[B]);const ne=l.useMemo(()=>t.map(S=>`${S.key}|${S.xpath}`).join("||"),[t]);l.useEffect(()=>{const S=new Worker(new URL("/assets/xmlExplorer.worker-CHTIePgi.js",typeof document>"u"?require("url").pathToFileURL(__filename).href:le&&le.tagName.toUpperCase()==="SCRIPT"&&le.src||new URL("index.cjs",document.baseURI).href),{type:"module"});return d.current=S,S.onmessage=h=>{const o=h.data;if(o.xmlVersion===c.current)switch(o.type){case"INIT_PROGRESS":v("indexing");return;case"INIT_READY":v("ready"),N(I=>I?.total?I:null);return;case"COUNT_BATCH":Q(I=>{const P={...I};for(const L of o.entries)P[L.key]=L.count;return P}),N({done:o.done,total:o.total}),o.done>=o.total&&N(null);return;case"CURSOR_RESULT":if(o.requestId!==m.current)return;Oe()&&console.debug("[xml-explorer] cursor-result",{requestId:o.requestId,key:o.key,debug:o.debug}),V(o.key),M(o.debug??null);return;case"MATCH_RESULT":{const I=p.current.get(o.requestId);I&&(p.current.delete(o.requestId),I.resolve({total:o.total,matches:o.matches}));return}case"COUNT_RESULT":{const I=y.current.get(o.requestId);I&&(y.current.delete(o.requestId),I.resolve(o.count));return}case"ERROR":if(v("error"),G(o.message),typeof o.requestId=="number"){const I=p.current.get(o.requestId);I&&(p.current.delete(o.requestId),I.reject(new Error(o.message)));const P=y.current.get(o.requestId);P&&(y.current.delete(o.requestId),P.reject(new Error(o.message)))}}},()=>{S.terminate(),d.current=null,p.current.forEach(h=>h.reject(new Error("Worker terminated"))),p.current.clear(),y.current.forEach(h=>h.reject(new Error("Worker terminated"))),y.current.clear()}},[]),l.useEffect(()=>{c.current+=1;const S=c.current;m.current=0,V(null),G(null),v("indexing"),Q({}),N(t.length?{done:0,total:t.length}:null),M(null),p.current.forEach(o=>o.reject(new Error("Canceled due to new XML version"))),p.current.clear(),y.current.forEach(o=>o.reject(new Error("Canceled due to new XML version"))),y.current.clear();const h={type:"INIT",xmlVersion:S,xmlText:a,syntax:i,mappings:t};d.current?.postMessage(h)},[a,i,ne,t]);const O=l.useCallback((S,h)=>{if(k.current!=="ready"||b.current===S&&D.current===h)return;b.current=S,D.current=h;const o=++m.current,I={type:"CURSOR_LOOKUP",xmlVersion:c.current,requestId:o,line:S,column:h};d.current?.postMessage(I)},[]),X=l.useCallback((S,h,o=1,I)=>new Promise((P,L)=>{const F=++m.current,_={type:"GET_MATCHES",xmlVersion:c.current,requestId:F,nodeKey:S,offset:h,limit:o,context:I};p.current.set(F,{resolve:P,reject:L}),d.current?.postMessage(_)}),[]),U=l.useCallback((S,h)=>new Promise((o,I)=>{const P=++m.current,L={type:"GET_COUNT",xmlVersion:c.current,requestId:P,nodeKey:S,context:h};y.current.set(P,{resolve:o,reject:I}),d.current?.postMessage(L)}),[]);return{workerState:B,error:j,countByKey:$,countProgress:Y,cursorMatchKey:Z,cursorLookupDebug:ee,lookupCursor:O,requestMatches:X,requestCount:U}}const _e=120,xe=500;function he(){return typeof window<"u"&&window.localStorage.getItem("xmlExplorerDebug")==="1"}function je({xml:r,syntax:a="cii"}){const i=l.useRef(null),t=l.useRef([]),d=l.useRef(null),c=l.useRef(new Set),m=l.useRef("idle"),p=l.useRef(!1),y=l.useRef(null),b=l.useRef(null),D=l.useRef(null),[k,B]=l.useState(""),[v,j]=l.useState("nearest"),[G,$]=l.useState(null),[Q,Y]=l.useState({}),[N,Z]=l.useState({}),[V,ee]=l.useState({});l.useEffect(()=>{Y({}),$(null),ee({}),c.current.clear()},[r]);const M=l.useMemo(()=>fe(),[]),ne=l.useMemo(()=>Be(M,a),[M,a]),{workerState:O,error:X,countByKey:U,countProgress:S,cursorMatchKey:h,cursorLookupDebug:o,lookupCursor:I,requestMatches:P,requestCount:L}=Me({xmlText:r,syntax:a,mappings:ne});l.useEffect(()=>{m.current=O},[O]),l.useEffect(()=>{const n=f=>{f.key==="Control"&&(p.current=!0)},s=f=>{f.key==="Control"&&(p.current=!1)},A=()=>{p.current=!1};return window.addEventListener("keydown",n),window.addEventListener("keyup",s),window.addEventListener("blur",A),()=>{window.removeEventListener("keydown",n),window.removeEventListener("keyup",s),window.removeEventListener("blur",A)}},[]),l.useEffect(()=>{X&&B(X)},[X]);const F=n=>n.xpaths?.[a],_=l.useMemo(()=>{const n=s=>{const A=s.children??[],f=te(s.key),R=f.length>0?V[s.key]:void 0,H=typeof R=="number"?R:f.length>0?void 0:U[ce(s.key)]??0;if(typeof H=="number"&&H>1&&A.length>0&&N[s.key]){const E=Math.min(H,xe);return{...s,children:Array.from({length:E},(w,g)=>{const W=g+1,z=`${s.key}::${W}`;return{key:z,id:s.id,title:`${s.title} [${W}]`,xpaths:s.xpaths,isOccurrence:!0,children:A.map((q,ae)=>{const K=Ie(z,q.id,ae);return n({...q,key:K})})}})}}return{...s,children:A.map((E,w)=>n({...E,key:Ie(s.key,E.id,w)}))}};return n(M)},[M,U,V,N]),ie=l.useMemo(()=>Ue(_,N),[_,N]);l.useEffect(()=>{D.current=_},[_]),l.useEffect(()=>{G&&requestAnimationFrame(()=>{ve(y.current,G)})},[G,_,N]),l.useEffect(()=>{if(!h)return;const n=`${h}|${o?.bestLine??""}|${o?.bestColumn??""}`;if(b.current===n)return;b.current=n;let s=!1;return(async()=>{const f=o?.bestLine,R=o?.bestColumn,H=Ye(o),E=Ce(o?.absolutePath),w=Ce(o?.matchedCursorXpath);if(!H&&v==="strict"){e(),B(`No exact BT/BG for ${E}. Strict mode blocks fallback${w?` (nearest: ${w})`:""}.`);return}let g=h;if(typeof f=="number"&&typeof R=="number"&&(g=await Xe(h,f,R,M,L,P)),he()&&console.debug("[xml-explorer] editor->tree sync",{cursorMatchKey:h,resolvedKey:g,depth:te(g).length,cursor:{line:f,column:R}}),s)return;e(),$(K=>K===g?K:g),Ge(g,Z);const z=(D.current?me(D.current,g):null)?.title??g,q=ce(g),ae=te(g);try{const K=ae.length>0?10:Math.min(50,U[q]??1),J=await P(q,0,Math.max(1,K),ae),ue=typeof f=="number"&&typeof R=="number"?J.matches[ge(J.matches,f,R)]:J.matches[0];if(!ue||s)return;C(ue,z,0,J.total),H||B(`No exact BT/BG for ${E}. Mapped to nearest: ${w}.`),Y(be=>({...be,[g]:0}))}catch{}})(),()=>{s=!0}},[h,o,M,P,L,U,v]),l.useEffect(()=>{if(O==="ready")for(const n of ie)typeof V[n.key]!="number"&&(c.current.has(n.key)||(c.current.add(n.key),L(n.baseKey,n.context).then(s=>{ee(A=>({...A,[n.key]:s}))}).catch(()=>{}).finally(()=>{c.current.delete(n.key)})))},[O,ie,V,L]);function e(){const n=i.current,s=n?.getModel();!n||!s||(t.current=n.deltaDecorations(t.current,[]))}function u(n){Z(s=>({...s,[n]:!s[n]}))}function C(n,s,A,f){const R=i.current,H=R?.getModel();if(!R||!H)return;const E=Math.min(Math.max(1,n.line),H.getLineCount()),w=H.getLineMaxColumn(E),g=Math.min(Math.max(1,n.column),w),W=n.endLine??E,z=Math.min(Math.max(E,W),H.getLineCount()),q=H.getLineMaxColumn(z),ae=n.endColumn??q,K=Math.min(Math.max(1,ae),q),J=new Ee.Range(E,g,z,K);R.revealRangeInCenter(J),t.current=R.deltaDecorations(t.current,[{range:J,options:{inlineClassName:"xml-xpath-highlight"}}]),B(f>1?`Highlighted ${s}: ${A+1}/${f}`:`Highlighted ${s}`)}async function x(n){$(n.key);const s=ce(n.key),A=te(n.key),f=n.isOccurrence?1:A.length?void 0:U[s]??0,R=F(n);if(!R){e();return}if(f===0)B(`${n.id}: no match found in XML. (${R})`),e();else{const H=Q[n.key]??-1,E=n.isOccurrence?0:G===n.key&&typeof f=="number"&&f>1?(H+1)%f:0;try{const w=await P(s,E,1,A),g=w.matches[0];g?(C(g,n.title,n.isOccurrence?0:E,w.total),Y(W=>({...W,[n.key]:n.isOccurrence?0:E}))):(B(`${n.id}: no match found in XML.`),e())}catch(w){const g=w instanceof Error?w.message:"Failed to resolve match";B(g)}}n.children?.length&&u(n.key)}function re(n){if(m.current!=="ready"||!p.current)return;d.current!=null&&window.clearTimeout(d.current);const s=n.position;he()&&console.debug("[xml-explorer] cursor-change",{line:s.lineNumber,column:s.column}),d.current=window.setTimeout(()=>{I(s.lineNumber,s.column)},_e)}return T.jsxs("div",{style:{height:"100%",maxHeight:"100%",minHeight:0,overflow:"hidden",boxSizing:"border-box",display:"flex",flexDirection:"column",width:"100%"},children:[T.jsxs("div",{style:{padding:10,borderBottom:"1px solid #ddd",display:"flex",gap:12,alignItems:"center",fontFamily:"system-ui, sans-serif",flexShrink:0,minWidth:0},children:[T.jsx("button",{onClick:e,style:{padding:"6px 10px"},children:"Clear highlight"}),T.jsxs("button",{onClick:()=>j(n=>n==="nearest"?"strict":"nearest"),style:{padding:"6px 10px"},title:"Toggle mapping mode for XML clicks",children:["Mode: ",v==="nearest"?"Nearest fallback":"Strict exact"]}),T.jsxs("span",{style:{color:"#374151",fontSize:12},children:["Worker:"," ",O==="indexing"?"indexing XML...":O==="ready"?"ready":O]}),T.jsxs("span",{style:{color:"#374151",fontSize:12},children:["Counts:"," ",S?`${S.done}/${S.total}`:"ready"]}),T.jsx("span",{style:{fontFamily:"monospace",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:k,children:k})]}),T.jsxs("div",{style:{flex:1,minHeight:0,overflow:"hidden",display:"grid",gridTemplateColumns:"1fr 360px",width:"100%"},children:[T.jsx("div",{style:{minWidth:0,minHeight:0,width:"100%"},children:T.jsx(Pe,{height:"100%",defaultLanguage:"xml",value:r,onMount:n=>{i.current=n,n.onDidChangeCursorPosition(re)},options:{minimap:{enabled:!1},fontSize:13,wordWrap:"on",scrollBeyondLastLine:!1,automaticLayout:!0}})}),T.jsxs("div",{style:{borderLeft:"1px solid #ddd",padding:10,overflow:"hidden",minHeight:0,display:"flex",flexDirection:"column",fontFamily:"system-ui, sans-serif",background:"#fafafa"},children:[T.jsx("div",{style:{fontWeight:600,marginBottom:8,flexShrink:0},children:"BT / BG (EN16931)"}),T.jsx("div",{ref:y,style:{flex:1,minHeight:0,overflow:"auto"},children:T.jsx(Ne,{root:_,expanded:N,selectedKey:G,onToggle:u,onClickNode:x,getNodeXpath:F,getMatchCount:n=>{if(n.isOccurrence)return 1;const s=V[n.key];if(typeof s=="number")return s;if(te(n.key).length>0)return;const A=ce(n.key);return U[A]}})}),T.jsx("div",{style:{marginTop:10,fontSize:12,color:"#444"},children:"Cursor sync and count calculation run in a worker thread."})]})]}),T.jsx("style",{children:`
|
|
7
|
+
.xml-xpath-highlight {
|
|
8
|
+
background: rgba(255, 230, 0, 0.35);
|
|
9
|
+
border-bottom: 1px solid rgba(255, 180, 0, 0.9);
|
|
10
|
+
}
|
|
11
|
+
`})]})}function Ge(r,a){const i=$e(r);i.length&&a(t=>{let d=!1;const c={...t};for(const m of i)c[m]||(c[m]=!0,d=!0);return d?c:t})}function Ve(r){const a=r.indexOf("::");return a>=0?r.slice(0,a):r}function ce(r){return r.split(".").map(Ve).join(".")}function te(r){const a=[],i=r.split("."),t=[];for(const d of i){const c=d.indexOf("::");if(c>=0){const m=Number(d.slice(c+2)),p=Number.isFinite(m)?Math.max(0,m-1):0,y=d.slice(0,c);t.push(y),a.push({nodeKey:t.join("."),occurrenceIndex:p})}else t.push(d)}return a}function Ue(r,a){const i=[],t=d=>{const c=te(d.key);if(c.length>0&&d.xpaths&&i.push({key:d.key,baseKey:ce(d.key),context:c}),!!d.children?.length&&a[d.key])for(const m of d.children)t(m)};return t(r),i}function $e(r){const a=r.split("."),i=[],t=[];for(let m=0;m<a.length-1;m++){const p=a[m],y=p.indexOf("::");if(y>=0){const b=p.slice(0,y);t.push(b),i.push(t.join(".")),t[t.length-1]=p,i.push(t.join("."))}else t.push(p),i.push(t.join("."))}const d=a[a.length-1],c=d.indexOf("::");if(c>=0){const m=d.slice(0,c);i.push([...t,m].join("."))}return Array.from(new Set(i))}function Ie(r,a,i){return`${r}.${a}:${i}`}function me(r,a){if(r.key===a)return r;if(!r.children?.length)return null;for(const i of r.children){const t=me(i,a);if(t)return t}return null}function Fe(r,a){if(!r)return!1;const i=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(a):a.replace(/["\\]/g,"\\$&"),t=r.querySelector(`[data-tree-key="${i}"]`);return t?(t.scrollIntoView({block:"center",inline:"nearest"}),!0):!1}function ve(r,a,i=12){Fe(r,a)||i<=0||requestAnimationFrame(()=>{ve(r,a,i-1)})}function qe(r,a,i){if(!r.length)return-1;let t=0,d=Number.POSITIVE_INFINITY;for(let c=0;c<r.length;c++){const m=r[c],p=Math.abs(m.line-a)*1e3+Math.abs(m.column-i);p<d&&(d=p,t=c)}return t}function Ke(r,a,i){const t=r.line,d=r.column,c=r.endLine??t,m=r.endColumn??d;return!(a<t||a>c||a===t&&i<d||a===c&&i>m)}function ge(r,a,i){for(let t=0;t<r.length;t++)if(Ke(r[t],a,i))return t;return qe(r,a,i)}function Ye(r){return r?.absolutePath?r.matchedCursorXpath?r.absolutePath===r.matchedCursorXpath:!1:!0}function Ce(r){if(!r)return"unknown element";const a=r.split("/").filter(Boolean);return a[a.length-1]??"unknown element"}async function Xe(r,a,i,t,d,c){const m=r.split("."),p=[...m],y=[];for(let b=0;b<m.length;b++){const D=m.slice(0,b+1).join(".");if(!me(t,D)?.children?.length)continue;let B=0;try{B=await d(D,y)}catch{continue}if(!(B<=1))try{const v=await c(D,0,Math.min(B,xe),y),j=ge(v.matches,a,i);if(j<0)continue;p[b]=`${m[b]}::${j+1}`,y.push({nodeKey:D,occurrenceIndex:j})}catch{}}return p.join(".")}exports.XMLExplorer=je;exports.btTree=Se;exports.buildMappingsForSyntax=Be;exports.buildRuntimeTree=fe;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as XMLExplorer } from "./XMLExplorer";
|
|
2
|
+
export { btTree } from "./btTree";
|
|
3
|
+
export type { RuntimeTreeNode, TreeNode, XmlSyntax } from "./btTree";
|
|
4
|
+
export { buildMappingsForSyntax, buildRuntimeTree } from "./treeCatalog";
|
|
5
|
+
export type { MatchLocation, NodeMapping } from "./xmlProtocol";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/xmlExplorer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErE,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACzE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|