From adad60dc6b0590a175804eb347dd605198932655 Mon Sep 17 00:00:00 2001 From: Robert Saternus Date: Mon, 11 Mar 2024 07:47:29 +0100 Subject: [PATCH] FFWEB-2996: Improvements from marketplace version - Add validation for plugin configuration form - Add FactFinder logger - Add German translations --- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 3 ++ src/Api/TestConnectionController.php | 14 ++++++- src/Api/UiFeedExportController.php | 42 ++++++++++++------- src/Api/UpdateFieldRolesController.php | 28 +++++++++---- .../ClientBuilderConfigurator.php | 15 +++++-- src/OmikronFactFinder.php | 23 ++++++++-- .../module/configuration/snippet/de-DE.json | 13 +++--- .../src/module/sw-cms/snippet/de-DE.json | 32 +++++++------- .../module/ui-feed-export/snippet/de-DE.json | 23 +++++----- src/Resources/config/config.xml | 40 +++++++++++------- src/Resources/config/packages/monolog.yaml | 9 ++++ src/Resources/config/services.xml | 1 + .../administration/js/omikron-fact-finder.js | 2 +- .../js/omikron-fact-finder.js.LICENSE.txt | 1 + .../layout/factfinder/suggest.html.twig | 2 +- 16 files changed, 167 insertions(+), 83 deletions(-) create mode 100644 src/Resources/config/packages/monolog.yaml create mode 100644 src/Resources/public/static/js/omikron-fact-finder.js.LICENSE.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb448b69..6bee2c4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ --- name: build -on: [pull_request] +on: [push] jobs: build: diff --git a/CHANGELOG.md b/CHANGELOG.md index 838a7221..b5ecad0e 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog ## Unreleased ### Add +- Add validation for plugin configuration form +- Add FactFinder logger +- Add German translations - Add reporting for Shopware marketplace - Add PHPStan ### Change diff --git a/src/Api/TestConnectionController.php b/src/Api/TestConnectionController.php index a56b9da4..9391159f 100644 --- a/src/Api/TestConnectionController.php +++ b/src/Api/TestConnectionController.php @@ -9,6 +9,7 @@ use Omikron\FactFinder\Communication\Credentials; use Omikron\FactFinder\Shopware6\Config\Communication as CommunicationConfig; use Omikron\FactFinder\Shopware6\Upload\UploadService; +use Psr\Log\LoggerInterface; use Shopware\Core\Framework\Routing\Annotation\RouteScope; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; @@ -22,7 +23,8 @@ class TestConnectionController extends AbstractController public function __construct( private readonly ClientBuilder $clientBuilder, private readonly CommunicationConfig $config, - private readonly UploadService $uploadService + private readonly UploadService $uploadService, + private readonly LoggerInterface $factfinderLogger ) { } @@ -38,11 +40,19 @@ public function testApiConnection(): JsonResponse ->build(); try { + $client = $this->clientBuilder + ->withCredentials(new Credentials(...$this->config->getCredentials())) + ->withServerUrl($this->config->getServerUrl()) + ->withVersion($this->config->getVersion()) + ->build(); + $endpoint = $this->createTestEndpoint(); $client->request('GET', $endpoint); return new JsonResponse(['message' => 'Connection successfully established'], 200); } catch (\Exception $e) { + $this->factfinderLogger->error($e->getMessage()); + return new JsonResponse(['message' => 'Connection could not be established'], 400); } } @@ -57,6 +67,8 @@ public function testFTPConnection(): JsonResponse return new JsonResponse(['message' => 'Connection successfully established'], 200); } catch (FilesystemException $e) { + $this->factfinderLogger->error($e->getMessage()); + return new JsonResponse(['message' => "Connection could not be established. Error: {$e->getMessage()}"], 400); } } diff --git a/src/Api/UiFeedExportController.php b/src/Api/UiFeedExportController.php index 2db5ddfc..14143009 100644 --- a/src/Api/UiFeedExportController.php +++ b/src/Api/UiFeedExportController.php @@ -9,6 +9,7 @@ use Omikron\FactFinder\Shopware6\Message\RefreshExportCache; use Omikron\FactFinder\Shopware6\MessageQueue\FeedExportHandler; use Omikron\FactFinder\Shopware6\MessageQueue\RefreshExportCacheHandler; +use Psr\Log\LoggerInterface; use Shopware\Core\Framework\Routing\Annotation\RouteScope; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; @@ -23,7 +24,8 @@ class UiFeedExportController extends AbstractController public function __construct( private FeedExportHandler $feedExportHandler, private DataExportCommand $dataExportCommand, - private RefreshExportCacheHandler $refreshCacheHandler + private RefreshExportCacheHandler $refreshCacheHandler, + private LoggerInterface $factfinderLogger ) { } @@ -33,18 +35,22 @@ public function __construct( * @param Request $request * * @return JsonResponse - * - * @throws \Exception */ public function generateExportFeedAction(Request $request): JsonResponse { - $this->feedExportHandler->__invoke(new FeedExport( - $request->query->get('salesChannelValue'), - $request->query->get('salesChannelLanguageValue'), - $request->query->get('exportTypeValue') - )); + try { + $this->feedExportHandler->__invoke(new FeedExport( + $request->query->get('salesChannelValue'), + $request->query->get('salesChannelLanguageValue'), + $request->query->get('exportTypeValue') + )); + + return new JsonResponse(); + } catch (\Exception $e) { + $this->factfinderLogger->error($e->getMessage()); - return new JsonResponse(); + return new JsonResponse(['message' => 'Problem with export. Check logs for more informations'], 400); + } } /** @@ -63,16 +69,20 @@ public function getTypeEntityMap(): JsonResponse * @param Request $request * * @return JsonResponse - * - * @throws \Exception */ public function refreshExportCacheAction(Request $request): JsonResponse { - $this->refreshCacheHandler->__invoke(new RefreshExportCache( - $request->query->get('salesChannelValue'), - $request->query->get('salesChannelLanguageValue') - )); + try { + $this->refreshCacheHandler->__invoke(new RefreshExportCache( + $request->query->get('salesChannelValue'), + $request->query->get('salesChannelLanguageValue') + )); + + return new JsonResponse(); + } catch (\Exception $e) { + $this->factfinderLogger->error($e->getMessage()); - return new JsonResponse(); + return new JsonResponse(['message' => 'Problem with cache export. Check logs for more informations'], 400); + } } } diff --git a/src/Api/UpdateFieldRolesController.php b/src/Api/UpdateFieldRolesController.php index 1013c929..ec5441e6 100644 --- a/src/Api/UpdateFieldRolesController.php +++ b/src/Api/UpdateFieldRolesController.php @@ -5,6 +5,7 @@ namespace Omikron\FactFinder\Shopware6\Api; use Omikron\FactFinder\Shopware6\Config\FieldRolesInterface; +use Psr\Log\LoggerInterface; use Shopware\Core\Framework\Context; use Shopware\Core\Framework\DataAbstractionLayer\EntityCollection; use Shopware\Core\Framework\DataAbstractionLayer\EntityRepository; @@ -21,28 +22,37 @@ class UpdateFieldRolesController extends AbstractController { private FieldRolesInterface $fieldRoles; private EntityRepository $channelRepository; + private LoggerInterface $factfinderLogger; - public function __construct(FieldRolesInterface $fieldRolesService, EntityRepository $channelRepository) - { + public function __construct( + FieldRolesInterface $fieldRolesService, + EntityRepository $channelRepository, + LoggerInterface $factfinderLogger + ) { $this->fieldRoles = $fieldRolesService; $this->channelRepository = $channelRepository; + $this->factfinderLogger = $factfinderLogger; } /** * @Route("/api/_action/field-roles/update", name="api.action.fact_finder.field_roles.update", methods={"GET"}, defaults={"XmlHttpRequest"=true}) * * @return JsonResponse - * - * @throws \Exception */ public function execute(): JsonResponse { - foreach ($this->fetchSalesChannels() as $salesChannel) { - $fieldRoles = $this->fieldRoles->getRoles($salesChannel->getId()); - $this->fieldRoles->update($fieldRoles, $salesChannel->getId()); - } + try { + foreach ($this->fetchSalesChannels() as $salesChannel) { + $fieldRoles = $this->fieldRoles->getRoles($salesChannel->getId()); + $this->fieldRoles->update($fieldRoles, $salesChannel->getId()); + } - return new JsonResponse(); + return new JsonResponse(); + } catch (\Exception $e) { + $this->factfinderLogger->error($e->getMessage()); + + return new JsonResponse(['message' => 'Problem with update fields roles. Check logs for more informations'], 400); + } } /** diff --git a/src/Communication/ClientBuilderConfigurator.php b/src/Communication/ClientBuilderConfigurator.php index 415a792b..66ff6272 100644 --- a/src/Communication/ClientBuilderConfigurator.php +++ b/src/Communication/ClientBuilderConfigurator.php @@ -7,22 +7,29 @@ use Omikron\FactFinder\Communication\Client\ClientBuilder; use Omikron\FactFinder\Communication\Credentials; use Omikron\FactFinder\Shopware6\Config\Communication as CommunicationConfig; +use Psr\Log\LoggerInterface; class ClientBuilderConfigurator { private CommunicationConfig $config; + private LoggerInterface $factfinderLogger; - public function __construct(CommunicationConfig $config) + public function __construct(CommunicationConfig $config, LoggerInterface $factfinderLogger) { - $this->config = $config; + $this->config = $config; + $this->factfinderLogger = $factfinderLogger; } public function configure(ClientBuilder $clientBuilder): void { $clientBuilder->withCredentials(new Credentials(...$this->config->getCredentials())); - if ($this->config->getServerUrl() !== '') { - $clientBuilder->withServerUrl($this->config->getServerUrl()); + try { + if ($this->config->getServerUrl() !== '') { + $clientBuilder->withServerUrl($this->config->getServerUrl()); + } + } catch (\InvalidArgumentException $e) { + $this->factfinderLogger->error($e->getMessage()); } } } diff --git a/src/OmikronFactFinder.php b/src/OmikronFactFinder.php index cc59c1e9..41cd4ba6 100644 --- a/src/OmikronFactFinder.php +++ b/src/OmikronFactFinder.php @@ -19,7 +19,13 @@ use Shopware\Core\System\CustomField\Aggregate\CustomFieldSet\CustomFieldSetEntity; use Shopware\Core\System\CustomField\CustomFieldEntity; use Shopware\Core\System\CustomField\CustomFieldTypes; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\Config\Loader\DelegatingLoader; +use Symfony\Component\Config\Loader\LoaderResolver; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Loader\DirectoryLoader; +use Symfony\Component\DependencyInjection\Loader\GlobFileLoader; +use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; /** * @SuppressWarnings(PHPMD.CouplingBetweenObjects) @@ -37,7 +43,7 @@ class OmikronFactFinder extends Plugin 'config' => [ 'label' => [ 'en-GB' => 'Include in FACT-Finder® CMS Export', - 'de-DE' => 'Include in FACT-Finder® CMS Export', + 'de-DE' => 'In FACT-Finder® CMS-Export einbinden', ], 'componentName' => 'sw-field', 'customFieldType' => CustomFieldTypes::SWITCH, @@ -50,7 +56,7 @@ class OmikronFactFinder extends Plugin 'config' => [ 'label' => [ 'en-GB' => 'Disable `ff-communication/search-immediate`', - 'de-DE' => 'Disable `ff-communication/search-immediate`', + 'de-DE' => 'Deaktivieren `ff-communication/search-immediate`', ], 'componentName' => 'sw-field', 'customFieldType' => CustomFieldTypes::SWITCH, @@ -66,6 +72,17 @@ public function build(ContainerBuilder $container): void $container->registerForAutoconfiguration(ExportInterface::class)->addTag('factfinder.export.exporter'); $container->registerForAutoconfiguration(ExportEntityInterface::class)->addTag('factfinder.export.entity'); $container->registerForAutoconfiguration(FactoryInterface::class)->addTag('factfinder.export.entity_factory'); + + $locator = new FileLocator('Resources/config'); + $resolver = new LoaderResolver([ + new YamlFileLoader($container, $locator), + new GlobFileLoader($container, $locator), + new DirectoryLoader($container, $locator), + ]); + + $configLoader = new DelegatingLoader($resolver); + $confDir = \rtrim($this->getPath(), '/') . '/Resources/config'; + $configLoader->load($confDir . '/{packages}/*.yaml', 'glob'); } public function install(InstallContext $installContext): void @@ -176,7 +193,7 @@ private function fixCMSExportIncludeFieldType(Context $context): void 'customFieldType' => CustomFieldTypes::SWITCH, 'label' => [ 'en-GB' => 'Include in FACT-Finder® CMS Export', - 'de-DE' => 'Include in FACT-Finder® CMS Export', + 'de-DE' => 'In FACT-Finder® CMS-Export einbinden', ], ], ], diff --git a/src/Resources/app/administration/src/module/configuration/snippet/de-DE.json b/src/Resources/app/administration/src/module/configuration/snippet/de-DE.json index 4c1c3adc..6f5190a5 100644 --- a/src/Resources/app/administration/src/module/configuration/snippet/de-DE.json +++ b/src/Resources/app/administration/src/module/configuration/snippet/de-DE.json @@ -1,18 +1,19 @@ { "configuration": { "updateFieldRoles": { - "update": "Update Field Roles" + "update": "Feldrollen aktualisieren", + "successMessage": "Feldrollen erfolgreich aktualisiert. Bitte prüfen Sie, ob die Werte korrekt sind" }, "testConnection": { - "success": "Connection successfully established.", - "fail": "Connection could not be established.", - "helpText": "Please save you current configuration before test connection" + "success": "Verbindung erfolgreich hergestellt.", + "fail": "Die Verbindung konnte nicht hergestellt werden.", + "helpText": "Bitte speichern Sie Ihre aktuelle Konfiguration, bevor Sie die Verbindung testen" }, "testApiConnection": { - "testConnection": "Test Connection" + "testConnection": "Testverbindung" }, "testFtpConnection": { - "testConnection": "Test FTP/SFTP Connection" + "testConnection": "FTP/SFTP Testverbindung " } } } diff --git a/src/Resources/app/administration/src/module/sw-cms/snippet/de-DE.json b/src/Resources/app/administration/src/module/sw-cms/snippet/de-DE.json index b14c4592..e91a7d95 100644 --- a/src/Resources/app/administration/src/module/sw-cms/snippet/de-DE.json +++ b/src/Resources/app/administration/src/module/sw-cms/snippet/de-DE.json @@ -3,16 +3,16 @@ "blocks": { "commerce": { "factfinderWebComponentsListing": { - "label": "Typical collection of Web Components that implements search result page " + "label": "Typische Sammlung von Webkomponenten, die eine Suchergebnisseite implementiert" }, "factfinderWebComponentsCampaigns": { - "label": "FACT-Finder® Web Components Campaigns" + "label": "FACT-Finder® Web Components Kampagnen" }, "factfinderWebComponentsFilters": { - "label": "FACT-Finder® Web Components Filters" + "label": "FACT-Finder® Web Components Filter" }, "factfinderWebComponentsRecordList": { - "label": "FACT-Finder® Web Components Record List" + "label": "FACT-Finder® Web Components Rekordliste" } } }, @@ -20,22 +20,22 @@ "recordList": { "label": "FACT-Finder® Web Components ff-record-list element", "config": { - "callbackArg": "Name of argument which will be available inside the callback scope", - "callback": "callback to the subscribed topic. It is recommended to have only one callback per topic, per page.", - "domUpdated": "listener to dom-update event of that element.", - "id": "Value will be passed as `id` attribute to element. If not specified, the default CMS element id will be used" + "callbackArg": "Name des Arguments, das im Callback-Bereich verfügbar sein wird", + "callback": "Rückruf zum abonnierten Thema. Es wird empfohlen, nur einen Rückruf pro Thema und Seite durchzuführen.", + "domUpdated": "Listener für das dom-update-Ereignis dieses Elements", + "id": "Der Wert wird als „id“-Attribut an das Element übergeben. Wenn nicht angegeben, wird die Standard-CMS-Element-ID verwendet" } }, "asn": { "asn": { "label": "FACT-Finder® Web Components ff-asn element", "config": { - "callbackArg": "Name of argument which will be available inside the callback scope", - "callback": "callback to the subscribed topic. It is recommended to have only one callback per topic, per page.", - "domUpdated": "listener to dom-update event of that element.", - "id": "Value will be passed as `id` attribute to element. If not specified, the default CMS element id will be used", - "topic": "Leaving this field empty causes element subscribe to its default topic (asn)", - "vertical": "Setting to true will add additional CSS class `btn-block` to the `ff-asn-group` and `
Main Settings Grundeinstellungen - + serverUrl @@ -16,6 +16,7 @@ channel + true @@ -46,15 +47,15 @@ v4 - - + + true useSsr - + @@ -73,8 +74,9 @@ useProxy - + Using Proxy allows you to refine the data coming back from FACT-Finder inside the SDK code. Please refer the documentation for more info. + Mit Proxy können Sie die von FACT-Finder zurückkommenden Daten innerhalb des SDK-Codes verfeinern. Weitere Informationen finden Sie in der Dokumentation. @@ -83,26 +85,29 @@ count_as_one - + true redirectMapping + Put each pair "query=url" in separate row. If the phrase appears twice, the first one from the top of the list will be taken. + Fügen Sie jedes Paar „query=url“ in eine separate Zeile ein. Wenn die Phrase zweimal vorkommt, wird die erste von oben in der Liste verwendet. phrase one=/some/special/link/one -phrase two=https://domain.com/some/special/link/two + phrase two=https://domain.com/some/special/link/two - false @@ -113,17 +118,20 @@ phrase two=https://domain.com/some/special/link/two disabledPropertyGroups property_group + disabledCustomFields custom_field + currencyPriceExport + @@ -135,7 +143,7 @@ phrase two=https://domain.com/some/special/link/two protocol - + - + ftpPort 21 - false @@ -175,27 +182,30 @@ phrase two=https://domain.com/some/special/link/two ftpPassword - false If your authentication method does not require user password, please ignore that file + Wenn Ihre Authentifizierungsmethode kein Benutzerkennwort erfordert, ignorieren Sie diese Datei bitte rootDir - - false + privateKey + Put the content of the received key file into the text area. If your authentication method does not require key, please ignore that file + Geben Sie den Inhalt der empfangenen Schlüsseldatei in den Textbereich ein. Wenn Ihre Authentifizierungsmethode keinen Schlüssel erfordert, ignorieren Sie diese Datei bitte keyPassphrase + If your key is not protected with a passphrase, please ignore this field + Wenn Ihr Schlüssel nicht durch eine Passphrase geschützt ist, ignorieren Sie dieses Feld bitte @@ -206,7 +216,7 @@ phrase two=https://domain.com/some/special/link/two Import Settings Import-Konfiguration - + pushImport diff --git a/src/Resources/config/packages/monolog.yaml b/src/Resources/config/packages/monolog.yaml new file mode 100644 index 00000000..41cceb21 --- /dev/null +++ b/src/Resources/config/packages/monolog.yaml @@ -0,0 +1,9 @@ +monolog: + channels: ['factfinder_channel'] + + handlers: + myPluginLogHandler: + type: rotating_file + path: "%kernel.logs_dir%/factfinder_%kernel.environment%.log" + level: warning + channels: [ "factfinder_channel"] diff --git a/src/Resources/config/services.xml b/src/Resources/config/services.xml index adda328c..83777518 100644 --- a/src/Resources/config/services.xml +++ b/src/Resources/config/services.xml @@ -77,6 +77,7 @@ + diff --git a/src/Resources/public/administration/js/omikron-fact-finder.js b/src/Resources/public/administration/js/omikron-fact-finder.js index 01fac932..b9f2e3be 100755 --- a/src/Resources/public/administration/js/omikron-fact-finder.js +++ b/src/Resources/public/administration/js/omikron-fact-finder.js @@ -1,3 +1,3 @@ /*! For license information please see omikron-fact-finder.js.LICENSE.txt */ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=(window.__sw__.assetPath + '/bundles/omikronfactfinder/'),n(n.s="nNvV")}({"+KWN":function(e,t,n){var r=n("a5mS");r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n("P8hj").default)("5e95523a",r,!0,{})},"+tBY":function(e){e.exports=JSON.parse('{"sw-cms":{"blocks":{"commerce":{"factfinderWebComponentsListing":{"label":"Typical collection of Web Components that implements search result page "},"factfinderWebComponentsCampaigns":{"label":"FACT-Finder® Web Components Campaigns"},"factfinderWebComponentsFilters":{"label":"FACT-Finder® Web Components Filters"},"factfinderWebComponentsRecordList":{"label":"FACT-Finder® Web Components Record List"}}},"elements":{"recordList":{"label":"FACT-Finder® Web Components ff-record-list element","config":{"callbackArg":"Name of argument which will be available inside the callback scope","callback":"callback to the subscribed topic. It is recommended to have only one callback per topic, per page.","domUpdated":"listener to dom-update event of that element.","id":"Value will be passed as `id` attribute to element. If not specified, the default CMS element id will be used"}},"asn":{"asn":{"label":"FACT-Finder® Web Components ff-asn element","config":{"callbackArg":"Name of argument which will be available inside the callback scope","callback":"callback to the subscribed topic. It is recommended to have only one callback per topic, per page.","domUpdated":"listener to dom-update event of that element.","id":"Value will be passed as `id` attribute to element. If not specified, the default CMS element id will be used","topic":"Leaving this field empty causes element subscribe to its default topic (asn)","vertical":"Setting to true will add additional CSS class `btn-block` to the `ff-asn-group` and `
n.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(o=0;o\n \n
\n \n \n
\n \n
\n{% endblock %}\n'});Shopware.Component.register("sw-cms-block-listing-preview",{template:'{% block cms_block_commerce_factfinder_listing_preview %}\n
\n FACT-Finder Search Result\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsBlock({name:"listing",label:"sw-cms.blocks.commerce.factfinderWebComponentsListing.label",category:"commerce",component:"sw-cms-block-listing",previewComponent:"sw-cms-block-listing-preview",slots:{toolbarFilters:"asn",toolbarPaging:"paging",toolbarSorting:"sortbox",records:"record-list"}});Shopware.Component.register("sw-cms-block-campaigns",{template:'{% block cms_block_commerce_factfinder_campaigns %}\n
\n \n
\n{% endblock %}\n'});Shopware.Component.register("sw-cms-block-campaigns-preview",{template:'{% block cms_block_commerce_factfinder_campaigns_preview %}\n
\n FACT-Finder Campaigns\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsBlock({name:"campaigns",label:"sw-cms.blocks.commerce.factfinderWebComponentsCampaigns.label",category:"commerce",component:"sw-cms-block-campaigns",previewComponent:"sw-cms-block-campaigns-preview",slots:{campaigns:"campaigns"}});Shopware.Component.register("sw-cms-block-filters",{template:'{% block cms_block_commerce_factfinder_filters %}\n
\n \n
\n{% endblock %}\n'});Shopware.Component.register("sw-cms-block-filters-preview",{template:'{% block cms_block_commerce_factfinder_filters_preview %}\n
\n FACT-Finder Filters\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsBlock({name:"filters",label:"sw-cms.blocks.commerce.factfinderWebComponentsFilters.label",category:"commerce",component:"sw-cms-block-filters",previewComponent:"sw-cms-block-filters-preview",defaultConfig:{cssClass:"cms-block-sidebar-filter"},slots:{filters:"asn"}});Shopware.Component.register("sw-cms-el-record-list",{template:'{% block sw_cms_element_record_list %}\n
\n
FF-RECORD-LIST
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("record-list")}}});Shopware.Component.register("sw-cms-el-config-record-list",{template:'{% block sw_cms_element_record_list_config %}\n
\n \n\n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n
\n{% endblock %}\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("record-list")}}});Shopware.Component.register("sw-cms-el-preview-record-list",{template:'{% block sw_cms_element_record_list_preview %}\n
\n FF-RECORD-LIST\n
\n{% endblock %}\n'}),Shopware.Service("cmsService").registerCmsElement({name:"record-list",label:"sw-cms.elements.recordList.label",component:"sw-cms-el-record-list",configComponent:"sw-cms-el-config-record-list",previewComponent:"sw-cms-el-preview-record-list",defaultConfig:{subscribe:{value:!0,source:"static"},infiniteScrolling:{value:!1,source:"static"},restoreScrollPosition:{value:!1,source:"static"},infiniteDebounceDelay:{value:"32",source:"static"},infiniteScrollMargin:{value:0,source:"static"},callbackArg:{value:"records",source:"static"},callback:{value:"",source:"static"},id:{value:"",source:"static"},domUpdated:{value:"",source:"static"}}});Shopware.Component.register("sw-cms-el-asn",{template:'{% block sw_cms_element_asn %}\n
\n
FF-ASN
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("asn")}}});n("MVau");Shopware.Component.register("sw-cms-el-config-asn",{template:'{% block sw_cms_element_asn_config %}\n
\n \n\n \n \n\n \n \n\n \n \n\n \n \n \n \n \n \n\n \n

Filter Cloud

\n \n\n \n \n\n \n\n \n \n \n \n \n \n
\n
\n{% endblock %}\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("asn")}}});Shopware.Component.register("sw-cms-el-preview-asn",{template:'{% block sw_cms_preview_element_asn %}\n
\n FF-ASN\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsElement({name:"asn",label:"sw-cms.elements.asn.label",component:"sw-cms-el-asn",configComponent:"sw-cms-el-config-asn",previewComponent:"sw-cms-el-preview-asn",defaultConfig:{subscribe:{value:!0,source:"static"},vertical:{value:!1,source:"static"},topic:{value:"asn",source:"static"},callbackArg:{value:"groups",source:"static"},callback:{value:"",source:"static"},id:{value:"",source:"static"},domUpdated:{value:"",source:"static"},filterCloud:{value:!0,source:"static"},filterCloudBlacklist:{value:"",source:"static"},filterCloudWhitelist:{value:"",source:"static"},filterCloudOrder:{value:"fact-finder",source:"static"}}});Shopware.Component.register("sw-cms-el-sortbox",{template:'{% block sw_cms_element_sortbox %}\n
\n
FF-SORTBOX
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("sortbox")}}});Shopware.Component.register("sw-cms-el-config-sortbox",{template:'{% block sw_cms_element_sortbox_config %}\n
\n \n \n \n \n \n
\n{% endblock %}\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("sortbox")}}});Shopware.Component.register("sw-cms-el-preview-sortbox",{template:'{% block sw_cms_element_sortbox_preview %}\n
\n FF-SORTBOX\n
\n{% endblock %}\n'}),Shopware.Service("cmsService").registerCmsElement({name:"sortbox",label:"sw-cms.elements.sortbox.label",component:"sw-cms-el-sortbox",configComponent:"sw-cms-el-config-sortbox",previewComponent:"sw-cms-el-preview-sortbox",defaultConfig:{subscribe:{value:!0,source:"static"},opened:{value:!0,source:"static"},showSelected:{value:!1,source:"static"},showSelectedFirst:{value:!1,source:"static"},collapseOnblur:{value:!1,source:"static"}}});Shopware.Component.register("sw-cms-el-paging",{template:'{% block sw_cms_element_paging %}\n
\n
FF-PAGING
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("paging")}}});Shopware.Component.register("sw-cms-el-config-paging",{template:'{% block sw_cms_element_paging_config %}\n
\n \n \n \n
\n{% endblock %}\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("paging")}}});Shopware.Component.register("sw-cms-el-preview-paging",{template:'{% block sw_cms_element_paging_preview %}\n
\n FF-PAGING\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsElement({name:"paging",label:"sw-cms.elements.paging.label",component:"sw-cms-el-paging",configComponent:"sw-cms-el-config-paging",previewComponent:"sw-cms-el-preview-paging",defaultConfig:{subscribe:{value:!0,source:"static"},showOnly:{value:"true",source:"static"}}});Shopware.Component.register("sw-cms-el-campaigns",{template:'{% block sw_cms_element_campaigns %}\n
\n
CAMPAIGNS
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("campaigns")}}});Shopware.Component.register("sw-cms-el-config-campaigns",{template:'{% block sw_cms_element_campaigns_config %}\n
\n\n \n \n\n \n \n \n \n\n \n \n\n \n \n \n\n \n \n \n \n\n \n \n\n\n \n \n \n \n \n \n \n \n \n
\n{% endblock %}\n',mixins:["cms-element"],created:function(){this.createdComponent()},data:function(){return{campaignFlags:["None","is-product-campaign","is-landing-page-campaign"]}},methods:{createdComponent:function(){this.initElementConfig("campaigns")}}});Shopware.Component.register("sw-cms-el-preview-campaigns",{template:'{% block sw_cms_element_campaigns_preview %}\n
\n CAMPAIGNS\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsElement({name:"campaigns",label:"sw-cms.elements.campaigns.label",component:"sw-cms-el-campaigns",configComponent:"sw-cms-el-config-campaigns",previewComponent:"sw-cms-el-preview-campaigns",defaultConfig:{advisorCampaignName:{value:"",source:"static"},feedbackCampaignLabel:{value:"",source:"static"},feedbackCampaignFlag:{value:"",source:"static"},enableFeedbackCampaign:{value:!1,source:"static"},enableAdvisorCampaign:{value:!1,source:"static"},enableRedirectCampaign:{value:!1,source:"static"},enablePushedProducts:{value:!1,source:"static"},pushedProductsFlag:{value:"",source:"static"},pushedProductsName:{value:"",source:"static"}}});n("Xdcl"),n("qYTL");function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){o=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),c=new E(r||[]);return i(a,"_invoke",{value:S(e,n,c)}),a}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var d={};function h(){}function m(){}function v(){}var g={};u(g,c,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==t&&n.call(w,c)&&(g=w);var y=v.prototype=h.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function o(i,a,c,s){var l=p(e[i],e,a);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==r(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,c,s)}),(function(e){o("throw",e,c,s)})):t.resolve(f).then((function(e){u.value=e,c(u)}),(function(e){return o("throw",e,c,s)}))}s(l.arg)}var a;i(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function S(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=_(a,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=p(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function _(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=p(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function F(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:F(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function i(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}var a=Shopware,c=a.Component,s=a.Mixin;c.register("ui-feed-export-form",{template:'\n\n \n \n \n \n\n \n \n\n \n \n \n\n \n \n\n {{ $tc(\'ui-feed-export.component.export_form.button.title\') }}\n \n\n \n\n {{ $tc(\'ui-feed-export.component.export_form.cache_button.title\') }}\n \n \n\n',inject:["systemConfigApiService"],data:function(){return{salesChannelValue:null,salesChannelLanguageValue:null,exportTypeValue:null,typeSelectOptions:[],isCacheDisable:!1,isLoadingCache:!1,isLoadingExport:!1}},mixins:[s.getByName("notification")],mounted:function(){this.getPluginConfig(),this.getExportTypeValues()},filters:{capitalize:function(e){return e?(e=e.toString()).charAt(0).toUpperCase()+e.slice(1):""}},methods:{getPluginConfig:function(){var e,t=this;return(e=o().mark((function e(){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.systemConfigApiService.getValues("OmikronFactFinder.config");case 2:n=e.sent,t.isCacheDisable=n["OmikronFactFinder.config.enableExportCache"];case 4:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function c(e){i(a,r,o,c,s,"next",e)}function s(e){i(a,r,o,c,s,"throw",e)}c(void 0)}))})()},getExportTypeValues:function(){var e=this,t=Shopware.Service("syncService").httpClient,n={Authorization:"Bearer ".concat(Shopware.Context.api.authToken.access),"Content-Type":"application/json"};t.get("_action/fact-finder/get-export-type-options",{headers:n}).then((function(t){200===t.status&&(e.typeSelectOptions=t.data)}))},successFeedGenerationWindow:function(){this.createNotificationSuccess({message:this.$tc("ui-feed-export.component.export_form.alert_success.text")})},errorFeedGenerationWindow:function(){this.createNotificationError({message:this.$tc("ui-feed-export.component.export_form.alert_error.text")})},errorNotValidParams:function(){this.createNotificationError({message:this.$tc("ui-feed-export.component.export_form.alert_not_valid_params.text")})},successRefreshCacheWindow:function(){this.createNotificationSuccess({message:this.$tc("ui-feed-export.component.export_form.refresh_cache_success.text")})},errorRefreshCacheWindow:function(){this.createNotificationError({message:this.$tc("ui-feed-export.component.export_form.refresh_cache_error.text")})},validateParams:function(e){return null!==e.salesChannelValue&&null!==e.salesChannelLanguageValue&&null!==e.exportTypeValue},getFeedExportFile:function(e){var t=this,n={salesChannelValue:this.salesChannelValue,salesChannelLanguageValue:this.salesChannelLanguageValue,exportTypeValue:this.exportTypeValue};if(this.validateParams(n)){this.isLoadingExport=!0;var r=Shopware.Service("syncService").httpClient,o={Authorization:"Bearer ".concat(Shopware.Context.api.authToken.access),"Content-Type":"application/json"};r.get(e,{headers:o,params:n}).then((function(e){200===e.status?t.successFeedGenerationWindow():t.errorFeedGenerationWindow(),t.isLoadingExport=!1}))}else this.errorNotValidParams()},refreshExportCache:function(e){var t=this;this.isLoadingCache=!0;var n=Shopware.Service("syncService").httpClient,r={Authorization:"Bearer ".concat(Shopware.Context.api.authToken.access),"Content-Type":"application/json"},o={salesChannelValue:this.salesChannelValue,salesChannelLanguageValue:this.salesChannelLanguageValue};n.get(e,{headers:r,params:o}).then((function(e){200===e.status?t.successRefreshCacheWindow():t.errorRefreshCacheWindow(),t.isLoadingCache=!1}))}}});Shopware.Component.register("ui-feed-export-index",{template:'{% block factfinder_ui_feed_export_index %}\n \n \n \n{% endblock %}\n',metaInfo:function(){return{title:this.$createTitle()}}});var l=n("O06o"),u=n("QfK0");Shopware.Module.register("ui-feed-export",{color:"#ff3d58",icon:"default-shopping-paper-bag-product",title:"ui-feed-export.title",description:"",snippets:{"de-DE":l,"en-GB":u},routes:{index:{component:"ui-feed-export-index",path:"index"}},navigation:[{label:"ui-feed-export.title",path:"ui.feed.export.index",position:100,parent:"sw-extension"}]});function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(){p=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,o){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new E(o||[]);return r(a,"_invoke",{value:S(e,n,c)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var d={};function h(){}function m(){}function v(){}var g={};s(g,i,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(F([])));w&&w!==t&&n.call(w,i)&&(g=w);var y=v.prototype=h.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function o(r,i,a,c){var s=u(e[r],e,i);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==f(p)&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(p).then((function(e){l.value=e,a(l)}),(function(e){return o("throw",e,a,c)}))}c(s.arg)}var i;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function S(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=_(a,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=u(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function _(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=u(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function F(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:F(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function d(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}var h=Shopware,m=h.Component,v=h.Mixin;m.register("update-field-roles",{template:'\n {{ $tc(\'configuration.updateFieldRoles.update\') }}\n\n',inject:["fieldRolesService"],mixins:[v.getByName("notification"),v.getByName("sw-inline-snippet")],data:function(){return{isLoading:!1,isSaveSuccessful:!1}},methods:{onClick:function(){var e,t=this;return(e=p().mark((function e(){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.isLoading=!0,e.next=3,t.fieldRolesService.sendUpdateFieldRoles();case 3:e.sent,t.isSaveSuccessful=!0,t.isLoading=!1,t.createNotificationSuccess({message:t.$tc("configuration.updateFieldRoles.update")});case 7:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,c,"next",e)}function c(e){d(i,r,o,a,c,"throw",e)}a(void 0)}))})()}}});n("R3ag");function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(){b=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,o){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),c=new E(o||[]);return r(a,"_invoke",{value:S(e,n,c)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f={};function p(){}function d(){}function h(){}var m={};s(m,i,(function(){return this}));var v=Object.getPrototypeOf,w=v&&v(v(F([])));w&&w!==t&&n.call(w,i)&&(m=w);var y=h.prototype=p.prototype=Object.create(m);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function o(r,i,a,c){var s=u(e[r],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==g(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return o("throw",e,a,c)}))}c(s.arg)}var i;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function S(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=_(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=u(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function _(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=u(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function F(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:F(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function w(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}var y=Shopware,x=y.Component,C=y.Mixin;x.register("test-api-connection",{template:'\n {{ $tc(\'configuration.testApiConnection.testConnection\') }}\n\n',mixins:[C.getByName("notification"),C.getByName("sw-inline-snippet")],data:function(){return{isLoading:!1,isSaveSuccessful:!1}},methods:{onClick:function(){var e,t=this;return(e=b().mark((function e(){var n,r;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.isLoading=!0,n=Shopware.Service("syncService").httpClient,r={Authorization:"Bearer ".concat(Shopware.Context.api.authToken.access),"Content-Type":"application/json"},n.get("_action/test-connection/api",{headers:r}).then((function(e){200===e.status?t.createNotificationSuccess({message:t.$tc("configuration.testConnection.success")}):t.createNotificationError({title:t.$tc("configuration.testConnection.fail"),message:t.$tc("configuration.testConnection.helpText")})})).catch((function(){t.createNotificationError({title:t.$tc("configuration.testConnection.fail"),message:t.$tc("configuration.testConnection.helpText")})})).finally((function(){t.isSaveSuccessful=!0,t.isLoading=!1}));case 5:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){w(i,r,o,a,c,"next",e)}function c(e){w(i,r,o,a,c,"throw",e)}a(void 0)}))})()}}});n("+KWN");function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(){_=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,o){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),c=new E(o||[]);return r(a,"_invoke",{value:x(e,n,c)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f={};function p(){}function d(){}function h(){}var m={};s(m,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(F([])));g&&g!==t&&n.call(g,i)&&(m=g);var b=h.prototype=p.prototype=Object.create(m);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function y(e,t){function o(r,i,a,c){var s=u(e[r],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==S(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return o("throw",e,a,c)}))}c(s.arg)}var i;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function x(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=C(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=u(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function C(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,C(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=u(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function F(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:F(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function k(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}var L=Shopware,E=L.Component,F=L.Mixin;function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function T(e,t){for(var n=0;n\n {{ $tc(\'configuration.testFtpConnection.testConnection\') }}\n\n',mixins:[F.getByName("notification"),F.getByName("sw-inline-snippet")],data:function(){return{isLoading:!1,isSaveSuccessful:!1}},methods:{onClick:function(){var e,t=this;return(e=_().mark((function e(){var n,r;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.isLoading=!0,n=Shopware.Service("syncService").httpClient,r={Authorization:"Bearer ".concat(Shopware.Context.api.authToken.access),"Content-Type":"application/json"},n.get("_action/test-connection/ftp",{headers:r}).then((function(e){200===e.status?t.createNotificationSuccess({message:t.$tc("configuration.testConnection.success")}):t.createNotificationError({title:t.$tc("configuration.testConnection.fail"),message:t.$tc("configuration.testConnection.helpText")})})).catch((function(){t.createNotificationError({title:t.$tc("configuration.testConnection.fail"),message:t.$tc("configuration.testConnection.helpText")})})).finally((function(){t.isSaveSuccessful=!0,t.isLoading=!1}));case 5:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){k(i,r,o,a,c,"next",e)}function c(e){k(i,r,o,a,c,"throw",e)}a(void 0)}))})()}}});var G=Shopware.Classes.ApiService,R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(i,e);var t,n,r,o=P(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t,null,"application/json")).name="fieldRolesServiceApi",n}return t=i,(n=[{key:"sendUpdateFieldRoles",value:function(){var e=this.getBasicHeaders();return this.httpClient.get("_action/field-roles/update",{headers:e}).then((function(e){return G.handleResponse(e)}))}}])&&T(t.prototype,n),r&&T(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(G);Shopware.Service().register("fieldRolesService",(function(){return new R(Shopware.Application.getContainer("init").httpClient,Shopware.Service("loginService"))}));var W=n("+tBY"),I=n("gynV"),$=n("atL3"),V=n("Z3TO");Shopware.Locale.extend("de-DE",$),Shopware.Locale.extend("de-DE",W),Shopware.Locale.extend("en-GB",V),Shopware.Locale.extend("en-GB",I)},qYTL:function(e,t,n){var r=n("xp4p");r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n("P8hj").default)("5a1df260",r,!0,{})},xp4p:function(e,t,n){}}); +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=(window.__sw__.assetPath + '/bundles/omikronfactfinder/'),n(n.s="nNvV")}({"+KWN":function(e,t,n){var r=n("a5mS");r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n("P8hj").default)("5e95523a",r,!0,{})},"+tBY":function(e){e.exports=JSON.parse('{"sw-cms":{"blocks":{"commerce":{"factfinderWebComponentsListing":{"label":"Typische Sammlung von Webkomponenten, die eine Suchergebnisseite implementiert"},"factfinderWebComponentsCampaigns":{"label":"FACT-Finder® Web Components Kampagnen"},"factfinderWebComponentsFilters":{"label":"FACT-Finder® Web Components Filter"},"factfinderWebComponentsRecordList":{"label":"FACT-Finder® Web Components Rekordliste"}}},"elements":{"recordList":{"label":"FACT-Finder® Web Components ff-record-list element","config":{"callbackArg":"Name des Arguments, das im Callback-Bereich verfügbar sein wird","callback":"Rückruf zum abonnierten Thema. Es wird empfohlen, nur einen Rückruf pro Thema und Seite durchzuführen.","domUpdated":"Listener für das dom-update-Ereignis dieses Elements","id":"Der Wert wird als „id“-Attribut an das Element übergeben. Wenn nicht angegeben, wird die Standard-CMS-Element-ID verwendet"}},"asn":{"asn":{"label":"FACT-Finder® Web Components ff-asn element","config":{"callbackArg":"Name des Arguments, das im Callback-Bereich verfügbar sein wird","callback":"Rückruf zum abonnierten Thema. Es wird empfohlen, nur einen Rückruf pro Thema und Seite durchzuführen.","domUpdated":"Listener für das dom-update-Ereignis dieses Elements.","id":"Der Wert wird als „id“-Attribut an das Element übergeben. Wenn nicht angegeben, wird die Standard-CMS-Element-ID verwendet","topic":"Wenn Sie dieses Feld leer lassen, abonniert das Element sein Standardthema (ASN).","vertical":"Durch die Einstellung „true“ wird die zusätzliche CSS-Klasse „btn-block“ zu „ff-asn-group“ und „
n.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(o=0;o\n \n
\n \n \n
\n \n
\n{% endblock %}\n'});Shopware.Component.register("sw-cms-block-listing-preview",{template:'{% block cms_block_commerce_factfinder_listing_preview %}\n
\n FACT-Finder Search Result\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsBlock({name:"listing",label:"sw-cms.blocks.commerce.factfinderWebComponentsListing.label",category:"commerce",component:"sw-cms-block-listing",previewComponent:"sw-cms-block-listing-preview",slots:{toolbarFilters:"asn",toolbarPaging:"paging",toolbarSorting:"sortbox",records:"record-list"}});Shopware.Component.register("sw-cms-block-campaigns",{template:'{% block cms_block_commerce_factfinder_campaigns %}\n
\n \n
\n{% endblock %}\n'});Shopware.Component.register("sw-cms-block-campaigns-preview",{template:'{% block cms_block_commerce_factfinder_campaigns_preview %}\n
\n FACT-Finder Campaigns\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsBlock({name:"campaigns",label:"sw-cms.blocks.commerce.factfinderWebComponentsCampaigns.label",category:"commerce",component:"sw-cms-block-campaigns",previewComponent:"sw-cms-block-campaigns-preview",slots:{campaigns:"campaigns"}});Shopware.Component.register("sw-cms-block-filters",{template:'{% block cms_block_commerce_factfinder_filters %}\n
\n \n
\n{% endblock %}\n'});Shopware.Component.register("sw-cms-block-filters-preview",{template:'{% block cms_block_commerce_factfinder_filters_preview %}\n
\n FACT-Finder Filters\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsBlock({name:"filters",label:"sw-cms.blocks.commerce.factfinderWebComponentsFilters.label",category:"commerce",component:"sw-cms-block-filters",previewComponent:"sw-cms-block-filters-preview",defaultConfig:{cssClass:"cms-block-sidebar-filter"},slots:{filters:"asn"}});Shopware.Component.register("sw-cms-el-record-list",{template:'{% block sw_cms_element_record_list %}\n
\n
FF-RECORD-LIST
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("record-list")}}});Shopware.Component.register("sw-cms-el-config-record-list",{template:'{% block sw_cms_element_record_list_config %}\n
\n \n\n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n
\n{% endblock %}\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("record-list")}}});Shopware.Component.register("sw-cms-el-preview-record-list",{template:'{% block sw_cms_element_record_list_preview %}\n
\n FF-RECORD-LIST\n
\n{% endblock %}\n'}),Shopware.Service("cmsService").registerCmsElement({name:"record-list",label:"sw-cms.elements.recordList.label",component:"sw-cms-el-record-list",configComponent:"sw-cms-el-config-record-list",previewComponent:"sw-cms-el-preview-record-list",defaultConfig:{subscribe:{value:!0,source:"static"},infiniteScrolling:{value:!1,source:"static"},restoreScrollPosition:{value:!1,source:"static"},infiniteDebounceDelay:{value:"32",source:"static"},infiniteScrollMargin:{value:0,source:"static"},callbackArg:{value:"records",source:"static"},callback:{value:"",source:"static"},id:{value:"",source:"static"},domUpdated:{value:"",source:"static"}}});Shopware.Component.register("sw-cms-el-asn",{template:'{% block sw_cms_element_asn %}\n
\n
FF-ASN
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("asn")}}});n("MVau");Shopware.Component.register("sw-cms-el-config-asn",{template:'{% block sw_cms_element_asn_config %}\n
\n \n\n \n \n\n \n \n\n \n \n\n \n \n \n \n \n \n\n \n

Filter Cloud

\n \n\n \n \n\n \n\n \n \n \n \n \n \n
\n
\n{% endblock %}\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("asn")}}});Shopware.Component.register("sw-cms-el-preview-asn",{template:'{% block sw_cms_preview_element_asn %}\n
\n FF-ASN\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsElement({name:"asn",label:"sw-cms.elements.asn.label",component:"sw-cms-el-asn",configComponent:"sw-cms-el-config-asn",previewComponent:"sw-cms-el-preview-asn",defaultConfig:{subscribe:{value:!0,source:"static"},vertical:{value:!1,source:"static"},topic:{value:"asn",source:"static"},callbackArg:{value:"groups",source:"static"},callback:{value:"",source:"static"},id:{value:"",source:"static"},domUpdated:{value:"",source:"static"},filterCloud:{value:!0,source:"static"},filterCloudBlacklist:{value:"",source:"static"},filterCloudWhitelist:{value:"",source:"static"},filterCloudOrder:{value:"fact-finder",source:"static"}}});Shopware.Component.register("sw-cms-el-sortbox",{template:'{% block sw_cms_element_sortbox %}\n
\n
FF-SORTBOX
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("sortbox")}}});Shopware.Component.register("sw-cms-el-config-sortbox",{template:'{% block sw_cms_element_sortbox_config %}\n
\n \n \n \n \n \n
\n{% endblock %}\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("sortbox")}}});Shopware.Component.register("sw-cms-el-preview-sortbox",{template:'{% block sw_cms_element_sortbox_preview %}\n
\n FF-SORTBOX\n
\n{% endblock %}\n'}),Shopware.Service("cmsService").registerCmsElement({name:"sortbox",label:"sw-cms.elements.sortbox.label",component:"sw-cms-el-sortbox",configComponent:"sw-cms-el-config-sortbox",previewComponent:"sw-cms-el-preview-sortbox",defaultConfig:{subscribe:{value:!0,source:"static"},opened:{value:!0,source:"static"},showSelected:{value:!1,source:"static"},showSelectedFirst:{value:!1,source:"static"},collapseOnblur:{value:!1,source:"static"}}});Shopware.Component.register("sw-cms-el-paging",{template:'{% block sw_cms_element_paging %}\n
\n
FF-PAGING
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("paging")}}});Shopware.Component.register("sw-cms-el-config-paging",{template:'{% block sw_cms_element_paging_config %}\n
\n \n \n \n
\n{% endblock %}\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("paging")}}});Shopware.Component.register("sw-cms-el-preview-paging",{template:'{% block sw_cms_element_paging_preview %}\n
\n FF-PAGING\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsElement({name:"paging",label:"sw-cms.elements.paging.label",component:"sw-cms-el-paging",configComponent:"sw-cms-el-config-paging",previewComponent:"sw-cms-el-preview-paging",defaultConfig:{subscribe:{value:!0,source:"static"},showOnly:{value:"true",source:"static"}}});Shopware.Component.register("sw-cms-el-campaigns",{template:'{% block sw_cms_element_campaigns %}\n
\n
CAMPAIGNS
\n
\n{% endblock %}\n\n',mixins:["cms-element"],created:function(){this.createdComponent()},methods:{createdComponent:function(){this.initElementConfig("campaigns")}}});Shopware.Component.register("sw-cms-el-config-campaigns",{template:'{% block sw_cms_element_campaigns_config %}\n
\n\n \n \n\n \n \n \n \n\n \n \n\n \n \n \n\n \n \n \n \n\n \n \n\n\n \n \n \n \n \n \n \n \n \n
\n{% endblock %}\n',mixins:["cms-element"],created:function(){this.createdComponent()},data:function(){return{campaignFlags:["None","is-product-campaign","is-landing-page-campaign"]}},methods:{createdComponent:function(){this.initElementConfig("campaigns")}}});Shopware.Component.register("sw-cms-el-preview-campaigns",{template:'{% block sw_cms_element_campaigns_preview %}\n
\n CAMPAIGNS\n
\n{% endblock %}\n\n'}),Shopware.Service("cmsService").registerCmsElement({name:"campaigns",label:"sw-cms.elements.campaigns.label",component:"sw-cms-el-campaigns",configComponent:"sw-cms-el-config-campaigns",previewComponent:"sw-cms-el-preview-campaigns",defaultConfig:{advisorCampaignName:{value:"",source:"static"},feedbackCampaignLabel:{value:"",source:"static"},feedbackCampaignFlag:{value:"",source:"static"},enableFeedbackCampaign:{value:!1,source:"static"},enableAdvisorCampaign:{value:!1,source:"static"},enableRedirectCampaign:{value:!1,source:"static"},enablePushedProducts:{value:!1,source:"static"},pushedProductsFlag:{value:"",source:"static"},pushedProductsName:{value:"",source:"static"}}});n("Xdcl"),n("qYTL");function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){o=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),c=new E(r||[]);return i(a,"_invoke",{value:S(e,n,c)}),a}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var d={};function h(){}function m(){}function v(){}var g={};u(g,c,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(F([])));b&&b!==t&&n.call(b,c)&&(g=b);var y=v.prototype=h.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function o(i,a,c,s){var l=p(e[i],e,a);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==r(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,c,s)}),(function(e){o("throw",e,c,s)})):t.resolve(f).then((function(e){u.value=e,c(u)}),(function(e){return o("throw",e,c,s)}))}s(l.arg)}var a;i(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function S(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=_(a,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=p(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function _(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=p(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function F(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:F(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function i(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}var a=Shopware,c=a.Component,s=a.Mixin;c.register("ui-feed-export-form",{template:'\n\n \n \n \n \n\n \n \n\n \n \n \n\n \n \n\n {{ $tc(\'ui-feed-export.component.export_form.button.title\') }}\n \n\n \n\n {{ $tc(\'ui-feed-export.component.export_form.cache_button.title\') }}\n \n \n\n',inject:["systemConfigApiService"],data:function(){return{salesChannelValue:null,salesChannelLanguageValue:null,exportTypeValue:null,typeSelectOptions:[],isCacheDisable:!1,isLoadingCache:!1,isLoadingExport:!1}},mixins:[s.getByName("notification")],mounted:function(){this.getPluginConfig(),this.getExportTypeValues()},filters:{capitalize:function(e){return e?(e=e.toString()).charAt(0).toUpperCase()+e.slice(1):""}},methods:{getPluginConfig:function(){var e,t=this;return(e=o().mark((function e(){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.systemConfigApiService.getValues("OmikronFactFinder.config");case 2:n=e.sent,t.isCacheDisable=n["OmikronFactFinder.config.enableExportCache"];case 4:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function c(e){i(a,r,o,c,s,"next",e)}function s(e){i(a,r,o,c,s,"throw",e)}c(void 0)}))})()},getExportTypeValues:function(){var e=this,t=Shopware.Service("syncService").httpClient,n={Authorization:"Bearer ".concat(Shopware.Context.api.authToken.access),"Content-Type":"application/json"};t.get("_action/fact-finder/get-export-type-options",{headers:n}).then((function(t){200===t.status&&(e.typeSelectOptions=t.data)}))},successFeedGenerationWindow:function(){this.createNotificationSuccess({message:this.$tc("ui-feed-export.component.export_form.alert_success.text")})},errorFeedGenerationWindow:function(){this.createNotificationError({message:this.$tc("ui-feed-export.component.export_form.alert_error.text")})},errorNotValidParams:function(){this.createNotificationError({message:this.$tc("ui-feed-export.component.export_form.alert_not_valid_params.text")})},successRefreshCacheWindow:function(){this.createNotificationSuccess({message:this.$tc("ui-feed-export.component.export_form.refresh_cache_success.text")})},errorRefreshCacheWindow:function(){this.createNotificationError({message:this.$tc("ui-feed-export.component.export_form.refresh_cache_error.text")})},validateParams:function(e){return null!==e.salesChannelValue&&null!==e.salesChannelLanguageValue&&null!==e.exportTypeValue},getFeedExportFile:function(e){var t=this,n={salesChannelValue:this.salesChannelValue,salesChannelLanguageValue:this.salesChannelLanguageValue,exportTypeValue:this.exportTypeValue};if(this.validateParams(n)){this.isLoadingExport=!0;var r=Shopware.Service("syncService").httpClient,o={Authorization:"Bearer ".concat(Shopware.Context.api.authToken.access),"Content-Type":"application/json"};r.get(e,{headers:o,params:n}).then((function(e){200===e.status?t.successFeedGenerationWindow():t.errorFeedGenerationWindow(),t.isLoadingExport=!1}))}else this.errorNotValidParams()},refreshExportCache:function(e){var t=this;this.isLoadingCache=!0;var n=Shopware.Service("syncService").httpClient,r={Authorization:"Bearer ".concat(Shopware.Context.api.authToken.access),"Content-Type":"application/json"},o={salesChannelValue:this.salesChannelValue,salesChannelLanguageValue:this.salesChannelLanguageValue};n.get(e,{headers:r,params:o}).then((function(e){200===e.status?t.successRefreshCacheWindow():t.errorRefreshCacheWindow(),t.isLoadingCache=!1}))}}});Shopware.Component.register("ui-feed-export-index",{template:'{% block factfinder_ui_feed_export_index %}\n \n \n \n{% endblock %}\n',metaInfo:function(){return{title:this.$createTitle()}}});var l=n("O06o"),u=n("QfK0");Shopware.Module.register("ui-feed-export",{color:"#ff3d58",icon:"default-shopping-paper-bag-product",title:"ui-feed-export.title",description:"",snippets:{"de-DE":l,"en-GB":u},routes:{index:{component:"ui-feed-export-index",path:"index"}},navigation:[{label:"ui-feed-export.title",path:"ui.feed.export.index",position:100,parent:"sw-extension"}]});function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(){p=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,o){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),c=new E(o||[]);return r(a,"_invoke",{value:S(e,n,c)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var d={};function h(){}function m(){}function v(){}var g={};s(g,i,(function(){return this}));var w=Object.getPrototypeOf,b=w&&w(w(F([])));b&&b!==t&&n.call(b,i)&&(g=b);var y=v.prototype=h.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function o(r,i,a,c){var s=u(e[r],e,i);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==f(p)&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(p).then((function(e){l.value=e,a(l)}),(function(e){return o("throw",e,a,c)}))}c(s.arg)}var i;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function S(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=_(a,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=u(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function _(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=u(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function F(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:F(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function d(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}var h=Shopware,m=h.Component,v=h.Mixin;m.register("update-field-roles",{template:'\n {{ $tc(\'configuration.updateFieldRoles.update\') }}\n\n',inject:["fieldRolesService"],mixins:[v.getByName("notification"),v.getByName("sw-inline-snippet")],data:function(){return{isLoading:!1,isSaveSuccessful:!1}},methods:{onClick:function(){var e,t=this;return(e=p().mark((function e(){return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.isLoading=!0,e.next=3,t.fieldRolesService.sendUpdateFieldRoles();case 3:e.sent,t.isSaveSuccessful=!0,t.isLoading=!1,t.createNotificationSuccess({message:t.$tc("configuration.updateFieldRoles.update")});case 7:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,c,"next",e)}function c(e){d(i,r,o,a,c,"throw",e)}a(void 0)}))})()}}});n("R3ag");function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(){w=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,o){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),c=new E(o||[]);return r(a,"_invoke",{value:S(e,n,c)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f={};function p(){}function d(){}function h(){}var m={};s(m,i,(function(){return this}));var v=Object.getPrototypeOf,b=v&&v(v(F([])));b&&b!==t&&n.call(b,i)&&(m=b);var y=h.prototype=p.prototype=Object.create(m);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function o(r,i,a,c){var s=u(e[r],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==g(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return o("throw",e,a,c)}))}c(s.arg)}var i;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function S(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=_(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=u(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function _(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=u(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function F(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:F(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function b(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}var y=Shopware,x=y.Component,C=y.Mixin;x.register("test-api-connection",{template:'\n {{ $tc(\'configuration.testApiConnection.testConnection\') }}\n\n',mixins:[C.getByName("notification"),C.getByName("sw-inline-snippet")],data:function(){return{isLoading:!1,isSaveSuccessful:!1}},methods:{onClick:function(){var e,t=this;return(e=w().mark((function e(){var n,r;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.isLoading=!0,n=Shopware.Service("syncService").httpClient,r={Authorization:"Bearer ".concat(Shopware.Context.api.authToken.access),"Content-Type":"application/json"},n.get("_action/test-connection/api",{headers:r}).then((function(e){200===e.status?t.createNotificationSuccess({message:t.$tc("configuration.testConnection.success")}):t.createNotificationError({title:t.$tc("configuration.testConnection.fail"),message:t.$tc("configuration.testConnection.helpText")})})).catch((function(){t.createNotificationError({title:t.$tc("configuration.testConnection.fail"),message:t.$tc("configuration.testConnection.helpText")})})).finally((function(){t.isSaveSuccessful=!0,t.isLoading=!1}));case 5:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){b(i,r,o,a,c,"next",e)}function c(e){b(i,r,o,a,c,"throw",e)}a(void 0)}))})()}}});n("+KWN");function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(){_=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,o){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),c=new E(o||[]);return r(a,"_invoke",{value:x(e,n,c)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f={};function p(){}function d(){}function h(){}var m={};s(m,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(F([])));g&&g!==t&&n.call(g,i)&&(m=g);var w=h.prototype=p.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function y(e,t){function o(r,i,a,c){var s=u(e[r],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==S(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return o("throw",e,a,c)}))}c(s.arg)}var i;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function x(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=C(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=u(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function C(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,C(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=u(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function F(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:F(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function k(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}var L=Shopware,E=L.Component,F=L.Mixin;function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function T(e,t){for(var n=0;n\n {{ $tc(\'configuration.testFtpConnection.testConnection\') }}\n\n',mixins:[F.getByName("notification"),F.getByName("sw-inline-snippet")],data:function(){return{isLoading:!1,isSaveSuccessful:!1}},methods:{onClick:function(){var e,t=this;return(e=_().mark((function e(){var n,r;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.isLoading=!0,n=Shopware.Service("syncService").httpClient,r={Authorization:"Bearer ".concat(Shopware.Context.api.authToken.access),"Content-Type":"application/json"},n.get("_action/test-connection/ftp",{headers:r}).then((function(e){200===e.status?t.createNotificationSuccess({message:t.$tc("configuration.testConnection.success")}):t.createNotificationError({title:t.$tc("configuration.testConnection.fail"),message:t.$tc("configuration.testConnection.helpText")})})).catch((function(){t.createNotificationError({title:t.$tc("configuration.testConnection.fail"),message:t.$tc("configuration.testConnection.helpText")})})).finally((function(){t.isSaveSuccessful=!0,t.isLoading=!1}));case 5:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){k(i,r,o,a,c,"next",e)}function c(e){k(i,r,o,a,c,"throw",e)}a(void 0)}))})()}}});var W=Shopware.Classes.ApiService,G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(i,e);var t,n,r,o=P(i);function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e,t,null,"application/json")).name="fieldRolesServiceApi",n}return t=i,(n=[{key:"sendUpdateFieldRoles",value:function(){var e=this.getBasicHeaders();return this.httpClient.get("_action/field-roles/update",{headers:e}).then((function(e){return W.handleResponse(e)}))}}])&&T(t.prototype,n),r&&T(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(W);Shopware.Service().register("fieldRolesService",(function(){return new G(Shopware.Application.getContainer("init").httpClient,Shopware.Service("loginService"))}));var R=n("+tBY"),B=n("gynV"),I=n("atL3"),$=n("Z3TO");Shopware.Locale.extend("de-DE",I),Shopware.Locale.extend("de-DE",R),Shopware.Locale.extend("en-GB",$),Shopware.Locale.extend("en-GB",B)},qYTL:function(e,t,n){var r=n("xp4p");r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);(0,n("P8hj").default)("5a1df260",r,!0,{})},xp4p:function(e,t,n){}}); //# sourceMappingURL=omikron-fact-finder.js.map \ No newline at end of file diff --git a/src/Resources/public/static/js/omikron-fact-finder.js.LICENSE.txt b/src/Resources/public/static/js/omikron-fact-finder.js.LICENSE.txt new file mode 100644 index 00000000..ae386fb7 --- /dev/null +++ b/src/Resources/public/static/js/omikron-fact-finder.js.LICENSE.txt @@ -0,0 +1 @@ +/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ diff --git a/src/Resources/views/storefront/layout/factfinder/suggest.html.twig b/src/Resources/views/storefront/layout/factfinder/suggest.html.twig index 0d4fb934..6d73643f 100644 --- a/src/Resources/views/storefront/layout/factfinder/suggest.html.twig +++ b/src/Resources/views/storefront/layout/factfinder/suggest.html.twig @@ -35,7 +35,7 @@