rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
[elasticsearch-6.x] name=Elasticsearch repository for 6.x packages baseurl=https://artifacts.elastic.co/packages/6.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md
firewall-cmd --add-port=5601/tcp --permanent firewall-cmd --reload
– systemctl enable kibana
curl 127.0.0.1:9200 { "name" : "l_cUCzP", "cluster_name" : "elasticsearch", "cluster_uuid" : "ueCIZ5AqSEWsMRb7VU90cw", "version" : { "number" : "6.2.1", "build_hash" : "7299dc3", "build_date" : "2018-02-07T19:34:26.990113Z", "build_snapshot" : false, "lucene_version" : "7.2.1", "minimum_wire_compatibility_version" : "5.6.0", "minimum_index_compatibility_version" : "5.0.0" }, "tagline" : "You Know, for Search" }
This tutorial is on installing gpart
in Ubuntu Live CD because when you have to use gpart
it’s basically to rescue an existing Ubuntu or Windows installation which has to be done via Live CD.
Windows firewall settings can be managed from the Windows Defender Firewall interface in Control Panel. You can also manage Windows firewall configuration from the command prompt by using the …
Read More
On Linux bootup or startup, it will first run the program init, and depending on how it is configured and the runlevel Linux is running, it will run other scripts which normally resides in the /etc/rc.d/ directory. Right before a user is presented with the login prompt, the /etc/rc.d/boot.local or /etc/rc.local script is executed.
By that we should have the idea that to execute our programs even before we’re given the login prompt is to add them to the /etc/rc.d directory, or simply edit the /etc/rc.d/boot.local or /etc/rc.local script and add few lines to make it execute our program. Running programs using the /etc/rc.d directory is actually more complicated than what I’ve mentioned so far, and so we’ll just proceed with the /etc/rc.d/boot.local or /etc/rc.local script.
In any given Linux system, only one of these 2 files actually exist. /etc/rc.local is normally used by Debian and it’s derivatives, and /etc/rc.d/boot.local used by the Redhat family of Linux distribution.
The /etc/rc.d/boot.local or /etc/rc.local scripts are actually Bash scripts, and the following is the default file for Ubuntu;
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing
In my case I use it to execute no-ip program, and I added the following line to the file to have it executed;
noip2 -c /var/lib/noip2/noip2.conf
That’s a very simple example to directly execute a program. Anyone with some Bash scripting knowledge can include conditional statements and whatever Bash has to offer if they need to.
The prerequisites for installing IE in Linux is wine and cabextract. To install these 2 packages in Ubuntu, simply run the following command;
$ sudo apt-get install wine cabextract
Next is to download and run the installer script provided by the nice guys at the IEs4Linux project;
$ wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz $ tar xf ies4linux-latest.tar.gz $ ies4linux-*/ies4linux
The installer will then download and install the neccessary files and programs after clicking the Ok button at the following screen;
In the end, just execute the following command to run the installed Internet Explorer version of choice;
$ ~/bin/ie6
CentOS
and Red Hat
comes with vim-minimal
installed by default which lacks support for syntax highlighting and many other features.
To see currently installed version, run vi --version
at the command line and note the list of enabled and disabled features.
[root@centos ~]# vi --version VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 2 2017 00:45:54) Included patches: 1-160 Modified by <[email protected]> Compiled by <[email protected]> Small version without GUI. Features included (+) or not (-): +acl -farsi -mouse_sgr -tag_old_static -arabic -file_in_path -mouse_sysmouse -tag_any_white -autocmd -find_in_path -mouse_urxvt -tcl -balloon_eval -float -mouse_xterm +terminfo -browse -folding +multi_byte -termresponse +builtin_terms -footer -multi_lang -textobjects -byte_offset +fork() -mzscheme -title -cindent -gettext -netbeans_intg -toolbar -clientserver -hangul_input -path_extra -user_commands -clipboard +iconv -perl -vertsplit -cmdline_compl -insert_expand -persistent_undo -virtualedit +cmdline_hist +jumplist -printer +visual -cmdline_info -keymap -profile -visualextra -comments -langmap -python -viminfo -conceal -libcall -python3 -vreplace -cryptv -linebreak -quickfix +wildignore -cscope -lispindent -reltime -wildmenu -cursorbind -listcmds -rightleft +windows -cursorshape -localmap -ruby +writebackup -dialog -lua -scrollbind -X11 -diff -menu -signs -xfontset -digraphs -mksession -smartindent -xim -dnd -modify_fname -sniff -xsmp -ebcdic -mouse -startuptime -xterm_clipboard -emacs_tags -mouse_dec -statusline -xterm_save -eval -mouse_gpm -sun_workshop -xpm -ex_extra -mouse_jsbterm -syntax -extra_search -mouse_netterm -tag_binary system vimrc file: "/etc/virc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" fall-back for $VIM: "/etc" f-b for $VIMRUNTIME: "/usr/share/vim/vim74" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -g -pipe -Wall -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -Wl,-z,relro -L/usr/local/lib -Wl,--as-needed -o vim -lm -lselinux -lncurses -lacl -lattr -ldl
To use the version of vim
with most of the features enabled in CentOS / Red Hat, you’ll have to install vim-enhanced
. This could be done by following these steps at the command line;
Use administrator account or sudo
to perform the installation.
vim-minimal
.
yum remove -y vim-minimal
yum -y update
vim-enhanced
and related dependencies.
yum install -y vim-enhanced
Running vim --version
should produce a more desirable output.
Note that the command is now vim
instead of vi
.
[root@centos ~]# vim --version VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 2 2017 00:45:39) Included patches: 1-160 Modified by <[email protected]> Compiled by <[email protected]> Huge version without GUI. Features included (+) or not (-): +acl +farsi +mouse_netterm +syntax +arabic +file_in_path +mouse_sgr +tag_binary +autocmd +find_in_path -mouse_sysmouse +tag_old_static -balloon_eval +float +mouse_urxvt -tag_any_white -browse +folding +mouse_xterm -tcl ++builtin_terms -footer +multi_byte +terminfo +byte_offset +fork() +multi_lang +termresponse +cindent +gettext -mzscheme +textobjects -clientserver -hangul_input +netbeans_intg +title -clipboard +iconv +path_extra -toolbar +cmdline_compl +insert_expand +perl +user_commands +cmdline_hist +jumplist +persistent_undo +vertsplit +cmdline_info +keymap +postscript +virtualedit +comments +langmap +printer +visual +conceal +libcall +profile +visualextra +cryptv +linebreak +python/dyn +viminfo +cscope +lispindent -python3 +vreplace +cursorbind +listcmds +quickfix +wildignore +cursorshape +localmap +reltime +wildmenu +dialog_con -lua +rightleft +windows +diff +menu +ruby/dyn +writebackup +digraphs +mksession +scrollbind -X11 -dnd +modify_fname +signs -xfontset -ebcdic +mouse +smartindent -xim +emacs_tags -mouseshape -sniff -xsmp +eval +mouse_dec +startuptime -xterm_clipboard +ex_extra +mouse_gpm +statusline -xterm_save +extra_search -mouse_jsbterm -sun_workshop -xpm system vimrc file: "/etc/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" fall-back for $VIM: "/etc" f-b for $VIMRUNTIME: "/usr/share/vim/vim74" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -g -pipe -Wall -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -L. -Wl,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE -Wl,-z,relro -L/usr/local/lib -Wl,--as-needed -o vim -lm -lnsl -lselinux -lncurses -lacl -lattr -lgpm -ldl -Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE -fstack-protector -L/usr/lib64/perl5/CORE -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
Here are some ways that you can check the installed version of PHP
in your system;
php -v
from the command line.
$ php -v PHP 7.0.19 (cli) (built: Jun 21 2017 07:13:57) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
php -i
from the command line.
$ php -i | grep "PHP Version" PHP Version => 7.0.19 PHP Version => 7.0.19
PHP_VERSION_ID
from PHP script.
<?php echo PHP_VERSION_ID; //Sample output: 70019 ?>
phpversion()
output from PHP script.
<?php echo phpversion(); //Sample output: 7.0.19 ?>
PHP
packages are installed from. Here’s a list of some common package managers and the corresponding commands; Platform | Location |
---|---|
homebrew | brew list –versions php |
Debian/Ubuntu | |
RedHat/CentOS |
KDE 4.2 has been released, but till now it’s still not being included in Ubuntu’s main repository. This makes the Ubuntu / Kubuntu users to get stuck with KDE 4.1, probably until Jaunty Jackalope is released this April.
There are however a solution as some nice people has actually compiled the KDE 4.2 packages and creates a repository for it.
To install KDE 4.2, you’ll need to add the following line to /etc/apt/sources.list. The easiest way to to that is to run the following command from the console;
$ echo "deb http://ppa.launchpad.net/project-neon/ubuntu intrepid main" | sudo tee -a /etc/apt/sources.list
You’ll then need to add the GPG key and update your packages cache by running the following commands;
$ gpg --keyserver keyserver.ubuntu.com --recv-keys 493B3065 && gpg --export -a 493B3065 | sudo apt-key add - $ sudo apt-get update
Your system will now update all your KDE 4 installation to the latest version when you run the following command;
$ sudo apt-get upgrade
and if you’re a Ubuntu user who doesn’t have KDE 4 installed and want to try a full KDE 4.2 experience, install the Kubuntu Desktop with the following command;
$ sudo apt-get install kubuntu-desktop
From now you’ll be able to log in to KDE 4.2 session from your GDM.
Vim
is a very powerful text editor and is available in almost all modern computing platforms. It is bundled in the default installation of almost Linux
distribution, though Ubuntu
ships with the minimal version of Vim
which lack features such as syntax highlighting making it less powerful or useful as it could be.
Details about the currently installed version could be gathered by running vi --version
from the command line;
Note the list of enabled and disabled features.
$ vi --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jul 26 2017 20:13:43) Included patches: 1-197, 322, 377-378, 422, 550 Modified by [email protected] Compiled by [email protected] Small version without GUI. Features included (+) or not (-): +acl -farsi -mouse_netterm +tag_binary -arabic -file_in_path -mouse_sgr -tag_old_static -autocmd -find_in_path -mouse_sysmouse -tag_any_white -balloon_eval -float -mouse_urxvt -tcl -browse -folding -mouse_xterm -termguicolors +builtin_terms -footer +multi_byte +terminfo -byte_offset +fork() -multi_lang -termresponse -channel -gettext -mzscheme -textobjects -cindent -hangul_input -netbeans_intg -timers -clientserver +iconv -num64 -title -clipboard -insert_expand +packages -toolbar -cmdline_compl -job -path_extra -user_commands +cmdline_hist +jumplist -perl +vertsplit -cmdline_info -keymap -persistent_undo -virtualedit -comments -lambda -printer +visual -conceal -langmap -profile -visualextra -cryptv -libcall -python -viminfo -cscope -linebreak -python3 -vreplace -cursorbind -lispindent -quickfix +wildignore -cursorshape -listcmds -reltime -wildmenu -dialog -localmap -rightleft +windows -diff -lua -ruby +writebackup -digraphs -menu -scrollbind -X11 -dnd -mksession -signs +xfontset -ebcdic -modify_fname -smartindent -xim -emacs_tags -mouse -startuptime -xpm -eval -mouse_dec -statusline -xsmp +ex_extra -mouse_gpm -sun_workshop -xterm_clipboard -extra_search -mouse_jsbterm -syntax -xterm_save system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/usr/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -fdebug-prefix-map=/build/vim-w5iGhr/vim-8.0.0197=. -fstack-protector-strong -Wformat -Werror=format-security -DTINY_VIMRC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lselinux -lacl -lattr -ldl
The full version however is available in the default package repository and can easily be installed by following these steps at the terminal;
vim-tiny
which is the default installation package.
sudo apt -y remove vim-tiny
sudo apt -y update
Vim
.
sudo apt -y install vim
$ vi --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jul 26 2017 20:13:43) Included patches: 1-197, 322, 377-378, 422, 550 Modified by [email protected] Compiled by [email protected] Huge version without GUI. Features included (+) or not (-): +acl +file_in_path +mouse_sgr +tag_old_static +arabic +find_in_path -mouse_sysmouse -tag_any_white +autocmd +float +mouse_urxvt -tcl -balloon_eval +folding +mouse_xterm +termguicolors -browse -footer +multi_byte +terminfo ++builtin_terms +fork() +multi_lang +termresponse +byte_offset +gettext -mzscheme +textobjects +channel -hangul_input +netbeans_intg +timers +cindent +iconv +num64 +title -clientserver +insert_expand +packages -toolbar -clipboard +job +path_extra +user_commands +cmdline_compl +jumplist -perl +vertsplit +cmdline_hist +keymap +persistent_undo +virtualedit +cmdline_info +lambda +postscript +visual +comments +langmap +printer +visualextra +conceal +libcall +profile +viminfo +cryptv +linebreak -python +vreplace +cscope +lispindent +python3 +wildignore +cursorbind +listcmds +quickfix +wildmenu +cursorshape +localmap +reltime +windows +dialog_con -lua +rightleft +writebackup +diff +menu -ruby -X11 +digraphs +mksession +scrollbind -xfontset -dnd +modify_fname +signs -xim -ebcdic +mouse +smartindent -xpm +emacs_tags -mouseshape +startuptime -xsmp +eval +mouse_dec +statusline -xterm_clipboard +ex_extra +mouse_gpm -sun_workshop -xterm_save +extra_search -mouse_jsbterm +syntax +farsi +mouse_netterm +tag_binary system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/usr/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -fdebug-prefix-map=/build/vim-w5iGhr/vim-8.0.0197=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -lpython3.6m -lpthread -ldl -lutil -lm
Chromium
is the open source project behind Google Chrome
. Chromium
browser is available as source based install from the Chromium
website, and has been available in Ubuntu
‘s default repository since Maverick Meerkat (10.10). This means that you’ll no longer need to include the chromium-daily
‘s PPA
repository in order to install the Chromium
browser in your system.
To install the Chromium
browser in your system, follow these steps at the terminal.
sudo apt update
sudo apt install chromium-browser
Parking is currently unavailable. We'll be right back.
\n ")}errorParkingServicesDisabled(){this.message("\nServices for this domain name have been disabled.
\n ")}errorParkingNoSponsors(e){this.message(`\n \n \n ${window.location.hostname} currently does not have any sponsors for you.\n \n `,e)}imprint(e){if(!e)return;const t=document.querySelector("#imprint-text");t&&(t.innerHTML=e.replace(/(?:\r\n|\r|\n)/g,"${this.domain} currently does not have any sponsors for you.
`;case"disabled_mr":return`\nReferral traffic for ${this.domain} does not meet requirements.
`;case"js_error":return"\nParking is currently unavailable. We'll be right back.
\n ";default:return"\nServices for this domain name have been disabled.
\n "}}get trackingType(){switch(this.reason){case"disabled_rc":return"revenue_cap_reached";case"disabled_mr":return"invalid_referral";case"adblock":return"ad_blocked_message";case"no_sponsors":return"no_sponsors_message"}}get domain(){return window.location.hostname}toContext(){return{cannotPark:this.reason}}}function unpackPHPArrayObject(e,t){const n=e[t];if(n&&!Array.isArray(n))return n}class Parking extends State$2{constructor(){super(...arguments),this.type=Type.Parking}static build(e,t){const n=new Parking;n.domain=e.domainName,n.html=e.template,n.scripts=e.scripts||[],n.javascript=e.inlineJs,n.stylesheet=e.styles,n.imprint=e.imprintText;const i=unpackPHPArrayObject(e,"salesSettings"),s=(null==i?void 0:i.status)&&"NOT_FOR_SALE"!==(null==i?void 0:i.status);if(s){const{status:e,location:t,message:s,link:a,type:o}=i;n.salesBanner={message:s,href:a,position:t,theme:o,status:e}}return t.wantsToServeAds?n.trackingType="ctr":s&&window.location.pathname.startsWith("/listing")?n.trackingType="sales":n.trackingType="visit",n}toContext(){return{}}}class Sales extends State$2{constructor(){super(...arguments),this.type=Type.Sales}static build(e){const t=unpackPHPArrayObject(e,"salesSettings");if(!t)return;const{status:n}=t;return["NOT_FOR_SALE","EXTERNAL_MARKET","URL"].includes(n)?void 0:window.location.pathname.startsWith("/listing")?new Sales:void 0}toContext(){return{}}get trackingType(){return"sales"}init(e){window.context=e;const t=document.createElement("script");t.type="text/javascript",t.src=SALES_JS_URL,document.head.append(t)}}class Redirect extends State$2{constructor(){super(...arguments),this.type=Type.Redirect}static build(e,t,n){const i=unpackPHPArrayObject(e,"salesSettings"),{zeroClickDelay:s,skenzoRedirect:a,skenzoUrl:o,showInquiryForm:r,canZeroClick:d,cannotPark:c}=e;if(window.location.pathname.startsWith("/listing")&&["EXTERNAL_MARKET","URL"].includes(null==i?void 0:i.status)){if(null==i?void 0:i.external)return Redirect.toState(i.external,"sales");if(null==i?void 0:i.link)return Redirect.toState(i.link,"sales")}if(n.cannotLoadAds&&n.wantsToServeAds)return Redirect.toState(n.noAdsRedirectUrl,"no_ads_redirect");if(d&&(null==t?void 0:t.reason)){if(null==t?void 0:t.redirect)return Redirect.toState(t.redirect,"zc_redirect",s);if(a&&o)return Redirect.toState(o,"skenzo_redirect")}return(null==i?void 0:i.status)&&"NOT_FOR_SALE"!==(null==i?void 0:i.status)&&(n.cannotLoadAds||n.cannotLoadAds&&!d||r)?Redirect.toState(`${window.location.origin}/listing`):void 0}static toState(e,t,n=0){const i=new Redirect;return i.url=e,i.delay=n,i.trackingType=t,i}toContext(){return{}}}const browserState=()=>{var e,t,n,i,s;const{screen:{width:a,height:o},self:r,top:d,matchMedia:c,opener:l}=window,{documentElement:{clientWidth:h,clientHeight:u}}=document;let p;try{p=(new Date).getTimezoneOffset()/60*-1}catch(e){p=null}return{popup:!(!l||l===window),timezone_offset:p,user_preference:null===(e=null===Intl||void 0===Intl?void 0:Intl.DateTimeFormat())||void 0===e?void 0:e.resolvedOptions(),user_using_darkmode:Boolean(c&&c("(prefers-color-scheme: dark)").matches),user_supports_darkmode:Boolean(c),window_resolution:{width:null!=h?h:0,height:null!=u?u:0},screen_resolution:{width:null!=a?a:0,height:null!=o?o:0},frame:d===r?null:{innerWidth:null!==(t=null==r?void 0:r.innerWidth)&&void 0!==t?t:0,innerHeight:null!==(n=null==r?void 0:r.innerHeight)&&void 0!==n?n:0,outerWidth:null!==(i=null==r?void 0:r.outerWidth)&&void 0!==i?i:0,outerHeight:null!==(s=null==r?void 0:r.outerHeight)&&void 0!==s?s:0}}},TRACKING_URL="_tr",buildSignature=({callbacks:e,context:t},n)=>{var i,s,a,o;return Object.assign({ad_loaded_callback:null==e?void 0:e.adLoadedCallback,app_version:version,caf_client_id:null===(i=null==t?void 0:t.pageOptions)||void 0===i?void 0:i.pubId,caf_timed_out:null==e?void 0:e.cafTimedOut,caf_loaded_ms:null==e?void 0:e.cafLoadedMs,channel:null===(s=null==t?void 0:t.pageOptions)||void 0===s?void 0:s.channel,desktop:t.desktop,terms:null===(a=null==t?void 0:t.pageOptions)||void 0===a?void 0:a.terms,fd_server_datetime:t.fd_server_datetime,fd_server:t.fd_server,flex_rule:t.flex_rule,host:t.host,ip:t.ip,ivt:null===(o=null==t?void 0:t.pageOptions)||void 0===o?void 0:o.ivt,js_error:t.js_error,mobile:t.mobile,no_ads_redirect:t.noAdsRedirect,page_headers:t.page_headers,page_loaded_callback:null==e?void 0:e.pageLoadedCallback,page_method:t.page_method,page_request:t.page_request,page_time:t.page_time,page_url:t.page_url,reportable_channel:t.reportableChannel,reportable_style_id:t.reportableStyleId,tablet:t.tablet,template_id:t.templateId,type:n,user_has_ad_blocker:t.user_has_ad_blocker,user_id:t.userId,uuid:t.uuid,zeroclick:t.zeroClick},browserState())},trackVisit=({callbacks:e,context:t},n,i="")=>{const s=`${i}/${TRACKING_URL}`,a=i?"include":"same-origin",o=buildSignature({callbacks:e,context:t},n);let r={};"click"===n&&(r={click:"true",session:t.uuid,nc:Date.now().toString()}),fetch(s,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},credentials:a,body:JSON.stringify(Object.assign({signature:encode(o)},r))})};var State$1;!function(){if(!window.CustomEvent){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}}(),function(e){e[e.Pending=0]="Pending",e[e.Loaded=1]="Loaded",e[e.Failed=2]="Failed"}(State$1||(State$1={}));class Provider{constructor(e){this.timeoutSeconds=5,this.handlePixelEvent=e=>{switch(this.state){case State$1.Failed:break;case State$1.Pending:setTimeout((()=>this.handlePixelEvent(e)),100);break;case State$1.Loaded:this.onPixelEvent(e)}},this.watch=()=>{switch(this.state){case State$1.Loaded:case State$1.Failed:break;case State$1.Pending:this.isLoaded()?this.state=State$1.Loaded:this.isTimedOut()?this.state=State$1.Failed:setTimeout(this.watch,50)}},this.config=e,this.identifier&&this.identifier.length>0?(this.state=State$1.Pending,this.timeoutAt=new Date,this.timeoutAt.setSeconds(this.timeoutAt.getSeconds()+this.timeoutAfter()),this.injectPixel()):this.state=State$1.Failed}get identifier(){var e;return null===(e=this.config)||void 0===e?void 0:e.key}get pixelEvents(){var e;return null===(e=this.config)||void 0===e?void 0:e.pixel_events}injectPixel(){this.injectedAt||(this.injectedAt=new Date,this.inject(),this.watch())}inject(){const e=document.createElement("script");e.text=this.script,document.head.appendChild(e)}isTimedOut(){return+new Date>=+this.timeoutAt}timeoutAfter(){return this.timeoutSeconds}selectPixelEvents(e){if(Array.isArray(this.pixelEvents))return this.pixelEvents.filter((t=>"term-view"===t.trigger&&"visit"===e||(!(!["term-click","ad-view"].includes(t.trigger)||"ctr"!==e)||"ad-click"===t.trigger&&"click"===e)))}}class Facebook extends Provider{get script(){return`!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','https://connect.facebook.net/en_US/fbevents.js');fbq('init', '${this.identifier}');`}onPixelEvent(e){this.selectPixelEvents(e).forEach((e=>{e&&(e.custom?window.fbq("trackCustom",e.event):window.fbq("track",e.event))}))}isLoaded(){return!!window.fbq}}class Outbrain extends Provider{get script(){return`!function(_window, _document) {var OB_ADV_ID = '${this.identifier}';if (_window.obApi) {var toArray = function(object) {return Object.prototype.toString.call(object) === '[object Array]' ? object : [object];};_window.obApi.marketerId = toArray(_window.obApi.marketerId).concat(toArray(OB_ADV_ID));return;}var api = _window.obApi = function() {api.dispatch ? api.dispatch.apply(api, arguments) : api.queue.push(arguments);};api.version = '1.1';api.loaded = true;api.marketerId = OB_ADV_ID;api.queue = [];var tag = _document.createElement('script');tag.async = true;tag.src = '//amplify.outbrain.com/cp/obtp.js';tag.type = 'text/javascript';var script = _document.getElementsByTagName('script')[0];script.parentNode.insertBefore(tag, script);}(window, document);`}onPixelEvent(e){this.selectPixelEvents(e).forEach((e=>{e&&window.obApi("track",e.event)}))}isLoaded(){return!!window.obApi}}class Revcontent extends Provider{get script(){return""}inject(){const e=document.createElement("script");e.src="https://assets.revcontent.com/master/rev.js",document.head.appendChild(e)}onPixelEvent(e){this.selectPixelEvents(e).forEach((e=>{e&&window.rev("event",e.event)}))}isLoaded(){return!!window.rev}}class Taboola extends Provider{get script(){return"window._tfa = window._tfa || [];!function (t, f, a, x) {if (!document.getElementById(x)) {t.async = 1;t.src = a;t.id=x;f.parentNode.insertBefore(t, f);}}(document.createElement('script'),document.getElementsByTagName('script')[0],'//cdn.taboola.com/libtrc/unip/1451879/tfa.js','tb_tfa_script');"}onPixelEvent(e){this.selectPixelEvents(e).forEach((e=>{e&&window._tfa.push({notify:"event",name:e.event,id:e.pixel_id})}))}isLoaded(){return Array.isArray(window._tfa)}}class Tiktok extends Provider{constructor(e,t){super(e),this.useAltTikTokEventsForAdsPlatformUser=t}get script(){return`!function (w, d, t) {w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i