jinrai 1.0.3 → 1.0.4
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/.vscode/launch.json +21 -0
- package/lib/bin.js +11 -3350
- package/lib/index.js +1 -7
- package/lib/src/config/userConfig.d.ts +11 -2
- package/package.json +9 -6
- package/readme.md +23 -8
- package/src/bin.ts +43 -23
- package/src/config/defaultIndexHtml.ts +2 -2
- package/src/config/userConfig.ts +12 -2
- package/src/content/normolizeContent.ts +7 -0
- package/src/routes/Parser.ts +148 -0
- package/src/routes/getRoutes.ts +7 -4
- package/src/routes/replaceDevScripts.ts +16 -0
- package/src/server/vitePreview.ts +13 -0
- package/src/templates.ts +19 -3
- package/tests/content/1.html +12 -0
- package/tests/content/1_result.json +54 -0
- package/tests/content/2.html +16 -0
- package/tests/content/2_result.json +28 -0
- package/tests/content/3.html +21 -0
- package/tests/content/3_result.json +39 -0
- package/tests/content/4.html +4 -0
- package/tests/content/4_result.json +9 -0
- package/tests/content/custom.html +5 -0
- package/tests/content/custom.json +5 -0
- package/tests/content/index.html +543 -0
- package/tests/content/index.json +49 -0
- package/tests/content/index_with_templates.json +31 -0
- package/tests/content/templates.json +13 -0
- package/tests/custom.test.ts +16 -0
- package/tests/parse.test.ts +52 -0
- package/vitest.config.ts +14 -0
- package/src/routes/parser.ts +0 -58
- package/src/routes/splitByTag.ts +0 -38
- package/test/fld.config.ts +0 -13
- package/test/jinrai.config.ts +0 -8
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "html",
|
|
4
|
+
"content": "<div class=\"css-dev-only-do-not-override-11mmrso ant-app\"><div class=\"flex flex-col gap-3\"><section aria-label=\"Navbar\" class=\"border-0 border-b-[1px] border-gray-200 border-solid flex flex-col sticky top-0 z-50\" ><div class=\"py-[4px] px-2 relative w-full bg-white\" style=\"z-index: 30\"><nav class=\"flex gap-2 items-center justify-end bg-white z-30 pt-1\"><a class=\"flex-grow xl:flex-grow-0 ms-2\" href=\"/\"><div class=\"md:w-[149px] xl:w-[270px]\"><img src=\"/images/public/logo.svg\" alt=\"FLD LOGO\" width=\"90\" height=\"30\" /></div></a><ol class=\"xl:flex flex-grow items-center gap-3 list-none m-0 p-0\"><li class=\"p-1 px-2 rounded-lg transition-all cursor-pointer hover:text-gray-800 bg-light\"><a class=\"text-gray-700 text-[16px]\" href=\"/\">Home</a></li><li class=\"p-1 px-2 rounded-lg transition-all cursor-pointer hover:text-gray-800 text-no_active\" ><a class=\"text-gray-700 text-[16px]\" href=\"/about\">About the company</a></li><li class=\"p-1 px-2 rounded-lg transition-all cursor-pointer hover:text-gray-800 text-no_active\" ><a class=\"text-gray-700 text-[16px]\" href=\"/contacts\">Contacts</a></li><li class=\"p-1 px-2 rounded-lg transition-all cursor-pointer hover:text-gray-800 text-no_active\" ><a class=\"text-gray-700 text-[16px]\" href=\"/delivery\">Delivery and payment</a></li></ol><ol class=\"sm:flex lg:hidden justify-between gap-2 m-0 p-0\"><a href=\"/lk\"><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only flex items-center justify-center\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#969696\" height=\"20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(150, 150, 150)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\" ></path></svg></span></button></a><a href=\"/favorite\"><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only flex items-center justify-center\" ><span class=\"ant-btn-icon\"><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#969696\" height=\"20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(150, 150, 150)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z\" ></path></svg></span></button></a><span class=\"ant-badge ant-badge-status css-dev-only-do-not-override-13cgf7g\"><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only px-[24px]\" ><span class=\"ant-btn-icon\"><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#969696\" height=\"22\" width=\"22\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(150, 150, 150)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49A1.003 1.003 0 0 0 20 4H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z\" ></path></svg></span></button></span></ol><a class=\"hidden text-[16px] lg:block text-sm no-underline text-no_active hover:underline hover:text-link\" href=\"callto:+7(495)984-41-06\" >+7 (495) 984-41-06</a ><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined hidden lg:flex gap-1 items-center\" ><span class=\"ant-btn-icon\" ><img class=\"mr-2 border\" src=\"/images/public/lang/icons/eng.svg\" /></span ><span>Eng</span></button><div class=\"xl:hidden\"><button aria-describedby=\":r3:\" type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only flex items-center justify-center\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#969696\" height=\"20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(150, 150, 150)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M3 3h18v2H3zM3 19h18v2H3zM3 11h18v2H3z\"></path></svg ></span></button></div></nav></div><div class=\"py-[4px] px-2 relative w-full bg-white\" style=\"z-index: 30\"><div class=\"flex gap-2 items-center relative\"><button aria-describedby=\":r5:\" type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-primary ant-btn-color-primary ant-btn-variant-solid catalog h-[40px] flex items-center justify-start md:w-[150px] lg:w-[280px]\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#fff\" height=\"24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(255, 255, 255); margin-top: -2px\" ><path fill=\"none\" d=\"M0 0h24v24H0V0z\"></path><path d=\"M3 18h13v-2H3v2zm0-5h10v-2H3v2zm0-7v2h13V6H3zm18 9.59L17.42 12 21 8.41 19.59 7l-5 5 5 5L21 15.59z\" ></path></svg></span ><span>Catalog</span></button><div class=\"flex-grow\"><section aria-label=\"Search input\"><div class=\"xl:relative\"><span class=\"ant-input-affix-wrapper css-dev-only-do-not-override-13cgf7g ant-input-outlined border border-1 h-[40px] border-blue-500 text-[16px]\" ><span class=\"ant-input-prefix\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#969696\" height=\"20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(150, 150, 150)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\" ></path></svg></span ><input placeholder=\"Search\" class=\"ant-input css-dev-only-do-not-override-13cgf7g\" type=\"text\" value=\"\" /></span></div></section></div><div class=\"hidden lg:flex gap-2\"><a href=\"/lk\" ><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#969696\" height=\"22\" width=\"22\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(150, 150, 150)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\" ></path></svg></span ><span>Enter</span></button></a ><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only p-2\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#969696\" height=\"22\" width=\"22\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(150, 150, 150)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z\" ></path></svg ></span></button ><span class=\"ant-badge ant-badge-status css-dev-only-do-not-override-13cgf7g\" ><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined px-[24px]\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#969696\" height=\"22\" width=\"22\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(150, 150, 150)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49A1.003 1.003 0 0 0 20 4H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z\" ></path></svg></span ><span>Basket</span></button></span ></div></div></div><div class=\"py-[4px] px-2 relative w-full bg-white\" style=\"z-index: 30\"><div class=\"overflow-hidden undefined\" style=\"opacity: 0; height: 0px; visibility: hidden\"><div class=\"flex flex-col relative\"><div class=\"flex justify-between gap-2 flex-col xl:flex-row\"><div class=\"flex gap-2\"><div class=\"relative sm:flex-grow xl:flex-grow-0\"><button aria-describedby=\":r7:\" type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined flex items-center w-full\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" height=\"22px\" width=\"22px\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(136, 136, 136)\" ><path fill=\"none\" d=\"M0 0h24v24H0V0z\"></path><path d=\"M9 18h12v-2H9v2zM3 6v2h18V6H3zm6 7h12v-2H9v2z\"></path></svg ></span><div class=\"flex-grow truncate\">Products</div><div class=\"ml-5 mr-0 flex items-center\"><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" height=\"22px\" width=\"22px\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(136, 136, 136)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z\" ></path></svg></div></button></div><div class=\"flex items-center px-3 gap-2 border border-solid border-[#d9d9d9] rounded-md shadow-popBorder undefined\" ><div role=\"button\" class=\"cursor-pointer hover:text-link\">Available in stock</div><button type=\"button\" role=\"switch\" aria-checked=\"false\" class=\"ant-switch css-dev-only-do-not-override-13cgf7g\" ><div class=\"ant-switch-handle\"></div><span class=\"ant-switch-inner\" ><span class=\"ant-switch-inner-checked\"></span ><span class=\"ant-switch-inner-unchecked\"></span ></span></button></div></div><div class=\"flex gap-2\"><button aria-describedby=\":r9:\" type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined flex items-center flex-grow lg:flex-grow-0 sm:p-2 md:p-3 w-[170px]\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" height=\"20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(136, 136, 136)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z\" ></path></svg ></span><div class=\"truncate text-left lg:text-left flex-grow\">Sort</div><div class=\"sm:w-[40px] lg:w-[0px]\"></div></button ><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-primary ant-btn-color-primary ant-btn-variant-solid flex items-center flex-grow lg:flex-grow-0 sm:p-2 md:p-[10px] w-[170px]\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#fff\" height=\"22px\" width=\"22px\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(255, 255, 255)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z\"></path></svg></span ><span>All filters</span></button></div></div><div class=\"flex items-center overflow-hidden gap-3\" style=\"height: 0px; margin-top: 0px\"><div class=\"flex-grow overflow-x-auto overflow-y-hidden\"><div class=\"flex items-center\"></div></div></div></div></div></div><div class=\"py-[4px] px-2 relative w-full bg-white\" style=\"z-index: 30\"></div><div class=\"substrate bg-black transition-all fixed w-full left-0 h-screen z-10 top-0 z-20 pointer-events-none\" style=\"opacity: 0; visibility: hidden\" ></div></section><div class=\"min-h-[calc(100vh-440px)] px-4\"><div class=\"text-center m-8 mt-14\"><h1 class=\"text-center mb-3\">Product catalog</h1><a href=\"/products\" ><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined\" ><span>Show all products</span></button></a ></div><section aria-label=\"catalog\" class=\"min-h-[50vh]\"><div class=\"grid grid-cols-1 xl:grid-cols-2 xl2:grid-cols-3 gap-3\">"
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"type": "array",
|
|
8
|
+
"data": [
|
|
9
|
+
{
|
|
10
|
+
"type": "html",
|
|
11
|
+
"content": " <div class=\"p-3 border border-gray-200 border-solid rounded-lg flex flex-col gap-3 cursor-pointer hover:shadow-md shadow-primary\" tabindex=\"0\" ><div class=\"flex gap-3 items-center\"><img class=\"rounded-md\" src=\""
|
|
12
|
+
},
|
|
13
|
+
{ "type": "value", "key": "0#/Api/Catalog/GetCatalog@/[ITEM=0]/preview" },
|
|
14
|
+
{ "type": "html", "content": "\" width=\"64\" height=\"64\" alt=\"" },
|
|
15
|
+
{ "type": "value", "key": "0#/Api/Catalog/GetCatalog@/[ITEM=0]/title" },
|
|
16
|
+
{
|
|
17
|
+
"type": "html",
|
|
18
|
+
"content": "\" /><div class=\"flex-grow\"><h2 class=\"max-w-[200px] md:max-w-[310px] my-0 font-semibold truncate\"> "
|
|
19
|
+
},
|
|
20
|
+
{ "type": "value", "key": "0#/Api/Catalog/GetCatalog@/[ITEM=0]/title" },
|
|
21
|
+
{ "type": "html", "content": " </h2><a href=\"/products/" },
|
|
22
|
+
{ "type": "value", "key": "0#/Api/Catalog/GetCatalog@/[ITEM=0]/url" },
|
|
23
|
+
{
|
|
24
|
+
"type": "html",
|
|
25
|
+
"content": "\" ><span class=\"text-black\">Series</span></a ></div><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined rounded-full w-10 p-0 py-2\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" height=\"22\" width=\"22\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(136, 136, 136)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z\"></path></svg></button></div><div class=\"grid grid-cols-1 md:grid-cols-2 gap-3\">"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "array",
|
|
29
|
+
"data": [
|
|
30
|
+
{ "type": "html", "content": " <div><a class=\"flex gap-2 text-gray-800\" href=\"/products/" },
|
|
31
|
+
{ "type": "value", "key": "0#/Api/Catalog/GetCatalog@/[ITEM=0]/children/[ITEM=0]/url" },
|
|
32
|
+
{ "type": "html", "content": "\" >" },
|
|
33
|
+
{ "type": "value", "key": "0#/Api/Catalog/GetCatalog@/[ITEM=0]/children/[ITEM=0]/title" },
|
|
34
|
+
{
|
|
35
|
+
"type": "html",
|
|
36
|
+
"content": " <div><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" height=\"24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(136, 136, 136)\" ><path fill=\"none\" d=\"M0 0h24v24H0V0z\"></path><path d=\"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z\" ></path></svg></div ></a></div >"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"key": "0#/Api/Catalog/GetCatalog@/[ITEM=0]/children"
|
|
40
|
+
},
|
|
41
|
+
{ "type": "html", "content": "</div></div >" }
|
|
42
|
+
],
|
|
43
|
+
"key": "0#/Api/Catalog/GetCatalog@"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "html",
|
|
47
|
+
"content": "</div></section></div><footer aria-label=\"footer\" class=\"px-4\"><div class=\"py-5 border-0 border-gray-200 border-solid border-t-[1px] mt-5\"><div class=\"flex flex-col gap-5\"><section aria-label=\"links\" class=\"sm:flex sm:flex-col lg:grid lg:grid-cols-2 xl:grid-cols-6 gap-5 text-gray-500\" ><div class=\"col-span-3 flex flex-col gap-7 pr-5\"><div class=\"w-[288px]\"><a class=\"flex-grow xl:flex-grow-0 ms-2\" href=\"/\" ><div class=\"md:w-[149px] xl:w-[270px]\"><img src=\"/images/public/logo.svg\" alt=\"FLD LOGO\" width=\"90\" height=\"30\" /></div ></a></div><p class=\"text-balance\"> «FLD» is a manufacturer and exclusive distributor of products <br />A-Flow, Hy-Lok, Drastar and HiFlux in Russia and the CIS. </p><address><p><span>Наш офис и склад находится по адресу 107023, </span>г. Москва, вн. тер. г. муниципальный округ Соколиная Гора, пер. Семёновский, д. 15 </p><p>Telephone: +7 (495) 984-41-06</p><p>Email: mail@fld.ru</p></address></div><div></div><div class=\"flex flex-col gap-[12px] mt-16\"><b class=\"text-gray-800 mb-4\">Popular sections</b ><a class=\"flex gap-1\" href=\"/products/fitingi\">Fittings</a ><a class=\"flex gap-1\" href=\"/products/sredstva_izmereniya_urovnya\" >Level measurement tools</a ><a class=\"flex gap-1\" href=\"/products/filtry\">Filters</a ><a class=\"flex gap-1\" href=\"/products/klapany\">Valves</a></div></section><hr class=\"w-full border-0 border-gray-200 border-solid border-t-[1px]\" /><section aria-label=\"copyright\" class=\"flex gap-4 justify-between text-gray-400 items-center flex-col lg:flex-row\" ><div>© ИП Слободов ОГРНИП 320774600055229 - Все права защищены 2025</div><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined gap-1 items-center\" ><span class=\"ant-btn-icon\" ><img class=\"mr-2 border\" src=\"/images/public/lang/icons/eng.svg\" /></span ><span>Eng</span></button></section></div></div></footer></div></div>"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[
|
|
2
|
+
{ "type": "html", "content": "cfcd208495d565ef66e7dff9f98764da" },
|
|
3
|
+
{
|
|
4
|
+
"type": "array",
|
|
5
|
+
"data": [
|
|
6
|
+
{ "type": "html", "content": "c4ca4238a0b923820dcc509a6f75849b" },
|
|
7
|
+
{ "type": "value", "key": "0#/Api/Catalog/GetCatalog@/[ITEM=0]/preview" },
|
|
8
|
+
{ "type": "html", "content": "c81e728d9d4c2f636f067f89cc14862c" },
|
|
9
|
+
{ "type": "value", "key": "0#/Api/Catalog/GetCatalog@/[ITEM=0]/title" },
|
|
10
|
+
{ "type": "html", "content": "eccbc87e4b5ce2fe28308fd9f2a7baf3" },
|
|
11
|
+
{ "type": "value", "key": "0#/Api/Catalog/GetCatalog@/[ITEM=0]/title" },
|
|
12
|
+
{ "type": "html", "content": "a87ff679a2f3e71d9181a67b7542122c" },
|
|
13
|
+
{ "type": "value", "key": "0#/Api/Catalog/GetCatalog@/[ITEM=0]/url" },
|
|
14
|
+
{ "type": "html", "content": "e4da3b7fbbce2345d7772b0674a318d5" },
|
|
15
|
+
{
|
|
16
|
+
"type": "array",
|
|
17
|
+
"data": [
|
|
18
|
+
{ "type": "html", "content": "1679091c5a880faf6fb5e6087eb1b2dc" },
|
|
19
|
+
{ "type": "value", "key": "0#/Api/Catalog/GetCatalog@/[ITEM=0]/children/[ITEM=0]/url" },
|
|
20
|
+
{ "type": "html", "content": "8f14e45fceea167a5a36dedd4bea2543" },
|
|
21
|
+
{ "type": "value", "key": "0#/Api/Catalog/GetCatalog@/[ITEM=0]/children/[ITEM=0]/title" },
|
|
22
|
+
{ "type": "html", "content": "c9f0f895fb98ab9159f51fd0297e236d" }
|
|
23
|
+
],
|
|
24
|
+
"key": "0#/Api/Catalog/GetCatalog@/[ITEM=0]/children"
|
|
25
|
+
},
|
|
26
|
+
{ "type": "html", "content": "45c48cce2e2d7fbdea1afc51c7c6ad26" }
|
|
27
|
+
],
|
|
28
|
+
"key": "0#/Api/Catalog/GetCatalog@"
|
|
29
|
+
},
|
|
30
|
+
{ "type": "html", "content": "d3d9446802a44259755d38e6d163e820" }
|
|
31
|
+
]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"<div class=\"css-dev-only-do-not-override-11mmrso ant-app\"><div class=\"flex flex-col gap-3\"><section aria-label=\"Navbar\" class=\"border-0 border-b-[1px] border-gray-200 border-solid flex flex-col sticky top-0 z-50\" ><div class=\"py-[4px] px-2 relative w-full bg-white\" style=\"z-index: 30\"><nav class=\"flex gap-2 items-center justify-end bg-white z-30 pt-1\"><a class=\"flex-grow xl:flex-grow-0 ms-2\" href=\"/\"><div class=\"md:w-[149px] xl:w-[270px]\"><img src=\"/images/public/logo.svg\" alt=\"FLD LOGO\" width=\"90\" height=\"30\" /></div></a><ol class=\"xl:flex flex-grow items-center gap-3 list-none m-0 p-0\"><li class=\"p-1 px-2 rounded-lg transition-all cursor-pointer hover:text-gray-800 bg-light\"><a class=\"text-gray-700 text-[16px]\" href=\"/\">Home</a></li><li class=\"p-1 px-2 rounded-lg transition-all cursor-pointer hover:text-gray-800 text-no_active\" ><a class=\"text-gray-700 text-[16px]\" href=\"/about\">About the company</a></li><li class=\"p-1 px-2 rounded-lg transition-all cursor-pointer hover:text-gray-800 text-no_active\" ><a class=\"text-gray-700 text-[16px]\" href=\"/contacts\">Contacts</a></li><li class=\"p-1 px-2 rounded-lg transition-all cursor-pointer hover:text-gray-800 text-no_active\" ><a class=\"text-gray-700 text-[16px]\" href=\"/delivery\">Delivery and payment</a></li></ol><ol class=\"sm:flex lg:hidden justify-between gap-2 m-0 p-0\"><a href=\"/lk\"><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only flex items-center justify-center\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#969696\" height=\"20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(150, 150, 150)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\" ></path></svg></span></button></a><a href=\"/favorite\"><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only flex items-center justify-center\" ><span class=\"ant-btn-icon\"><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#969696\" height=\"20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(150, 150, 150)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z\" ></path></svg></span></button></a><span class=\"ant-badge ant-badge-status css-dev-only-do-not-override-13cgf7g\"><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only px-[24px]\" ><span class=\"ant-btn-icon\"><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#969696\" height=\"22\" width=\"22\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(150, 150, 150)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49A1.003 1.003 0 0 0 20 4H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z\" ></path></svg></span></button></span></ol><a class=\"hidden text-[16px] lg:block text-sm no-underline text-no_active hover:underline hover:text-link\" href=\"callto:+7(495)984-41-06\" >+7 (495) 984-41-06</a ><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined hidden lg:flex gap-1 items-center\" ><span class=\"ant-btn-icon\" ><img class=\"mr-2 border\" src=\"/images/public/lang/icons/eng.svg\" /></span ><span>Eng</span></button><div class=\"xl:hidden\"><button aria-describedby=\":r3:\" type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only flex items-center justify-center\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#969696\" height=\"20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(150, 150, 150)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M3 3h18v2H3zM3 19h18v2H3zM3 11h18v2H3z\"></path></svg ></span></button></div></nav></div><div class=\"py-[4px] px-2 relative w-full bg-white\" style=\"z-index: 30\"><div class=\"flex gap-2 items-center relative\"><button aria-describedby=\":r5:\" type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-primary ant-btn-color-primary ant-btn-variant-solid catalog h-[40px] flex items-center justify-start md:w-[150px] lg:w-[280px]\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#fff\" height=\"24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(255, 255, 255); margin-top: -2px\" ><path fill=\"none\" d=\"M0 0h24v24H0V0z\"></path><path d=\"M3 18h13v-2H3v2zm0-5h10v-2H3v2zm0-7v2h13V6H3zm18 9.59L17.42 12 21 8.41 19.59 7l-5 5 5 5L21 15.59z\" ></path></svg></span ><span>Catalog</span></button><div class=\"flex-grow\"><section aria-label=\"Search input\"><div class=\"xl:relative\"><span class=\"ant-input-affix-wrapper css-dev-only-do-not-override-13cgf7g ant-input-outlined border border-1 h-[40px] border-blue-500 text-[16px]\" ><span class=\"ant-input-prefix\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#969696\" height=\"20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(150, 150, 150)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\" ></path></svg></span ><input placeholder=\"Search\" class=\"ant-input css-dev-only-do-not-override-13cgf7g\" type=\"text\" value=\"\" /></span></div></section></div><div class=\"hidden lg:flex gap-2\"><a href=\"/lk\" ><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#969696\" height=\"22\" width=\"22\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(150, 150, 150)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\" ></path></svg></span ><span>Enter</span></button></a ><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only p-2\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#969696\" height=\"22\" width=\"22\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(150, 150, 150)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z\" ></path></svg ></span></button ><span class=\"ant-badge ant-badge-status css-dev-only-do-not-override-13cgf7g\" ><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined px-[24px]\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#969696\" height=\"22\" width=\"22\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(150, 150, 150)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49A1.003 1.003 0 0 0 20 4H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z\" ></path></svg></span ><span>Basket</span></button></span ></div></div></div><div class=\"py-[4px] px-2 relative w-full bg-white\" style=\"z-index: 30\"><div class=\"overflow-hidden undefined\" style=\"opacity: 0; height: 0px; visibility: hidden\"><div class=\"flex flex-col relative\"><div class=\"flex justify-between gap-2 flex-col xl:flex-row\"><div class=\"flex gap-2\"><div class=\"relative sm:flex-grow xl:flex-grow-0\"><button aria-describedby=\":r7:\" type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined flex items-center w-full\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" height=\"22px\" width=\"22px\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(136, 136, 136)\" ><path fill=\"none\" d=\"M0 0h24v24H0V0z\"></path><path d=\"M9 18h12v-2H9v2zM3 6v2h18V6H3zm6 7h12v-2H9v2z\"></path></svg ></span><div class=\"flex-grow truncate\">Products</div><div class=\"ml-5 mr-0 flex items-center\"><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" height=\"22px\" width=\"22px\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(136, 136, 136)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z\" ></path></svg></div></button></div><div class=\"flex items-center px-3 gap-2 border border-solid border-[#d9d9d9] rounded-md shadow-popBorder undefined\" ><div role=\"button\" class=\"cursor-pointer hover:text-link\">Available in stock</div><button type=\"button\" role=\"switch\" aria-checked=\"false\" class=\"ant-switch css-dev-only-do-not-override-13cgf7g\" ><div class=\"ant-switch-handle\"></div><span class=\"ant-switch-inner\" ><span class=\"ant-switch-inner-checked\"></span ><span class=\"ant-switch-inner-unchecked\"></span ></span></button></div></div><div class=\"flex gap-2\"><button aria-describedby=\":r9:\" type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined flex items-center flex-grow lg:flex-grow-0 sm:p-2 md:p-3 w-[170px]\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" height=\"20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(136, 136, 136)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z\" ></path></svg ></span><div class=\"truncate text-left lg:text-left flex-grow\">Sort</div><div class=\"sm:w-[40px] lg:w-[0px]\"></div></button ><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-primary ant-btn-color-primary ant-btn-variant-solid flex items-center flex-grow lg:flex-grow-0 sm:p-2 md:p-[10px] w-[170px]\" ><span class=\"ant-btn-icon\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" color=\"#fff\" height=\"22px\" width=\"22px\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(255, 255, 255)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z\"></path></svg></span ><span>All filters</span></button></div></div><div class=\"flex items-center overflow-hidden gap-3\" style=\"height: 0px; margin-top: 0px\"><div class=\"flex-grow overflow-x-auto overflow-y-hidden\"><div class=\"flex items-center\"></div></div></div></div></div></div><div class=\"py-[4px] px-2 relative w-full bg-white\" style=\"z-index: 30\"></div><div class=\"substrate bg-black transition-all fixed w-full left-0 h-screen z-10 top-0 z-20 pointer-events-none\" style=\"opacity: 0; visibility: hidden\" ></div></section><div class=\"min-h-[calc(100vh-440px)] px-4\"><div class=\"text-center m-8 mt-14\"><h1 class=\"text-center mb-3\">Product catalog</h1><a href=\"/products\" ><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined\" ><span>Show all products</span></button></a ></div><section aria-label=\"catalog\" class=\"min-h-[50vh]\"><div class=\"grid grid-cols-1 xl:grid-cols-2 xl2:grid-cols-3 gap-3\">": "cfcd208495d565ef66e7dff9f98764da",
|
|
3
|
+
" <div class=\"p-3 border border-gray-200 border-solid rounded-lg flex flex-col gap-3 cursor-pointer hover:shadow-md shadow-primary\" tabindex=\"0\" ><div class=\"flex gap-3 items-center\"><img class=\"rounded-md\" src=\"": "c4ca4238a0b923820dcc509a6f75849b",
|
|
4
|
+
"\" width=\"64\" height=\"64\" alt=\"": "c81e728d9d4c2f636f067f89cc14862c",
|
|
5
|
+
"\" /><div class=\"flex-grow\"><h2 class=\"max-w-[200px] md:max-w-[310px] my-0 font-semibold truncate\"> ": "eccbc87e4b5ce2fe28308fd9f2a7baf3",
|
|
6
|
+
" </h2><a href=\"/products/": "a87ff679a2f3e71d9181a67b7542122c",
|
|
7
|
+
"\" ><span class=\"text-black\">Series</span></a ></div><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined rounded-full w-10 p-0 py-2\" ><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" height=\"22\" width=\"22\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(136, 136, 136)\" ><path fill=\"none\" d=\"M0 0h24v24H0z\"></path><path d=\"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z\"></path></svg></button></div><div class=\"grid grid-cols-1 md:grid-cols-2 gap-3\">": "e4da3b7fbbce2345d7772b0674a318d5",
|
|
8
|
+
" <div><a class=\"flex gap-2 text-gray-800\" href=\"/products/": "1679091c5a880faf6fb5e6087eb1b2dc",
|
|
9
|
+
"\" >": "8f14e45fceea167a5a36dedd4bea2543",
|
|
10
|
+
" <div><svg stroke=\"currentColor\" fill=\"currentColor\" stroke-width=\"0\" viewBox=\"0 0 24 24\" height=\"24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\" style=\"color: rgb(136, 136, 136)\" ><path fill=\"none\" d=\"M0 0h24v24H0V0z\"></path><path d=\"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z\" ></path></svg></div ></a></div >": "c9f0f895fb98ab9159f51fd0297e236d",
|
|
11
|
+
"</div></div >": "45c48cce2e2d7fbdea1afc51c7c6ad26",
|
|
12
|
+
"</div></section></div><footer aria-label=\"footer\" class=\"px-4\"><div class=\"py-5 border-0 border-gray-200 border-solid border-t-[1px] mt-5\"><div class=\"flex flex-col gap-5\"><section aria-label=\"links\" class=\"sm:flex sm:flex-col lg:grid lg:grid-cols-2 xl:grid-cols-6 gap-5 text-gray-500\" ><div class=\"col-span-3 flex flex-col gap-7 pr-5\"><div class=\"w-[288px]\"><a class=\"flex-grow xl:flex-grow-0 ms-2\" href=\"/\" ><div class=\"md:w-[149px] xl:w-[270px]\"><img src=\"/images/public/logo.svg\" alt=\"FLD LOGO\" width=\"90\" height=\"30\" /></div ></a></div><p class=\"text-balance\"> «FLD» is a manufacturer and exclusive distributor of products <br />A-Flow, Hy-Lok, Drastar and HiFlux in Russia and the CIS. </p><address><p><span>Наш офис и склад находится по адресу 107023, </span>г. Москва, вн. тер. г. муниципальный округ Соколиная Гора, пер. Семёновский, д. 15 </p><p>Telephone: +7 (495) 984-41-06</p><p>Email: mail@fld.ru</p></address></div><div></div><div class=\"flex flex-col gap-[12px] mt-16\"><b class=\"text-gray-800 mb-4\">Popular sections</b ><a class=\"flex gap-1\" href=\"/products/fitingi\">Fittings</a ><a class=\"flex gap-1\" href=\"/products/sredstva_izmereniya_urovnya\" >Level measurement tools</a ><a class=\"flex gap-1\" href=\"/products/filtry\">Filters</a ><a class=\"flex gap-1\" href=\"/products/klapany\">Valves</a></div></section><hr class=\"w-full border-0 border-gray-200 border-solid border-t-[1px]\" /><section aria-label=\"copyright\" class=\"flex gap-4 justify-between text-gray-400 items-center flex-col lg:flex-row\" ><div>© ИП Слободов ОГРНИП 320774600055229 - Все права защищены 2025</div><button type=\"button\" class=\"ant-btn css-dev-only-do-not-override-13cgf7g ant-btn-default ant-btn-color-default ant-btn-variant-outlined gap-1 items-center\" ><span class=\"ant-btn-icon\" ><img class=\"mr-2 border\" src=\"/images/public/lang/icons/eng.svg\" /></span ><span>Eng</span></button></section></div></div></footer></div></div>": "d3d9446802a44259755d38e6d163e820"
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest"
|
|
2
|
+
import { Parser } from "../src/routes/Parser"
|
|
3
|
+
import { readFile } from "fs/promises"
|
|
4
|
+
|
|
5
|
+
import custom from "./content/custom.json"
|
|
6
|
+
|
|
7
|
+
describe("test custom component", async () => {
|
|
8
|
+
const parsr = new Parser({ normolize: true })
|
|
9
|
+
|
|
10
|
+
it("parse custom.html", async () => {
|
|
11
|
+
const html = await readFile("./tests/content/custom.html", "utf-8")
|
|
12
|
+
// expect(JSON.stringify(parsr.parse(html))).toEqual("")
|
|
13
|
+
|
|
14
|
+
expect(parsr.parse(html)).toEqual(custom)
|
|
15
|
+
})
|
|
16
|
+
})
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises"
|
|
2
|
+
import { describe, expect, it } from "vitest"
|
|
3
|
+
import { Parser } from "../src/routes/Parser"
|
|
4
|
+
|
|
5
|
+
import result_1 from "./content/1_result.json"
|
|
6
|
+
import result_2 from "./content/2_result.json"
|
|
7
|
+
import result_3 from "./content/3_result.json"
|
|
8
|
+
import result_4 from "./content/4_result.json"
|
|
9
|
+
import index from "./content/index.json"
|
|
10
|
+
import index_tempates from "./content/index_with_templates.json"
|
|
11
|
+
import templates from "./content/templates.json"
|
|
12
|
+
|
|
13
|
+
describe("test Parser class", async () => {
|
|
14
|
+
const parsr = new Parser({ normolize: true })
|
|
15
|
+
|
|
16
|
+
it("parse 1.html", async () => {
|
|
17
|
+
const html = await readFile("./tests/content/1.html", "utf-8")
|
|
18
|
+
expect(parsr.parse(html)).toEqual(result_1)
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
it("parse 2.html", async () => {
|
|
22
|
+
const html = await readFile("./tests/content/2.html", "utf-8")
|
|
23
|
+
expect(parsr.parse(html)).toEqual(result_2)
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
it("parse 3.html", async () => {
|
|
27
|
+
const html = await readFile("./tests/content/3.html", "utf-8")
|
|
28
|
+
expect(parsr.parse(html)).toEqual(result_3)
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it("parse 4.html", async () => {
|
|
32
|
+
const html = await readFile("./tests/content/4.html", "utf-8")
|
|
33
|
+
expect(parsr.parse(html)).toEqual(result_4)
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
it("parse index.html", async () => {
|
|
37
|
+
const html = await readFile("./tests/content/index.html", "utf-8")
|
|
38
|
+
expect(parsr.parse(html)).toEqual(index)
|
|
39
|
+
})
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
describe("test Parser templates", async () => {
|
|
43
|
+
const parsr = new Parser({ normolize: true, templates: true })
|
|
44
|
+
|
|
45
|
+
it("parse index.html", async () => {
|
|
46
|
+
const html = await readFile("./tests/content/index.html", "utf-8")
|
|
47
|
+
// expect(JSON.stringify(parsr.templates)).toEqual("")
|
|
48
|
+
|
|
49
|
+
expect(parsr.parse(html)).toEqual(index_tempates)
|
|
50
|
+
expect(parsr.templates).toEqual(templates)
|
|
51
|
+
})
|
|
52
|
+
})
|
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineConfig } from "vitest/config"
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
test: {
|
|
5
|
+
globals: true,
|
|
6
|
+
environment: "node",
|
|
7
|
+
include: ["tests/**/*.test.ts"],
|
|
8
|
+
coverage: {
|
|
9
|
+
provider: "v8",
|
|
10
|
+
reporter: ["text", "json", "html"],
|
|
11
|
+
exclude: ["node_modules/", "dist/"],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
})
|
package/src/routes/parser.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { splitByTag } from "./splitByTag.ts"
|
|
2
|
-
|
|
3
|
-
export interface ParseItem {
|
|
4
|
-
type: string
|
|
5
|
-
template: ParseItem[] | number
|
|
6
|
-
contentKey?: string
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const toBinary = (content: string) => {
|
|
10
|
-
return btoa(unescape(encodeURIComponent(content)))
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export class Parser {
|
|
14
|
-
templates: string[] = []
|
|
15
|
-
ctemplates: string[] = []
|
|
16
|
-
convertor?: (content: string) => string
|
|
17
|
-
|
|
18
|
-
constructor(convertor?: (content: string) => string) {
|
|
19
|
-
this.convertor = convertor
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
parse(html: string): ParseItem[] {
|
|
23
|
-
const parts = splitByTag("loopwrapper", html)
|
|
24
|
-
|
|
25
|
-
return parts.map(content => {
|
|
26
|
-
const isArray = content.startsWith("ArrayDataKey=")
|
|
27
|
-
|
|
28
|
-
let contentKey = undefined
|
|
29
|
-
if (isArray) {
|
|
30
|
-
;[contentKey, content] = this.firstPypeSplit(content)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return {
|
|
34
|
-
type: isArray ? "array" : "html",
|
|
35
|
-
template: isArray ? this.parse(content) : this.getTemplateId(content),
|
|
36
|
-
contentKey,
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
getTemplateId(template: string): number {
|
|
42
|
-
const index = this.templates.indexOf(template)
|
|
43
|
-
if (index != -1) {
|
|
44
|
-
return index
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
this.templates.push(template)
|
|
48
|
-
this.ctemplates.push(this.convertor ? this.convertor(template) : toBinary(template))
|
|
49
|
-
|
|
50
|
-
return this.templates.length - 1
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
firstPypeSplit(content: string) {
|
|
54
|
-
const index = content.indexOf("|")
|
|
55
|
-
|
|
56
|
-
return [content.slice(13, index), content.slice(index + 1)]
|
|
57
|
-
}
|
|
58
|
-
}
|
package/src/routes/splitByTag.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export const splitByTag = (tag: string, content: string): string[] => {
|
|
2
|
-
const htmls = content
|
|
3
|
-
.replace(new RegExp(`(<\/?${tag}.*?>)`, "gm"), (_, find) => {
|
|
4
|
-
return `<**${tag}**>` + (find.startsWith('</') ? 'CLS' : 'OPN')
|
|
5
|
-
})
|
|
6
|
-
.split(`<**${tag}**>`)
|
|
7
|
-
|
|
8
|
-
if (htmls.length == 1)
|
|
9
|
-
return htmls
|
|
10
|
-
|
|
11
|
-
let count = 0
|
|
12
|
-
const result: string[][] = []
|
|
13
|
-
|
|
14
|
-
for (let itm of htmls) {
|
|
15
|
-
let step = 0
|
|
16
|
-
|
|
17
|
-
if (itm.startsWith('OPN')) step = 1
|
|
18
|
-
if (itm.startsWith('CLS')) step = -1
|
|
19
|
-
|
|
20
|
-
if (step != 0)
|
|
21
|
-
itm = itm.substring(3)
|
|
22
|
-
|
|
23
|
-
if (step > 0) {
|
|
24
|
-
count+=step
|
|
25
|
-
step = 0
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (count<=1)
|
|
29
|
-
result.push([itm])
|
|
30
|
-
else
|
|
31
|
-
result[result.length -1].push(itm)
|
|
32
|
-
|
|
33
|
-
count+=step
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return result.map(itms => itms.join(`<**${tag}**>`))
|
|
37
|
-
};
|
|
38
|
-
|
package/test/fld.config.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "../src/config/define"
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
url: "https://fld.ru",
|
|
5
|
-
pages: [
|
|
6
|
-
"/",
|
|
7
|
-
"/products",
|
|
8
|
-
"/products/{klapany}",
|
|
9
|
-
"/product/{krany_sharovye_serii_105_prohodnoj_2h_hodovoj}",
|
|
10
|
-
"/{CMC-8M-4N}",
|
|
11
|
-
],
|
|
12
|
-
outDir: "fld",
|
|
13
|
-
})
|