{"id":4340,"date":"2026-02-28T17:28:21","date_gmt":"2026-02-28T09:28:21","guid":{"rendered":"https:\/\/phicycling.com\/aktivierung-garantie\/"},"modified":"2026-04-08T09:42:18","modified_gmt":"2026-04-08T01:42:18","slug":"aktivierung-garantie","status":"publish","type":"page","link":"https:\/\/phicycling.com\/de\/aktivierung-garantie\/","title":{"rendered":"Aktivierung &amp; Garantie"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"4340\" class=\"elementor elementor-4340 elementor-2761\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-8365112 e-flex e-con-boxed e-con e-parent\" data-id=\"8365112\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-85efb9d elementor-widget elementor-widget-shortcode\" data-id=\"85efb9d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">        <div class=\"wc-hub-container\">\r\n            <style>\r\n                \/* \u2705 \u4f60\u539f\u6765\u7684\u6837\u5f0f\uff0c\u4e00\u5b57\u4e0d\u6539 *\/\r\n                .wc-hub-container {\r\n                    max-width: 1000px; margin: 40px auto;\r\n                    font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;\r\n                }\r\n                .wc-hub-header { text-align: center; margin-bottom: 40px; }\r\n                .wc-hub-header h2 { font-size: 28px; color: #111 !important; margin-bottom: 10px; }\r\n                .wc-hub-header p { color: #7f8c8d; font-size: 16px; }\r\n                .wc-hub-tabs { display:flex; justify-content:center; gap:10px; margin:-18px 0 30px; width:100%; box-sizing:border-box; }\r\n                .wc-hub-tab { min-width:0; max-width:100%; box-sizing:border-box; padding:10px 20px !important; border:1px solid #111 !important; border-radius:4px; background:#fff !important; color:#111 !important; cursor:pointer; font-weight:700; }\r\n                .wc-hub-tab.is-active { background:#111 !important; color:#fff !important; }\r\n                .wc-hub-panel { display:none; }\r\n                .wc-hub-panel.is-active { display:block; }\r\n    \r\n                .wc-hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }\r\n    \r\n                .wc-card {\r\n                    background: #ffffff;\r\n                    border: 1px solid #e5e5e5;\r\n                    border-radius: 8px;\r\n                    padding: 30px;\r\n                    box-shadow: 0 4px 12px rgba(0,0,0,0.05);\r\n                }\r\n                .wc-card h3 {\r\n                    margin-top: 0; color: #111 !important;\r\n                    border-bottom: 2px solid #f0f0f0;\r\n                    padding-bottom: 15px; margin-bottom: 20px;\r\n                }\r\n                .wc-card p.desc {\r\n                    font-size: 14px; color: #666; margin-bottom: 25px; line-height: 1.5;\r\n                }\r\n    \r\n                .wc-form-group { margin-bottom: 20px; }\r\n                .wc-form-group label {\r\n                    display: block; margin-bottom: 8px;\r\n                    font-weight: 600; color: #34495e;\r\n                }\r\n                .wc-form-group input {\r\n                    width: 100%; padding: 12px;\r\n                    border: 1px solid #bdc3c7; border-radius: 4px;\r\n                    font-size: 16px; box-sizing: border-box;\r\n                }\r\n    \r\n                \/* \u2705 \u6781\u5c0f\u8865\u5145\uff08\u4e0d\u5f71\u54cd\u539f UI\uff09 *\/\r\n                .wc-barcode-row {\r\n                    display: flex; gap: 8px; margin-bottom: 10px;\r\n                    align-items: stretch;\r\n                }\r\n                .wc-barcode-row:last-child { margin-bottom: 0; }\r\n                .wc-barcode-row input { min-width: 0; }\r\n                .wc-barcode-entry { margin-bottom:14px; }\r\n                .wc-component-caption { display:block;margin:7px 0 5px;color:#111;font-size:13px;font-weight:600; }\r\n                .wc-component-caption em { color:#777;font-style:normal;font-weight:400; }\r\n                .wc-component-label { width:100%;box-sizing:border-box;padding:9px 10px;border:1px solid #bdc3c7;border-radius:4px;background:#fff;color:#111;font-size:14px; }\r\n                .wc-warranty-policy-note { margin:10px 0 0;color:#666;font-size:13px;line-height:1.55; }\r\n                .wc-warranty-policy-note a { color:#111;text-decoration:underline;font-weight:700; }\r\n                .wc-owner-tabs { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px; }\r\n                .wc-owner-tabs label { position:relative;margin:0; }\r\n                .wc-owner-tabs input { position:absolute;opacity:0;pointer-events:none; }\r\n                .wc-owner-tabs span { display:block;padding:11px 12px;border:1px solid #111;border-radius:4px;text-align:center;font-weight:700;cursor:pointer;background:#fff;color:#111; }\r\n                .wc-owner-tabs input:checked + span { background:#111;color:#fff; }\r\n                .wc-scan-btn {\r\n                    width:54px; min-height:48px; padding:0 !important; font-size:20px;\r\n                    border: none; border-radius: 4px;\r\n                    background: #111 !important; color: #fff !important; cursor: pointer;\r\n                    border-color: #111 !important;\r\n                    flex: 0 0 auto;\r\n                }\r\n                .wc-scan-btn svg { display:block; width:29px; height:29px; margin:auto; fill:none; stroke:#fff; stroke-width:2; stroke-linecap:round; }\r\n                .wc-remove-barcode {\r\n                    width: 42px; border: 1px solid #bdc3c7; border-radius: 4px;\r\n                    background: #111 !important; color: #fff !important; font-size: 22px;\r\n                    border-color: #111 !important;\r\n                    cursor: pointer; flex: 0 0 auto;\r\n                }\r\n                .wc-remove-barcode:disabled { opacity: .35; cursor: not-allowed; }\r\n                .wc-add-barcode {\r\n                    border: 1px solid #111 !important; border-radius: 4px;\r\n                    background: #111 !important; color: #fff !important;\r\n                    padding: 7px 12px; font-size: 14px; font-weight: 600;\r\n                    cursor: pointer; margin-top:12px !important; margin-bottom:8px !important;\r\n                }\r\n                .wc-scan-btn:hover, .wc-remove-barcode:hover, .wc-add-barcode:hover,\r\n                .wc-btn:hover { background: #333 !important; border-color: #333 !important; }\r\n                .wc-repair-card { max-width:760px; margin:0 auto; }\r\n                .wc-repair-card select, .wc-repair-card textarea { width:100%; box-sizing:border-box; padding:12px; border:1px solid #bdc3c7; border-radius:4px; font-size:16px; background:#fff; }\r\n                .wc-repair-card textarea { min-height:130px; resize:vertical; }\r\n                .wc-repair-help { color:#666; font-size:13px; margin:7px 0 0; }\r\n                .wc-repair-lookup-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:end; }\r\n                .wc-repair-lookup-row .wc-form-group { margin-bottom:0; }\r\n                .wc-repair-find { min-height:48px; white-space:nowrap; padding:0 16px !important; background:#111 !important; color:#fff !important; border:1px solid #111 !important; border-radius:4px; cursor:pointer; }\r\n                .wc-repair-file-control { display:flex;align-items:center;gap:12px;min-height:48px;padding:6px;border:1px solid #bdc3c7;border-radius:4px;background:#fff;box-sizing:border-box; }\r\n                .wc-repair-file-control input[type=\"file\"] { position:absolute;width:1px;height:1px;padding:0;border:0;clip:rect(0,0,0,0);clip-path:inset(50%);overflow:hidden;white-space:nowrap; }\r\n                .wc-repair-file-button { flex:0 0 auto;padding:9px 14px !important;background:#111 !important;color:#fff !important;border:1px solid #111 !important;border-radius:4px;cursor:pointer;font-weight:600; }\r\n                .wc-repair-file-name { min-width:0;color:#222;overflow-wrap:anywhere; }\r\n                .wc-upload-progress { margin-top:14px; }\r\n                .wc-upload-progress-track { height:12px;background:#e3e3e3;border-radius:999px;overflow:hidden; }\r\n                .wc-upload-progress-track span { display:block;width:0;height:100%;background:#111;transition:width .15s ease; }\r\n                .wc-upload-progress-label { display:block;margin-top:7px;color:#111;font-size:13px; }\r\n                .wc-add-repair-images { margin-top:10px;padding:9px 14px !important;background:#111 !important;color:#fff !important;border:1px solid #111 !important;border-radius:4px;cursor:pointer; }\r\n                #repair-images { position:absolute;width:1px;height:1px;padding:0;border:0;clip:rect(0,0,0,0);overflow:hidden; }\r\n                .wc-repair-image-queue { display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;margin-top:12px; }\r\n                .wc-repair-image-item { position:relative;border:1px solid #ddd;border-radius:4px;overflow:hidden;background:#f5f5f5; }\r\n                .wc-repair-image-item img { display:block;width:100%;height:100px;object-fit:cover; }\r\n                .wc-repair-image-item button { position:absolute;right:5px;top:5px;width:27px;height:27px;padding:0 !important;border:0;border-radius:50%;background:#111 !important;color:#fff !important;font-size:18px;line-height:27px;cursor:pointer; }\r\n                .wc-repair-image-item small { display:block;padding:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#333; }\r\n    \r\n                .wc-btn {\r\n                    width: 100%; padding: 14px;\r\n                    border: none; border-radius: 4px;\r\n                    font-size: 16px; font-weight: bold;\r\n                    color: #fff; cursor: pointer;\r\n                }\r\n                .btn-activate, .btn-check {\r\n                    background: #111 !important; border-color: #111 !important;\r\n                }\r\n    \r\n                .wc-result {\r\n                    margin-top: 25px; padding: 20px;\r\n                    border-radius: 4px; display: none;\r\n                }\r\n                .res-success { background: #d4edda; color: #155724; }\r\n                .res-error { background: #f8d7da; color: #721c24; }\r\n                .res-info { background: #fff3cd; color: #856404; }\r\n    \r\n                @media (max-width: 768px) {\r\n                    .wc-hub-grid { grid-template-columns: 1fr; }\r\n                    .wc-repair-lookup-row { grid-template-columns:1fr; }\r\n                    .wc-repair-find { width:100%; }\r\n                    .wc-hub-tabs { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin:-18px 0 24px;padding:0;overflow:hidden; }\r\n                    .wc-hub-tab { width:100%;padding:10px 5px !important;font-size:11px;line-height:1.35;letter-spacing:1px;white-space:normal;overflow-wrap:anywhere; }\r\n                    .wc-card { padding:22px 18px; }\r\n                }\r\n    \r\n                \/* \u2705 \u626b\u7801\u5c42 *\/\r\n                #wcScanModal {\r\n                    display: none; position: fixed; inset: 0;\r\n                    background: #000; z-index: 99999;\r\n                    align-items: center; justify-content: center;\r\n                    flex-direction: column;\r\n                }\r\n                #wcScanBox {\r\n                    width: 90%; max-width: 400px;\r\n                    aspect-ratio: 4\/3;\r\n                    position: relative; overflow: hidden;\r\n                }\r\n                #wcScanBox video, #wcScanBox canvas {\r\n                    width: 100%; height: 100%; object-fit: cover;\r\n                }\r\n                .wc-scan-guide {\r\n                    position: absolute; z-index: 3; pointer-events: none;\r\n                    top: 35%; bottom: 35%; left: 10%; right: 10%;\r\n                    border: 3px dashed #20e870; border-radius: 6px;\r\n                    box-shadow: 0 0 0 9999px rgba(0,0,0,.55);\r\n                }\r\n                #wcScanStatus {\r\n                    position: absolute; bottom: 40px; width: 100%;\r\n                    padding: 0 20px; box-sizing: border-box;\r\n                    text-align: center; color: #fff; font-size: 14px;\r\n                }\r\n            <\/style>\r\n    \r\n            <div class=\"wc-hub-header\">\r\n                <h2>Garantiezentrum<\/h2>\r\n                <p>Produkt aktivieren, Garantiestatus pr\u00fcfen oder Reparaturanfrage senden.<\/p>\r\n            <\/div>\r\n\r\n            <div class=\"wc-hub-tabs\" role=\"tablist\" aria-label=\"Warranty services\">\r\n                <button type=\"button\" class=\"wc-hub-tab is-active\" data-hub-panel=\"warranty\" role=\"tab\" aria-selected=\"true\">Garantiezentrum<\/button>\r\n                <button type=\"button\" class=\"wc-hub-tab\" data-hub-panel=\"repair\" role=\"tab\" aria-selected=\"false\">Reparaturanfrage<\/button>\r\n            <\/div>\r\n\r\n            <div id=\"wc-panel-warranty\" class=\"wc-hub-panel is-active\" role=\"tabpanel\">\r\n            <div class=\"wc-hub-grid\">\r\n                <!-- \u6fc0\u6d3b -->\r\n                <div class=\"wc-card\">\r\n                    <h3>Garantie aktivieren<\/h3>\r\n                    <p class=\"desc\">Registrieren Sie Laufr\u00e4der, Lenker, Komplettr\u00e4der oder andere Produkte, um die offizielle Garantie zu aktivieren.<\/p>\r\n    \r\n                    <form id=\"hub-activate-form\">\r\n                        <input type=\"hidden\" id=\"security\" name=\"security\" value=\"67acd5e208\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/de\/wp-json\/wp\/v2\/pages\/4340\" \/>                        <input type=\"hidden\" name=\"lang\" value=\"de\">\r\n    \r\n                        <div class=\"wc-form-group\">\r\n                            <label>Barcode \/ Seriennummern<\/label>\r\n                            <div id=\"wc-activation-barcodes\">\r\n                                <div class=\"wc-barcode-entry\">\r\n                                    <div class=\"wc-barcode-row\">\r\n                                        <input type=\"text\" id=\"ha-barcode-1\" name=\"barcodes[]\" placeholder=\"Barcode 1\" autocomplete=\"off\" required aria-label=\"Barcode 1\">\r\n                                        <button type=\"button\" class=\"wc-scan-btn\" onclick=\"wcStartScan('ha-barcode-1')\" aria-label=\"Scan barcode 1\"><svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M3 7V4h4M17 4h4v3M21 17v3h-4M7 20H3v-3M7 8v8M10 8v8M14 8v8M17 8v8\"\/><\/svg><\/button>\r\n                                        <button type=\"button\" class=\"wc-remove-barcode\" onclick=\"wcRemoveBarcode(this)\" aria-label=\"Remove barcode 1\">&times;<\/button>\r\n                                    <\/div>\r\n                                    <span class=\"wc-component-caption\">Produkttyp <em>(erforderlich)<\/em><\/span>\r\n                                    <select class=\"wc-component-label\" name=\"component_labels[]\" aria-label=\"Product type for barcode 1\" required>\r\n                                        <option value=\"\" selected disabled>Produkttyp ausw\u00e4hlen<\/option>\r\n                                        <option value=\"front_wheel\">Vorderrad<\/option><option value=\"rear_wheel\">Hinterrad<\/option><option value=\"handlebar\">Lenker<\/option><option value=\"complete_bike\">Komplettrad<\/option><option value=\"other\">Anderes Produkt<\/option>                                    <\/select>\r\n                                <\/div>\r\n                            <\/div>\r\n                            <button type=\"button\" class=\"wc-add-barcode\" id=\"wc-add-barcode\">+ Weiteren Barcode hinzuf\u00fcgen<\/button>\r\n                            <p class=\"wc-warranty-policy-note\">The displayed warranty period applies to the product main body. For spokes, hubs, bearings, freehubs, ratchets, end caps, and other wear parts, please see the Warranty Policy. <a href=\"https:\/\/phicycling.com\/de\/warranty-policy\/\" target=\"_blank\" rel=\"noopener\">View Warranty Policy<\/a><\/p>\r\n                        <\/div>\r\n    \r\n                        <div class=\"wc-form-group\">\r\n                            <label>Eigent\u00fcmer<\/label>\r\n                            <div class=\"wc-owner-tabs\" role=\"radiogroup\" aria-label=\"Eigent\u00fcmerstatus\">\r\n                                <label><input type=\"radio\" name=\"owner_type\" value=\"first\" checked><span>Erstbesitzer<\/span><\/label>\r\n                                <label><input type=\"radio\" name=\"owner_type\" value=\"second\"><span>Zweitbesitzer<\/span><\/label>\r\n                            <\/div>\r\n                            <input type=\"text\" name=\"customer_name\" placeholder=\"Name des Eigent\u00fcmers\" required>\r\n                        <\/div>\r\n    \r\n                        <div class=\"wc-form-group\">\r\n                            <label>E-Mail<\/label>\r\n                            <input type=\"email\" name=\"customer_email\" required>\r\n                        <\/div>\r\n    \r\n                        <button type=\"submit\" id=\"btn-act-submit\" class=\"wc-btn btn-activate\">Garantie aktivieren<\/button>\r\n                    <\/form>\r\n    \r\n                    <div id=\"hub-act-result\" class=\"wc-result\"><\/div>\r\n                <\/div>\r\n    \r\n                <!-- \u67e5\u8be2 -->\r\n                <div class=\"wc-card\">\r\n                    <h3>Status pr\u00fcfen<\/h3>\r\n                    <p class=\"desc\">Geben Sie einen Produktbarcode ein, um den Garantiestatus zu pr\u00fcfen.<\/p>\r\n    \r\n                    <form id=\"hub-check-form\">\r\n                        <input type=\"hidden\" id=\"security\" name=\"security\" value=\"67acd5e208\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/de\/wp-json\/wp\/v2\/pages\/4340\" \/>                        <input type=\"hidden\" name=\"lang\" value=\"de\">\r\n    \r\n                        <div class=\"wc-form-group\">\r\n                            <label>Barcode \/ Seriennummer<\/label>\r\n                            <div class=\"wc-barcode-row\">\r\n                                <input type=\"text\" id=\"hc-barcode\" name=\"barcode\" required>\r\n                                <button type=\"button\" class=\"wc-scan-btn\" onclick=\"wcStartScan('hc-barcode')\" aria-label=\"Scan barcode\"><svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M3 7V4h4M17 4h4v3M21 17v3h-4M7 20H3v-3M7 8v8M10 8v8M14 8v8M17 8v8\"\/><\/svg><\/button>\r\n                            <\/div>\r\n                        <\/div>\r\n    \r\n                        <button type=\"submit\" id=\"btn-chk-submit\" class=\"wc-btn btn-check\">Status pr\u00fcfen<\/button>\r\n                    <\/form>\r\n    \r\n                    <div id=\"hub-chk-result\" class=\"wc-result\"><\/div>\r\n                <\/div>\r\n            <\/div>\r\n            <\/div>\r\n\r\n            <div id=\"wc-panel-repair\" class=\"wc-hub-panel\" role=\"tabpanel\">\r\n                <div class=\"wc-card wc-repair-card\">\n    <h3>Reparaturanfrage<\/h3>\n    <p class=\"desc\">Geben Sie die bei der Aktivierung verwendete E-Mail-Adresse ein, w\u00e4hlen Sie dann die genaue Komponente und erg\u00e4nzen Sie die Reparaturdetails.<\/p>\n    <form id=\"wc-repair-form\" enctype=\"multipart\/form-data\">\n        <input type=\"hidden\" id=\"security\" name=\"security\" value=\"67acd5e208\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/de\/wp-json\/wp\/v2\/pages\/4340\" \/>        <input type=\"hidden\" name=\"lang\" value=\"de\">\n        <input id=\"repair-customer-name\" type=\"hidden\" name=\"customer_name\" value=\"\">\n        <div class=\"wc-repair-lookup-row\">\n            <div class=\"wc-form-group\">\n                <label for=\"repair-customer-email\">E-Mail<\/label>\n                <input id=\"repair-customer-email\" type=\"email\" name=\"customer_email\" required>\n            <\/div>\n            <button type=\"button\" id=\"wc-find-repair-wheels\" class=\"wc-repair-find\">Mein Produkt finden<\/button>\n        <\/div>\n        <p id=\"wc-repair-lookup-message\" class=\"wc-repair-help\" aria-live=\"polite\">Geben Sie Ihre Aktivierungs-E-Mail ein, um Ihre registrierten Produkte zu finden.<\/p>\n\n        <div id=\"wc-repair-wheel-group\" class=\"wc-form-group\" hidden>\n            <label for=\"repair-barcode\">Aktiviertes Produkt \/ Komponente \/ Barcode<\/label>\n            <select id=\"repair-barcode\" name=\"barcode\" required disabled><\/select>\n        <\/div>\n\n        <div class=\"wc-form-group\">\n            <label for=\"repair-issue-type\">Problemtyp<\/label>\n            <select id=\"repair-issue-type\" name=\"issue_type\" required>\n                <option value=\"\">Problem ausw\u00e4hlen<\/option>\n                                    <option value=\"wheel_rim_damage\">Laufrad-\/Felgenschaden<\/option>\n                                    <option value=\"carbon_spoke\">Problem mit Carbon-Speichen<\/option>\n                                    <option value=\"hub_bearing\">Naben-\/Lagerproblem<\/option>\n                                    <option value=\"freehub_cassette\">Freilauf-\/Kassettenproblem<\/option>\n                                    <option value=\"tubeless_tire_valve\">Tubeless-\/Reifen-\/Ventilproblem<\/option>\n                                    <option value=\"alignment_truing\">Laufradausrichtung \/ Zentrierung<\/option>\n                                    <option value=\"noise_vibration\">Ger\u00e4usch \/ Vibration<\/option>\n                                    <option value=\"installation_compatibility\">Montage \/ Kompatibilit\u00e4t<\/option>\n                                    <option value=\"accident_impact\">Unfall-\/Aufprallschaden<\/option>\n                                    <option value=\"handlebar_cockpit\">Lenker-\/Cockpitproblem<\/option>\n                                    <option value=\"complete_bike_assembly\">Komplettrad-\/Montageproblem<\/option>\n                                    <option value=\"drivetrain_brake\">Antriebs-\/Bremsproblem<\/option>\n                                    <option value=\"electrical_system\">Elektrik-\/Motor-\/Akkuproblem<\/option>\n                                    <option value=\"cosmetic_finish\">Optik-\/Oberfl\u00e4chenproblem<\/option>\n                                    <option value=\"other\">Sonstiges<\/option>\n                            <\/select>\n        <\/div>\n\n        <div class=\"wc-form-group\">\n            <label for=\"repair-reason\">Detaillierte Beschreibung<\/label>\n            <textarea id=\"repair-reason\" name=\"reason\" required placeholder=\"Beschreiben Sie das Problem, den Beginn und die relevanten Fahrbedingungen.\"><\/textarea>\n        <\/div>\n\n        <div class=\"wc-form-group\">\n            <label for=\"repair-video\">Video<\/label>\n            <div class=\"wc-repair-file-control\">\n                <input id=\"repair-video\" type=\"file\" name=\"repair_video\" accept=\"video\/mp4,video\/quicktime,video\/webm\" required>\n                <button type=\"button\" id=\"wc-choose-repair-video\" class=\"wc-repair-file-button\">Video ausw\u00e4hlen<\/button>\n                <span id=\"wc-repair-video-name\" class=\"wc-repair-file-name\">Keine Datei ausgew\u00e4hlt<\/span>\n            <\/div>\n            <p class=\"wc-repair-help\">MP4, MOV oder WebM; maximal 100 MB.<\/p>\n        <\/div>\n\n        <div class=\"wc-form-group\">\n            <label for=\"repair-images\">Bilder<\/label>\n            <input id=\"repair-images\" type=\"file\" accept=\"image\/jpeg,image\/png,image\/webp\" multiple>\n            <button type=\"button\" id=\"wc-add-repair-images\" class=\"wc-add-repair-images\">+ Weitere Bilder hinzuf\u00fcgen<\/button>\n            <div id=\"wc-repair-image-queue\" class=\"wc-repair-image-queue\" aria-live=\"polite\"><\/div>\n            <p class=\"wc-repair-help\">F\u00fcgen Sie Bilder einmalig oder in mehreren Schritten hinzu (insgesamt 1\u20138). Bilder werden vor dem Upload auf maximal 1800 px komprimiert; Originale werden nicht gespeichert.<\/p>\n        <\/div>\n\n        <button type=\"submit\" id=\"wc-repair-submit\" class=\"wc-btn btn-activate\">Reparaturanfrage senden<\/button>\n        <div id=\"wc-repair-upload-progress\" class=\"wc-upload-progress\" hidden aria-live=\"polite\">\n            <div class=\"wc-upload-progress-track\"><span><\/span><\/div>\n            <strong class=\"wc-upload-progress-label\">Upload wird vorbereitet\u2026<\/strong>\n        <\/div>\n    <\/form>\n    <div id=\"wc-repair-result\" class=\"wc-result\"><\/div>\n<\/div>\n            <\/div>\r\n    \r\n            <!-- \u2705 \u626b\u7801\u5f39\u7a97 -->\r\n            <div id=\"wcScanModal\">\r\n                <button type=\"button\" onclick=\"wcStopScan()\" style=\"position:absolute;top:20px;right:20px;padding:8px 14px;background:#fff;border:none;border-radius:4px;z-index:4;\">\r\n                    Schlie\u00dfen                <\/button>\r\n    \r\n                <div id=\"wcScanBox\">\r\n                    <div class=\"wc-scan-guide\"><\/div>\r\n                <\/div>\r\n    \r\n                <div id=\"wcScanStatus\" aria-live=\"polite\">\r\n                    Barcode im Rahmen ausrichten                <\/div>\r\n            <\/div>\r\n    \r\n            <!-- \u2705 Quagga2\uff08\u7a33\u5b9a\u7248\uff09 -->\r\n            <script src=\"https:\/\/unpkg.com\/@ericblade\/quagga2\/dist\/quagga.min.js\"><\/script>\r\n    \r\n            <script>\r\n            let wcTargetInput = null;\r\n            let wcScannerRunning = false;\r\n            let wcScanSession = 0;\r\n            let wcDetectionCode = '';\r\n            let wcDetectionCount = 0;\r\n            let wcDetectionTime = 0;\r\n            const wcRequiredDetections = 2;\r\n\r\n            function wcHandleDetected(result) {\r\n                if (!result || !result.codeResult || !result.codeResult.code) return;\r\n\r\n                const decoded = result.codeResult.decodedCodes || [];\r\n                const errors = decoded\r\n                    .filter(function(bit) { return typeof bit.error === 'number'; })\r\n                    .map(function(bit) { return bit.error; });\r\n                const averageError = errors.length\r\n                    ? errors.reduce(function(total, error) { return total + error; }, 0) \/ errors.length\r\n                    : 0;\r\n                if (averageError > 0.25) return;\r\n\r\n                const code = String(result.codeResult.code).trim();\r\n                const now = Date.now();\r\n                if (code === wcDetectionCode && now - wcDetectionTime < 1800) {\r\n                    wcDetectionCount++;\r\n                } else {\r\n                    wcDetectionCode = code;\r\n                    wcDetectionCount = 1;\r\n                }\r\n                wcDetectionTime = now;\r\n\r\n                const status = document.getElementById('wcScanStatus');\r\n                if (wcDetectionCount < wcRequiredDetections) {\r\n                    status.textContent = \"Stillhalten, um den Barcode zu best\\u00e4tigen\\u2026\";\r\n                    return;\r\n                }\r\n\r\n                const target = document.getElementById(wcTargetInput);\r\n                if (target) {\r\n                    target.value = code;\r\n                    target.dispatchEvent(new Event('change', { bubbles: true }));\r\n                }\r\n                wcStopScan();\r\n            }\r\n    \r\n            function wcStartScan(inputId) {\r\n                const scanSession = ++wcScanSession;\r\n                wcTargetInput = inputId;\r\n                wcDetectionCode = '';\r\n                wcDetectionCount = 0;\r\n                wcDetectionTime = 0;\r\n                document.getElementById('wcScanModal').style.display = 'flex';\r\n                document.getElementById('wcScanStatus').textContent = \"Einen Barcode im Rahmen ausrichten\";\r\n    \r\n                Quagga.init({\r\n                    inputStream: {\r\n                        type: 'LiveStream',\r\n                        target: document.querySelector('#wcScanBox'),\r\n                        area: {\r\n                            top: '35%',\r\n                            right: '10%',\r\n                            bottom: '35%',\r\n                            left: '10%'\r\n                        },\r\n                        constraints: {\r\n                            facingMode: 'environment',\r\n                            width: { ideal: 1920, min: 1280 },\r\n                            height: { ideal: 1080, min: 720 }\r\n                        }\r\n                    },\r\n                    decoder: {\r\n                        readers: ['code_128_reader']\r\n                    },\r\n                    locator: {\r\n                        patchSize: 'medium',\r\n                        halfSample: true\r\n                    },\r\n                    locate: true,\r\n                    frequency: 10,\r\n                    numOfWorkers: 0\r\n                }, function (err) {\r\n                    if (scanSession !== wcScanSession) {\r\n                        try { Quagga.stop(); } catch (e) {}\r\n                        return;\r\n                    }\r\n                    if (err) {\r\n                        console.error(err);\r\n                        document.getElementById('wcScanStatus').textContent = \"Kamera nicht verf\\u00fcgbar. Pr\\u00fcfen Sie die Berechtigung oder geben Sie den Barcode manuell ein.\";\r\n                        return;\r\n                    }\r\n                    Quagga.offDetected(wcHandleDetected);\r\n                    Quagga.onDetected(wcHandleDetected);\r\n                    Quagga.start();\r\n                    wcScannerRunning = true;\r\n                });\r\n            }\r\n    \r\n            function wcStopScan() {\r\n                wcScanSession++;\r\n                Quagga.offDetected(wcHandleDetected);\r\n                if (wcScannerRunning) {\r\n                    Quagga.stop();\r\n                    wcScannerRunning = false;\r\n                }\r\n                document.getElementById('wcScanModal').style.display = 'none';\r\n            }\r\n            <\/script>\r\n    \r\n            <!-- \u2705 \u4f60\u539f\u6765\u7684 AJAX \u903b\u8f91\uff08\u5b8c\u5168\u4e0d\u52a8\uff09 -->\r\n            <script>\r\n            jQuery(document).ready(function($){\r\n                var barcodeIndex = 1;\r\n                var scanIcon = '<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M3 7V4h4M17 4h4v3M21 17v3h-4M7 20H3v-3M7 8v8M10 8v8M14 8v8M17 8v8\"\/><\/svg>';\r\n                var componentOptions = {\"front_wheel\":\"Vorderrad\",\"rear_wheel\":\"Hinterrad\",\"handlebar\":\"Lenker\",\"complete_bike\":\"Komplettrad\",\"other\":\"Anderes Produkt\"};\r\n                var wcFrontendText = {\"Front Wheel\":\"Vorderrad\",\"Rear Wheel\":\"Hinterrad\",\"Handlebar\":\"Lenker\",\"Complete Bike\":\"Komplettrad\",\"Other Product\":\"Anderes Produkt\",\"Product Type\":\"Produkttyp\",\"(required)\":\"(erforderlich)\",\"Select product type\":\"Produkttyp ausw\\u00e4hlen\",\"Wheel Warranty Center\":\"Garantiezentrum\",\"Activate your product, check warranty status, or submit a repair request.\":\"Produkt aktivieren, Garantiestatus pr\\u00fcfen oder Reparaturanfrage senden.\",\"Warranty Center\":\"Garantiezentrum\",\"Repair Request\":\"Reparaturanfrage\",\"Activate Warranty\":\"Garantie aktivieren\",\"Register wheels, handlebars, complete bikes, or other products to activate the official warranty.\":\"Registrieren Sie Laufr\\u00e4der, Lenker, Komplettr\\u00e4der oder andere Produkte, um die offizielle Garantie zu aktivieren.\",\"Barcode \\\/ Serial Numbers\":\"Barcode \\\/ Seriennummern\",\"Barcode \\\/ Serial Number\":\"Barcode \\\/ Seriennummer\",\"+ Add another barcode\":\"+ Weiteren Barcode hinzuf\\u00fcgen\",\"Owner\":\"Eigent\\u00fcmer\",\"Owner Name\":\"Name des Eigent\\u00fcmers\",\"Owner Type\":\"Eigent\\u00fcmerstatus\",\"Owner Type:\":\"Eigent\\u00fcmerstatus:\",\"First Owner\":\"Erstbesitzer\",\"Second Owner\":\"Zweitbesitzer\",\"Lifetime Warranty\":\"Lebenslange Garantie\",\"No Commercial Warranty\":\"Keine kommerzielle Garantie\",\"Email\":\"E-Mail\",\"Check Status\":\"Status pr\\u00fcfen\",\"Enter a product barcode to verify activation status.\":\"Geben Sie einen Produktbarcode ein, um den Garantiestatus zu pr\\u00fcfen.\",\"Customer\":\"Kunde\",\"Find My Product\":\"Mein Produkt finden\",\"Activated Product \\\/ Component \\\/ Barcode\":\"Aktiviertes Produkt \\\/ Komponente \\\/ Barcode\",\"Problem Type\":\"Problemtyp\",\"Select a problem\":\"Problem ausw\\u00e4hlen\",\"Detailed Reason\":\"Detaillierte Beschreibung\",\"Video\":\"Video\",\"Images\":\"Bilder\",\"Choose video\":\"Video ausw\\u00e4hlen\",\"No file selected\":\"Keine Datei ausgew\\u00e4hlt\",\"+ Add Images\":\"+ Bilder hinzuf\\u00fcgen\",\"+ Add More Images\":\"+ Weitere Bilder hinzuf\\u00fcgen\",\"Submit Repair Request\":\"Reparaturanfrage senden\",\"Wheel \\\/ Rim Damage\":\"Laufrad-\\\/Felgenschaden\",\"Carbon Spoke Problem\":\"Problem mit Carbon-Speichen\",\"Hub \\\/ Bearing Problem\":\"Naben-\\\/Lagerproblem\",\"Freehub \\\/ Cassette Problem\":\"Freilauf-\\\/Kassettenproblem\",\"Tubeless \\\/ Tire \\\/ Valve Problem\":\"Tubeless-\\\/Reifen-\\\/Ventilproblem\",\"Wheel Alignment \\\/ Truing\":\"Laufradausrichtung \\\/ Zentrierung\",\"Noise \\\/ Vibration\":\"Ger\\u00e4usch \\\/ Vibration\",\"Installation \\\/ Compatibility\":\"Montage \\\/ Kompatibilit\\u00e4t\",\"Accident \\\/ Impact Damage\":\"Unfall-\\\/Aufprallschaden\",\"Handlebar \\\/ Cockpit Problem\":\"Lenker-\\\/Cockpitproblem\",\"Complete Bike \\\/ Assembly Problem\":\"Komplettrad-\\\/Montageproblem\",\"Drivetrain \\\/ Brake Problem\":\"Antriebs-\\\/Bremsproblem\",\"Electrical \\\/ Motor \\\/ Battery Problem\":\"Elektrik-\\\/Motor-\\\/Akkuproblem\",\"Cosmetic \\\/ Finish Problem\":\"Optik-\\\/Oberfl\\u00e4chenproblem\",\"Other\":\"Sonstiges\",\"Use the same customer name and email used to activate the product. Select the exact component and provide all required details.\":\"Verwenden Sie denselben Namen und dieselbe E-Mail-Adresse wie bei der Aktivierung. W\\u00e4hlen Sie die genaue Komponente und f\\u00fcllen Sie alle Pflichtfelder aus.\",\"Enter both fields to find your activated barcode.\":\"F\\u00fcllen Sie beide Felder aus, um den aktivierten Barcode zu finden.\",\"Describe the problem, when it started, and any relevant riding conditions.\":\"Beschreiben Sie das Problem, den Beginn und die relevanten Fahrbedingungen.\",\"MP4, MOV, or WebM; maximum 100 MB.\":\"MP4, MOV oder WebM; maximal 100 MB.\",\"Add images one time or in several selections (1\\u20138 total). Images are compressed to a maximum of 1800 px before upload; originals are not stored.\":\"F\\u00fcgen Sie Bilder einmalig oder in mehreren Schritten hinzu (insgesamt 1\\u20138). Bilder werden vor dem Upload auf maximal 1800 px komprimiert; Originale werden nicht gespeichert.\",\"Preparing upload\\u2026\":\"Upload wird vorbereitet\\u2026\",\"Enter the email used to activate the product, then select the exact component and provide the repair details.\":\"Geben Sie die bei der Aktivierung verwendete E-Mail-Adresse ein, w\\u00e4hlen Sie dann die genaue Komponente und erg\\u00e4nzen Sie die Reparaturdetails.\",\"Enter your activation email to find your registered products.\":\"Geben Sie Ihre Aktivierungs-E-Mail ein, um Ihre registrierten Produkte zu finden.\",\"No activated products matched this email address.\":\"F\\u00fcr diese E-Mail-Adresse wurden keine aktivierten Produkte gefunden.\",\"Close\":\"Schlie\\u00dfen\",\"Align barcode within the frame\":\"Barcode im Rahmen ausrichten\",\"Align one barcode within the frame\":\"Einen Barcode im Rahmen ausrichten\",\"Hold steady to confirm the barcode\\u2026\":\"Stillhalten, um den Barcode zu best\\u00e4tigen\\u2026\",\"Camera unavailable. Check camera permission or enter the barcode manually.\":\"Kamera nicht verf\\u00fcgbar. Pr\\u00fcfen Sie die Berechtigung oder geben Sie den Barcode manuell ein.\",\"Finding\\u2026\":\"Finding\\u2026\",\"activated product(s) found. Select the exact component that needs repair.\":\"activated product(s) found. Select the exact component that needs repair.\",\"The lookup could not be completed. Please try again.\":\"The lookup could not be completed. Please try again.\",\"A maximum of 8 images can be attached.\":\"A maximum of 8 images can be attached.\",\"Image could not be read.\":\"Image could not be read.\",\"Image format is not supported.\":\"Image format is not supported.\",\"Image compression failed.\":\"Image compression failed.\",\"Please find and select your activated product first.\":\"Please find and select your activated product first.\",\"Please select between 1 and 8 images.\":\"Please select between 1 and 8 images.\",\"Preparing\\u2026\":\"Preparing\\u2026\",\"Compressing images to 1800 px\\u2026\":\"Compressing images to 1800 px\\u2026\",\"Uploading video and images\\u2026\":\"Uploading video and images\\u2026\",\"Upload complete \\u2014 100%\":\"Upload complete \\u2014 100%\",\"Repair request submitted.\":\"Repair request submitted.\",\"Reference\":\"Reference\",\"Upload failed. Please check the files and try again.\":\"Upload failed. Please check the files and try again.\",\"The repair request could not be submitted.\":\"The repair request could not be submitted.\",\"The repair request could not be submitted. Please try again.\":\"The repair request could not be submitted. Please try again.\",\"Activating...\":\"Activating...\",\"Activation Successful!\":\"Activation Successful!\",\"Start:\":\"Start:\",\"Expires:\":\"Expires:\",\"The request could not be completed. Please try again.\":\"The request could not be completed. Please try again.\",\"Checking...\":\"Checking...\",\"Not Activated\":\"Not Activated\",\"Owner:\":\"Owner:\",\"Activated:\":\"Activated:\",\"The displayed warranty period applies to the product main body. For spokes, hubs, bearings, freehubs, ratchets, end caps, and other wear parts, please see the Warranty Policy.\":\"The displayed warranty period applies to the product main body. For spokes, hubs, bearings, freehubs, ratchets, end caps, and other wear parts, please see the Warranty Policy.\",\"View Warranty Policy\":\"View Warranty Policy\",\"Please enter the activated customer name and a valid email address.\":\"Please enter the activated customer name and a valid email address.\",\"No activated products matched this customer name and email.\":\"No activated products matched this customer name and email.\",\"Please complete every required field.\":\"Please complete every required field.\",\"The selected barcode does not belong to this activated customer. Please find the product again.\":\"The selected barcode does not belong to this activated customer. Please find the product again.\",\"One video and at least one image are required.\":\"One video and at least one image are required.\",\"You can upload up to 8 images.\":\"You can upload up to 8 images.\",\"The video must be 100 MB or smaller.\":\"The video must be 100 MB or smaller.\",\"Each compressed image must be 10 MB or smaller.\":\"Each compressed image must be 10 MB or smaller.\",\"Too many repair requests were submitted. Please try again later.\":\"Too many repair requests were submitted. Please try again later.\",\"One of the images could not be uploaded.\":\"One of the images could not be uploaded.\",\"The repair request could not be saved.\":\"The repair request could not be saved.\",\"Your repair request has been submitted successfully.\":\"Your repair request has been submitted successfully.\",\"Video upload failed: %s\":\"Video upload failed: %s\",\"Image upload failed: %s\":\"Image upload failed: %s\",\"Your customer account could not be created. Please try again or contact support.\":\"Your customer account could not be created. Please try again or contact support.\",\"The same barcode was entered more than once. Please remove the duplicate.\":\"The same barcode was entered more than once. Please remove the duplicate.\",\"Please select the product type for every barcode.\":\"Please select the product type for every barcode.\",\"At least one barcode, Owner, and Email are required.\":\"At least one barcode, Owner, and Email are required.\",\"Please enter a valid email address.\":\"Please enter a valid email address.\",\"A maximum of 20 barcodes can be activated at one time.\":\"A maximum of 20 barcodes can be activated at one time.\",\"Invalid barcode <strong>%s<\\\/strong>. This code was not found in our wholesale sales records.\":\"Invalid barcode <strong>%s<\\\/strong>. This code was not found in our wholesale sales records.\",\"Barcode <strong>%1$s<\\\/strong> was already activated by <strong>%2$s<\\\/strong> on %3$s.\":\"Barcode <strong>%1$s<\\\/strong> was already activated by <strong>%2$s<\\\/strong> on %3$s.\",\"System Error: Could not locate the order item for barcode <strong>%s<\\\/strong>.\":\"System Error: Could not locate the order item for barcode <strong>%s<\\\/strong>.\",\"%d product was activated successfully.\":\"%d product was activated successfully.\",\"%d products were activated successfully.\":\"%d products were activated successfully.\",\"Please enter a barcode.\":\"Please enter a barcode.\",\"Barcode not found in our system.\":\"Barcode not found in our system.\",\"This product has <strong>not been activated<\\\/strong> yet. Please use the Activation form to register it.\":\"This product has <strong>not been activated<\\\/strong> yet. Please use the Activation form to register it.\",\"Warranty Expired\":\"Warranty Expired\",\"Warranty Active\":\"Warranty Active\",\"Sorry, the warranty period for this product has expired.\":\"Sorry, the warranty period for this product has expired.\",\"Good news! This product is currently under warranty.\":\"Good news! This product is currently under warranty.\"};\r\n                function wcT(source) { return wcFrontendText[source] || source; }\r\n\r\n                $('.wc-hub-tab').on('click', function(){\r\n                    var panel = $(this).data('hub-panel');\r\n                    $('.wc-hub-tab').removeClass('is-active').attr('aria-selected', 'false');\r\n                    $(this).addClass('is-active').attr('aria-selected', 'true');\r\n                    $('.wc-hub-panel').removeClass('is-active');\r\n                    $('#wc-panel-' + panel).addClass('is-active');\r\n                });\r\n\r\n                function updateRemoveButtons() {\r\n                    var disableRemove = $('#wc-activation-barcodes .wc-barcode-row').length === 1;\r\n                    $('#wc-activation-barcodes .wc-remove-barcode').prop('disabled', disableRemove);\r\n                }\r\n\r\n                $('#wc-add-barcode').on('click', function(){\r\n                    barcodeIndex++;\r\n                    var inputId = 'ha-barcode-' + barcodeIndex;\r\n                    var $entry = $('<div>', { class: 'wc-barcode-entry' });\r\n                    var $row = $('<div>', { class: 'wc-barcode-row' });\r\n                    $('<input>', {\r\n                        type: 'text', id: inputId, name: 'barcodes[]', required: true,\r\n                        placeholder: 'Barcode ' + barcodeIndex,\r\n                        autocomplete: 'off', 'aria-label': 'Barcode ' + barcodeIndex\r\n                    }).appendTo($row);\r\n                    $('<button>', {\r\n                        type: 'button', class: 'wc-scan-btn', html: scanIcon,\r\n                        'aria-label': 'Scan barcode ' + barcodeIndex\r\n                    }).on('click', function(){ wcStartScan(inputId); }).appendTo($row);\r\n                    $('<button>', {\r\n                        type: 'button', class: 'wc-remove-barcode', html: '&times;',\r\n                        'aria-label': 'Remove barcode ' + barcodeIndex\r\n                    }).on('click', function(){ wcRemoveBarcode(this); }).appendTo($row);\r\n                    $row.appendTo($entry);\r\n                    var $caption = $('<span>', { class: 'wc-component-caption' }).text(wcT('Product Type') + ' ');\r\n                    $('<em>').text(wcT('(required)')).appendTo($caption);\r\n                    $caption.appendTo($entry);\r\n                    var $component = $('<select>', {\r\n                        class: 'wc-component-label', name: 'component_labels[]',\r\n                        'aria-label': 'Product type for barcode ' + barcodeIndex,\r\n                        required: true\r\n                    });\r\n                    $('<option>', { value: '', text: wcT('Select product type'), disabled: true, selected: true }).appendTo($component);\r\n                    $.each(componentOptions, function(value, label){ $('<option>', { value: value, text: label }).appendTo($component); });\r\n                    $component.appendTo($entry);\r\n                    $('#wc-activation-barcodes').append($entry);\r\n                    updateRemoveButtons();\r\n                    document.getElementById(inputId).focus();\r\n                });\r\n\r\n                window.wcRemoveBarcode = function(button) {\r\n                    if ($('#wc-activation-barcodes .wc-barcode-row').length <= 1) return;\r\n                    $(button).closest('.wc-barcode-entry').remove();\r\n                    updateRemoveButtons();\r\n                };\r\n\r\n                updateRemoveButtons();\r\n\r\n                function resetRepairWheelLookup() {\r\n                    $('#repair-barcode').empty().prop('disabled', true);\r\n                    $('#repair-customer-name').val('');\r\n                    $('#wc-repair-wheel-group').prop('hidden', true);\r\n                    $('#wc-repair-lookup-message').text(wcT('Enter your activation email to find your registered products.'));\r\n                }\r\n                $('#repair-customer-email').on('input', resetRepairWheelLookup);\r\n\r\n                $('#wc-find-repair-wheels').on('click', function(){\r\n                    var $button = $(this);\r\n                    var email = $('#repair-customer-email').val().trim();\r\n                    if (!email) {\r\n                        $('#wc-repair-lookup-message').text(wcT('Please enter a valid email address.'));\r\n                        return;\r\n                    }\r\n                    $button.prop('disabled', true).text(wcT('Finding\u2026'));\r\n                    $.post('https:\/\/phicycling.com\/wp-admin\/admin-ajax.php', {\r\n                        action: 'wc_find_activated_wheels',\r\n                        security: $('#wc-repair-form input[name=\"security\"]').val(),\r\n                        lang: $('#wc-repair-form input[name=\"lang\"]').val(),\r\n                        customer_email: email\r\n                    }).done(function(res){\r\n                        if (!res.success) {\r\n                            resetRepairWheelLookup();\r\n                            $('#wc-repair-lookup-message').text(res.data.message);\r\n                            return;\r\n                        }\r\n                        var $select = $('#repair-barcode').empty();\r\n                        $('#repair-customer-name').val(res.data.customer_name || '');\r\n                        res.data.wheels.forEach(function(wheel){\r\n                            $('<option>', { value: wheel.barcode, text: wheel.product + ' \u2014 ' + wheel.component_label + ' \u2014 ' + wheel.barcode }).appendTo($select);\r\n                        });\r\n                        $select.prop('disabled', false);\r\n                        $('#wc-repair-wheel-group').prop('hidden', false);\r\n                        $('#wc-repair-lookup-message').text(res.data.wheels.length + ' ' + wcT('activated product(s) found. Select the exact component that needs repair.'));\r\n                    }).fail(function(){\r\n                        resetRepairWheelLookup();\r\n                        $('#wc-repair-lookup-message').text(wcT('The lookup could not be completed. Please try again.'));\r\n                    }).always(function(){\r\n                        $button.prop('disabled', false).text(wcT('Find My Product'));\r\n                    });\r\n                });\r\n\r\n                var wcRepairImageFiles = [];\r\n\t\t\t\t$('#wc-choose-repair-video').on('click', function(){ $('#repair-video').trigger('click'); });\r\n\t\t\t\t$('#repair-video').on('change', function(){\r\n\t\t\t\t\tvar file = this.files && this.files[0];\r\n\t\t\t\t\t$('#wc-repair-video-name').text(file ? file.name : wcT('No file selected'));\r\n\t\t\t\t});\r\n                function wcRenderRepairImageQueue() {\r\n                    var $queue = $('#wc-repair-image-queue').empty();\r\n                    wcRepairImageFiles.forEach(function(file, index) {\r\n                        var previewUrl = URL.createObjectURL(file);\r\n                        var $item = $('<div>', { class: 'wc-repair-image-item' });\r\n                        $('<img>', { src: previewUrl, alt: file.name }).on('load', function(){ URL.revokeObjectURL(previewUrl); }).appendTo($item);\r\n                        $('<button>', { type: 'button', html: '&times;', 'aria-label': 'Remove ' + file.name, 'data-image-index': index }).appendTo($item);\r\n                        $('<small>', { text: file.name }).appendTo($item);\r\n                        $queue.append($item);\r\n                    });\r\n                    $('#wc-add-repair-images').text(wcRepairImageFiles.length ? wcT('+ Add More Images') + ' (' + wcRepairImageFiles.length + '\/8)' : wcT('+ Add Images'));\r\n                }\r\n                $('#wc-add-repair-images').on('click', function(){ $('#repair-images').trigger('click'); });\r\n                $('#repair-images').on('change', function() {\r\n                    var incoming = Array.from(this.files || []);\r\n                    incoming.forEach(function(file) {\r\n                        var signature = [file.name, file.size, file.lastModified].join(':');\r\n                        var duplicate = wcRepairImageFiles.some(function(existing){ return [existing.name, existing.size, existing.lastModified].join(':') === signature; });\r\n                        if (!duplicate && wcRepairImageFiles.length < 8 && \/^image\\\/(jpeg|png|webp)$\/.test(file.type)) wcRepairImageFiles.push(file);\r\n                    });\r\n                    this.value = '';\r\n                    wcRenderRepairImageQueue();\r\n                    if (incoming.length && wcRepairImageFiles.length >= 8) {\r\n                        $('#wc-repair-result').removeClass('res-success').addClass('res-error').show().text(wcT('A maximum of 8 images can be attached.'));\r\n                    }\r\n                });\r\n                $('#wc-repair-image-queue').on('click', 'button[data-image-index]', function() {\r\n                    wcRepairImageFiles.splice(Number($(this).data('image-index')), 1);\r\n                    wcRenderRepairImageQueue();\r\n                });\r\n\r\n                function wcCompressRepairImage(file) {\r\n                    return new Promise(function(resolve, reject) {\r\n                        var reader = new FileReader();\r\n                        reader.onerror = function(){ reject(new Error(wcT('Image could not be read.'))); };\r\n                        reader.onload = function(event) {\r\n                            var image = new Image();\r\n                            image.onerror = function(){ reject(new Error(wcT('Image format is not supported.'))); };\r\n                            image.onload = function() {\r\n                                var scale = Math.min(1, 1800 \/ Math.max(image.naturalWidth, image.naturalHeight));\r\n                                var canvas = document.createElement('canvas');\r\n                                canvas.width = Math.max(1, Math.round(image.naturalWidth * scale));\r\n                                canvas.height = Math.max(1, Math.round(image.naturalHeight * scale));\r\n                                var context = canvas.getContext('2d');\r\n                                context.fillStyle = '#fff';\r\n                                context.fillRect(0, 0, canvas.width, canvas.height);\r\n                                context.drawImage(image, 0, 0, canvas.width, canvas.height);\r\n                                canvas.toBlob(function(blob) {\r\n                                    if (!blob) reject(new Error(wcT('Image compression failed.')));\r\n                                    else resolve({ blob: blob, name: file.name.replace(\/\\.[^.]+$\/, '') + '-1800.jpg' });\r\n                                }, 'image\/jpeg', 0.84);\r\n                            };\r\n                            image.src = event.target.result;\r\n                        };\r\n                        reader.readAsDataURL(file);\r\n                    });\r\n                }\r\n\r\n                function wcSetUploadProgress(percent, label) {\r\n                    $('#wc-repair-upload-progress').prop('hidden', false);\r\n                    $('#wc-repair-upload-progress .wc-upload-progress-track span').css('width', percent + '%');\r\n                    $('#wc-repair-upload-progress .wc-upload-progress-label').text(label);\r\n                }\r\n\r\n                $('#wc-repair-form').on('submit', function(e){\r\n                    e.preventDefault();\r\n                    var form = this;\r\n                    var $button = $('#wc-repair-submit');\r\n                    var $result = $('#wc-repair-result').removeClass('res-success res-error').hide();\r\n                    if ($('#repair-barcode').prop('disabled') || !$('#repair-barcode').val()) {\r\n                        $result.addClass('res-error').show().text(wcT('Please find and select your activated product first.'));\r\n                        return;\r\n                    }\r\n                    var files = wcRepairImageFiles.slice();\r\n                    if (!files.length || files.length > 8) {\r\n                        $result.addClass('res-error').show().text(wcT('Please select between 1 and 8 images.'));\r\n                        return;\r\n                    }\r\n                    $button.prop('disabled', true).text(wcT('Preparing\u2026'));\r\n                    wcSetUploadProgress(0, wcT('Compressing images to 1800 px\u2026'));\r\n                    Promise.all(files.map(wcCompressRepairImage)).then(function(images) {\r\n                        var data = new FormData(form);\r\n                        data.delete('repair_images[]');\r\n                        images.forEach(function(image){ data.append('repair_images[]', image.blob, image.name); });\r\n                        data.append('action', 'wc_submit_repair');\r\n                        $button.text(wcT('Uploading video and images\u2026'));\r\n                        wcSetUploadProgress(1, wcT('Uploading video and images\u2026') + ' 1%');\r\n                        return $.ajax({\r\n                            url: 'https:\/\/phicycling.com\/wp-admin\/admin-ajax.php',\r\n                            method: 'POST', data: data, processData: false, contentType: false,\r\n                            xhr: function() {\r\n                                var xhr = $.ajaxSettings.xhr();\r\n                                if (xhr.upload) xhr.upload.addEventListener('progress', function(event) {\r\n                                    if (!event.lengthComputable) return;\r\n                                    var percent = Math.min(99, Math.round((event.loaded \/ event.total) * 100));\r\n                                    wcSetUploadProgress(percent, wcT('Uploading video and images\u2026') + ' ' + percent + '%');\r\n                                });\r\n                                return xhr;\r\n                            }\r\n                        });\r\n                    }).then(function(res){\r\n                        if (res.success) {\r\n                            wcSetUploadProgress(100, wcT('Upload complete \u2014 100%'));\r\n                            $result.addClass('res-success').show().html('<strong>' + wcT('Repair request submitted.') + '<\/strong><br>' + wcT('Reference') + ' #' + res.data.reference);\r\n                            form.reset();\r\n                            wcRepairImageFiles = [];\r\n                            wcRenderRepairImageQueue();\r\n                            resetRepairWheelLookup();\r\n                        } else {\r\n                            throw new Error(res.data && res.data.message ? res.data.message : wcT('The repair request could not be submitted.'));\r\n                        }\r\n                    }).catch(function(error){\r\n                        $result.addClass('res-error').show().text(error.message || wcT('The repair request could not be submitted. Please try again.'));\r\n                        wcSetUploadProgress(0, wcT('Upload failed. Please check the files and try again.'));\r\n                    }).finally(function(){\r\n                        $button.prop('disabled', false).text(wcT('Submit Repair Request'));\r\n                    });\r\n                });\r\n    \r\n                $('#hub-activate-form').on('submit', function(e){\r\n                    e.preventDefault();\r\n                    var $btn = $('#btn-act-submit');\r\n                    var $res = $('#hub-act-result');\r\n    \r\n                    $btn.prop('disabled',true).text(wcT('Activating...'));\r\n                    $res.removeClass('res-success res-error res-info').hide();\r\n    \r\n                    $.post(\r\n                        'https:\/\/phicycling.com\/wp-admin\/admin-ajax.php',\r\n                        $(this).serialize()+'&action=wc_activate_wheel'\r\n                    ).done(function(res){\r\n                        $btn.prop('disabled',false).text(wcT('Activate Warranty'));\r\n                        $res.show();\r\n                        if(res.success){\r\n                            $res.addClass('res-success').html(\r\n                                '<strong>\u2705 '+wcT('Activation Successful!')+'<\/strong><br>'+\r\n                                res.data.message+'<br>'+\r\n                                '<div style=\"margin-top:10px;font-size:14px;\">'+\r\n                                '<strong>'+wcT('Start:')+'<\/strong> '+res.data.start_date+' | '+\r\n                                '<strong>'+wcT('Expires:')+'<\/strong> '+res.data.end_date+\r\n                                '<\/div>'\r\n                            );\r\n                            $('#hub-activate-form')[0].reset();\r\n                            $('#wc-activation-barcodes .wc-barcode-entry').slice(1).remove();\r\n                            updateRemoveButtons();\r\n                        }else{\r\n                            $res.addClass('res-error').html(res.data.message);\r\n                        }\r\n                    }).fail(function(){\r\n                        $btn.prop('disabled',false).text(wcT('Activate Warranty'));\r\n                        $res.addClass('res-error').show().text(wcT('The request could not be completed. Please try again.'));\r\n                    });\r\n                });\r\n    \r\n                $('#hub-check-form').on('submit', function(e){\r\n                    e.preventDefault();\r\n                    var $btn = $('#btn-chk-submit');\r\n                    var $res = $('#hub-chk-result');\r\n    \r\n                    $btn.prop('disabled',true).text(wcT('Checking...'));\r\n                    $res.removeClass('res-success res-error res-info').hide();\r\n    \r\n                    $.post(\r\n                        'https:\/\/phicycling.com\/wp-admin\/admin-ajax.php',\r\n                        $(this).serialize()+'&action=wc_check_warranty'\r\n                    ).done(function(res){\r\n                        $btn.prop('disabled',false).text(wcT('Check Status'));\r\n                        $res.show();\r\n                        if(res.success){\r\n                            if(!res.data.active){\r\n                                $res.addClass('res-info').html(wcT('Not Activated'));\r\n                            }else{\r\n                                $res.addClass(res.data.is_expired?'res-error':'res-success').html(\r\n                                    '<strong>'+res.data.status_label+'<\/strong><br>'+\r\n                                    wcT('Owner:')+' '+res.data.owner+'<br>'+ \r\n                                    wcT('Owner Type:')+' '+res.data.owner_type+'<br>'+ \r\n                                    wcT('Activated:')+' '+res.data.activated_date+'<br>'+\r\n                                    wcT('Expires:')+' '+res.data.expiry_date\r\n                                );\r\n                            }\r\n                        }else{\r\n                            $res.addClass('res-error').html(res.data.message);\r\n                        }\r\n                    }).fail(function(){\r\n                        $btn.prop('disabled',false).text(wcT('Check Status'));\r\n                        $res.addClass('res-error').show().text(wcT('The request could not be completed. Please try again.'));\r\n                    });\r\n                });\r\n    \r\n            });\r\n            <\/script>\r\n        <\/div>\r\n        <\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4340","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/phicycling.com\/de\/wp-json\/wp\/v2\/pages\/4340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/phicycling.com\/de\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/phicycling.com\/de\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/phicycling.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phicycling.com\/de\/wp-json\/wp\/v2\/comments?post=4340"}],"version-history":[{"count":1,"href":"https:\/\/phicycling.com\/de\/wp-json\/wp\/v2\/pages\/4340\/revisions"}],"predecessor-version":[{"id":4342,"href":"https:\/\/phicycling.com\/de\/wp-json\/wp\/v2\/pages\/4340\/revisions\/4342"}],"wp:attachment":[{"href":"https:\/\/phicycling.com\/de\/wp-json\/wp\/v2\/media?parent=4340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}