(function(){/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
var f="function",h="string",l,m=this||self;var n=Array.prototype.indexOf?function(a,b,c){return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(typeof a===h)return typeof b!==h||1!=b.length?-1:a.indexOf(b,c);for(;c2*this.b&&this.B(),!0):!1};l.B=function(){if(this.b!=this.c.length){for(var a=0,b=0;a=d.c.length)throw G;var g=d.c[b++];return a?g:d.g[g]};return e};var J=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var K=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/,L=function(a,b){if(a){a=a.split("&");for(var c=0;ca)throw Error("Bad port number "+a);this.D=a}else this.D=null;return this};l.getPath=function(){return this.M};l.setPath=function(a,b){this.j();this.M=b?S(a,!0):a;return this};
l.S=function(a,b){this.j();a instanceof N?(this.h=a,this.h.K(this.f)):(b||(a=O(a,ba)),this.h=new N(a,this.f));return this};l.W=function(){return this.h.toString()};l.ca=function(a,b){this.j();this.h.set(a,b);return this};l.X=function(a){return this.h.get(a)};l.P=function(a,b){this.j();this.H=b?S(a):a;return this};l.j=function(){if(this.Z)throw Error("Tried to modify a read-only Uri");};l.K=function(a){this.f=a;this.h&&this.h.K(a);return this};
var S=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},O=function(a,b,c){return typeof a===h?(a=encodeURI(a).replace(b,ca),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},ca=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},P=/[#\/\?@]/g,R=/[#\?:]/g,Q=/[#\?]/g,ba=/[#\?@]/g,aa=/#/g,N=function(a,b){this.b=this.a=null;this.i=a||null;this.f=!!b};l=N.prototype;
l.l=function(){if(!this.a&&(this.a=new I,this.b=0,this.i)){var a=this;L(this.i,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)})}};l.add=function(a,b){this.l();this.A();a=this.m(a);var c=this.a.get(a);c||this.a.set(a,c=[]);c.push(b);this.b+=1;return this};l.remove=function(a){this.l();a=this.m(a);return this.a.s(a)?(this.A(),this.b-=this.a.get(a).length,this.a.remove(a)):!1};l.s=function(a){this.l();a=this.m(a);return this.a.s(a)};
l.forEach=function(a,b){this.l();this.a.forEach(function(c,d){p(c,function(e){a.call(b,e,d,this)},this)},this)};l.u=function(){this.l();for(var a=this.a.v(),b=this.a.u(),c=[],d=0;d