<html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><?php

namespace Elementor\Modules\EditorOne\Classes;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class Slug_Normalizer {

	public function normalize( string $slug ): string {
		if ( 0 !== strpos( $slug, 'http' ) ) {
			return $slug;
		}

		$parsed = wp_parse_url( $slug );
		$path = basename( $parsed['path'] ?? '' );

		if ( ! empty( $parsed['query'] ) ) {
			$path .= '?' . $parsed['quer