text
stringlengths 7
3.69M
|
|---|
module.exports = rows => {
return new Promise((resolver, reject) => {
try{
const words = rows
.filter(filterValidRow)
.map(removePunctuation)
.map(removeTags)
.reduce(mergeRows)
.split(' ')
.map(word => word.toLowerCase())
.map(word => word.replace('"', ''))
resolver(words)
}
catch (err) {
reject(err)
}
})
}
function filterValidRow(row){
//se o parse retornar algo valido, significa que é um número
const notNumber = !parseInt(row.trim())
//a dupla negação converte o valor pra boolean
//se for string vazia, retorna falso
const notEmpty = !!row.trim()
//exclui as linhas do intervalo de tempo das legendas
const notInteval = !row.includes('-->')
return notNumber && notEmpty && notInteval
}
//substitui caracateres por string vazia
const removePunctuation = row => row.replace(/[,?!.-]/g, '')
const removeTags = row => row.replace(/(<[^>]+)>/ig, '').trim()
const mergeRows = (fullText, row) => `${fullText} ${row}`
|
const actions = require('../support/actions')
const selectors = require('../support/selectors')
const { Given, When, Then, setDefaultTimeout } = require('@cucumber/cucumber')
setDefaultTimeout(60 * 1000);
Given('Open website', async () => {
await actions.visitWebSite();
});
When('Goto Help', async () => {
await actions.clickOnNavItem(selectors.help)
});
When('Goto About us', async () => {
await actions.clickOnCurrentDocument(selectors.aboutus)
});
When('Click FAQ', async () => {
await actions.clickOnItem(selectors.forFans)
});
When('Select a Question', async () => {
await actions.clickOnDocument(selectors.forFansQstn)
});
When('I Submitted yes for the feedback form', async () => {
this.actualResponse = await actions.clickOnDocument(selectors.feedbackYes)
});
When('I enter text {string} to search', async (text) => {
await actions.enterText(text, selectors.searchInput)
});
When('Select first suggestion', async () => {
this.actualResponse = await actions.clickOnItem(selectors.helpSuggestion)
});
When('Press {string}', async (key) => {
this.actualResponse = await actions.pressKey(key)
});
When('I Click SignIn', async () => {
await actions.clickOnNavItem(selectors.signIn)
});
When('I Click create event', async () => {
await actions.clickOnNavItem(selectors.createEvent)
});
Then('I recieve no result', async () => {
this.actualResponse = await actions.checkResult(selectors.noResult)
});
Then('I should recieve {string}', async (expectedResponse) => {
await actions.checkResponse(this.actualResponse, expectedResponse)
});
Then('I should be redirected to {string}', async (expectedResponse) => {
await actions.checkUrl(expectedResponse)
});
Then('I should see {string}', async (expectedResponse) => {
await actions.checkCurrentUrl(expectedResponse)
});
|
import React, { useState, useMemo } from 'react';
import { View, StyleSheet } from 'react-native';
import Animated, { Easing, Extrapolate } from 'react-native-reanimated';
import { TouchableWithoutFeedback } from 'react-native-gesture-handler';
import Heart from './SVG/Heart';
const {
Clock,
Value,
set,
cond,
startClock,
clockRunning,
timing,
debug,
stopClock,
block,
interpolate,
useCode,
} = Animated;
const runTiming = (clock, from, to) => {
const state = {
finished: new Value(0),
position: new Value(from),
time: new Value(0),
frameTime: new Value(0),
};
const config = {
duration: 200,
toValue: new Value(to),
easing: Easing.inOut(Easing.ease),
};
return block([
cond(clockRunning(clock), [], startClock(clock)),
// we run the step here that is going to update position
timing(clock, state, config),
// if the animation is over we stop the clock
cond(state.finished, debug('stop clock', stopClock(clock))),
// we made the block return the updated position
state.position,
]);
};
const TouchableHeart = () => {
// const [pressed, setPressed] = useState(false);
// const [filled, setFilled] = useState(false);
// const { clock, scale, circleScale, circleClock } = useMemo(
// () => ({
// clock: new Clock(),
// scale: new Value(0),
// circleScale: new Value(0),
// circleClock: new Clock(),
// }),
// [],
// );
// useCode(
// () =>
// block([
// pressed
// ? (set(scale, runTiming(clock, 0, 1)),
// set(scale, runTiming(clock, 0, 1)))
// : (set(scale, runTiming(clock, 1, 0)),
// set(scale, runTiming(clock, 1, 0))),
// ]),
// [pressed],
// );
// const heartScaling = interpolate(scale, {
// inputRange: [0, 1],
// outputRange: [1, 1.2],
// extrapolate: Extrapolate.CLAMP,
// });
// const circleScaling = interpolate(scale, {
// inputRange: [0, 1],
// outputRange: [1, 3.4],
// extrapolate: Extrapolate.CLAMP,
// });
return (
// <TouchableWithoutFeedback
// style={{ height: 200 }}
// onPressIn={() => {
// setPressed(true);
// setFilled(!filled);
// }}
// onPressOut={() => setPressed(false)}>
// <Animated.View
// style={{
// transform: [{ scaleX: heartScaling }, { scaleY: heartScaling }],
// }}>
// <Heart fillColor={filled ? 'red' : 'gray'} />
// </Animated.View>
// <Animated.View
// style={[
// styles.circle,
// [{ scaleX: circleScaling }, { scaleY: circleScaling }],
// ]}
// />
// </TouchableWithoutFeedback>
<View>
<Heart fillColor="red" />
</View>
);
};
const styles = StyleSheet.create({
circle: {
backgroundColor: 'red',
opacity: 0.1,
height: 100,
width: 100,
position: 'absolute',
alignSelf: 'center',
borderRadius: 500,
// zIndex: -2,
},
});
export default TouchableHeart;
|
import React, { Fragment, useEffect, useState } from 'react';
import Window from '../windows/Window';
import BlindsUp from '../windows/coverings/BlindsUp';
export default () => {
const getColor = () => {
const h = (Math.random() * 360).toFixed(0);
return {h, s: 60, l: 0}
}
const [light , toggleBlinds] = useState(false);
const [color, setColor] = useState(null)
useEffect(() => {
setColor(getColor())
}, [])
useEffect(() => {
setColor(prev => (
{h: prev.h, s: prev.s, l: prev.l + (light ? 10 : -5)}
))
}, [light])
if (!color) {
return null;
} else {
const floor = `hsl(${color.h - 20}deg, ${color.s * 0.8}%, ${color.l * 0.5}%)`;
return (
<Fragment>
<div className='ceiling' style={{background: floor}}>
</div>
<div style={{
perspective: '1014px',
transformStyle: 'preserve-3d',
position: 'relative',
}}>
<div style={{display: 'flex',
flexDirection: 'row',
padding: '40px 20px 80px 20px',
backgroundColor: 'rgb(121 78 0)',
backgroundSize: '30px 30px',
transform: 'rotate3d(0, 1, 0, -45deg)',
backgroundImage: 'radial-gradient(circle, rgb(179 179 255) 1px, rgba(0, 0, 0, 0) 1px)'}}>
<div style={{position: 'relative', width: '100%', height: 450, }}>
<Window width={50}
widthUnits={'%'}
height={'100%'}
maxWidth={100}
maxWidthUnits='%'
>
<BlindsUp />
</Window>
</div>
{/* <div style={{position: 'relative', width: '50%'}}>
<Window width={200}
height={'100%'}
maxWidth={100}
maxWidthUnits='%'
>
<GlassUp />
</Window>
</div> */}
</div>
<div style={{
padding: '40px 20px 80px 20px',
backgroundColor: 'rgb(121 78 0)',
backgroundSize: '30px 30px',
position: 'absolute',
height: '100%',
width: '100%',
left: '-70%',
top: 0,
transform: 'rotate3d(0, 1, 0, 45deg)',
backgroundImage: 'radial-gradient(circle, rgb(179 179 255) 1px, rgba(0, 0, 0, 0) 1px)'}}>
</div>
<div style={{
background: 'white',
width: '100%',
position: 'absolute',
height: '100%',
transform: 'rotateX(90deg) rotateZ(45deg)',
transformOrigin: 'top center',
// backgroundImage: 'radial-gradient(circle, rgb(5 37 28) 17px, rgb(239 255 45 / 0%) 11px)',
// backgroundSize: '40px 40px',
backgroundImage: 'linear-gradient(currentColor 1px, transparent 1px),linear-gradient(to right, currentColor 1px, transparent 1px)',
backgroundSize: '25px 25px',
}}>
</div>
</div>
</Fragment>
)
}
}
|
// //arguments function is no longer bound with arrow functions
// const add = function(a, b){
// console.log(arguments); //will print all the arguments passed inside
// return a + b;
// }
// console.log(add(55, 1, 20));
// const addarrow = (a, b) => {
// //console.log(arguments); //will print an error
// return a + b;
// }
// console.log(addarrow(55, 1, 20));
// //this keyword is no longer bound with arrow functions
// const user = {
// name: "Name",
// cities: ["City1", "City2", "City3"],
// printPlacesLived: function () {
// console.log(this.name);
// console.log(this.cities);
// const that = this;
// this.cities.forEach(function (city) { //anonymous function
// //console.log(this.name + " has lived in " + city); //will throw an error as this is not accesible by anonymous function
// console.log(that.name + " has lived in " + city); //work around
// });
// }
// };
// user.printPlacesLived();
// const user2 = {
// name: "Name",
// cities: ["City1", "City2", "City3"],
// printPlacesLived: function () {
// console.log(this.name);
// console.log(this.cities);
// const that = this;
// this.cities.forEach((city) => {
// console.log(this.name + " has lived in " + city); //this keyword works
// });
// }
// };
// user2.printPlacesLived();
// //this keyword gets bound to parent function
// // const user2 = {
// // name: "Name",
// // cities: ["City1", "City2", "City3"],
// // printPlacesLived: () => {
// // console.log(this.name);
// // console.log(this.cities);
// // const that = this;
// // this.cities.forEach((city) => { //will not work as parent function becomes the main function i.e. outside user2 object
// // console.log(this.name + " has lived in " + city);
// // });
// // }
// // };
// // user2.printPlacesLived();
// const user3 = {
// name: "Name",
// cities: ["City1", "City2", "City3"],
// printPlacesLived() {
// console.log(this.name);
// console.log(this.cities);
// this.cities.forEach((city) => {
// console.log(this.name + " has lived in " + city);
// });
// }
// };
// user3.printPlacesLived();
// //map is similar to forEach but allows us to transform the variables
// // const user4 = {
// // name: "Name",
// // cities: ["City1", "City2", "City3"],
// // printPlacesLived() { //workaround
// // console.log(this.name);
// // console.log(this.cities);
// // const cityMessages = this.cities.map((city) => {
// // return city + '!';
// // });
// // return cityMessages;
// // }
// // };
// // console.log(user4.printPlacesLived());
// //concise version for user4
// const user4 = {
// name: "Name",
// cities: ["City1", "City2", "City3"],
// printPlacesLived() { //workaround
// console.log(this.name);
// console.log(this.cities);
// return this.cities.map((city) => city + '!');
// }
// };
// console.log(user4.printPlacesLived());
const multiplier = {
numbers: [1, 3, 7],
multiplyBy: 8,
multiply() {
return this.numbers.map((number) => number*this.multiplyBy); }
};
console.log(multiplier.multiply());
|
import App from '../App'
//事务模块
// const affairList = resolve => require(['../page/affair/affairList'], resolve);
// const affairDetail = resolve => require(['../page/affair/affairDetail'], resolve);
//单元模块
const unitInfoALL = resolve => require(['../page/unitInfo/unitInfoALL'], resolve);
const unitInfoAllMap = resolve => require(['../page/unitInfo/unitInfoAllMap'], resolve);
//预定模块
const reserveList = resolve => require(['../page/reserve/reserveList'], resolve);
const reserveDetail = resolve => require(['../page/reserve/reserveDetail'], resolve);
const reserveRemark = resolve => require(['../page/reserve/reserveRemark'], resolve);
const reserveAdd = resolve => require(['../page/reserve/reserveAdd'], resolve);
const reserveEdit = resolve => require(['../page/reserve/reserveEdit'], resolve);
const reserveAddFromUint = resolve => require(['../page/reserve/reserveAddFromUint'], resolve);
// 商机模块
const businessAdd = resolve => require(['../page/business/businessAdd'], resolve);
const businessEdit = resolve => require(['../page/business/businessEdit'], resolve);
const businessDetail = resolve => require(['../page/business/businessDetail'], resolve);
const businessList = resolve => require(['../page/business/businessList'], resolve);
const businessTrackList = resolve => require(['../page/business/children/businessTrackList'], resolve);
const businessTackAdd = resolve => require(['../page/business/children/businessTackAdd'], resolve);
const businessTransfer = resolve => require(['../page/business/children/businessTransfer'], resolve);
const businessLost = resolve => require(['../page/business/children/businessLost'], resolve);
// 客户模块
const clientList = resolve => require(['../page/client/clientList'], resolve);
const clientAdd = resolve => require(['../page/client/clientAdd'], resolve);
const clientDetail = resolve => require(['../page/client/clientDetail'], resolve);
// 合同模块
// const contractDetail = resolve => require(['../page/contract/contractDetail'], resolve);
// const contractList = resolve => require(['../page/contract/contractList'], resolve);
// 工作流审批流程
const addSign = resolve => require(['../page/workFlow/addSign'], resolve);
const workFlowSubmit = resolve => require(['../page/workFlow/workFlowSubmit'], resolve);
const WorkFlowReject = resolve => require(['../page/workFlow/WorkFlowReject'], resolve);
const WorkFlowAgree = resolve => require(['../page/workFlow/WorkFlowAgree'], resolve);
const notFound = resolve => require(['../page/404/notFound'], resolve);
export default [{
path: '',
redirect: '/businessList'
},
//工作流模块
{
path: '/addSign/:id', //审批加签
component: addSign,
name: 'addSign'
},
{
path: '/workFlowSubmit/:id', //提交
component: workFlowSubmit,
name: 'workFlowSubmit'
},
{
path: '/WorkFlowReject/:id', //审批驳回
component: WorkFlowReject,
name: 'WorkFlowReject'
},
{
path: '/WorkFlowAgree/:id', //审批同意
component: WorkFlowAgree,
name: 'WorkFlowAgree'
},
// //事务管理模块
// {
// path: '/affairList', //事务列表
// component: affairList,
// name: 'affairList',
// // meta: {
// // keepAlive: true,
// // isBack: false
// // }
// },
// {
// path: '/affairDetail/:id', //事务详情审批
// component: affairDetail,
// name: 'affairDetail'
// },
//单元模块
{
path: '/unitInfoALL', //单元信息所有
name: 'unitInfoALL',
component: unitInfoALL,
},
{
path: '/unitInfoAllMap', //单元信息平面图
name: 'unitInfoAllMap',
component: unitInfoAllMap,
},
//商机模块
{
path: '/businessAdd', //新增商机
name: 'businessAdd',
component: businessAdd,
},
{
path: '/businessEdit', //商机编辑
name: 'businessEdit',
component: businessEdit,
},
{
path: '/businessDetail/:id', //商机详情
name: 'businessDetail',
component: businessDetail,
},
{
path: '/businessTrackList/:id', //商机跟踪记录
name: 'businessTrackList',
component: businessTrackList,
},
{
path: '/businessTackAdd', //商机跟踪记录新增
name: 'businessTackAdd',
component: businessTackAdd,
},
{
path: '/businessTransfer', //商机移交
name: 'businessTransfer',
component: businessTransfer,
},
{
path: '/businessLost', //商机流失
name: 'businessLost',
component: businessLost,
},
{
path: '/businessList', //商机管理
name: 'businessList',
component: businessList,
},
//客户模块
{
path: '/clientList', //客户列表
name: 'clientList',
component: clientList,
},
{
path: '/clientAdd', //客户新增
name: 'clientAdd',
component: clientAdd,
},
{
path: '/clientDetail/:id', //客户详情
name: 'clientDetail',
component: clientDetail,
},
// //合同模块
// {
// path: '/contractDetail/:id', //合同详情
// name: 'contractDetail',
// component: contractDetail,
// },
// {
// path: '/contractList', //合同列表
// name: 'contractList',
// component: contractList,
// },
//预定模块
{
path: '/reserveList', //预定列表
name: 'reserveList',
component: reserveList,
// meta: {
// keepAlive: true,
// isBack: false
// }
},
{
path: '/reserveDetail/:id', //预定详情
name: 'reserveDetail',
component: reserveDetail,
meta: {
isLoad: false, //是否需要重载
}
},
{
path: '/reserveRemark', //预定详情备注
name: 'reserveRemark',
component: reserveRemark,
},
{
path: '/reserveAdd', //预定新增
name: 'reserveAdd',
component: reserveAdd,
},
{
path: '/reserveEdit', //预定编辑
name: 'reserveEdit',
component: reserveEdit,
},
{
path: '/reserveAddFromUint', //预定新增
name: 'reserveAddFromUint',
component: reserveAddFromUint,
},
]
|
import {Component} from 'react'
import './index.css'
class DistrictData extends Component {
componentDidMount() {
this.getDistrictData()
}
getDistrictData = async () => {
const response = await fetch(
'https://data.covid19india.org/v4/min/data.min.json',
)
const data = await response.json()
console.log(data)
}
render() {
return (
<div className="districts-container">
<h1 className="districts-heading">Top Districts</h1>
</div>
)
}
}
export default DistrictData
|
// pages/home/index.js
const app = getApp();
const config = require("../../utils/config.js");
const userService = require("../../service/userService.js");
const couponService = require("../../service/couponService.js");
const depositService = require("../../service/depositService.js");
Page({
/**
* 页面的初始数据
*/
data: {
userInfo: null, // 用户
couponList: [], // 优惠券列表
pointGoodsList: [
{
brand: "BOBO", // 品牌
type: "奶瓶", // 商品
amount: 20, // 价格
point: 180, // 积分
},
{
brand: "AUBY", // 品牌
type: "婴儿牙胶棒", // 商品
amount: 30, // 价格
point: 550, // 积分
},
{
brand: "PIGEON", // 品牌
type: "奶嘴", // 商品
amount: 50, // 价格
point: 220, // 积分
},
],// 积分商品
projectList: [
{
name: "宝宝游泳馆",
},
{
name: "产后中心",
},
{
name: "早教中心",
},
], // 项目
depositGoodsList: [
{
name: "雅培1段900g配方奶粉",
count: 12,
unit: "罐"
},
{
name: "花王尿不湿M码",
count: 4,
unit: "箱"
},
{
name: "施巴婴儿沐浴洗发露140ml",
count: 2,
unit: "瓶"
},
{
name: "中式和尚服",
count: 1,
unit: "件"
},
], // 寄存商品
},
/** ======================================= */
/** 生命周期 */
/** ======================================= */
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let that = this;
userService.checkLogin(function alreadyLoginCallback(state){
if (state) {
that.setData({
userInfo: userService.getUserInfo()
})
}
},false)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this;
userService.checkLogin(function alreadyLoginCallback(state) {
if (state) {
couponService.getMyCouponList(userService.getMemberNo(), null ,
function getCouponSuccessCallback(responseData) {
that.setData({
couponList: responseData
})
},
function getCouponCompleteCallback() {
}
);
depositService.getDepositGoods(userService.getMemberNo, config.Deposit_Type_Current, 0, 5,
function getDepositSuccessCallback(responseData) {
},
function getDepositCompleteCallback() {
}
)
}
}, false)
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/** ======================================= */
/** 页面事件 */
/** ======================================= */
/**
* 点击客服按钮
*/
tapCustomerService: function () {
// 拨打客服电话
wx.makePhoneCall({
phoneNumber: config.Service_Phone,
})
},
/**
* 点击设置按钮
*/
tapSetting: function () {
console.log("点击设置按钮");
// 跳转设置页面
wx.navigateTo({
url: config.Page_Personal_EditPersonal,
})
},
/**
* 点击注册|登陆
*/
tapLoginOrRegister: function () {
console.log("点击注册|登陆");
let that = this;
userService.login(function loginCallback(state, msg){
// 登陆成功
if (state == config.Res_Code_Success) {
that.setData({
userInfo: userService.getUserInfo()
})
}
});
},
/**
* 获取成长值
*/
tapGetGrowthValue: function () {
console.log("获取成长值");
//
},
/**
* 余额充值
*/
tapBalanceRecharge: function () {
console.log("余额充值");
wx.navigateTo({
url: config.Page_Balance_BalanceRecharge,
})
},
/**
* 余额明细
*/
tapBalanceDetail: function () {
console.log("余额明细");
wx.navigateTo({
url: config.Page_Balance_BalanceDetail,
})
},
/**
* 点击我的二维码
*/
tapQRCode: function () {
console.log("点击我的二维码");
// 跳转二维码页面 展示二维码
wx.navigateTo({
url: config.Page_Personal_QRCode,
})
},
/**
* 点击优惠券明细
*/
tapCouponDetail: function () {
console.log("点击优惠券明细");
wx.navigateTo({
url: config.Page_Coupon_CouponList,
})
},
/**
* 点击领券
*/
tapReceiveCoupon: function () {
console.log("点击领券");
wx.navigateTo({
url: config.Page_Coupon_ReceiveCoupon,
})
},
/**
* 点击优惠券
*/
tapCoupon: function(e) {
console.log("点击优惠券 couponIndex:" + e.currentTarget.dataset.couponindex);
let tempCoupon = this.data.couponList[e.currentTarget.dataset.couponindex];
wx.navigateTo({
url: config.Page_QRCode_Index + "?code=" + tempCoupon.couponNo + "&type=" + config.QRCode_Type_Coupon,
})
},
/**
* 点击积分明细
*/
tapPointDetail: function () {
console.log("点击积分明细");
wx.navigateTo({
url: config.Page_Point_PointDetail,
})
},
/**
* 点击积分兑换
*/
tapExchange: function () {
console.log("点击积分兑换");
wx.navigateTo({
url: config.Page_Point_PointExchange,
})
},
/**
* 点击兑换商品
*/
tapPointGoods: function (e) {
console.log("兑换商品 goodsIndex:" + e.currentTarget.dataset.goodsindex);
},
/**
* 点击项目储值明细
*/
tapProjectDetail: function () {
console.log("点击项目储值明细");
wx.navigateTo({
url: config.Page_Project_ProjectIndex,
})
},
/**
* 点击项目储值充值
*/
tapProjectRecharge: function () {
console.log("点击项目储值充值");
wx.navigateTo({
url: config.Page_Project_ProjectRecharge,
})
},
/**
* 点击储值项目
*/
tapProject: function (e) {
console.log("储值项目 projectIndex:" + e.currentTarget.dataset.projectindex);
},
/**
* 点击寄存商品明细
*/
tapDepositDetail: function () {
console.log("点击寄存商品明细");
wx.navigateTo({
url: config.Page_DepositGoods_DepositGoodsDetail,
})
},
/**
* 点击取商品
*/
tapReceiveDeposit: function () {
console.log("点击取商品");
wx.navigateTo({
url: config.Page_DepositGoods_DepositGoodsDetail,
})
},
/**
* 点击会员权益
*/
tapVipRight: function () {
console.log("点击会员权益");
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
})
|
var mongoose = require('mongoose')
var RecordSchema = new mongoose.Schema({
year: {
type: String,
required: [true, "can't be blank"],
match: [/\d{4}[MY]/, 'is invalid']
},
keyList: [String],
businessSegments: [{
business: {
type: String,
required: [true, "can't be blank"]
},
grossProfitMargin: Number,
share: {
type: Number,
min: 0,
max: 100,
default: 0
}
}],
grossProfitMargin: {
type: Number,
min: 0,
max: 100,
default: 0
},
plans: [{
plan: {
type: String,
required: [true, "can't be blank"]
},
executed: {
type: String,
match: [/\d{4}[MY]/, 'is invalid']
}
}],
actionsDone: [{
type: String,
required: [true, "can't be blank"]
}]
}, { timestamps: true })
RecordSchema.methods.toJSONFor = function(){
return {
updatedAt: this.updatedAt,
year: this.year,
keyList: this.keyList,
businessSegments: this.businessSegments,
grossProfitMargin: this.grossProfitMargin,
plans: this.plans,
actionsDone: this.actionsDone
}
}
RecordSchema.methods.toJSONForAdmin = function(){
return {
symbol: this.company.symbol,
year: this.year,
author: this.company.author.toJSONFor()
}
}
mongoose.model('Record', RecordSchema)
|
module.exports = function(app) {
Ember.TEMPLATES['components/svg-i'] = require('./template.hbs');
require('./style.less');
app.SvgIComponent = Ember.Component.extend({
mIcon: '',
icon: 'close',
icons: require('../../../svg-icons'),
size: 0,
tagName: 'i',
didInsertElement() {
this.$().attr('title', this.get('title'));
},
iconObserver: function() {
var icon = this.get('icon');
this.setProperties({
'mIcon': this.get(`icons.${icon}`),
classNames: ['svg-i', `svg-icon-${icon}`],
});
}.observes('icon').on('init'),
});
};
|
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'login',
component: ()=>import('@/pages/login.vue')
},
{
path: '/register',
name: 'register',
component: ()=>import('@/pages/register.vue')
},
{
path: '/resetPassword',
name: 'resetPassword',
component: ()=>import('@/pages/resetPassword.vue')
},
{
path: '/home',
name: 'home',
component: ()=>import('@/pages/home.vue'),
},
{
path: '/tagManage',
name: 'tagManage',
component: ()=>import('@/pages/tagManage.vue'),
},
{
path: '/ele',
name: 'ele',
component: ()=>import('../components/simpleUploadImg.vue'),
},
]
})
|
import React from 'react';
import './App.css';
import Timer from "./timeManager.js";
import Dropdown from "./dropdown.js";
import Header from "./header.js";
import Calendar from "./calendar.js";
import Lunch from "./lunch.js";
import List from "./scheduleList.js";
import ButtonBar from "./buttonBar.js";
import Job from "./Unrelated.js";
function App() {
return (
<div className="App">
<Header />
<div className="mainContent">
<div className="lunchPage">
<Lunch />
</div>
</div>
</div>
);
}
export default App;
|
import { StyleSheet } from 'react-native'
import { metrics, colors, fonts } from '../../styles'
const styles = StyleSheet.create({
container: {
backgroundColor: colors.primary,
height: 56,
width: 56,
borderRadius: 28,
position: 'absolute',
right: metrics.padding,
bottom: metrics.padding,
alignItems: 'center',
justifyContent: 'center',
elevation: 2,
},
icon: {
color: colors.white,
},
})
export default styles
|
import ReactDom from "react-dom";
import Highlight from "highlight.js";
function RenderService(){
const APP_CONTAINER_ID = "app";
const CODE_BLOCKS_TAG_NAME = "code";
function render({content}){
const appContainer = document.getElementById(APP_CONTAINER_ID);
ReactDom.unmountComponentAtNode(appContainer);
appContainer.innerHTML = content;
}
function renderWithCodeBlockHighlighting({content}){
render({content: content});
const codeBlocks = document.getElementsByTagName(CODE_BLOCKS_TAG_NAME);
Array.prototype.forEach.call(codeBlocks, codeBlock => Highlight.highlightBlock(codeBlock));
}
function reactRender({component}){
ReactDom.render(
component,
document.getElementById(APP_CONTAINER_ID))
}
return {
render: render,
renderWithCodeBlockHighlighting: renderWithCodeBlockHighlighting,
reactRender: reactRender
};
}
module.exports = RenderService;
|
(function ($) {
if (window == top) {
//Global shortcuts
$.shortcuts.add(window, "CS+1", function () {
var tree = UmbClientMgr.mainTree()._tree;
if (tree) {
window.focus(); //Bug, at least in chrome. If window.focus has been called on another window, .focus() methods will not work on elements unless their windows are focused.
tree.settings.plugins.keyboard.focus();
}
}, { cue: "#treeWindow_innerContent" });
//Used to get tray links and then tabs in the content frame in the same shortcut sequence
function trayAndTabsHandler(n, execute) {
var trays = $("#tray li a");
if (n < trays.length) {
var link = trays.eq(n);
if (execute) {
link.click();
} else {
return link;
}
}
n -= trays.length;
return tabsHandler(n, execute);
};
function tabsHandler(n, execute) {
var contentWin, contentDoc;
try {
//Bypass cross domain errors
contentWin = UmbClientMgr.contentFrame();
contentDoc = contentWin.document;
} catch (e) { }
if (contentDoc) {
var tabs = $(".tabOn a,.tabOff a", contentDoc);
if (!tabs.length) {
if (n == 0) {
//No tabs. Just focus content frame
if (execute) {
focusPropertyPage($("body", contentDoc), contentWin);
} else {
return $(contentWin.frameElement);
}
}
} else {
if (n >= 0 && n < tabs.length) {
var link = tabs.eq(n);
if (execute) {
link.click();
var tabPageID = link.parent().attr("id") + "layer";
//Do more than just "click" the tab. Also select the first focusable element on the tab page
var tabRoot = link.parent()/*li*/.parent()/*ul*/.parent()/*div.header*/.parent();
var tabPage = $("#" + tabPageID + " > div.tabpagescrollinglayer", contentDoc);
focusPropertyPage(tabPage, contentWin);
} else {
return link;
}
}
}
}
return null;
}
$.shortcuts.add(window, "CS+[#]", function (n) { trayAndTabsHandler(n, true); }, { cue: trayAndTabsHandler, start: 1, max: 12 /* until C */ });
$.shortcuts.add(window, "CSA+[#]", function (n) { tabsHandler(n, true); }, { cue: tabsHandler, max: 12 /* until C */ });
$.shortcuts.add(window, "TreeMenu+[#]", "#jstree-contextmenu:visible li:visible a", {
cuePos: { my: "left center", at: "left center" }
});
$.shortcuts.add(window, "CS+S", function () { $("#umbSearchField").focus() }, { cue: "#umbSearchField", enabled: function () { return $("#umbSearchField").is(":visible"); } });
$.shortcuts.add(window, "CS+U,CS+A", "button.topBarButton:eq(1)", { final: true, fade: true });
$.shortcuts.add(window, "CS+H", "button.topBarButton:eq(2)", { final: true });
$.shortcuts.add(window, "CS+L", "button.topBarButton:eq(3)", { final: true });
function focusPropertyPage(scope, contentWin) {
var sections = $(".propertypane", scope);
if (sections.length) {
focusEls = $("a, :input", sections);
//:visible is really slow in ie.
var match = false;
if (focusEls.length) {
for (var i = 0; i < focusEls.length; i++) {
var el = focusEls.eq(i);
if (el.is(":visible")) {
//Focus the first normal focusable element
contentWin.focus();
el.focus();
match = true;
break;
}
}
}
if (!match) {
try {
-//Try to focus the first tinyMCE editor if any
contentWin.tinyMCE.execCommand('mceFocus', false, $("textarea:first", sections).attr("id"));
} catch (e) { }
}
}
}
} else {
//Frame specific shortcuts
//Not working, yet: $.shortcuts.add(window, "CSA+[#]", ".menubar:visible a:visible, .menubar:visible input:visible");
}
})(jQuery);
|
import {
SET_START_LOADING_PROGRESS
} from '../actions/startLoadingProgress';
const initialState = {
confirmations : 6,
progress : 0
};
export default function (state = initialState, action) {
switch (action.type) {
case SET_START_LOADING_PROGRESS :
return {...state, ...action.action}
default:
return state;
}
}
|
import React from "react";
import { List, ListItem} from 'framework7-react';
import crypto from 'crypto-js';
const RoleList = (props) => {
if (props.roles) {
return (
<List mediaList>
{props.roles.map((role) =>
<ListItem
key={crypto.lib.WordArray.random(32)}
link={"/roles/" + role.id}
ignoreCache={true}
title={role.title}
after=""
subtitle=""
text=""
></ListItem>
)}
</List>
)} else {
return (<ul></ul>)
}
}
export default RoleList;
|
let second = document.getElementById('second').innerHTML;
class taskTimer {
constructor(sec) {
this.defaultSec = sec;
this.timerID = 0;
second = this.defaultSec;
}
getTime() {
function fixTimer(value) {
let str = String(value);
let result = (value < 10 && str.length === 1) ? "0" + value : value;
return result;
}
if (second > 0) {
second--;
}
document.getElementById('second').innerHTML = fixTimer(second);
if (second == 0) {
clearInterval(this.timerID);
}
}
startTimer() {
second = this.defaultSec;
this.timerID = setInterval(this.getTime, 1000);
}
stopTimer() {
clearInterval(this.timerID);
}
value() {
return second;
}
setValue(value) {
second = value;
}
}
module.exports = taskTimer;
|
describe("Reverse Last Two Letters", function() {
it("swaps last 2 letters", function() {
expect(reverseLastTwoCharacters("OH")).toBe("HO");
});
});
describe("Reverse Last Two Letters", function() {
it("swaps last 2 letters", function() {
expect(reverseLastTwoCharacters("OH")).toBe("HO");
});
});
|
/*
index.js:Webpage入口起点文件
安装webpage指令:
1 先初始化一个package.json文件
1.1 npm init
1.2 输入名称
1.3 一直回车即可
2 npm i webpack@4.41.6 webpack-cli@3.3.11 -g 这个是全局安装
只安装了全局的就可以
3 npm i webpack@4.41.6 webpack-cli@3.3.11 -D 这个是开发包
4 node 执行代码 node .\build\built.js 相当于右键 run code
1.运行指令:
开发环境:webpack ./src/index.js -o ./build/built.js --mode=development
生成环境:webpack ./src/index.js -o ./build/built.js --mode=production
2.结论:
2.1 webpage能处理js/json,不能处理css/img等其他资源
2.2 生成环境和开发环境的对比
2.3
*/
import data from './data.json';
console.log(data);
import './index.css'
function add(x,y){
return x+y;
}
console.log(add(1,2));
|
import { createStore } from "redux";
import rootReducer from "./modules";
import dataManager from "./modules/dataManager";
const store = createStore(dataManager(rootReducer));
export default store;
|
/**
* @param {number[][]} bookings
* @param {number} n
* @return {number[]}
*/
var corpFlightBookings = function(bookings, n) {
flights = {};
for (let i = 1; i <= n; i++) {
flights[i] = 0;
}
for (let i = 0; i < bookings.length; i++) {
for (let j = bookings[i][0]; j <= bookings[i][1]; j++) {
if (j in flights) {
flights[j] += bookings[i][2];
} else {
flights[j] = bookings[i][2];
}
}
}
res = [];
flNumber = Object.keys(flights);
for (let i = 1; i <= n; i++) {
if (i === parseInt(flNumber[i - 1])) {
res.push(flights[i]);
}
}
return res;
};
|
import React from 'react'
class IntroPage extends React.Component {
render() {
return (
<div className="intropage" >
<h1>Handy Dandy</h1>
<p>A place where people like you can hire or get hired to do something they good at!</p>
</div>
)
}
}
export default IntroPage;
|
import React, {Component} from 'react';
class Cate extends Component {
constructor(props) {
super(props);
this.onCateSelect = this.onCateSelect.bind(this);
}
onCateSelect() {
this.props.selectCate(this.props.cate.id);
}
render() {
return (
<ul className="kid-menu" style={{display: 'none'}}>
<li key={this.props.cate.id}><a href="#" onClick={this.onCateSelect}> {this.props.cate.name}</a></li>
</ul>
)
}
}
export default Cate;
|
/** @format */
import React, { useState, useEffect } from 'react';
import axios from 'axios';
import { makeStyles } from '@material-ui/core/styles';
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core/TableCell';
import TableContainer from '@material-ui/core/TableContainer';
import TableRow from '@material-ui/core/TableRow';
import Paper from '@material-ui/core/Paper';
import Chip from '@material-ui/core/Chip';
import Divider from '@material-ui/core/Divider';
import { Link } from 'react-router-dom';
import Form from './Form';
import UpdateForm from './UpdateForm';
import { toast, ToastContainer } from 'react-toastify';
const useRowStyles = makeStyles((theme) => ({
root: {
'& > *': {
borderBottom: 'unset',
},
},
}));
const toastOptions = {
position: 'top-center',
autoClose: 5000,
hideProgressBar: true,
closeOnClick: true,
pauseOnHover: false,
draggable: false,
progress: undefined,
};
function Mentors() {
const [mentors, setMentors] = useState([]);
const [change, setChange] = useState(false);
const [loading, setLoading] = useState(false);
const [id, setId] = useState('');
const classes = useRowStyles();
const [open, setOpen] = React.useState(false);
const handleClickOpen = (id) => {
setOpen(true);
setId(id);
};
const handleClose = () => {
setOpen(false);
};
const showTasks = () => {};
const getMentors = async () => {
const res = await axios.get('/admin');
setMentors(res.data.data);
};
const deleteProduct = async (id) => {
try {
setLoading(true);
const res = await axios.delete(`admin/${id}`);
setChange(!change);
getMentors();
setLoading(false);
toast.success('product deleted successfully', {
position: 'top-center',
autoClose: 5000,
hideProgressBar: false,
closeOnClick: true,
pauseOnHover: true,
draggable: true,
progress: undefined,
});
} catch (err) {
toast.error(err.response.data.message, {
position: 'top-center',
autoClose: 5000,
hideProgressBar: false,
closeOnClick: true,
pauseOnHover: true,
draggable: true,
progress: undefined,
});
}
};
useEffect(() => {
getMentors();
}, [change]);
return (
<TableContainer component={Paper}>
{open && (
<UpdateForm
change={change}
setChange={setChange}
open={open}
setOpen={setOpen}
handleClose={handleClose}
id={id}
/>
)}
<div
style={{
display: 'flex',
flexDirection: 'row',
justifyContent: 'space-between',
}}
>
<h3 style={{ paddingLeft: '30px' }}>All mentors</h3>
<Form setChange={setChange} change={change} />
</div>
<ToastContainer />
<Divider />
<Table aria-label="collapsible table">
<TableBody>
{mentors.map((mentor) => (
<React.Fragment key={mentor._id}>
<TableRow className={classes.root}>
<TableCell component="th" scope="row">
{mentor.name}
</TableCell>
<TableCell align="right">
<Chip
color="primary"
onClick={() => handleClickOpen(mentor._id)}
label="Update"
clickable
/>
</TableCell>
<TableCell align="right">
<Chip
onClick={() => deleteProduct(mentor._id)}
color="secondary"
label="Delete"
clickable
/>
</TableCell>
<TableCell align="right">
<Link to={`/admin/${mentor._id}`}>
<Chip color="primary" label="show tasks" clickable />
</Link>
</TableCell>
</TableRow>
</React.Fragment>
))}
</TableBody>
</Table>
</TableContainer>
);
}
export default Mentors;
|
var http = require('http');
var fs = require('fs');
var url = require('url');
var mongodb = require("mongodb");
var port = 8085;
var MongoClient = mongodb.MongoClient;
var collections = {
animale: null, //done
electronice: null, //done
useri: null, //done
haine: null, //done
bijuterii: null, //done
tichete: null, //done
accesorii: null, //done
bani: null, //done
jucarii: null, //done
messages: null //done
};
Init = function (callback) { // make a module for that ?
MongoClient.connect(
"mongodb://localhost:27017/lost_and_found",
function (err, db) {
if (!err) {
console.log("[Init] MongoClient we are conected");
collections.jucarii = db.collection('jucarii');
if (collections.jucarii != null) {
console.log("connected to 'jucarii' collection ");
} else {
console.log(" collections.jucarii is NULL ");
}
collections.bani = db.collection('bani');
if (collections.bani != null) {
console.log("connected to 'bani' collection ");
} else {
console.log(" collections.bani is NULL ");
}
collections.accesorii = db.collection('accesorii');
if (collections.accesorii != null) {
console.log("connected to 'accesorii' collection ");
} else {
console.log(" collections.accesorii is NULL ");
}
collections.tichete = db.collection('tichete');
if (collections.tichete != null) {
console.log("connected to 'tichete' collection ");
} else {
console.log(" collections.tichete is NULL ");
}
collections.bijuterii = db.collection('bijuterii');
if (collections.bijuterii != null) {
console.log("connected to 'bijuterii' collection ");
} else {
console.log(" collections.bijuterii is NULL ");
}
collections.haine = db.collection('haine');
if (collections.haine != null) {
console.log("connected to 'haine' collection ");
} else {
console.log(" collections.haine is NULL ");
}
collections.animale = db.collection('animale');
if (collections.animale != null) {
console.log("connected to 'animale' collection ");
} else {
console.log(" collections.animale is NULL ");
}
collections.useri = db.collection('useri');
if (collections.useri != null) {
console.log("connected to 'useri' collection ");
} else {
console.log(" collections.user is NULL ");
}
collections.electronice = db.collection('electronice');
if (collections.electronice != null) {
console.log("connected to 'electronice' collection ");
} else {
console.log("'collections.electronice' is NULL ");
}
// de adaugat modificat colectii in functie de ce avem nevoie ...
} else {
console.log(err);
}
callback;
}
);
};
Init(null);
function send404Response(response) {
response.writeHead(404, {
"Content-Type": "text/plain"
});
response.write("Error 404: Page not found! ");
response.end();
}
function parseCookies(request) {
var list = {},
rc = request.headers.cookie;
rc && rc.split(';').forEach(function (cookie) {
var parts = cookie.split('=');
list[parts.shift().trim()] = decodeURI(parts.join('='));
});
return list;
}
http.createServer(function (request, response) {
console.log(request.url);
var par = url.parse(request.url, true);
var cookies = parseCookies(request);
console.log(cookies);
if (request.method == "GET")
switch (par.pathname) {
case '/images/profile.png':
{
response.writeHead(200, {"Content-Type": "image/png"});
fs.createReadStream("./images/profile.png").pipe(response);
break;
}
case '/images/header.png':
{
response.writeHead(200, {"Content-Type": "image/png"});
fs.createReadStream("./images/header.png").pipe(response);
break;
}
case '/images/cauta.png':
{
response.writeHead(200, {"Content-Type": "image/png"});
fs.createReadStream("./images/cauta.png").pipe(response);
break;
}
case '/images/returneaza.png':
{
response.writeHead(200, {"Content-Type": "image/png"});
fs.createReadStream("./images/returneaza.png").pipe(response);
break;
}
case '/images/index.png':
{
response.writeHead(200, {"Content-Type": "image/png"});
fs.createReadStream("./images/index.png").pipe(response);
break;
}
case '/images/profilephoto.png':
{
response.writeHead(200, {"Content-Type": "image/png"});
fs.createReadStream("./images/profilephoto.png").pipe(response);
break;
}
case '/css/homepage.css':
{
response.writeHead(200, {"Content-Type": "text/css"});
fs.createReadStream("./css/homepage.css").pipe(response);
break;
}
case '/css/homepagePrinc.css':
{
response.writeHead(200, {"Content-Type": "text/css"});
fs.createReadStream("./css/homepagePrinc.css").pipe(response);
break;
}
case '/css/login.css':
{
response.writeHead(200, {"Content-Type": "text/css"});
fs.createReadStream("./css/login.css").pipe(response);
break;
}
case '/css/contul.css':
{
response.writeHead(200, {"Content-Type": "text/css"});
fs.createReadStream("./css/contul.css").pipe(response);
break;
}
case '/css/gasite.css':
{
response.writeHead(200, {"Content-Type": "text/css"});
fs.createReadStream("./css/gasite.css").pipe(response);
break;
}
case '/css/mesaje.css':
{
response.writeHead(200, {"Content-Type": "text/css"});
fs.createReadStream("./css/mesaje.css").pipe(response);
break;
}
case '/css/new.css':
{
response.writeHead(200, {"Content-Type": "text/css"});
fs.createReadStream("./css/new.css").pipe(response);
break;
}
case '/css/newMessage.css':
{
response.writeHead(200, {"Content-Type": "text/css"});
fs.createReadStream("./css/newMessage.css").pipe(response);
break;
}
case '/css/pierdute.css':
{
response.writeHead(200, {"Content-Type": "text/css"});
fs.createReadStream("./css/pierdute.css").pipe(response);
break;
}
case '/css/register.css':
{
response.writeHead(200, {"Content-Type": "text/css"});
fs.createReadStream("./css/register.css").pipe(response);
break;
}
default:
{
if (!cookies.user)
{
switch (par.pathname)
{
case '/' :
{
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/indexPrincipal.html").pipe(response);
break;
}
case '/index.html' :
{
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/indexPrincipal.html").pipe(response);
break;
}
case '/indexPrincipal.html':
{
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/indexPrincipal.html").pipe(response);
break;
}
case '/login.html':
{
if (!par.query.id_utilizator) {
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/login.html").pipe(response);
} else {
var item = {
_id: par.query.id_utilizator,
pass: par.query.parola
};
console.log(item);
collections.useri.findOne({_id: par.query.id_utilizator},
function (err, user) {
if (user)
if (user._id) { // , parola: par.query.parola}
if (par.query.parola == user.parola) {
console.log("credintiale corecte");
var pas = Math.random() * (999999 - 100000) + 100000;
// collections.useri.update({_id: par.query.id_utilizator}, {status: "logged", pass: pas}, function (err) {});
var cookie1 = 'user=' + par.query.id_utilizator;
response.writeHead(200, {
'Set-Cookie': cookie1,
"Content-Type": "text/html"}
);
fs.createReadStream("./html pages/index.html").pipe(response);
}
} else {
console.log("credentiale gresite");
}
if (err)
console.log(err);
}
);
}
break;
}
case '/register.html':
{
if (!par.query.nume) {
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/register.html").pipe(response);
} else {
var item = {
_id: par.query.id_utilizator,
nume: par.query.nume,
prenume: par.query.prenume,
parola: par.query.parola,
email: par.query.email,
status: "log",
pass: "123"
};
collections.useri.findOne({_id: par.query.id_utilizator}, function (err, user) {
if (user === null) {
collections.useri.insert(item, function (err, res) {
if (err)
console.log(err);
console.log("Number of records inserted: " + res.insertedCount);
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/login.html").pipe(response);
});
} else {
console.log("aces id_utilizator exista deja"); // de returna pe pagina
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/login.html").pipe(response);
}
});
}
break;
}
default:
{
send404Response(response); // or you need to log in in order to continue;
}
}
} else {
console.log("logged");
collections.useri.findOne({_id: cookies.user}, /* , status: "logged", pass: cookies.pass*/
function (err, user)
{
if (err) {
console.log(err);
console.log("eroare")
}
if (user) {
console.log("FOUND")
switch (par.pathname) {
case '/contul.html':
{
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/contul.html").pipe(response);
break;
}
case '/':
{
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/index.html").pipe(response);
break;
}
case '/index.html':
{
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/index.html").pipe(response);
break;
}
case '/gasite.html':
{
if (!par.query.anunturi) {
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/gasite.html").pipe(response);
}
break;
}
case '/gasite':
{
if (par.query.anunturi == 1)
collections.electronice.find({'stare': "gasit"}).toArray(function (err, items) {
//console.log(items);
response.writeHead(200, {"Content-Type": "text/html"});
response.write("<table>");
for (i = 0; i < items.length; i++) {
response.write("<tr>");
response.write("<th> _id " + JSON.stringify(items[i]._id));
response.write("<th> ziua " + JSON.stringify(items[i].ziua));
response.write("<th> luna " + JSON.stringify(items[i].luna));
response.write("<th> categoria " + JSON.stringify(items[i].categoria));
response.write("</tr>");
//response.write(JSON.stringify(items));
}
response.write("</table>");
response.end();
})
break;
}
case '/pierdute.html':
{
if (!par.query.anunturi) {
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/pierdute.html").pipe(response);
} else {
collections.electronice.find({'stare': "pierdut"}).toArray(function (err, items) {
//console.log(items);
response.writeHead(200, {"Content-Type": "text/plain"});
response.write(JSON.stringify(items));
response.end();
})
}
break;
}
case '/pierdute':
{
if (par.query.anunturi) {
collections.electronice.find({'stare': "pierdut"}).toArray(function (err, items) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.write(JSON.stringify(items));
response.end();
})
}
break;
}
case '/new.html':
{
if (!par.query.titlul) {
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/new.html").pipe(response);
} else {
var item = {
_id: par.query.titlul,
ziua: par.query.Ziua,
luna: par.query.Luna,
anul: par.query.Anul,
Categoria: par.query.Categoria,
stare: par.query.stare,
//poza :par.query.poza,
descriere: par.query.descriere
}
collections[par.query.Categoria].findOne({_id: par.query.titlul}, function (err, user) {
if (user === null) {
collections[par.query.Categoria].insert(item, function (err, res) {
if (err)
console.log(err);
console.log("Number of records inserted: " + res.insertedCount);
response.writeHead(200, {
"Content-Type": "text/html"
});
fs.createReadStream("./html pages/AnuntCreat.html").pipe(response);
});
} else {
console.log("titlul anuntului este deja in baza de date la aceasta categorie"); // de returna pe pagina
response.writeHead(200, {
"Content-Type": "text/html"
});
fs.createReadStream("./html pages/AnuntNeCreat.html").pipe(response);
}
});
}
break;
}
case '/reports.html':
{
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/reports.html").pipe(response);
break;
}
case '/mesaje.html':
{
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/mesaje.html").pipe(response);
break;
}
case '/newMessage.html':
{
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/newMessage.html").pipe(response);
break;
}
case '/mesajeTrimise.html':
{
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/mesajeTrimise.html").pipe(response);
break;
}
case '/obiecteleMele.html':
{
response.writeHead(200, {"Content-Type": "text/html"});
fs.createReadStream("./html pages/obiecteleMele.html").pipe(response);
break;
}
default:
{
send404Response(response);
}
}
} else {
send404Response(response);
console.log("user null")
// response.write ( you need to login insend404Response(response);
}
});
}
}
}
}).listen(port);
console.log("listening on port " + port);
|
cc.Class({
extends: cc.Component,
properties: {
point1List: [cc.Node],
point2List: [cc.Node],
point3List: [cc.Node],
point4List: [cc.Node],
point5List: [cc.Node],
goldList: [cc.Node],
pufferModList: [cc.Node],
citieList: [cc.Node],
scene: [],
buildCount: 0
},
start: function() {
for (var C, S = this, t = (cc.instantiate(this.point1List[0]), 0); 4 > t; t++) C = cc.instantiate(this.point1List[0]),
C.parent = this.point1List[0].parent, this.point1List[this.point1List.length] = C;
for (var e, o = 0; 4 > o; o++) e = cc.instantiate(this.point2List[0]), e.parent = this.point2List[0].parent,
this.point2List[this.point2List.length] = e;
for (var n, i = 0; 4 > i; i++) n = cc.instantiate(this.point3List[0]), n.parent = this.point3List[0].parent,
this.point3List[this.point3List.length] = n;
for (var a, r = 0; 4 > r; r++) a = cc.instantiate(this.point4List[0]), a.parent = this.point4List[0].parent,
this.point4List[this.point4List.length] = a;
for (var s, d = 0; 4 > d; d++) s = cc.instantiate(this.point5List[0]), s.parent = this.point5List[0].parent,
this.point5List[this.point5List.length] = s;
for (var l, c = 0; 15 > c; c++) l = cc.instantiate(this.goldList[0]), l.parent = this.goldList[0].parent,
this.goldList[this.goldList.length] = l;
for (var u, m = 0; 6 > m; m++) u = cc.instantiate(this.pufferModList[0]), u.parent = this.pufferModList[0].parent,
this.pufferModList[this.pufferModList.length] = u;
for (var p, g = 0; 2 > g; g++) p = cc.instantiate(this.citieList[0]), p.parent = this.citieList[0].parent,
p.active = !1, this.citieList[this.citieList.length] = p;
this.build = {
1: this.goldList,
11: this.point4List,
12: this.point2List,
13: this.point3List,
14: this.point4List,
15: this.point5List,
21: this.citieList,
31: this.pufferModList
};
for (var h = this, _ = function(a) {
var o = "Fishscene" + (a + 1) + "Cfg.json",
t = cc.url.raw("resources/fishPop/config/" + o);
cc.loader.load(t, function(n, e) {
return n ? (console.error("load FishLineCfg failed"), void console.error(n.message || n)) : void(console.log("load FishLineCfg success", o),
h.scene[a] = e);
}.bind(S));
}, f = 0; 12 > f; f++) _(f);
},
updateBuild: function() {
this.buildCount++;
var r, e, t = (r = 1, e = 12, d(Math.random() * (e - r + 1) + r)),
o = this.scene[t],
i = 0;
if (o && o.length)
for (var n, s = 0; s < o.length - 1; s++)
if (n = o[s], 21 != n.type || "21" != n.type) {
var a = this.build[n.type];
o[s - 1] && o[s - 1].type == o[s].type || (i = 0), a[i] && (a[i].active = !0, a[i].x = n.x,
a[i].y = n.y), i++;
}
}
});
|
const navMenu=document.getElementById('nav-menu'),
toggleMenu=document.getElementById('nav-toggle'),
closeMenu=document.getElementById('nav-close')
//show
toggleMenu.addEventListener('click',()=>{
navMenu.classList.toggle('show')
})
//hide
closeMenu.addEventListener('click',()=>{
navMenu.classList.remove('show')
})
//remove menu
const navLink=document.querySelectorAll('.nav_link')
function linkAction()
{
navMenu.classList.remove('show')
}
navLink.forEach(n=> n.addEventListener('click',linkAction))
//scroll sections active link
const sections=document.querySelectorAll('section[id]')
window.addEventListener('scroll',scrollActive)
function scrollActive()
{
const scrollY=window.pageYOffset
sections.forEach(current =>{
const sectionHeight=current.offsetHeight
const sectionTop=current.offsetTop - 50
sectionId=current.getAttribute('id')
if(scrollY > sectionTop && scrollY<= sectionTop+sectionHeight)
{
document.querySelector('.nav_menu a[href*='+ sectionId +']').classList.add('active')
}
else
{
document.querySelector('.nav_menu a[href*='+ sectionId +']').classList.remove('active')
}
})
}
const form=document.getElementById('form');
const uname=document.getElementById('fn');
const email=document.getElementById('email');
form.addEventListener('submit',(e)=>
{
e.preventDefault();
checkInputs();
})
function checkInputs()
{
const u=uname.value.trim();
console.log(u);
const e=email.value.trim();
console.log(e);
if(u==='')
{
setErrorFor(u);
}
else
{
setSuccessFor(u);
}
if(e==='')
{
setErrorMail(e);
}
else if(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(e))
{
setSuccessEmail(e);
}
else
{
setErrorForEmail(e);
}
}
function setErrorFor(input)
{
const formControl=uname.parentElement;
formControl.className='form-control error i';
formControl.className='form-control error contact_input';
const form=uname.parentElement.parentElement;
}
function setSuccessFor(input)
{
const formControl=uname.parentElement;
formControl.className='form-control success';
formControl.className='form-control success contact_input';
}
function setErrorMail(input)
{
const formControl=email.parentElement;
formControl.className='form-control error i';
formControl.className='form-control error contact_input';
}
function setErrorForEmail(input)
{
const formControl=email.parentElement;
formControl.className='form-control error i';
formControl.className='form-control error contact_input';
}
function setSuccessEmail(input)
{
const formControl=email.parentElement;
formControl.className='form-control success';
formControl.className='form-control success contact_input';
}
|
import { gql } from '@apollo/client';
const GET_OPERATOR_STATUS = gql`
query GetOperatorStatus($id: ID!) {
operator: getOperator(id: $id) {
id
givenName
familyName
email
}
}
`;
export { GET_OPERATOR_STATUS }; // eslint-disable-line
|
(function() {
'use strict';
angular
.module('iconlabApp')
.factory('PointAvancementSearch', PointAvancementSearch);
PointAvancementSearch.$inject = ['$resource'];
function PointAvancementSearch($resource) {
var resourceUrl = 'api/_search/point-avancements/:id';
return $resource(resourceUrl, {}, {
'query': { method: 'GET', isArray: true}
});
}
})();
|
import React from 'react'
import { View, Text, Image, StyleSheet, TouchableWithoutFeedback } from 'react-native'
import PERSON from '../../images/person.png'
const buildImage = (person) => {
if (person.image) {
return <Image style={{width:80, height: 80, borderRadius:40}} source={person.image} resizeMode="cover" />
} else {
return <Image style={{width:80, height: 80}} source={PERSON} resizeMode="contain" />
}
}
const ListItem = props => {
return (
<TouchableWithoutFeedback onLongPress={() => props.onClick(props.item)}>
<View style={styles.card}>
{buildImage(props.item)}
<View style={{marginLeft:10}}>
<Text style={{fontSize:18}}>{props.item.name}</Text>
<Text style={{fontSize:16}}>{props.item.email}</Text>
<Text style={{fontSize:14}}>{props.item.phone}</Text>
</View>
</View>
</TouchableWithoutFeedback>
)
}
export default ListItem
const styles = StyleSheet.create({
card: {
flex:1,
height:100,
margin: 10,
padding:10,
backgroundColor:'#FFF',
elevation:5,
borderRadius:10,
flexDirection: 'row',
alignItems:'center'
}
})
|
// Filename: libs/amcharts/amcharts-wrapper.js
define([
// Load the original amcharts source file
'lib/amcharts/amcharts'
], function(){
// Get global reference
// Apparently jscolor uses multiple globals, so this is actually pointless as a way to wrap jscolor.
// Only good for passing reference into called functions
var localAmCharts = window.AmCharts;
var deleteStatus = delete window.AmCharts;
// console.log("delete window.AmCharts " + (deleteStatus ? 'succeeded' : 'failed'));
// Tell Require.js that this module returns a reference to AmCharts
return localAmCharts;
});
|
let express = require('express');
let router = express.Router();
const upload = require('../services/file.upload')
const singleUpload = upload.single('image')
router.post('/', function(req, res){
//console.log('hitting file route')
singleUpload(req, res, function(err){
if(err) {res.status(400).send({error: [{title: "file type not allowed", detail: err.message}]})}
else{
return res.status(200).json({'url': req.file.location})}
})
})
module.exports = router;
|
const Discord = require("discord.js");
module.exports = class howgay {
constructor(){
this.name = 'howgay',
this.alias = ['gay'],
this.usage = 'howgay'
}
run(bot, message, args){
var min=1;
var max=100;
var random =Math.floor(Math.random() * (+max - +min)) + +min;
let embed = new Discord.RichEmbed();
if (!message.guild) return;
embed.setAuthor(`How gay is ${message.author.tag}?`)
embed.setDescription(`<@${message.author.id}> is ${random}% gay :gay_pride_flag: `)
embed.setTimestamp()
embed.setColor(0xF08080)
message.channel.send(embed);
}
}
|
import React from 'react';
import {Switch, Route, useRouteMatch} from 'react-router-dom';
import Rooms from "../pages/app/Rooms";
import SingleRoom from "../pages/app/Room/SingleRoom";
import PublicRooms from "../pages/app/PublicRooms";
import JoinedRooms from "../pages/app/JoinedRooms";
import NotFound from "../pages/app/NotFound";
import MyProfile from "../pages/app/MyProfile";
import EditRoom from "../pages/app/Room/EditRoom";
import AddRoom from "../pages/app/Room/AddRoom";
import PrivateRoutes from "./PrivateRoutes";
import {DASHBOARD_PAGE, JOINED_ROOMS_PAGE, PROFILE_PAGE, PUBLIC_ROOMS_PAGE, ROOMS_PAGE} from "../urls/AppBaseUrl";
const AppRoutes = () => {
const { path } = useRouteMatch();
return (
<Switch>
<Route path="/" exact component={Rooms} />
<Route path={PUBLIC_ROOMS_PAGE} exact component={PublicRooms} />
<Route path={JOINED_ROOMS_PAGE} exact component={JoinedRooms} />
<Route path={PROFILE_PAGE} exact component={MyProfile} />
<Route path={ROOMS_PAGE} exact component={Rooms} />
<Route path={ROOMS_PAGE+'add'} component={AddRoom} />
<Route path={ROOMS_PAGE+':id/edit'} component={EditRoom} />
<Route path={ROOMS_PAGE+':id'} component={SingleRoom} />
<Route path="*" component={NotFound}/>
</Switch>
)
}
export default AppRoutes;
|
import React, { useContext, useState } from 'react';
import { Carousel, Card, Image } from 'antd';
import beijing from './beijing2.jpg';
import shanghai from './shanghai.jpg';
import shenzhen from './shenzhen.jpg';
// 'https://react.semantic-ui.com/images/wireframe/image.png'
import { Text, LanguageContext } from '../../containers/Language';
const isImg = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-./?%&=]*)?/;
const contentStyle = {
flex: 1,
height: '100vh',
color: '#fff',
lineHeight: '100vh',
textAlign: 'center',
background: '#FFFFFF',
position: 'relative'
};
const imgStyle = {
height: '20%',
width: '100%',
color: '#fff',
lineHeight: '20%',
textAlign: 'center',
background: '#364d79',
};
const boxStyle = {
position: 'absolute',
backgroundColor: 'rgba(0,0,0,0.5)',
bottom: '10%',
left: '5%',
width: '45%',
minheight: '20%',
color: 'white',
overflow: 'auto',
};
const titleStyle = {
textAlign: 'left',
color: 'white',
fontFamily: 'Montserrat',
fontSize: '30pt',
fontWeight: 'bolder',
lineHeight: '12pt',
padding: '10px 0'
}
const stitleStyle = {
textAlign: 'left',
color: 'white',
fontFamily: 'Montserrat',
fontSize: '20pt',
lineHeight: '12pt',
fontWeight: 'bolder'
}
const pStyle = {
textAlign: 'left',
color: 'white',
fontFamily: 'Montserrat',
paddingBottom: '0px'
};
const bannerStyle = {
height: '100vh',
padding: '0px'
};
export function EDFbanner() {
//const [clickText, setClickText] = useState();
//const { dictionary } = useContext(LanguageContext);
return(
<div style={bannerStyle}>
<div style = {contentStyle}>
<Carousel autoplay='true' dots ={false}>
<div>
<Image preview={false} width="100%" height = '100vh' src={shenzhen} alt="img"/>
</div>
<div>
<Image preview={false} width="100%" height = '100vh' src={shanghai} alt="img"/>
</div>
<div>
<Image preview={false} width="100%" height = '100vh' src={beijing} alt="img"/>
</div>
</Carousel>
</div>
<div style={boxStyle}>
<Card style={{borderColor: 'rgba(0,0,0,0.5)' , borderRadius: '0', textAlign:'left', lineHeight:'20px', backgroundColor:'rgba(0,0,0,0.25)'}}>
<div style ={{height: '200px'}}>
<h1 style={{color:'white', lineHeight:'30px'}}><Text tid="headerTitle" /></h1>
<h2 style={{color:'white', lineHeight:'35px'}}><Text tid="headerSubtitle" /></h2>
<p style={{color:'white'}}><Text tid="headerText" /></p>
</div>
</Card>
</div>
</div>
);
};
|
/*************************************************************/
/**
* 接口名称:新建群分组<br>
* 功能:
* "action": "1.202"
* "method": "1.1.0001"
*/
var request = {
"head" : {
"key" : "e3659c12-ca74-46da-81c9-35d646b4ae65",
"name" : "",
"action" : "1.202",
"method" : "1.1.0001",
"version" : "1",
"time" : 1524579997232
},
"body" : {
"groupCategory" : {
"rank" : 0,
"sort" : 0,
"name" : "什么"
}
}
};
var response = {
"head" : {
"resultCode" : "1",
"resultMessage" : "",
"key" : "e3659c12-ca74-46da-81c9-35d646b4ae65",
"name" : "",
"action" : "1.202",
"method" : "1.1.0001",
"version" : "1",
"time" : 1524579999466
},
"info" : {
"success" : true,
"errors" : [],
"warnings" : []
},
"body" : {
"groupCategory" : {
"userId" : "2fff6e3f-1f90-401a-a2f8-56e3054aad32",
"rank" : 0,
"sort" : 2,
"name" : "什么",
"id" : "01832c88-3468-443a-8532-497462208d40"
}
}
};
/*************************************************************/
/**
* 接口名称:获取群分组信息<br>
* 功能:
* "action": ""
* "method": "1.1.0002"
*/
var request = "";
var response = "";
/*************************************************************/
/**
* 接口名称:修改分组名<br>
* 功能:
* "action": ""
* "method": "1.1.0003"
*/
var request = {
"head" : {
"key" : "187ac8dc-8d39-4d5b-a30f-ded916c9a040",
"name" : "",
"action" : "1.202",
"method" : "1.1.0003",
"version" : "1",
"time" : 1524579961371
},
"body" : {
"groupCategoryName" : "我的群",
"groupCategoryId" : "1102b276-fdf3-4243-ac07-5ab81b736d07"
}
};
var response = {
"head" : {
"resultCode" : "1",
"resultMessage" : "",
"key" : "187ac8dc-8d39-4d5b-a30f-ded916c9a040",
"name" : "",
"action" : "1.202",
"method" : "1.1.0003",
"version" : "1",
"time" : 1524579963658
},
"info" : {
"success" : true,
"errors" : [],
"warnings" : []
},
"body" : {
"groupCategory" : {
"userId" : "2fff6e3f-1f90-401a-a2f8-56e3054aad32",
"rank" : 0,
"sort" : 2,
"name" : "我的群",
"id" : "1102b276-fdf3-4243-ac07-5ab81b736d07"
}
}
};
|
const express = require("express");
const bodyParser = require("body-parser");
const app = express();
app.use(express.static("p"));
app.set("view engine", "ejs");
const mongoose = require("mongoose");
app.use(bodyParser.urlencoded({ extended: true }));
//create new database
mongoose.connect("mongodb://localhost:27017/todolistDB", { useNewUrlParser: true }, { useUnifiedTopology: true });
const listSchema = {
Name: String,
List: []
};
const list = mongoose.model("list", listSchema);
const itemSchema = {
Work: String
};
const workm = mongoose.model("item", itemSchema);
const item1 = new workm({
Work: "welcome to your todolist!"
});
const item2 = new workm({
Work: "Hit the + button to add a new item!"
});
const item3 = new workm({
Work: "<--hit this to delete an item!"
});
var addes = [item1, item2, item3];
app.get("/", function (req, res)
{
workm.find({}, function (err, founditems)
{
if (founditems.length == 0)
{
workm.insertMany(addes, function (err)
{
console.log(err);
});
res.redirect("/");
}
else
{
res.render("list", { din: "Today", items: founditems });
}
});
});
app.post("/", function (req, res)
{
var adds = req.body.add;
const listName = req.body.submit;
const item = new workm({
Work: adds
});
if (listName == "Today")
{
item.save();
res.redirect("/");
}
else
{
list.findOne({ Name: listName }, function (err, foundlist)
{
foundlist.List.push(item);
foundlist.save();
res.redirect("/" + listName);
})
}
});
app.post("/delete", function (req, res)
{
var ck = req.body.checkbox;
workm.deleteOne({ _id: ck }, function (err)
{
console.log(err);
res.redirect("/");
})
});
app.get("/:customListName", function (req, res)
{
const customListName = req.params.customListName;
list.findOne({ Name: customListName }, function (err, foundList)
{
if (!err)
{
if (!foundList)
{
const q = new list({
Name: customListName,
List: addes
});
q.save();
res.redirect("/" + customListName);
}
else
{
res.render("list", { din: foundList.Name, items: foundList.List });
}
}
});
});
// app.get("/work", function (req, res)
// {
// res.render("list", { din: "Work",items:works,action:"/work" });
// });
// app.post("/work", function (req, res)
// {
// var w = req.body.add;
// works.push(w);
// res.redirect("/work");
// });
// app.get("/about", function (res, req)
// {
// req.render("about");
// });
app.listen(3001, function ()
{
});
|
import React from 'react';
import s from './ButtonsBlock.module.css'
import Button from "../../Button/Button";
import {connect} from "react-redux";
import {increment, reset} from "../../redux/reduser";
const ButtonsBlock = (props) => {
return (
<div className={s.buttonsBlock}>
<Button onClickFunction={props.increment} title="inc" isDisabled={props.isDisableInc}/>
<Button onClickFunction={props.reset} title="reset" isDisabled={props.isDisableRes}/>
</div>
)
};
const connectedValuesBlock = connect(null, {increment, reset})(ButtonsBlock);
export default connectedValuesBlock;
|
module.exports = {
"sidebar.app": "App",
"sidebar.horizontal": "Horizontales",
"sidebar.horizontalMenu": "Horizontales Menü",
"sidebar.general": "Allgemeines",
"sidebar.component": "Komponente",
"sidebar.features": "Eigenschaften",
"sidebar.applications": "Anwendungen",
"sidebar.dashboard": "Instrumententafel",
"sidebar.dashboard1": "Instrumententafel 1",
"sidebar.dashboard2": "Instrumententafel 2",
"sidebar.dashboard3": "Instrumententafel 3",
"sidebar.modules": "Modul",
"sidebar.agency": "Agentur",
"sidebar.pages": "Seiten",
"sidebar.gallery": "Galerie",
"sidebar.pricing": "Preisgestaltung",
"sidebar.terms&Conditions": "Terms & amp Bedingungen",
"sidebar.feedback": "Feedback",
"sidebar.report": "Bericht",
"sidebar.faq(s)": "Faq(s)",
"sidebar.advancedComponent": "Erweiterte Komponente",
"sidebar.blank": "Leer",
"sidebar.session": "Session",
"sidebar.login": "Anmeldung",
"sidebar.register": "Registrieren",
"sidebar.lockScreen": "Bildschirm sperren",
"sidebar.forgotPassword": "Passwort vergessen",
"sidebar.404": "404",
"sidebar.500": "500",
"sidebar.uiComponents": "UI Components",
"sidebar.alerts": "Benachrichtigungen",
"sidebar.appBar": "App-Leiste",
"sidebar.avatars": "Avatare",
"sidebar.buttons": "Tasten",
"sidebar.bottomNavigations": "Untere Navigation",
"sidebar.badges": "Abzeichen",
"sidebar.cards": "Karten",
"sidebar.cardsMasonry": "Karten Masonary",
"sidebar.chip": "Chip",
"sidebar.dialog": "Dialog",
"sidebar.dividers": "Teiler",
"sidebar.drawers": "Schubladen",
"sidebar.popover": "Popover",
"sidebar.expansionPanel": "Erweiterungsfeld",
"sidebar.gridList": "Rasterliste",
"sidebar.list": "Liste",
"sidebar.menu": "Speisekarte",
"sidebar.popoverAndToolTip": "Popover und Kurzinfo",
"sidebar.progress": "Fortschritt",
"sidebar.snackbar": "Imbissbude",
"sidebar.selectionControls": "Auswahlkontrollen",
"sidebar.advanceUiComponents": "Advance UI-Komponenten",
"sidebar.dateAndTimePicker": "Datums- und Uhrzeitauswahl",
"sidebar.tabs": "Registerkarten",
"sidebar.stepper": "Stepper",
"sidebar.notification": "Benachrichtigung",
"sidebar.sweetAlert": "Süßer Alarm",
"sidebar.autoComplete": "Auto abgeschlossen",
"sidebar.aboutUs": "Über uns",
"sidebar.widgets": "Widgets",
"sidebar.forms": "Formen",
"sidebar.formElements": "Formularelemente",
"sidebar.textField": "Textfeld",
"sidebar.selectList": "Wählen Sie Liste",
"sidebar.charts": "Diagramme",
"sidebar.reCharts": "Re Charts",
"sidebar.reactChartjs2": "Reagiere Chartjs 2",
"sidebar.icons": "Symbole",
"sidebar.themifyIcons": "Themify Symbole",
"sidebar.simpleLineIcons": "Einfache Linie Icons",
"sidebar.materialIcons": "Materielle Ikonen",
"sidebar.fontAwesome": "Schrift genial",
"sidebar.tables": "Tabellen",
"sidebar.basic": "Basic",
"sidebar.dataTable": "Datentabelle",
"sidebar.responsive": "Reagierend",
"sidebar.reactTable": "Reagiert Tabelle",
"sidebar.maps": "Karten",
"sidebar.googleMaps": "Google Karten",
"sidebar.leafletMaps": "Prospektkarten",
"sidebar.inbox": "Posteingang",
"sidebar.users": "Benutzer",
"sidebar.userProfile1": "Benutzerprofil 1",
"sidebar.userProfile2": "Benutzerprofil 2",
"sidebar.userManagement": "Benutzerverwaltung",
"sidebar.userProfile": "Benutzerprofil",
"sidebar.userList": "Benutzerliste",
"sidebar.calendar": "Kalander",
"sidebar.cultures": "Kulturen",
"sidebar.dnd": "Dnd",
"sidebar.selectable": "Wählbar",
"sidebar.customRendering": "Benutzerdefiniertes Rendern",
"sidebar.chat": "Plaudern",
"sidebar.toDo": "Machen",
"sidebar.editor": "Editor",
"sidebar.wysiwygEditor": "WYSIWYG-Editor",
"sidebar.quillEditor": "Federredakteur",
"sidebar.reactAce": "Reagiere Ace",
"sidebar.dragAndDrop": "Ziehen und ablegen",
"sidebar.reactDragula": "Reagiere Dragula",
"sidebar.reactDnd": "Reagiere Dnd",
"sidebar.blogManagement": "Blogverwaltung",
"sidebar.ecommerce": "E-Commerce",
"sidebar.shopList": "Geschäftsliste",
"sidebar.shopGrid": "Ladenetz",
"sidebar.invoice": "Rechnung",
"sidebar.multilevel": "Mehrstufig",
"sidebar.sublevel": "Unterebene",
"widgets.totalEarns": "Gesamt verdient",
"widgets.emailsStatistics": "E-Mail-Statistiken",
"widgets.onlineVistors": "Online-Vistoren",
"widgets.trafficSources": "Zugriffsquellen",
"widgets.RecentOrders": "letzte Bestellungen",
"widgets.topSellings": "Top-Verkäufe",
"widgets.productReports": "Produktberichte",
"widgets.productStats": "Produkt Statistiken",
"widgets.ComposeEmail": "E-Mail verfassen",
"widgets.ratings": "Bewertungen",
"widgets.employeePayroll": "Personalabrechnung",
"widgets.visitors": "Besucher",
"widgets.orders": "Aufträge",
"widgets.orderStatus": "Bestellstatus",
"widgets.totalSales": "Gesamtumsatz",
"widgets.netProfit": "Reingewinn",
"widgets.overallTrafficStatus": "Gesamtverkehrsstatus",
"widgets.tax": "MwSt",
"widgets.expenses": "Expetenzen",
"widgets.currentTime": "Aktuelle Uhrzeit",
"widgets.currentDate": "Aktuelles Datum",
"widgets.todayOrders": "Heute Bestellungen",
"widgets.toDoList": "Aufgabenlisten",
"widgets.discoverPeople": "Menschen entdecken",
"widgets.commments": "Bemerkungen",
"widgets.newCustomers": "neue Kunden",
"widgets.recentNotifications": "Letzte Benachrichtigungen",
"widgets.appNotifications": "App-Benachrichtigungen",
"widgets.newEmails": "Neue E-Mails",
"widgets.siteVisitors": "Website-Besucher",
"widgets.recentActivities": "Kürzliche Aktivitäten",
"widgets.recentOrders": "letzte Bestellungen",
"widgets.gallery": "Galerie",
"widgets.pricing": "Preisgestaltung",
"widgets.enterpriseEdition": "Enterprise Edition",
"widgets.personalEdition": "Persönliche Ausgabe",
"widgets.teamEdition": "Teamausgabe",
"widgets.socialCompanines": "Soziale Unternehmen",
"widgets.standard": "Standard",
"widgets.advanced": "Fortgeschritten",
"widgets.master": "Meister",
"widgets.Mega": "Mega",
"widgets.logIn": "Einloggen",
"widgets.signUp": "Anmelden",
"widgets.lockScreen": "Bildschirm sperren",
"widgets.alertsWithLink": "Warnungen mit Link",
"widgets.additionalContent": "Zusätzlicher Inhalt",
"widgets.alertDismiss": "Alarm ablehnen",
"widgets.uncontrolledDisableAlerts": "Unkontrolliert Alarme deaktivieren",
"widgets.contexualAlerts": "Contexuelle Warnungen",
"widgets.alertsWithIcons": "Warnungen mit Symbolen",
"widgets.Simple App Bars": "Einfache App-Bars",
"widgets.appBarsWithButtons": "App-Bars mit Tasten",
"widgets.imageAvatars": "Bild-Avatare",
"widgets.lettersAvatars": "Buchstaben Avatare",
"widgets.iconsAvatars": "Ikonen Avatare",
"widgets.flatButtons": "Flache Tasten",
"widgets.raisedButton": "Raised Knopf",
"widgets.buttonWithIconAndLabel": "Knopf mit Ikone und Aufkleber",
"widgets.floatingActionButtons": "Schwimmende Aktionsschaltflächen",
"widgets.iconButton": "ICon-Taste",
"widgets.socialMediaButton": "Social-Media-Schaltfläche",
"widgets.reactButton": "Schaltfläche Reagieren",
"widgets.buttonOutline": "Schaltfläche Gliederung",
"widgets.buttonSize": "Knopfgröße",
"widgets.buttonState": "Schaltflächenstatus",
"widgets.buttonNavigationWithNoLabel": "Schaltfläche Navigation ohne Label",
"widgets.buttonNavigation": "Schaltflächennavigation",
"widgets.iconNavigation": "Symbol Navigation",
"widgets.badgeWithHeadings": "Abzeichen mit Überschriften",
"widgets.contexualVariations": "Contexuelle Variationen",
"widgets.badgeLinks": "Abzeichen Links",
"widgets.materialBadge": "Materialabzeichen",
"widgets.simpleCards": "Einfache Karten",
"widgets.backgroundVarient": "Hintergrund-Variante",
"widgets.cardOutline": "Kartenumriss",
"widgets.overlayCard": "Overlay-Karte",
"widgets.cardGroup": "Kartengruppe",
"widgets.cardTitle": "Kartentitel",
"widgets.speacialTitleTreatment": "Spezielle Titelbehandlung",
"widgets.chipWithClickEvent": "Chip mit Klickereignis",
"widgets.chipArray": "Chip-Array",
"widgets.dialogs": "Dialoge",
"widgets.listDividers": "Verteiler auflisten",
"widgets.insetDividers": "Ergänzung Teiler",
"widgets.temporaryDrawers": "Vorübergehende Schubladen",
"widgets.permanentDrawers": "Permanente Schubladen",
"widgets.simpleExpansionPanel": "Einfacher Erweiterungspanel",
"widgets.controlledAccordion": "Kontrolliertes Akkordeon",
"widgets.secondaryHeadingAndColumns": "Sekundäre Überschrift und Spalten",
"widgets.imageOnlyGridLists": "Bild nur Rasterlisten",
"widgets.advancedGridLists": "Erweiterte Grid-Listen",
"widgets.singleLineGridLists": "Einzellinien-Raster-Listen",
"widgets.simpleLists": "Einfache Listen",
"widgets.folderLists": "Ordnerlisten",
"widgets.listItemWithImage": "Artikel mit Bild auflisten",
"widgets.switchLists": "Listen umschalten",
"widgets.insetLists": "Einfügelisten",
"widgets.nestedLists": "Verschachtelte Listen",
"widgets.checkboxListControl": "Kontrollkästchen Listensteuerung",
"widgets.pinedSubHeader": "Pined Unterkopf",
"widgets.InteractiveLists": "Interaktive Listen",
"widgets.simpleMenus": "Einfache Menüs",
"widgets.selectedMenu": "Ausgewähltes Menü",
"widgets.maxHeightMenu": "Max Höhe Menü",
"widgets.changeTransition": "Übergang ändern",
"widgets.paper": "Papier",
"widgets.anchorPlayGround": "Anker Spielfeld",
"widgets.tooltip": "QuickInfo",
"widgets.positionedToolTips": "Positionierte Snackbar",
"widgets.circularProgressBottomStart": "Kreisförmiger Fortschritt Bottom Start",
"widgets.interactiveIntegration": "Interaktive Integration",
"widgets.determinate": "Bestimmt",
"widgets.linearProgressLineBar": "Lineare Fortschrittsleiste",
"widgets.indeterminate": "Unbestimmt",
"widgets.buffer": "Puffer",
"widgets.query": "Abfrage",
"widgets.transitionControlDirection": "Übergangskontrollrichtung",
"widgets.simpleSnackbar": "Einfache Snackbar",
"widgets.positionedSnackbar": "Positionierte Snackbar",
"widgets.contexualColoredSnackbars": "Contexual farbige Snackbars",
"widgets.simpleCheckbox": "Einfache Checkbox",
"widgets.interminateSelection": "Auswahl trennen",
"widgets.disabledCheckbox": "Deaktivierte Checkbox",
"widgets.customColorCheckbox": "Benutzerdefinierte Farbe Kontrollkästchen",
"widgets.VerticalStyleCheckbox": "Vertical Style Checkbox",
"widgets.horizontalStyleCheckbox": "Horizontal Style Checkbox",
"widgets.radioButtons": "Radio Knöpfe",
"widgets.disabledRadio": "Deaktiviertes Radio",
"widgets.withError": "Mit Fehler",
"widgets.switches": "Swisches",
"widgets.dateAndTimePicker": "Datum und Zeit Picker",
"widgets.defaultPicker": "Standardauswahl",
"widgets.timePicker": "ime Picker",
"widgets.weekPicker": "Wochenauswahl",
"widgets.defaultDatePicker": "Standard-Datumsauswahl",
"widgets.customPicker": "Benutzerdefinierte Auswahl",
"widgets.tabs": "Registerkarten",
"widgets.fixedTabs": "Feste Registerkarten",
"widgets.basicTab": "Grundlegende Registerkarte",
"widgets.wrappedLabels": "Wrapped Etiketten",
"widgets.centeredLabels": "Zentrierte Etiketten",
"widgets.forcedScrolledButtons": "Erzwungene Scroll-Schaltflächen",
"widgets.iconsTabs": "Ikonen-Registerkarten",
"widgets.withDisableTabs": "Mit Disable Registerkarten ",
"widgets.iconWithLabel": "Ikone mit Etikett",
"widgets.stepper": "Stepper",
"widgets.horizontalLinear": "Horizontal Linear",
"widgets.horizontalNonLinear": "Horizontal nicht linear",
"widgets.horizontalLinerAlternativeLabel": "Horizontale Liner Alternative Label",
"widgets.horizontalNonLinerAlternativeLabel": "Horizontaler nonliner alternativer Aufkleber",
"widgets.verticalStepper": "Vertikaler Stepper",
"widgets.descriptionAlert": "Beschreibung Warnung",
"widgets.customIconAlert": "Benutzerdefinierte Symbolwarnung",
"widgets.withHtmlAlert": "Mit HTML-Warnung",
"widgets.promptAlert": "Prompte Warnung",
"widgets.passwordPromptAlert": "Passwort Aufforderung Alert",
"widgets.customStyleAlert": "Benutzerdefinierte Stilwarnung",
"widgets.autoComplete": "Auto abgeschlossen",
"widgets.reactSelect": "Reagieren Auswählen",
"widgets.downshiftAutoComplete": "Herunterschalten Auto abgeschlossen",
"widgets.reactAutoSuggests": "Reagiere Auto Suggests",
"widgets.aboutUs": "Über uns",
"widgets.ourVission": "Unsere Entscheidung",
"widgets.ourMissions": "Unsere Missionen",
"widgets.ourMotivation": "Unsere Motivation",
"widgets.defualtReactForm": "Defaultre Reagieren Form",
"widgets.url": "Url",
"widgets.textArea": "Textbereich",
"widgets.file": "Datei",
"widgets.formGrid": "Formularraster",
"widgets.inlineForm": "Inline-Formular",
"widgets.inputSizing": "Eingabegröße",
"widgets.inputGridSizing": "Größe des Eingabegrids",
"widgets.hiddenLabels": "Versteckte Etiketten",
"widgets.formValidation": "Formularüberprüfung",
"widgets.number": "Nummer",
"widgets.date": "Datum",
"widgets.time": "Zeit",
"widgets.color": "Farbe",
"widgets.search": "Suche",
"widgets.selectMultiple": "Wählen Sie Mehrere",
"widgets.inputWithSuccess": "Eingabe mit Erfolg",
"widgets.inputWithDanger": "Eingabe mit Gefahr",
"widgets.simpleTextField": "Einfaches Textfeld",
"widgets.componet": "Komponenten",
"widgets.layouts": "Layouts",
"widgets.inputAdorements": "Eingabeverehrung",
"widgets.formattedInputs": "Formatierte Eingaben",
"widgets.simpleSelect": "Einfache Select",
"widgets.nativeSelect": "Native Auswahl",
"widgets.MutltiSelectList": "Mutlti Auswahlliste",
"widgets.lineChart": "Liniendiagramm",
"widgets.barChart": "Balkendiagramm",
"widgets.stackedBarChart": "Gestapeltes Balkendiagramm",
"widgets.lineBarAreaChart": "Line Bar Bereich Diagramm",
"widgets.areaChart": "Flächendiagramm",
"widgets.stackedAreaChart": "Gestapelte Flächendiagramm",
"widgets.verticalChart": "Vertikales Diagramm",
"widgets.radarChart": "Radar-Diagramm",
"widgets.doughnut": "Krapfen",
"widgets.polarChart": "Polardiagramm",
"widgets.pieChart": "Kuchendiagramm",
"widgets.bubbleChart": "Blasendiagramm",
"widgets.horizontalBar": "Horizonatl Bar",
"widgets.basicTable": "Grundtabelle",
"widgets.contexualColoredTable": "Contexual farbige Tabelle",
"widgets.dataTable": "Datentabelle",
"widgets.employeeList": "Mitarbeiterliste",
"widgets.responsiveTable": "Responsive Tabelle",
"widgets.responsiveFlipTable": "Responsive Flip-Tabelle",
"widgets.reactGridControlledStateMode": "Grid-gesteuerten Statusmodus reaktivieren",
"widgets.googleMaps": "Google Maps",
"widgets.productsReports": "Produkte Berichte",
"widgets.taskList": "Aufgabenliste",
"widgets.basicCalender": "Grundkalender",
"widgets.culturesCalender": "Kulturen Kalender",
"widgets.dragAndDropCalender": "ziehen und fallen Kalender",
"widgets.selectableCalender": "Wählbarer Kalender",
"widgets.customRendering": "Benutzerdefiniertes Rendern",
"widgets.customCalender": "Benutzerdefinierte Kalender",
"widgets.searchMailList": "Mail-Liste durchsuchen",
"components.buyNow": "Kaufe jetzt",
"compenets.choose": "Wählen",
"compenets.username": "Nutzername",
"compenets.passwords": "Passwörter",
"widgets.forgetPassword": "Passwort vergessen",
"compenets.signIn": "Anmelden",
"compenets.dontHaveAccountSignUp": "Keine Kontoanmeldung",
"compenets.enterUserName": "Geben Sie den Benutzernamen ein",
"compenets.enterEmailAddress": "E-Mail Adresse eingeben",
"compenets.confirmPasswords": "Bestätigen Sie die Passwörter",
"components.alreadyHavingAccountSignIn": "Account bereits angemeldet haben",
"components.enterYourPassword": "Geben Sie Ihr Passwort ein",
"components.unlock": "Freischalten",
"components.enterPasswords": "Geben Sie Passwörter ein",
"components.resestPassword": "Passwort zurücksetzen",
"components.pageNotfound": "Seite nicht gefunden",
"components.goToHomePage": "Zur Startseite gehen",
"components.sorryServerGoesWrong": "Sorry Server geht falsch",
"components.persistentDrawer": "Persistente Schublade",
"components.back": "Zurück",
"components.next": "Nächster",
"components.completeStep": "Beende den Schritt",
"components.withHtml": "Mit HTML",
"components.prompt": "Prompt",
"components.withDescription": "Mit Beschreibung",
"components.success": "Erfolg",
"components.passwordPrompt": "Passwort Eingabeaufforderung",
"components.warning": "Warnung",
"components.customIcon": "Benutzerdefiniertes Symbol",
"components.customStyle": "Benutzerdefinierter Stil",
"components.basic": "Basic",
"components.submit": "einreichen",
"components.compose": "Komponieren",
"components.sendMessage": "Nachricht senden",
"components.addNewTasks": "Fügen Sie neue Aufgaben hinzu",
"components.addToCart": "In den Warenkorb legen",
"components.payNow": "Zahl jetzt",
"components.print": "Drucken",
"components.cart": "Wagen",
"components.viewCart": "Warenkorb ansehen",
"components.checkout": "Auschecken",
"widgets.QuickLinks": "Schnelle Links",
"widgets.upgrade": "Aktualisierung",
"widgets.app": "App",
"widgets.addNew": "Neue hinzufügen",
"widgets.orderDate": "Auftragsdatum",
"widgets.status": "Status",
"widgets.trackingNumber": "Auftragsnummer, Frachtnummer,",
"widgets.action": "Sendungscode",
"widgets.designation": "Aktion",
"widgets.subject": "Bezeichnung",
"widgets.send": "Gegenstand",
"widgets.saveAsDrafts": "Senden",
"widgets.onlineSources": "Als Entwürfe speichern",
"widgets.lastMonth": "Online-Quellen",
"widgets.widgets": "Im vergangenen Monat",
"widgets.listing": "Widgets",
"widgets.paid": "Neue hinzufügen",
"widgets.refunded": "Bezahlt",
"widgets.done": "Zurückerstattet",
"widgets.pending": "Erledigt",
"widgets.cancelled": "steht aus",
"widgets.approve": "Abgebrochen",
"widgets.following": "Folgend",
"widgets.follow": "Folgen",
"widgets.graphs&Charts": "Grafiken und Diagramme",
"widgets.open": "Öffnen",
"widgets.bounced": "Ausgetreten",
"widgets.spam": "Spam",
"widgets.unset": "Nicht festgelegt",
"widgets.bandwidthUse": "Bandbreite verwenden",
"widgets.dataUse": "Daten verwenden",
"widgets.unsubscribe": "Abmelden",
"widgets.profile": "Profil",
"widgets.messages": "Mitteilungen",
"widgets.support": "Unterstützung",
"widgets.faq(s)": "Faq (s)",
"widgets.upgradePlains": "Upgrade-Ebenen",
"widgets.logOut": "Ausloggen",
"widgets.mail": "E-Mail",
"widgets.adminTheme": "Admin-Design",
"widgets.wordpressTheme": "Wordpress-Thema",
"widgets.addToCart": "In den Warenkorb legen",
"widgets.plan": "Planen",
"widgets.basic": "Basic",
"widgets.pro": "Profi",
"widgets.startToBasic": "Start zu Basic",
"widgets.upgradeToPro": "Upgrade auf Pro",
"widgets.upgradeToAdvance": "Upgrade zum Vorrücken",
"widgets.comparePlans": "Vergleiche Pläne",
"widgets.free": "Frei",
"widgets.frequentlyAskedQuestions": "Häufig gestellte Fragen",
"widgets.searchIdeas": "Ideen suchen",
"widgets.startDate": "Anfangsdatum",
"widgets.endDate": "Endtermin",
"widgets.category": "Kategorie",
"widgets.apply": "Sich bewerben",
"widgets.downloadPdfReport": "PDF-Bericht herunterladen",
"widgets.yesterday": "Gestern",
"widgets.totalOrders": "Gesamtbestellungen",
"widgets.totalVisitors": "Gesamt Besucher",
"widgets.typeYourQuestions": "Geben Sie Ihre Fragen ein",
"widgets.username": "Nutzername",
"widgets.password": "Passwort",
"widgets.signIn": "Anmelden",
"widgets.enterYourPassword": "Geben Sie Ihr Passwort ein",
"widgets.alreadyHavingAccountLogin": "Haben Sie bereits Konto Login",
"widgets.composeMail": "Mail schreiben",
"widgets.issue": "Problem",
"widgets.recentChat": "Kürzlicher Chat",
"widgets.previousChat": "Vorheriger Chat",
"widgets.all": "Alle",
"widgets.filters": "Filter",
"widgets.deleted": "Gelöscht",
"widgets.starred": "Markiert",
"widgets.frontend": "Vorderes Ende",
"widgets.backend": "Backend",
"widgets.api": "Api",
"widgets.simpleAppBar": "Einfache App-Leiste",
"widgets.recents": "Letzte",
"widgets.cardLink": "Kartenverbindung",
"widgets.anotherLink": "Ein weiterer Link",
"widgets.cardSubtitle": "subtítulo de la tarjeta",
"widgets.confirmationDialogs": "Bestätigungsdialoge",
"widgets.deletableChip": "Löschbarer Chip",
"widgets.customDeleteIconChip": "Benutzerdefiniertes Löschen Icon Chip",
"widgets.openAlertDialog": "Öffnen Sie den Benachrichtigungsdialog",
"widgets.openResponsiveDialog": "Offener responsiver Dialog",
"widgets.openSimpleDialog": "Einfaches Dialogfeld öffnen",
"widgets.openFormDialog": "Formular öffnen",
"widgets.follower": "Anhänger",
"widgets.important": "Wichtig",
"widgets.private": "Privatgelände",
"widgets.openLeft": "Öffnen Sie links",
"widgets.openRight": "Rechts öffnen",
"widgets.openTop": "Oben offen",
"widgets.openBottom": "Unten öffnen",
"widgets.selectTripDestination": "Wählen Sie Reiseziel",
"widgets.pinnedSubheaderList": "Fixierte Subheader-Liste",
"widgets.singleLineItem": "Einzelposten",
"widgets.acceptTerms": "Die Bedingungen akzeptieren",
"widgets.optionA": "Option A",
"widgets.optionB": "Option B",
"widgets.optionC": "Option C",
"widgets.optionM": "Option M",
"widgets.optionN": "Option N",
"widgets.optionO": "Option O",
"widgets.customColor": "Freiwählbare Farbe",
"widgets.centeredTabs": "Zentrierte Registerkarten",
"widgets.multipleTabs": "Mehrere Registerkarten",
"widgets.preventScrolledButtons": "Scroll-Schaltflächen verhindern",
"widgets.browse": "Durchsuche",
"widgets.formValidate": "Formvalidierung",
"widgets.code": "Code",
"widgets.company": "Unternehmen",
"widgets.price": "Preis",
"widgets.change": "Veränderung",
"widgets.high": "Hoch",
"widgets.low": "Niedrig",
"widgets.volume": "Lautstärke",
"widgets.personalDetails": "Persönliche Details",
"widgets.occupation": "Occupation",
"widgets.companyName": "Name der Firma",
"widgets.phoneNo": "Telefon-Nr",
"widgets.city": "Stadt",
"widgets.zipCode": "Postleitzahl",
"widgets.updateProfile": "Profil aktualisieren",
"widgets.reject": "Ablehnen",
"widgets.exportToExcel": "Exportieren nach Excell",
"widgets.addNewUser": "Neuen Benutzer hinzufügen",
"widgets.workWeek": "Arbeitswoche",
"widgets.agenda": "Agenda",
"widgets.conference": "Konferenz",
"widgets.dailySales": "Tägliche Verkäufe",
"widgets.today": "Heute",
"widgets.campaignPerformance": "Kampagnenleistung",
"widgets.supportRequest": "Unterstützungsanfrage",
"widgets.usersList": "Benutzerliste",
"widgets.lastWeek": "Letzte Woche",
"themeOptions.sidebarOverlay": "Sidebar-Überlagerung",
"themeOptions.sidebarBackgroundImages": "Seitenleiste Hintergrundbilder",
"themeOptions.sidebarImage": "Sidebar-Bild",
"themeOptions.miniSidebar": "Mini Seitenleiste",
"themeOptions.boxLayout": "Box-Layout",
"themeOptions.rtlLayout": "Rtl-Layout",
"themeOptions.darkMode": "Dunkler Modus",
"themeOptions.sidebarLight": "Licht",
"themeOptions.sidebarDark": "Dunkel",
"themeOptions.appSettings": "App Einstellungen",
"button.cancel": "Stornieren",
"button.add": "Hinzufügen",
"button.update": "Aktualisieren",
"button.reply": "Antworten",
"button.delete": "Löschen",
"button.yes": "Ja",
"button.viewAll": "Alle ansehen",
"button.like": "Mögen",
"button.assignNow": "Jetzt zuweisen",
"button.seeInsights": "Siehe Einblicke",
"sidebar.dateTimePicker": "Datums- und Uhrzeitauswahl",
"components.summary": "Zusammenfassung",
"hint.whatAreYouLookingFor": "Wonach suchen Sie",
"components.yesterday": "Gestern",
"components.last7Days": "Letzten 7 Tage",
"components.last1Month": "Letzter 1 Monat",
"components.last6Month": "Letzte 6 Monate",
"components.spaceUsed": "Speicherplatz verwendet",
"components.followers": "Anhänger",
"components.trending": "Trend",
"components.paid": "Bezahlt",
"components.refunded": "Zurückerstattet",
"components.done": "Erledigt",
"components.pending": "steht aus",
"components.cancelled": "Abgebrochen",
"components.approve": "Genehmigen",
"components.week": "Woche",
"components.month": "Monat",
"components.year": "Jahr",
"components.today": "Heute",
"components.popularity": "Popularität",
"components.email": "Email",
"components.drafts": "Entwürfe",
"components.sent": "Geschickt",
"components.trash": "Müll",
"components.all": "Alle",
"components.do": "Machen",
"components.title": "Titel",
"components.projectName": "Projektname",
"components.companyName": "Name der Firma",
"components.openAlert": "Alarm öffnen",
"components.slideInAlertDialog": "Einblenden im Benachrichtigungsdialog",
"components.openFullScreenDialog": "Öffnen Sie Vollbild-Dialoge",
"components.basicChip": "Grundlegender Chip",
"components.clickableChip": "Anklickbarer Chip",
"components.left": "links",
"components.right": "Recht",
"components.expansionPanel1": "Erweiterungskonsole 1",
"components.expansionPanel2": "Erweiterungspanel 2",
"components.generalSetting": "Allgemeine Einstellung",
"components.advancedSettings": "Erweiterte Einstellungen",
"components.firstName": "Vorname",
"components.lastName": "Familienname, Nachname",
"components.occupation": "Besetzung",
"components.phoneNo": "Telefon-Nr",
"components.address": "Adresse",
"components.city": "Stadt",
"components.state": "Zustand",
"components.zipCode": "Postleitzahl",
"components.social Connection": "Soziale Verbindung",
"widgets.buyMore": "Kauf mehr",
"widgets.trafficChannel": "Verkehrskanal",
"widgets.stockExchange": "Börse",
"widgets.tweets": "Tweets",
"widgets.ourLocations": "Unsere Standorte",
"widgets.sales": "Der Umsatz",
"widgets.to": "Zu",
"widgets.shipTo": "Ausliefern",
"widgets.description": "Beschreibung",
"widgets.unitPrice": "Einzelpreis",
"widgets.total": "Gesamt",
"widgets.note": "Hinweis",
"widgets.chipWithAvatar": "Chip mit Benutzerbild",
"widgets.chipWithTextAvatar": "Chip mit Text Benutzerbild",
"widgets.chipWithIconAvatar": "Chip mit Symbol Benutzerbild",
"widgets.customClickableChip": "Kundenspezifischer anklickbarer Chip",
"widgets.outlineChip": "Umriss-Chip",
"widgets.disableChip": "Deaktivieren Sie Chip",
"widgets.alertDialog": "Benachrichtigungsdialog",
"widgets.animatedSlideDialogs": "Animierte Dia-Dialoge",
"widgets.fullScreenDialogs": "Vollbild-Dialoge",
"widgets.formDialogs": "Formulardialogfelder",
"widgets.simpleDialogs": "Einfache Dialoge",
"widgets.responsiveFullScreen": "Responsive Vollbild",
"widgets.primary": "Primär",
"widgets.social": "Sozial",
"widgets.user": "Benutzer",
"widgets.admin": "Administrator",
"widgets.permanentdrawer": "Dauerhafte Schublade",
"widgets.persistentdrawer": "Persistente Schublade",
"widgets.swiches": "Swisches",
"widgets.horizontalLinearAlternativeLabel": "Horizontaler linearer alternativer Aufkleber",
"widgets.horizontalNonLinearAlternativeLabel": "Horizontaler nicht linearer alternativer Aufkleber",
"widgets.notifications": "Benachrichtigungen",
"widgets.basicAlert": "Grundlegende Warnung",
"widgets.successAlert": "Erfolgsalarm",
"widgets.warningAlert": "Warnung Warnung",
"widgets.reactAutoSuggest": "Reagiere Auto Suggest",
"widgets.components": "Komponenten",
"widgets.inputAdornments": "Eingabeverehrung",
"widgets.multiSelectList": "Mehrfachauswahlliste",
"widgets.contextualColoredTable": "Contexual farbige Tabelle",
"widgets.updateYourEmailAddress": "Aktualisieren Sie Ihre E-Mail-Adresse",
"widgets.selectADefaultAddress": "Wählen Sie eine Standardadresse",
"widgets.activity": "Aktivität",
"widgets.basicCalendar": "Basiskalender",
"widgets.culturesCalendar": "Kulturen Kalender",
"widgets.dragAndDropCalendar": "Ziehen Sie den Kalender und legen Sie ihn ab",
"widgets.quillEditor": "Federredakteur",
"widgets.reactDND": "Reagiere DND",
"widgets.dragula": "Dragula",
"button.acceptTerms": "Die Bedingungen akzeptieren",
"button.reject": "Ablehnen",
"button.addNew": "Neue hinzufügen",
"button.goToCampaign": "Gehe zur Kampagne",
"button.viewProfile": "Profil anzeigen",
"button.sendMessage": "Nachricht senden",
"button.saveNow": "Jetzt sparen",
"button.pen": "Stift",
"button.search": "Suche",
"button.downloadPdfReport": "PDF-Bericht herunterladen",
"button.primary": "Primär",
"button.secondary": "Sekundär",
"button.danger": "Achtung",
"button.info": "Info",
"button.success": "Erfolg",
"button.warning": "Warnung",
"button.link": "Verknüpfung",
"button.smallButton": "Kleiner Knopf",
"button.largeButton": "Großer Knopf",
"button.blockLevelButton": "Schaltfläche Blockieren Ebene",
"button.primaryButton": "Primärer Knopf",
"button.button": "Geschmack",
"button.save": "sparen",
"button.openMenu": "Menü öffnen",
"button.openWithFadeTransition": "Mit Fade-Übergang öffnen",
"button.openPopover": "Popover öffnen",
"button.accept": "Akzeptieren",
"button.click": "Klicken",
"button.complete": "Komplett",
"button.back": "Zurück",
"button.next": "Nächster",
"button.completeStep": "Beende den Schritt",
"button.error": "Error",
"button.writeNewMessage": "Schreibe eine neue Nachricht",
"button.saveChanges": "Änderungen speichern",
"button.addNewUser": "Neuen Benutzer hinzufügen",
"button.more": "Mehr",
"hint.searchMailList": "Mail-Liste durchsuchen",
"widgets.AcceptorrRejectWithin": "Akzeptieren oder ablehnen innerhalb",
"widgets.quoteOfTheDay": "Zitat des Tages",
"widgets.updated10Minago": "Vor 10 Minuten aktualisiert",
"widgets.personalSchedule": "Persönlicher Zeitplan",
"widgets.activeUsers": "Aktive Benutzer",
"widgets.totalRequest": "Gesamtanforderung",
"widgets.new": "Neu",
"widgets.ShareWithFriends": "Mit Freunden teilen!",
"widgets.helpToShareText": "Helfen Sie uns, die Welt zu verbreiten, indem Sie unsere Website mit Ihren Freunden und Followern in sozialen Netzwerken teilen!",
"widgets.thisWeek": "Diese Woche",
"widgets.howWouldYouRateUs": "Wie würdest du uns bewerten?",
"widgets.booking": "Buchung",
"widgets.confirmed": "Bestätigt",
"widgets.monthly": "monatlich",
"widgets.weekly": "Wöchentlich",
"widgets.target": "Ziel",
"widgets.totalActiveUsers": "Gesamtzahl aktiver Benutzer",
"sidebar.user": "Benutzer",
"sidebar.miscellaneous": "Sonstiges",
"sidebar.promo": "Promo",
"themeOptions.themeColor": "Thema Farbe",
"module.inbox": "Posteingang",
"module.drafts": "Entwürfe",
"module.sent": "Geschickt",
"module.trash": "Müll",
"module.spam": "Spam",
"module.frontend": "Vorderes Ende",
"module.backend": "Backend",
"module.api": "Api",
"module.issue": "Problem",
"components.emailPrefrences": "E-Mail Einstellungen",
"components.myProfile": "Mein Profil",
"sidebar.gettingStarted": "Anfangen",
"widgets.deadline": "Frist",
"widgets.team": "Mannschaft",
"widgets.projectManagement": "Projektmanagement",
"widgets.latestPost": "Neuester Beitrag",
"widgets.projectTaskManagement": "Projektaufgabenverwaltung",
"widgets.selectProject": "Wählen Sie Projekt",
"widgets.activityBoard": "Aktivitätsausschuss",
"widgets.checklist": "Checkliste",
"sidebar.shop": "Geschäft",
"sidebar.cart": "Wagen",
"sidebar.checkout": "Auschecken",
"components.product": "Produkt",
"components.quantity": "Menge",
"components.totalPrice": "Gesamtpreis",
"components.removeProduct": "Produkt entfernen",
"components.mobileNumber": "Handynummer",
"components.address2Optional": "Adresse 2 (optional)",
"components.country": "Land",
"components.zip": "Postleitzahl",
"components.saveContinue": "Speichern fortsetzen",
"components.placeOrder": "Bestellung aufgeben",
"components.payment": "Zahlung",
"components.billingAddress": "Rechnungsadresse",
"components.ShippingAddressText": "Die Lieferadresse ist die gleiche wie die Rechnungsadresse.",
"components.CartEmptyText": "Dein Einkaufswagen ist leer!",
"components.NoItemFound": "Kein Artikel gefunden",
"components.goToShop": "Zum Laden gehen",
"components.cardNumber": "Kartennummer",
"components.expiryDate": "Verfallsdatum",
"components.cvv": "CVV",
"components.nameOnCard": "Name auf der Karte",
"components.confirmPayment": "Bestätige Zahlung",
"sidebar.saas": "SAAS",
"sidebar.multiLevel": "MultiLevel",
"sidebar.level1": "Level 1",
"sidebar.level2": "Level 2",
"sidebar.boxed": "Verpackt",
"sidebar.news": "Nachrichten",
"sidebar.extensions": "Erweiterungen",
"sidebar.imageCropper": "Bildkrämer",
"sidebar.videoPlayer": "Videoplayer",
"sidebar.dropzone": "Abwurfgebiet",
"widgets.baseConfig": "Basiskonfiguration",
"widgets.customControlBar": "Benutzerdefinierte Steuerleiste",
"widgets.withDownloadButton": "Mit dem Download-Button",
"widgets.httpLiveStreaming": "HTTP-Live-Streaming",
"widgets.keyboardShortcuts": "Tastatürkürzel",
"button.useDefaultImage": "Verwenden Sie Standardbild",
"button.cropImage": "Bild zuschneiden",
"widgets.preview": "Vorschau",
"widgets.croppedImage": "Bild abgeschnitten"
}
|
import React, { Component } from 'react';
import {Redirect,Link} from "react-router-dom";
export class Bridegroomfather extends Component
{
constructor(props) {
super(props);
this.state = {
name: "React",
showHideDemo1: false,
};
const {value:{groomfatherlivingstatus,fatherschooseaddress,Street,Village,Taluk,District,State,Country,Pincode,
Street1,Village1,Taluk1,District1,State1,Country1,Pincode1}}=this.props;
if(groomfatherlivingstatus==="1")
{
if(fatherschooseaddress==="1")
{
this.state = {
showHideDemo1: true,
Street:Street,
Village:Village,
Taluk:Taluk,
District:District,
State:State,
Country:Country,
Pincode:Pincode,
};
}
else
{
this.state = {
showHideDemo1: true,
Street:Street1,
Village:Village1,
Taluk:Taluk1,
District:District1,
State:State1,
Country:Country1,
Pincode:Pincode1,
};
}
}
else
{
this.state = {
showHideDemo1: false,
};
}
}
state={
Fathernameerror:"",
FatherAgeerror:"",
Fatherreligionerror:"",
FatherOccupationerror:"",
groomfatherlivingstatuserror:"",
Pincode1error:"",
}
continue=e=>{
e.preventDefault();
const isValid=this.validateForm();
if(isValid){
this.props.nextStep();
}
};
back = e => {
e.preventDefault();
this.props.prevStep();
};
validateForm() {
let isValid = true;
const {value:{Fathername,FatherAge,FatherOccupation,Fatherreligion,groomfatherlivingstatus,fatherschooseaddress,
Street1,Village1,Taluk1,District1,State1,Country1,Pincode1}}=this.props;
let Fathernameerror="";
let FatherAgeerror="";
let Fatherreligionerror="";
let FatherOccupationerror="";
let groomfatherlivingstatuserror="";
let Street1error="";
let Village1error="";
let Taluk1error="";
let State1error="";
let District1error="";
let Country1error="";
let Pincode1error="";
if(Fathername===""||Fathername===undefined)
{
Fathernameerror="Please enter fathername";
isValid=false;
}
else{
}
if(Fatherreligion===""||Fatherreligion===undefined)
{
Fatherreligionerror="Please enter fatherreligion";
isValid=false;
}
if(groomfatherlivingstatus===""||groomfatherlivingstatus===undefined)
{
groomfatherlivingstatuserror="Please select groom father living status";
isValid=false;
}
if(groomfatherlivingstatus=="1")
{
if(FatherAge===""||FatherAge===undefined)
{
FatherAgeerror="Please enter father age";
isValid=false;
}
if(FatherOccupation===""||FatherOccupation===undefined)
{
FatherOccupationerror="Please enter father occupation";
isValid=false;
}
}
if(groomfatherlivingstatus==="1"&&fatherschooseaddress===undefined)
{
if(Street1===""||Street1===undefined)
{
Street1error="Please enter street";
isValid=false;
}
if(Village1===""||Village1===undefined)
{
Village1error="Please enter village";
isValid=false;
}
if(Taluk1===""||Taluk1===undefined)
{
Taluk1error="Please enter taluk";
isValid=false;
}
if(District1===""||District1===undefined)
{
District1error="Please enter district";
isValid=false;
}
if(State1===""||State1===undefined)
{
State1error="Please enter state";
isValid=false;
}
if(Country1===""||Country1===undefined)
{
Country1error="Please enter country";
isValid=false;
}
if(Pincode1===""||Pincode1===undefined)
{
Pincode1error="Please enter pincode";
isValid=false;
}
}
else if(groomfatherlivingstatus==="1"&&fatherschooseaddress==="1")
{
}
this.setState({Fathernameerror,FatherAgeerror,Fatherreligionerror,FatherOccupationerror,groomfatherlivingstatuserror,
Street1error,Village1error,Taluk1error,State1error,District1error,Country1error,Pincode1error})
return isValid;
}
myFunction=e=> {
const {value:{Street,Village,District,State,Country,Pincode,Taluk}}=this.props;
var checkBox = document.getElementById("fatherschooseaddress");
if (checkBox.checked === true){
document.getElementById("s_name").value=Street;
document.getElementById("v_name").value=Village;
document.getElementById("d_name").value=District;
document.getElementById("t_name").value=Taluk;
document.getElementById("st_name").value=State;
document.getElementById("c_name").value=Country;
document.getElementById("p_name").value=Pincode;
} else {
document.getElementById("s_name").value="";
document.getElementById("v_name").value="";
document.getElementById("d_name").value="";
document.getElementById("t_name").value="";
document.getElementById("st_name").value="";
document.getElementById("c_name").value="";
document.getElementById("p_name").value="";
}
}
onMenuItemClicked = () => {
this.setState({showHideDemo1: !this.state.showHideDemo1});
}
onMenuItemClickedvalue = () => {
const showHideDemo1=false;
this.setState({showHideDemo1: showHideDemo1});
}
closeform=e=>
{
window.localStorage.clear();
this.setState({referrer: '/sign-in'});
}
render()
{
const {referrer} = this.state;
if (referrer) return <Redirect to={referrer} />;
var fname=localStorage.getItem('firstname');
var lname=localStorage.getItem('lastname');
const { showHideDemo1} = this.state;
const {value,inputChange}=this.props;
const {value:{Fathername,Fatherreligion,groomfatherlivingstatus,FatherAge,FatherOccupation,fatherschooseaddress,
Street1,Village1,Taluk1,District1,State1,Country1,Pincode1}}=this.props;
return(
<div >
<div class="header_design w-100">
<div class="row float-right m-3" style={{marginRight:"20px"}}> <b style={{marginTop: "7px"}}><label >Welcome {fname }</label></b> <button style={{marginTop: "-7px"}} className="btn btn-primary" onClick={() => this.closeform()} style={{marginToptop: "-7px"}}>logout</button></div>
<div class="text-black">
<div class="text-black">
<div class="border-image p-4"></div> </div>
</div> </div>
<div class="body_UX">
<div class="body_color_code m-4">
<div className="img_logo"></div>
<br></br>
<br></br><br></br>
<div class="box m-4">
<div className="form-container ">
<br></br>
<h1>Details of Bridegroom Father </h1>
<br></br>
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label>Father's Name<span style={{color:"red"}}> *</span> </label>
<input type="text" className="input" name="Fathername" value={value.Fathername} onChange={inputChange('Fathername')} />
<p style={{color:"red"}}>{this.state.Fathernameerror}</p>
</div>
</div>
<div class="col-md-3">
<label>Father's Relegion<span style={{color:"red"}}> *</span> </label>
<input type="text" className="input" name="Fatherreligion" value={value.Fatherreligion} onChange={inputChange('Fatherreligion')} />
<p style={{color:"red"}}>{this.state.Fatherreligionerror}</p>
</div>
<div class="col-md-4">
<label>Living Status<span style={{color:"red"}}> *</span> </label>
<div className="form-group">
<input type="radio" name="groomfatherlivingstatus" value="1" onClick={() => this.onMenuItemClicked()} checked={value.groomfatherlivingstatus==="1"} onChange={inputChange('groomfatherlivingstatus')}/>
<label > Alive </label>
<input type="radio" id="dead" name="groomfatherlivingstatus" value="2" onClick={() => this.onMenuItemClickedvalue()} checked={value.groomfatherlivingstatus==="2"} onChange={inputChange('groomfatherlivingstatus')}/>
<label > Dead</label>
</div>
<p style={{color:"red"}}>{this.state.groomfatherlivingstatuserror}</p>
</div>
</div>
<br></br>
<br></br>
<div id="div1" >
{ this.state.showHideDemo1 &&
<div>
<div class="row">
<div class="col-md-3">
<div className="form-group">
<label>Fathers Age</label>
<input type="number" className="input" name="FatherAge" value={value.FatherAge} onChange={inputChange('FatherAge')} />
<p style={{color:"red"}}>{this.state.FatherAgeerror}</p>
</div>
</div>
<div class="col-md-3">
<div id="div2" >
<label>Father's Occupation</label>
<input type="text" className="input" name="FatherOccupation" value={value.FatherOccupation} onChange={inputChange('FatherOccupation')} />
<p style={{color:"red"}}>{this.state.FatherOccupationerror}</p>
</div>
</div>
</div>
<br></br>
<br></br>
<div class="row"><div class="col-md-12"> <label >Father's Address</label></div></div>
<div class="row">
<br></br>
<div class="col-md-3">
<br></br>
<input type="checkbox" id="fatherschooseaddress" name="fatherschooseaddress" value="1" onClick={this.myFunction} checked={value.fatherschooseaddress==="1"} onChange={inputChange('fatherschooseaddress')}/>
<label > Address same as Son </label>
</div>
<div class="col-md-3" >
<div class="form-group">
<label>Street</label>
<input type="text" id="s_name" className="input" name="Street1" value={this.state.Street} onChange={inputChange('Street1')} />
<p style={{color:"red"}}>{this.state.Street1error}</p>
</div>
</div>
<div class="col-md-3" >
<label>Village</label>
<input type="text" id="v_name" className="input" name="Village1" value={this.state.Village} onChange={inputChange('Village1')} />
<p style={{color:"red"}}>{this.state.Village1error}</p>
</div>
<div class="col-md-3" >
<label>Taluk</label>
<input type="text" id="t_name" className="input" name="Taluk1" value={this.state.Taluk} onChange={inputChange('Taluk1')} />
<p style={{color:"red"}}>{this.state.Taluk1error}</p>
</div>
</div>
<br></br>
<div id="div5">
<div class="row">
<div class="col-md-3" >
<label>District</label>
<input type="text" id="d_name" className="input" name="District1" value={this.state.District} onChange={inputChange('District1')} />
<p style={{color:"red"}}>{this.state.District1error}</p>
</div>
<div class="col-md-3" >
<label>State</label>
<input type="text" id="st_name" className="input" name="State1" value={this.state.State} onChange={inputChange('State1')} />
<p style={{color:"red"}}>{this.state.State1error}</p>
</div>
<div class="col-md-3" >
<label>Country</label>
<input type="text" id="c_name" className="input" name="Country1" value={this.state.Country} onChange={inputChange('Country1')} />
<p style={{color:"red"}}>{this.state.Country1error}</p>
</div>
<div class="col-md-3" >
<label>Pincode</label>
<input type="number" id="p_name" className="input" name="Pincode1" value={this.state.Pincode} onChange={inputChange('Pincode1')} />
<p style={{color:"red"}}>{this.state.Pincode1error}</p>
</div>
</div>
</div>
</div>
}
</div>
<br></br>
<br></br>
</div>
</div>
<div className="row">
<div className="col-md-6">
<button className="pev m-4" onClick={this.back}>Previous</button>
</div>
<div className="col-md-6">
<div className="text-right">
<button className="next m-4" onClick={this.continue}>Next</button>
</div>
</div>
</div>
<br></br><br></br> <br></br><br></br> <br></br>
</div>
</div>
</div>
)
}
}
export default Bridegroomfather
|
/*
* @lc app=leetcode id=54 lang=yavascript
*
* [54] Spiral Matrix
*/
/**
* @param {number[][]} matrix
* @return {number[]}
*/
var spiralOrder = function(matrix) {
if (!(matrix.length && matrix[0].length)) {
return [];
}
const deep = Math.min(Math.ceil(matrix.length / 2), Math.ceil(matrix[0].length / 2));
const result = [];
let i = 0;
for (; i < deep; i++) {
let y = i;
let x = i;
const xStart = i;
const xEnd = matrix[i].length - i - 1;
const yStart = i;
const yEnd = matrix.length - i - 1;
while (x < xEnd) {
result.push(matrix[y][x]);
x++;
}
while(y < yEnd) {
result.push(matrix[y][x]);
y++;
}
while(x > xStart) {
result.push(matrix[y][x]);
x--;
}
while(y > yStart) {
result.push(matrix[y][x]);
y--;
}
if (xStart === xEnd && yStart === yEnd) {
result.push(matrix[yStart][xStart]);
}
}
// if (Math.min(matrix.length / 2, matrix[0].length / 2) % 2 !== 0) {
// }
return result;
};
console.log(spiralOrder([
[1, 2, 3, 4],
[5, 6, 7, 8],
[9,10,11,12]
]).join(', '));
|
import React, { Component } from 'react';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import AppBar from 'material-ui/AppBar';
import RaisedButton from 'material-ui/RaisedButton';
import TextField from 'material-ui/TextField';
import FlatButton from 'material-ui/FlatButton';
import helpers from '../utils/helpers';
class DriverPage extends Component {
constructor(props){
super(props);
this.state={
driverFrom:"",
driverTo:""
}
}
handleClick(event){
helpers.saveDriverInfo(this.props.email, this.state.driverFrom, this.state.driverTo)
.then((result) => {
console.log(result);
});
this.props.parentContext.showDriverResultPage();
}
render(){
return(
<div>
<MuiThemeProvider>
<div>
<AppBar
title="Please enter your driving details"
iconElementRight={
<FlatButton
label="Log out"
onClick={(event) => this.props.parentContext.showLoginPage()}
/>}
/>
<br/>
<TextField
type="text"
hintText="Enter your Start Address"
onChange = {(event,newValue) => this.setState({driverFrom:newValue})}
/>
<br/>
<TextField
type="text"
hintText="Enter your Destination Address"
onChange = {(event,newValue) => this.setState({driverTo:newValue})}
/>
<br/>
<RaisedButton label="Submit"
primary={true}
style={style}
onClick={(event) => this.handleClick(event)}
/>
</div>
</MuiThemeProvider>
</div>
);
}
}
const style = {
margin:15
};
export default DriverPage;
|
app = document.getElementById('app')
let topDiv = document.createElement('div')
topDiv.id = 'topDiv'
topDiv.className = 'row'
let avatar = document.createElement('div')
avatar.id = 'avatar'
avatar.innerHTML = `<img src='./assets/avatar.jpg' class='avatar'>`
let info = document.createElement('div')
info.id = 'info'
info.innerHTML = `<img src='./assets/contact.png' class='contactCard'>`
topDiv.append(avatar, info)
let displayBlock = document.createElement('div')
displayBlock.id = 'displayBlock'
displayBlock.className = 'displayBlock'
let pBpreview = document.createElement('div')
pBpreview.id = 'pBpreview'
pBpreview.innerHTML = `
Ed was born & raised in The Bronx, graduated Pace University with a Bachelor's Degree in Finance,
then pursued Software Engineering with Flatiron School. He has experience owning, managing, and working for
consulting and food service businesses. With a niche perspective, the plan is to deliver
quality tailored solutions for the business world. Ed is the perfect translation from business operations
into technical possibilities. Be on the look out for future projects, and thank you for stopping by!
`
displayBlock.append(pBpreview)
let projectBlock = document.createElement('div')
projectBlock.id = 'projectBlock'
projectBlock.className = "row"
let LinkUpCard = document.createElement('div')
LinkUpCard.className = 'logo'
LinkUpCard.innerHTML = `<img src='./assets/LinkUp.png' id='LinkUpCard'>`
let LifeTourCard = document.createElement('div')
LifeTourCard.className = 'logo'
LifeTourCard.innerHTML = `<img src='./assets/LifeTour.png' id='LifeTourCard'>`
let IntelliTrakCard = document.createElement('div')
IntelliTrakCard.className = 'logo'
IntelliTrakCard.innerHTML = `<img src='./assets/Intellitrak.png' id='IntellitrakCard'>`
let PuppyLinkCard = document.createElement('div')
PuppyLinkCard.className = 'logo'
PuppyLinkCard.innerHTML = `<img src='./assets/PuppyLink.png' id='PuppyLinkCard'>`
projectBlock.append(LinkUpCard, LifeTourCard, IntelliTrakCard, PuppyLinkCard)
let LinkUpShow = document.createElement('div')
LinkUpShow.id = 'LinkUpShow'
LinkUpShow.className = 'row'
let LinkUpHomePage = document.createElement('div')
LinkUpHomePage.id = 'linkuphome'
LinkUpHomePage.innerHTML = `<img src='./assets/LinkUp/homepage.png' class='phone-image'>`
let LinkUpLogin = document.createElement('div')
LinkUpLogin.id = 'linkuplogin'
LinkUpLogin.innerHTML = `<img src='./assets/LinkUp/login.png' class='phone-image'>`
let LinkUpCrud = document.createElement('div')
LinkUpCrud.id = 'LinkUpCrud'
LinkUpCrud.innerHTML = `<img src='./assets/LinkUp/crud.png' class='phone-image'>`
let LinkUpMulti = document.createElement('div')
LinkUpMulti.id = 'LinkUpMulti'
LinkUpMulti.innerHTML = `<img src='./assets/LinkUp/mulitusers.png' class='phone-image'>`
let LinkUpChat = document.createElement('div')
LinkUpChat.id = 'LinkUpChat'
LinkUpChat.innerHTML = `<img src='./assets/LinkUp/chat.png' class='phone-image'>`
let LifeTourShow = document.createElement('div')
LifeTourShow.id = 'LifeTourShow'
LifeTourShow.className = 'row'
let LifeTourUserpage = document.createElement('div')
LifeTourUserpage.id = 'LifeTourUserpage'
LifeTourUserpage.innerHTML = `<img src='./assets/LifeTour/homepage.png' class='page-image'>`
let LifeTourLogin = document.createElement('div')
LifeTourLogin.id = 'LifeTourLogin'
LifeTourLogin.innerHTML = `<img src='./assets/LifeTour/login.png' class='page-image'>`
let LifeTourTour = document.createElement('div')
LifeTourTour.id = 'LifeTourTour'
LifeTourTour.innerHTML = `<img src='./assets/LifeTour/tourpage.png' class='page-image'>`
let LifeTourHome = document.createElement('div')
LifeTourHome.id = 'LifeTourHome'
LifeTourHome.innerHTML = `<img src='./assets/LifeTour/home.png' class='page-image'>`
let IntellitrakShow = document.createElement('div')
IntellitrakShow.id = 'IntellitrakShow'
IntellitrakShow.className = 'row'
let IntellitrakCarshow = document.createElement('div')
IntellitrakCarshow.id = 'IntellitrakCarshow'
IntellitrakCarshow.innerHTML = `<img src='./assets/IntelliTrak/carshow.png' class='page-image'>`
let IntellitrakHome = document.createElement('div')
IntellitrakHome.id = 'IntellitrakHome'
IntellitrakHome.innerHTML = `<img src='./assets/IntelliTrak/home.png' class='page-image'>`
let IntellitrakInv = document.createElement('div')
IntellitrakInv.id = 'IntellitrakInv'
IntellitrakInv.innerHTML = `<img src='./assets/IntelliTrak/inventory.png' class='page-image'>`
let IntellitrakPerf = document.createElement('div')
IntellitrakPerf.id = 'IntellitrakPerf'
IntellitrakPerf.innerHTML = `<img src='./assets/IntelliTrak/performance.png' class='page-image'>`
let PuppyLinkShow = document.createElement('div')
PuppyLinkShow.id = 'PuppyLinkShow'
PuppyLinkShow.className = 'row'
let PuppLinkBShow = document.createElement('div')
PuppLinkBShow.id = 'PuppLinkBShow'
PuppLinkBShow.innerHTML = `<img src='./assets/PuppyLink/breedershow.png' class='page-image'>`
let PuppyLinkDShow = document.createElement('div')
PuppyLinkDShow.id = 'PuppyLinkDShow'
PuppyLinkDShow.innerHTML = `<img src='./assets/PuppyLink/dogshow.png' class='page-image'>`
let PuppyLinkPShow = document.createElement('div')
PuppyLinkPShow.id = 'PuppyLinkPShow'
PuppyLinkPShow.innerHTML = `<img src='./assets/PuppyLink/petshow.png' class='page-image'>`
let PuppyLinkUser = document.createElement('div')
PuppyLinkUser.id = 'PuppyLinkUser'
PuppyLinkUser.innerHTML = `<img src='./assets/PuppyLink/userprofile.png' class='page-image'>`
app.append(topDiv, displayBlock, projectBlock)
document.getElementById('projectBlock').addEventListener('click', event => {
logoToggle();
removePrevDiv();
switch (event.target.id) {
case 'LinkUpCard':
event.target.className = 'selectedcard'
displayBlock.append(LinkUpShow)
LinkUpShow.append(LinkUpHomePage, LinkUpLogin, LinkUpCrud, LinkUpMulti, LinkUpChat)
break;
case 'LifeTourCard':
event.target.className = 'selectedcard'
displayBlock.append(LifeTourShow)
LifeTourShow.append(LifeTourUserpage, LifeTourLogin, LifeTourTour, LifeTourHome)
break;
case 'IntellitrakCard':
event.target.className = 'selectedcard'
displayBlock.append(IntellitrakShow)
IntellitrakShow.append(IntellitrakCarshow, IntellitrakHome, IntellitrakInv, IntellitrakPerf)
break;
case 'PuppyLinkCard':
event.target.className = 'selectedcard'
displayBlock.append(PuppyLinkShow)
PuppyLinkShow.append(PuppLinkBShow, PuppyLinkDShow, PuppyLinkPShow, PuppyLinkUser)
break;
}
})
function removePrevDiv(){
if (document.getElementById('pBpreview')){
document.getElementById('pBpreview').remove()
}
if (document.getElementById('LinkUpShow')){
document.getElementById('LinkUpShow').remove()
} else if (document.getElementById('LifeTourShow')){
document.getElementById('LifeTourShow').remove()
} else if (document.getElementById('IntellitrakShow')){
document.getElementById('IntellitrakShow').remove()
} else if (document.getElementById('PuppyLinkShow')){
document.getElementById('PuppyLinkShow').remove()
}
}
function logoToggle(){
if (document.getElementById('LinkUpCard').className === 'selectedcard'){
document.getElementById('LinkUpCard').className = ''
document.getElementById('LifeTourCard').className = ''
document.getElementById('IntellitrakCard').className = ''
document.getElementById('PuppyLinkCard').className = ''
} else if (document.getElementById('LifeTourCard').className === 'selectedcard'){
document.getElementById('LinkUpCard').className = ''
document.getElementById('LifeTourCard').className = ''
document.getElementById('IntellitrakCard').className = ''
document.getElementById('PuppyLinkCard').className = ''
} else if (document.getElementById('IntellitrakCard').className === 'selectedcard'){
document.getElementById('LinkUpCard').className = ''
document.getElementById('LifeTourCard').className = ''
document.getElementById('IntellitrakCard').className = ''
document.getElementById('PuppyLinkCard').className = ''
} else if (document.getElementById('PuppyLinkCard').className === 'selectedcard'){
document.getElementById('LinkUpCard').className = ''
document.getElementById('LifeTourCard').className = ''
document.getElementById('IntellitrakCard').className = ''
document.getElementById('PuppyLinkCard').className = ''
}
}
function on() {
document.getElementById("overlay").style.display = "block";
}
document.getElementById('displayBlock').addEventListener('click', event => {
switch (event.target.parentElement.parentElement.id) {
case 'LinkUpShow':
let LinkUpModal = document.createElement('div')
LinkUpModal.id = "overlay"
app.append(LinkUpModal)
on()
LinkUpModal.innerHTML = `
<div class="container">
<iframe width="600" height="350" src="https://www.youtube.com/embed/K0Y9VCCvfh0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>`
break;
case 'LifeTourShow':
let LifeTourModal = document.createElement('div')
LifeTourModal.id = "overlay"
app.append(LifeTourModal)
on()
LifeTourModal.innerHTML = `
<div class="container">
<iframe width="600" height="350" src="https://www.youtube.com/embed/e2d8cwx4wrw" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>`
break;
case 'IntellitrakShow':
let IntellitrakModal = document.createElement('div')
IntellitrakModal.id = "overlay"
app.append(IntellitrakModal)
on()
IntellitrakModal.innerHTML = `
<div class="container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/5km27Qy2KZQ" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>`
break;
case 'PuppyLinkShow':
let PuppyLinkModal = document.createElement('div')
PuppyLinkModal.id = "overlay"
app.append(PuppyLinkModal)
on()
PuppyLinkModal.innerHTML = `
<div class="container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/lhKQdcUUUNo" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>`
break;
}
})
app.addEventListener('click', event => {
if (event.target.id === 'overlay'){
event.target.remove()
};
})
|
"use strict";
module.exports = (sequelize, DataTypes) => {
const Car = sequelize.define(
"Car",
{
car_title: { allowNull: false, type: DataTypes.STRING },
car_location: { allowNull: false, type: DataTypes.STRING },
//car_brand_id: { allowNull: false, type: DataTypes.INTEGER },
car_model_id: { allowNull: false, type: DataTypes.INTEGER },
car_year: { allowNull: false, type: DataTypes.DATE },
car_transmission: { allowNull: false, type: DataTypes.STRING },
car_price: { allowNull: false, type: DataTypes.STRING },
car_imgs: DataTypes.BLOB
},
{}
);
Car.associate = function (models) {
// associations can be defined here
Car.belongsTo(models.Model, {
foreignKey: "car_model_id",
onDelete: "CASCADE",
as: "model_car"
});
};
return Car;
};
|
const MyError = require('./classError');
function ErrorReport(options) {
this.url = options.url;
this.method = options.method || 'POST';
if (!this.url) {
throw new Error('URL is not defined');
}
}
ErrorReport.prototype.report = function(err, meta) {
meta = meta || {};
if (typeof window !== 'undefined') {
meta.location = window.location;
}
err = this.formatErr(err, meta);
$.ajax({
url: this.url,
method: this.method,
type: 'json',
contentType: "application/json",
data: JSON.stringify(err),
});
};
ErrorReport.prototype.formatErr = function(err, meta) {
if (!err) {
err = new Error();
} else if (Array.isArray(err)) {
err = new Error(err.join());
} else if (typeof err === 'string') {
err = new Error(err);
}
return new MyError(err, meta);
};
module.exports = ErrorReport;
|
var user ={
name:'Vasya',
sayHi: function(){
showName(this);
}
}
function showName(nameObj) {
console.log(nameObj);
}
user.sayHI();
|
import Riotcontrol from 'riotcontrol';
riot.control = Riotcontrol;
riot.EVT = {
pushChart: 'push_chart',
getChart: 'get_chart'
};
|
/*
Send an email to client to notify them of a new biography request
- called from pages/biography -> components/ParallaxBiog/Download.js
- call body = {
email: String
}
*/
// import sendgrid sdk
const sgMail = require('@sendgrid/mail')
import { validate } from './validation'
export default async function(req, res){
// set api key
sgMail.setApiKey(process.env.SENDGRID_SECRET_KEY)
// fetch and deconstruct request body
const { email } = req.body
// format request data to send to sendgrid api
const emailData = {
from: {
name: 'Website Contact',
email: 'no-reply@wrweb.dev'
},
personalizations: [{
to: [{
email: process.env.CLIENT_EMAIL,
name: process.env.CLIENT_NAME
}],
dynamic_template_data: {
requestAddress: email
}
}],
template_id: process.env.SENDGRID_EMAIL_CLIENT_BIO_REQUEST
}
// make the api call if request body can be validated
try {
if(!validate(1, "", email)){
throw new Error('Passed parameters are not valid')
}
await sgMail.send(emailData)
res.status(200).send('Message sent successfully')
}catch (err){
console.error(err.message)
res.status(400).send(`${err.message}`)
}
}
|
import React from 'react'
// The loading animation ( set in css )
const screen = ( { message } ) => (
<div className = 'backdrop loading'>
<div className = "loader"></div>
<div>{ message }</div>
</div>
)
export default screen
|
/* kozmetika -> kod lepo uredjen. nije vise sve u jednoj liniji */
var student = null;
(jQuery)(document).ready(function () {
var tabLink = "#1";
var autocompetecache = {},
lastXhr;
start();
function start() {
(jQuery)("#fb-text").focus(function () {
(jQuery)(this).val("");
});
(jQuery).ajax({
data : "",
url : "cv/index.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "login") {
(jQuery)("#cv-content").hide('blind');
(jQuery)("#cv-content").html(data1[1]);
(jQuery)("#cv-content").show('blind', 'slow');
logInit();
} else if (data1[0] == "cv-login-success") {
student = (jQuery).parseJSON(data1[2]);
(jQuery)("#cv-content").hide('blind', 'slow');
(jQuery)("#cv-content").html(data1[1]);
(jQuery)("#cv-content").show('blind', 'slow');
appInit();
} else if (data1[0] == "pass_change") {
(jQuery)("#cv-content").hide('blind');
(jQuery)("#cv-content").html(data1[1]);
(jQuery)("#cv-content").show('blind', 'slow');
(jQuery)("#ch-stdChange").button().click(function () {
var pass1 = (jQuery)("#ch-stdPass1").val();
var pass2 = (jQuery)("#ch-stdPass2").val();
var key = (jQuery)("#ch-stdKey").val();
(jQuery)(".cv-alert").remove();
if (pass1 == pass2) {
(jQuery)("#ch-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#ch-stdForm :input").attr("disabled", true);
var text = "action=changePassword&pass=" + pass1 + "&key=" + key + "&";
(jQuery).ajax({
data : text,
url : "cv/recovery.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "change_success") {
alert(data1[1]);
GoToLoginForm();
} else {
alert(data1[1]);
}
(jQuery)("#ch-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
} else {
var div = (jQuery)("<div class='cv-alert ui-state-error ui-corner-all' title='Lozinke se ne podudaraju!'></div>");
(jQuery)(div).css("float", "left");
(jQuery)(div).width(16);
(jQuery)(div).append("<center><span class='ui-icon ui-icon-alert'></span></center>");
(jQuery)("#ch-stdPass2").parent().append(div);
}
});
}
},
type : 'POST'
});
};
function logInit() {
(jQuery)("#log-stdLogin").button().click(function () {
if (formCheck((jQuery)("#log-stdForm"))) {
LoginUser();
}
});
(jQuery)("#log-stdReg").click(function () {
GoToRegisterForm();
});
(jQuery)("#log-stdRecovery").click(function () {
GoToRecoveryForm();
});
(jQuery)('#log-stdPass').bind('keypress', function (e) {
if (e.keyCode == 13) {
(jQuery)("#log-stdLogin").trigger("click");
}
});
}
function recoveryInit() {
(jQuery)("#rec-stdRecover").button().click(function () {
RecoverPass();
});
(jQuery)("#rec-stdBack").button().click(function () {
GoToLoginForm();
});
(jQuery)("#rec-stdReg").click(function () {
GoToRegisterForm();
});
}
function regInit() {
(jQuery)("#cv-register").button().click(function () {
RegisterUser();
});
(jQuery)("#reg-stdBack").button().click(function () {
GoToLoginForm();
});
(jQuery)(".cv-datepicker").keydown(function (e) {
e.preventDefault();
});
(jQuery)(".cv-integers").forceNumeric(0);
(jQuery)(".cv-positive-numbers").forceNumeric(1);
(jQuery)(".cv-citySearch").autocomplete({
minLength : 1,
source : function (request, response) {
var term = request.term;
if (term in autocompetecache) {
response(autocompetecache[term]);
return;
}
lastXhr = (jQuery).getJSON("cv/searchCity.php", request, function (data, status, xhr) {
autocompetecache[term] = data;
if (xhr === lastXhr) {
response(data);
}
});
},
select : function (event, ui) {
this.removeClass("ui-autocomplete-loading");
}
}).focusout(function () {
this.removeClass("ui-autocomplete-loading");
});
(jQuery)("#lp-stdBDate").datepicker({
defaultDate : "-20y",
yearRange : "1970:2000",
changeMonth : true,
changeYear : true,
dateFormat : "dd-mm-yy",
constrainInput : true
});
(jQuery)("#lp-stdEmail").blur(function (e) {
(jQuery).ajax({
data : "data=" + this.value + "&",
url : "cv/checkEmail.php",
success : function (data) {
if (data == "false") {
(jQuery)(".cv-alert").remove();
var div = (jQuery)("<div class='cv-alert ui-state-error ui-corner-all' title='Dat email vec postoji u nasoj bazi!'></div>");
(jQuery)(div).css("float", "left");
(jQuery)(div).width(16);
(jQuery)(div).append("<center><span class='ui-icon ui-icon-alert'></span></center>");
(jQuery)("#lp-stdEmail").parent().append(div);
}
},
type : 'POST'
});
});
}
function appInit() {
setScoreBarPosition();
window.fbAsyncInit = function () {
FB.init({
appId : '230468043676033',
status : true,
cookie : true,
xfbml : true,
oauth : true
});
};
(function (d) {
var js,
id = 'facebook-jssdk';
if (d.getElementById(id)) {
return;
}
js = d.createElement('script');
js.id = id;
js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}
(document));
(jQuery)(".cv-scoreBar").css("display", "block");
(jQuery)("#cv-logout").button().click(function () {
student = null;
(jQuery)(".cv-scoreBar").css("display", "none");
GoToLoginForm();
});
(jQuery)("#cvAccordion").accordion({
autoHeight : false,
navigation : true
});
(jQuery)(".cv-menuItem").click(function (e) {
var retVal = true;
if (tabLink == "#1") {
if (formCheck((jQuery)("#lp-stdForm"))) {
savePersonalInfo();
tabLink = this.hash;
} else {
e.stopImmediatePropagation();
retVal = false;
}
} else if (tabLink == "#2") {
if (formCheck((jQuery)("#so-stdForm"))) {
saveHighSchool();
tabLink = this.hash;
} else {
e.stopImmediatePropagation();
retVal = false;
}
} else if (tabLink == "#11") {
saveMisc();
tabLink = this.hash;
} else {
tabLink = this.hash;
}
getGlobalScore(student);
return retVal;
});
(jQuery)(".ui-icon-triangle-1-e").click(function (e) {
(jQuery)(".cv-menuItem").trigger("click");
return false;
});
(jQuery)("#lp-stdSavePersonal").click(function () {
if (formCheck((jQuery)("#lp-stdForm"))) {
savePersonalInfo();
}
});
(jQuery)("#so-stdSaveHighschool").click(function () {
if (formCheck((jQuery)("#so-stdForm"))) {
saveHighSchool();
}
});
(jQuery)("#oi-stdSaveMisc").click(function () {
saveMisc();
});
(jQuery)(".cv-datepicker").keydown(function (e) {
e.preventDefault();
});
(jQuery)(".cv-integers").forceNumeric(0);
(jQuery)(".cv-positive-numbers").forceNumeric(1);
(jQuery)(".cv-citySearch").autocomplete({
minLength : 1,
source : function (request, response) {
var term = request.term;
if (term in autocompetecache) {
response(autocompetecache[term]);
return;
}
lastXhr = (jQuery).getJSON("cv/searchCity.php", request, function (data, status, xhr) {
autocompetecache[term] = data;
if (xhr === lastXhr) {
response(data);
}
});
},
select : function (event, ui) {
this.removeClass("ui-autocomplete-loading");
}
}).focusout(function () {
this.removeClass("ui-autocomplete-loading");
});
(jQuery)(".cv-langSearch").autocomplete({
minLength : 1,
source : function (request, response) {
var term = request.term;
if (term in autocompetecache) {
response(autocompetecache[term]);
return;
}
lastXhr = (jQuery).getJSON("cv/searchLang.php", request, function (data, status, xhr) {
autocompetecache[term] = data;
if (xhr === lastXhr) {
response(data);
}
});
},
select : function (event, ui) {
this.removeClass("ui-autocomplete-loading");
}
}).focusout(function () {
this.removeClass("ui-autocomplete-loading");
});
(jQuery)(".cv-year-picker").datepicker({
dateFormat : 'yy',
changeYear : true,
showButtonPanel : true,
stepMonths : 12,
monthNames : ['', '', '', '', '', '', '', '', '', '', '', ''],
yearRange : '1980:2015',
closeText : 'Izaberi',
currentText : 'Danas',
onClose : function (dateText, inst) {
var year = (jQuery)("#ui-datepicker-div .ui-datepicker-year :selected").val();
(jQuery)(this).val((jQuery).datepicker.formatDate('yy', new Date(year, 1, 1)));
},
onChangeMonthYear : function (year, month, inst) {
(jQuery)(this).val((jQuery).datepicker.formatDate('yy', new Date(year, 1, 0)));
}
});
(jQuery)(".cv-year-picker").focus(function () {
(jQuery)(".ui-datepicker-calendar").hide();
});
(jQuery)(".cv-year-month-picker").datepicker({
dateFormat : 'MM yy',
changeYear : true,
changeMonth : true,
showButtonPanel : true,
yearRange : '1970:2015',
monthNamesShort : ['Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Avg', 'Sep', 'Okt', 'Nov', 'Dec'],
closeText : 'Izaberi',
currentText : 'Danas',
onClose : function (dateText, inst) {
var month = (jQuery)("#ui-datepicker-div .ui-datepicker-month :selected").val();
var year = (jQuery)("#ui-datepicker-div .ui-datepicker-year :selected").val();
(jQuery)(this).val((jQuery).datepicker.formatDate('MM yy', new Date(year, month, 1), {
monthNames : ['Januar', 'Februar', 'Mart', 'April', 'Maj', 'Jun', 'Jul', 'Avgust', 'Septembar', 'Oktobar', 'Novembar', 'Decembar']
}));
},
onChangeMonthYear : function (year, month, inst) {
(jQuery)(this).val((jQuery).datepicker.formatDate('MM yy', new Date(year, month, 0), {
monthNames : ['Januar', 'Februar', 'Mart', 'April', 'Maj', 'Jun', 'Jul', 'Avgust', 'Septembar', 'Oktobar', 'Novembar', 'Decembar']
}));
}
});
(jQuery)(".cv-year-month-picker").focus(function () {
(jQuery)(".ui-datepicker-calendar").hide();
});
(jQuery)("#lp-stdBDate").datepicker({
defaultDate : "-20y",
changeMonth : true,
changeYear : true,
dateFormat : "dd-mm-yy",
constrainInput : true
});
function savePersonalInfo() {
var stud = new Student();
stud.name = (jQuery)("#lp-stdName").val();
stud.pname = (jQuery)("#lp-stdPName").val();
stud.sname = (jQuery)("#lp-stdSName").val();
stud.gender = (jQuery)("#lp-stdGender").val();
stud.bdate = (jQuery)("#lp-stdBDate").val();
stud.email = (jQuery)("#lp-stdEmail").val();
stud.address1 = (jQuery)("#lp-stdAddress1").val();
stud.city1 = (jQuery)("#lp-stdCity1").val();
stud.state1 = (jQuery)("#lp-stdState1").val();
stud.address2 = (jQuery)("#lp-stdAddress2").val();
stud.city2 = (jQuery)("#lp-stdCity2").val();
stud.state2 = (jQuery)("#lp-stdState2").val();
stud.phone1 = (jQuery)("#lp-stdPhone1").val();
stud.phone2 = (jQuery)("#lp-stdPhone2").val();
if (!isPersonalDataChanged(stud))
return;
(jQuery)("#lp-stdForm :input").attr("disabled", true);
(jQuery)("#cv-menuPersonalInfo").html("Licni podaci (Snimanje u toku...)");
(jQuery)("#cv-menuPersonalInfo").css("font-weight", "bold");
text = "action=savePersonal&data=" + encodeURIComponent(JSON.stringify(stud)) + "&";
(jQuery).ajax({
data : text,
url : "cv/student.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "student_success") {
(jQuery)("#cv-menuPersonalInfo").css("font-weight", "normal");
student.name = stud.name;
student.pname = stud.pname;
student.sname = stud.sname;
student.gender = stud.gender;
student.bdate = stud.bdate;
student.email = stud.email;
student.address1 = stud.address1;
student.address2 = stud.address2
student.city1 = stud.city1;
student.city2 = stud.city2;
student.state1 = stud.state1;
student.state2 = stud.state2;
student.phone1 = stud.phone1;
student.phone2 = stud.phone2;
getGlobalScore(student);
} else if (data1[0] == "student_nsuccess") {
alert(data1[1]);
} else {
alert(data);
}
(jQuery)("#lp-stdForm :input").attr("disabled", false);
(jQuery)("#cv-menuPersonalInfo").html("Licni podaci");
},
type : 'POST'
});
}
(jQuery)("#so-stdCity").autocomplete({
minLength : 1,
source : function (request, response) {
var term = request.term;
if (term in autocompetecache) {
response(autocompetecache[term]);
return;
}
lastXhr = (jQuery).getJSON("cv/searchCity.php", request, function (data, status, xhr) {
autocompetecache[term] = data;
if (xhr === lastXhr) {
response(data);
}
});
},
select : function (event, ui) {
this.removeClass("ui-autocomplete-loading");
}
}).focusout(function () {
this.removeClass("ui-autocomplete-loading");
});
function saveHighSchool() {
var school = new HighSchool();
school.name = (jQuery)("#so-stdName").val();
school.city = (jQuery)("#so-stdCity").val();
school.state = (jQuery)("#so-stdState").val();
school.course = (jQuery)("#so-stdCourse").val();
school.gyear = (jQuery)("#so-stdGYear").val();
school.type = (jQuery)("#so-stdType").val();
if (!isHighSchoolChanged(school))
return;
(jQuery)("#so-stdForm :input").attr("disabled", true);
(jQuery)("#cv-menuHighSchool").html("Srednje obrazovanje (Snimanje u toku...)");
(jQuery)("#cv-menuHighSchool").css("font-weight", "bold");
text = "action=saveHighschool&data=" + encodeURIComponent(JSON.stringify(school)) + "&";
(jQuery).ajax({
data : text,
url : "cv/student.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "highschool_success") {
(jQuery)("#cv-menuHighSchool").css("font-weight", "normal");
student.highschool.name = school.name;
student.highschool.city = school.city;
student.highschool.state = school.state;
student.highschool.course = school.course;
student.highschool.gyear = school.gyear;
student.highschool.type = school.type;
getGlobalScore(student);
} else if (data1[0] == "highschool_success") {
alert(data1[1]);
} else {
alert(data);
}
(jQuery)("#so-stdForm :input").attr("disabled", false);
(jQuery)("#cv-menuHighSchool").html("Srednje obrazovanje");
},
type : 'POST'
});
}
(jQuery)("#dialog:ui-dialog").dialog("destroy");
(jQuery)("#vo-stdForm").dialog({
autoOpen : false,
height : 760,
width : 648,
modal : true,
draggable : false,
resizable : false,
title : "Dodaj novo visoko obrazovanje:"
});
(jQuery)("#vo-stdAddNewEducation").click(function () {
(jQuery)("#vo-stdForm").dialog("option", "buttons", [{
text : "Dodaj",
click : function () {
if (formCheck("#vo-stdForm")) {
student.faculties[student.faculties.length] = AddNewFaculty();
(jQuery)("#vo-stdContent-Faculties").removeAttr('hidden');
return true;
} else
return false;
}
}, {
text : "Nazad",
click : function () {
(jQuery)(this).dialog("close");
}
}
]);
ClearForm((jQuery)("#vo-stdForm"));
(jQuery)("#vo-stdForm").dialog("open");
});
(jQuery)(".cv-vo-graduated-only").parent().parent().hide();
(jQuery)(".cv-vo-final-only").parent().parent().hide();
(jQuery)("#vo-stdStatus").change(function () {
if ((jQuery)(this).val() == "Student") {
(jQuery)(".cv-vo-student-only").parent().parent().show();
(jQuery)(".cv-vo-graduated-only").parent().parent().hide();
(jQuery)(".cv-vo-final-only").parent().parent().hide();
} else if ((jQuery)(this).val() == "Apsolvent") {
(jQuery)(".cv-vo-student-only").parent().parent().hide();
(jQuery)(".cv-vo-graduated-only").parent().parent().hide();
(jQuery)(".cv-vo-final-only").parent().parent().show();
} else {
(jQuery)(".cv-vo-student-only").parent().parent().hide();
(jQuery)(".cv-vo-graduated-only").parent().parent().show();
(jQuery)(".cv-vo-final-only").parent().parent().hide();
}
});
(jQuery)(".cv-vo-delete").click(function () {
var id = (jQuery)(this).next().val();
deleteFaculty(id);
});
(jQuery)(".cv-vo-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getFacultyInfo(id);
});
(jQuery)("#vo-stdUni").change(function () {
(jQuery)("#vo-stdUni2").remove();
(jQuery)("#vo-stdFaculty2").remove();
(jQuery)("#vo-stdFaculty").show();
if ((jQuery)(this).val() == "Nije u listi") {
(jQuery)('<input type="text" name="stdUni" id="vo-stdUni2" class="cv-input cv-mandatory"/>').insertAfter(this);
(jQuery)('<input type="text" name="stdFaculty" id="vo-stdFaculty2" class="cv-input cv-mandatory"/>').insertAfter((jQuery)("#vo-stdFaculty"));
(jQuery)("#vo-stdFaculty").hide();
} else {
(jQuery)("#vo-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#vo-stdForm :input").attr("disabled", true);
(jQuery)("#vo-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
var text = "action=getFacultiesByUni&uni=" + encodeURIComponent((jQuery)(this).val()) + "&";
(jQuery).ajax({
data : text,
url : "cv/faculty.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "faculty_success") {
(jQuery)("#vo-stdFaculty option").remove()
var faculties = (jQuery).parseJSON(data1[1]);
for (var i = 0; i < faculties.length; i++) {
(jQuery)("#vo-stdFaculty").append('<option value="' + faculties[i] + '">' + faculties[i] + '</option>');
}
(jQuery)("#vo-stdFaculty").append('<option value="Nije u listi">Nije u listi</option>');
}
(jQuery)("#vo-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
(jQuery)("#vo-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
},
type : 'POST'
});
}
});
(jQuery)("#vo-stdFaculty").change(function () {
(jQuery)("#vo-stdFaculty2").remove();
if ((jQuery)(this).val() == "Nije u listi") {
(jQuery)('<input type="text" name="stdFaculty" id="vo-stdFaculty2" class="cv-input cv-mandatory"/>').insertAfter(this);
}
});
function AddNewFaculty() {
var fac = new Faculty();
if ((jQuery)("#vo-stdUni").val() == "Nije u listi") {
fac.university = (jQuery)("#vo-stdUni2").val();
fac.name = (jQuery)("#vo-stdFaculty2").val();
} else {
fac.university = (jQuery)("#vo-stdUni").val();
if ((jQuery)("#vo-stdFaculty").val() == "Nije u listi") {
fac.name = (jQuery)("#vo-stdFaculty2").val();
} else {
fac.name = (jQuery)("#vo-stdFaculty").val();
}
}
fac.city = (jQuery)("#vo-stdCity").val();
fac.state = (jQuery)("#vo-stdState").val();
fac.course = (jQuery)("#vo-stdCourse").val();
fac.spec = (jQuery)("#vo-stdSpec").val();
fac.status = (jQuery)("#vo-stdStatus").val();
fac.ayear = (jQuery)("#vo-stdAYear").val();
fac.agrade = (jQuery)("#vo-stdAGrade").val();
fac.relSub = (jQuery)("#vo-stdRelSub").val();
fac.gsub = (jQuery)("#vo-stdNoSub").val();
if (fac.status == "Student") {
fac.syear = (jQuery)("#vo-stdSYear").val();
fac.gyear = '';
fac.gwork = '';
fac.rsub = '';
} else if (fac.status == "Apsolvent") {
fac.syear = '';
fac.rsub = (jQuery)("#vo-stdRSub").val();
fac.gyear = '';
fac.gwork = '';
} else {
fac.syear = '';
fac.rsub = '';
fac.gyear = (jQuery)("#vo-stdGYear").val();
fac.gwork = (jQuery)("#vo-stdGWork").val();
}
(jQuery)("#vo-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#vo-stdForm :input").attr("disabled", true);
(jQuery)("#vo-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
text = "action=addFaculty&data=" + encodeURIComponent(JSON.stringify(fac)) + "&";
(jQuery).ajax({
data : text,
url : "cv/faculty.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "faculty_success") {
(jQuery)("#cv-loading-parent").remove();
fac.id = data1[1];
var i = 0;
var textToInsert = [];
textToInsert[i++] = "<tr><td>";
textToInsert[i++] = fac.name;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = fac.university;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = fac.status;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = fac.syear;
textToInsert[i++] = "</td><td><span id='vo-edit'";
textToInsert[i++] = " title='Pogledaj/Izmeni' class='cv-icon ui-icon ui-icon-pencil cv-vo-edit'></span><span id='vo-del";
textToInsert[i++] = " title='Obrisi' class='cv-icon ui-icon ui-icon-trash cv-vo-delete'></span>";
textToInsert[i++] = "<input id='vo-hInput-"
textToInsert[i++] = fac.id;
textToInsert[i++] = "' type='hidden' value='";
textToInsert[i++] = fac.id;
textToInsert[i++] = "'/></td></tr>";
(jQuery)("#vo-stdContent-Faculties").append(textToInsert.join(''));
(jQuery)("#vo-stdContent-Faculties").show();
(jQuery)("#vo-stdForm").dialog("close");
(jQuery)(".cv-vo-edit").unbind("click");
(jQuery)(".cv-vo-edit").click(function () {
var facId = (jQuery)(this).next().next().val();
getFacultyInfo(facId);
});
(jQuery)(".cv-vo-delete").unbind("click");
(jQuery)(".cv-vo-delete").click(function () {
var facId = (jQuery)(this).next().val();
deleteFaculty(facId);
});
getGlobalScore(student);
} else if (data1[0] == "faculty_nsuccess") {
alert(data1[1]);
}
(jQuery)("#vo-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
(jQuery)("#vo-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
return fac;
}
function getFacultyInfo(id) {
for (var i = 0; i < student.faculties.length; i++) {
if (student.faculties[i].id == id)
break;
}
fac = student.faculties[i];
(jQuery)("#vo-stdForm").dialog("open");
(jQuery)("#vo-stdUni").val(fac.university);
(jQuery)("#vo-stdFaculty").val(fac.name);
(jQuery)("#vo-stdCity").val(fac.city);
(jQuery)("#vo-stdState").val(fac.state);
(jQuery)("#vo-stdCourse").val(fac.course);
(jQuery)("#vo-stdSpec").val(fac.spec);
(jQuery)("#vo-stdStatus").val(fac.status);
(jQuery)("#vo-stdAYear").val(fac.ayear);
(jQuery)("#vo-stdGYear").val(fac.gyear == 0 ? "" : fac.gyear);
(jQuery)("#vo-stdNoSub").val(fac.gsub == 0 ? "" : fac.gsub);
(jQuery)("#vo-stdSYear").val(fac.syear);
(jQuery)("#vo-stdRSub").val(fac.rsub);
(jQuery)("#vo-stdAGrade").val(fac.agrade == 0 ? "" : fac.agrade);
(jQuery)("#vo-stdRelSub").val(fac.relSub);
(jQuery)("#vo-stdGWork").val(fac.gwork);
(jQuery)("#vo-stdStatus").trigger("change");
(jQuery)("#vo-stdForm").dialog("option", "buttons", [{
text : "Izmeni",
click : function () {
if (formCheck((jQuery)("#vo-stdForm"))) {
saveFacultyInfo(id);
return true;
} else
return false;
}
}, {
text : "Nazad",
click : function () {
(jQuery)(this).dialog("close");
}
}
]);
}
function saveFacultyInfo(id) {
var fac = new Faculty();
if ((jQuery)("#vo-stdUni").val() == "Nije u listi") {
fac.university = (jQuery)("#vo-stdUni2").val();
fac.name = (jQuery)("#vo-stdFaculty2").val();
} else {
fac.university = (jQuery)("#vo-stdUni").val();
if ((jQuery)("#vo-stdFaculty").val() == "Nije u listi") {
fac.name = (jQuery)("#vo-stdFaculty2").val();
} else {
fac.name = (jQuery)("#vo-stdFaculty").val();
}
}
fac.city = (jQuery)("#vo-stdCity").val();
fac.state = (jQuery)("#vo-stdState").val();
fac.course = (jQuery)("#vo-stdCourse").val();
fac.spec = (jQuery)("#vo-stdSpec").val();
fac.status = (jQuery)("#vo-stdStatus").val();
fac.ayear = (jQuery)("#vo-stdAYear").val();
fac.agrade = (jQuery)("#vo-stdAGrade").val();
fac.relSub = (jQuery)("#vo-stdRelSub").val();
fac.gsub = (jQuery)("#vo-stdNoSub").val();
if (fac.status == "Student") {
fac.syear = (jQuery)("#vo-stdSYear").val();
fac.gyear = '';
fac.gwork = '';
fac.rsub = '';
} else if (fac.status == "Apsolvent") {
fac.syear = '';
fac.rsub = (jQuery)("#vo-stdRSub").val();
fac.gyear = '';
fac.gwork = '';
} else {
fac.syear = '';
fac.rsub = '';
fac.gyear = (jQuery)("#vo-stdGYear").val();
fac.gwork = (jQuery)("#vo-stdGWork").val();
}
(jQuery)("#vo-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#vo-stdForm :input").attr("disabled", true);
(jQuery)("#vo-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
fac.id = id;
text = "action=saveFaculty&data=" + encodeURIComponent(JSON.stringify(fac)) + "&";
(jQuery).ajax({
data : text,
url : "cv/faculty.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "faculty_success") {
for (var i = 0; i < student.faculties.length; i++) {
if (student.faculties[i].id == id) {
student.faculties[i] = fac;
break;
}
}
var i = 0;
var textToInsert = [];
textToInsert[i++] = "<tr><td>";
textToInsert[i++] = fac.name;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = fac.university;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = fac.status;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = fac.syear;
textToInsert[i++] = "</td><td><span";
textToInsert[i++] = " title='Pogledaj/Izmeni' class='cv-icon ui-icon ui-icon-pencil cv-vo-edit'></span><span";
textToInsert[i++] = " title='Obrisi' class='cv-icon ui-icon ui-icon-trash cv-vo-delete'></span>";
textToInsert[i++] = "<input id='vo-hInput-"
textToInsert[i++] = fac.id;
textToInsert[i++] = "' type='hidden' value='";
textToInsert[i++] = fac.id;
textToInsert[i++] = "'/></td></tr>";
(jQuery)("#vo-hInput-" + id).parent().parent().replaceWith(textToInsert.join(''));
(jQuery)(".cv-vo-edit").unbind("click");
(jQuery)(".cv-vo-edit").click(function () {
var facId = (jQuery)(this).next().next().val();
getFacultyInfo(facId);
});
(jQuery)(".cv-vo-delete").unbind("click");
(jQuery)(".cv-vo-delete").click(function () {
var facId = (jQuery)(this).next().val();
deleteFaculty(facId);
});
(jQuery)("#cv-loading-parent").remove();
(jQuery)("#vo-stdForm").dialog("close");
getGlobalScore(student);
} else if (data1[0] == "faculty_nsuccess") {
alert(data1[1]);
}
(jQuery)("#vo-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
(jQuery)("#vo-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
return fac;
}
function deleteFaculty(id) {
(jQuery)("#vo-stdFaculties").append("<div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div>");
text = "action=deleteFaculty&id=" + id + "&";
(jQuery).ajax({
data : text,
url : "cv/faculty.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "faculty_success") {
var index = -1;
for (var i = 0; i < student.faculties.length; i++) {
if (student.faculties[i].id == id) {
index = i;
break;
}
}
student.faculties.splice(index, 1);
(jQuery)("#vo-hInput-" + id).parent().parent().remove();
if (student.faculties.length == 0) {
(jQuery)("#vo-stdContent-Faculties").hide();
}
getGlobalScore(student);
} else if (data1[0] == "faculty_nsuccess") {
alert(data1[1]);
}
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
}
(jQuery)("#po-stdForm").dialog({
autoOpen : false,
height : 770,
width : 648,
modal : true,
draggable : false,
resizable : false,
title : "Dodaj nove postdiplomske studije:"
});
(jQuery)("#po-stdAddNewEducation").click(function () {
(jQuery)("#po-stdForm").dialog("option", "buttons", [{
text : "Dodaj",
click : function () {
if (formCheck((jQuery)("#po-stdForm"))) {
student.postgrads[student.postgrads.length] = AddNewPostgrad();
(jQuery)("#po-stdContent-Faculties").removeAttr('hidden');
return true;
} else
return false;
}
}, {
text : "Nazad",
click : function () {
(jQuery)(this).dialog("close");
}
}
]);
ClearForm((jQuery)("#po-stdForm"));
(jQuery)("#po-stdForm").dialog("open");
});
(jQuery)(".cv-po-graduated-only").parent().parent().hide();
(jQuery)(".cv-po-final-only").parent().parent().hide();
(jQuery)("#po-stdStatus").change(function () {
if ((jQuery)(this).val() == "Student") {
(jQuery)(".cv-po-student-only").parent().parent().show();
(jQuery)(".cv-po-graduated-only").parent().parent().hide();
(jQuery)(".cv-po-final-only").parent().parent().hide();
} else if ((jQuery)(this).val() == "Apsolvent") {
(jQuery)(".cv-po-student-only").parent().parent().hide();
(jQuery)(".cv-po-graduated-only").parent().parent().hide();
(jQuery)(".cv-po-final-only").parent().parent().show();
} else {
(jQuery)(".cv-po-student-only").parent().parent().hide();
(jQuery)(".cv-po-graduated-only").parent().parent().show();
(jQuery)(".cv-po-final-only").parent().parent().hide();
}
});
(jQuery)(".cv-po-delete").click(function () {
var id = (jQuery)(this).next().val();
deletePostgrad(id);
});
(jQuery)(".cv-po-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getPostgradInfo(id);
});
(jQuery)("#po-stdUni").change(function () {
(jQuery)("#po-stdUni2").remove();
(jQuery)("#po-stdFaculty2").remove();
(jQuery)("#po-stdFaculty").show();
if ((jQuery)(this).val() == "Nije u listi") {
(jQuery)('<input type="text" name="stdUni" id="po-stdUni2" class="cv-input cv-mandatory"/>').insertAfter(this);
(jQuery)('<input type="text" name="stdFaculty" id="po-stdFaculty2" class="cv-input cv-mandatory"/>').insertAfter((jQuery)("#po-stdFaculty")); ;
(jQuery)("#po-stdFaculty").hide();
} else {
(jQuery)("#po-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#po-stdForm :input").attr("disabled", true);
(jQuery)("#po-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
var text = "action=getFacultiesByUni&uni=" + encodeURIComponent((jQuery)(this).val()) + "&";
(jQuery).ajax({
data : text,
url : "cv/faculty.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "faculty_success") {
(jQuery)("#po-stdFaculty option").remove()
var faculties = (jQuery).parseJSON(data1[1]);
for (var i = 0; i < faculties.length; i++) {
(jQuery)("#po-stdFaculty").append('<option value="' + faculties[i] + '">' + faculties[i] + '</option>');
}
(jQuery)("#po-stdFaculty").append('<option value="Nije u listi">Nije u listi</option>');
}
(jQuery)("#po-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
(jQuery)("#po-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
},
type : 'POST'
});
}
});
(jQuery)("#po-stdFaculty").change(function () {
(jQuery)("#po-stdFaculty2").remove();
if ((jQuery)(this).val() == "Nije u listi") {
(jQuery)('<input type="text" name="stdFaculty" id="po-stdFaculty2" class="cv-input cv-mandatory"/>').insertAfter(this);
}
});
function AddNewPostgrad() {
var post = new Postgrad();
if ((jQuery)("#po-stdUni").val() == "Nije u listi") {
post.university = (jQuery)("#po-stdUni2").val();
post.name = (jQuery)("#po-stdFaculty2").val();
} else {
post.university = (jQuery)("#po-stdUni").val();
if ((jQuery)("#po-stdFaculty").val() == "Nije u listi") {
post.name = (jQuery)("#po-stdFaculty2").val();
} else {
post.name = (jQuery)("#po-stdFaculty").val();
}
}
post.city = (jQuery)("#po-stdCity").val();
post.state = (jQuery)("#po-stdState").val();
post.type = (jQuery)("#po-stdType").val();
post.course = (jQuery)("#po-stdCourse").val();
post.spec = (jQuery)("#po-stdSpec").val();
post.status = (jQuery)("#po-stdStatus").val();
post.ayear = (jQuery)("#po-stdAYear").val();
post.agrade = (jQuery)("#po-stdAGrade").val();
post.relSub = (jQuery)("#po-stdRelSub").val();
post.gsub = (jQuery)("#po-stdNoSub").val();
if (post.status == "Student") {
post.syear = (jQuery)("#po-stdSYear").val();
post.gyear = '';
post.gwork = '';
post.rsub = '';
} else if (post.status == "Apsolvent") {
post.syear = '';
post.rsub = (jQuery)("#po-stdRSub").val();
post.gyear = '';
post.gwork = '';
} else {
post.syear = '';
post.rsub = '';
post.gyear = (jQuery)("#po-stdGYear").val();
post.gwork = (jQuery)("#po-stdGWork").val();
}
(jQuery)("#po-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#po-stdForm :input").attr("disabled", true);
(jQuery)("#po-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
text = "action=addPostgrad&data=" + encodeURIComponent(JSON.stringify(post)) + "&";
(jQuery).ajax({
data : text,
url : "cv/postgrad.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "postgrad_success") {
(jQuery)("#cv-loading-parent").remove();
post.id = data1[1];
var i = 0;
var textToInsert = [];
textToInsert[i++] = "<tr><td>";
textToInsert[i++] = post.name;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = post.university;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = post.status;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = post.syear;
textToInsert[i++] = "</td><td><span";
textToInsert[i++] = " title='Pogledaj/Izmeni' class='cv-icon ui-icon ui-icon-pencil cv-po-edit'></span><span";
textToInsert[i++] = " title='Obrisi' class='cv-icon ui-icon ui-icon-trash cv-po-delete'></span>";
textToInsert[i++] = "<input id='po-hInput-"
textToInsert[i++] = post.id;
textToInsert[i++] = "' type='hidden' value='";
textToInsert[i++] = post.id;
textToInsert[i++] = "'/></td></tr>";
(jQuery)("#po-stdContent-Faculties").append(textToInsert.join(''));
(jQuery)("#po-stdContent-Faculties").show();
(jQuery)("#po-stdForm").dialog("close");
(jQuery)(".cv-po-edit").unbind("click");
(jQuery)(".cv-po-edit").click(function () {
var facId = (jQuery)(this).next().next().val();
getPostgradInfo(facId);
});
(jQuery)(".cv-po-delete").unbind("click");
(jQuery)(".cv-po-delete").click(function () {
var facId = (jQuery)(this).next().val();
deletePostgrad(facId);
});
getGlobalScore(student);
} else if (data1[0] == "postgrad_nsuccess") {
alert(data1[1]);
}
(jQuery)("#po-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
(jQuery)("#po-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
return post;
}
function getPostgradInfo(id) {
for (var i = 0; i < student.postgrads.length; i++) {
if (student.postgrads[i].id == id)
break;
}
post = student.postgrads[i];
(jQuery)("#po-stdForm").dialog("open");
(jQuery)("#po-stdUni").val(post.university);
(jQuery)("#po-stdFaculty").val(post.name);
(jQuery)("#po-stdCity").val(post.city);
(jQuery)("#po-stdState").val(post.state);
(jQuery)("#po-stdType").val(post.type);
(jQuery)("#po-stdCourse").val(post.course);
(jQuery)("#po-stdSpec").val(post.spec);
(jQuery)("#po-stdStatus").val(post.status);
(jQuery)("#po-stdAYear").val(post.ayear);
(jQuery)("#po-stdGYear").val(post.gyear == 0 ? "" : post.gyear);
(jQuery)("#po-stdNoSub").val(post.gsub == 0 ? "" : post.gsub);
(jQuery)("#po-stdSYear").val(post.syear);
(jQuery)("#po-stdRSub").val(post.rsub);
(jQuery)("#po-stdAGrade").val(post.agrade == 0 ? "" : post.agrade);
(jQuery)("#po-stdRelSub").val(post.relSub);
(jQuery)("#po-stdGWork").val(post.gwork);
(jQuery)("#po-stdStatus").trigger("change");
(jQuery)("#po-stdForm").dialog("option", "buttons", [{
text : "Izmeni",
click : function () {
if (formCheck((jQuery)("#po-stdForm"))) {
savePostgradInfo(id);
return true;
} else
return false;
}
}, {
text : "Nazad",
click : function () {
(jQuery)(this).dialog("close");
}
}
]);
}
function savePostgradInfo(id) {
var post = new Postgrad();
if ((jQuery)("#po-stdUni").val() == "Nije u listi") {
post.university = (jQuery)("#po-stdUni2").val();
post.name = (jQuery)("#po-stdFaculty2").val();
} else {
post.university = (jQuery)("#po-stdUni").val();
if ((jQuery)("#po-stdFaculty").val() == "Nije u listi") {
post.name = (jQuery)("#po-stdFaculty2").val();
} else {
post.name = (jQuery)("#po-stdFaculty").val();
}
}
post.city = (jQuery)("#po-stdCity").val();
post.state = (jQuery)("#po-stdState").val();
post.type = (jQuery)("#po-stdType").val();
post.course = (jQuery)("#po-stdCourse").val();
post.spec = (jQuery)("#po-stdSpec").val();
post.status = (jQuery)("#po-stdStatus").val();
post.ayear = (jQuery)("#po-stdAYear").val();
post.agrade = (jQuery)("#po-stdAGrade").val();
post.relSub = (jQuery)("#po-stdRelSub").val();
post.gsub = (jQuery)("#po-stdNoSub").val();
if (post.status == "Student") {
post.syear = (jQuery)("#po-stdSYear").val();
post.gyear = '';
post.gwork = '';
post.rsub = '';
} else if (post.status == "Apsolvent") {
post.syear = '';
post.rsub = (jQuery)("#po-stdRSub").val();
post.gyear = '';
post.gwork = '';
} else {
post.syear = '';
post.rsub = '';
post.gyear = (jQuery)("#po-stdGYear").val();
post.gwork = (jQuery)("#po-stdGWork").val();
}
(jQuery)("#po-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#po-stdForm :input").attr("disabled", true);
(jQuery)("#po-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
post.id = id;
text = "action=savePostgrad&data=" + encodeURIComponent(JSON.stringify(post)) + "&";
(jQuery).ajax({
data : text,
url : "cv/postgrad.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "postgrad_success") {
for (var i = 0; i < student.postgrads.length; i++) {
if (student.postgrads[i].id == id) {
student.postgrads[i] = post;
break;
}
}
var i = 0;
var textToInsert = [];
textToInsert[i++] = "<tr><td>";
textToInsert[i++] = post.name;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = post.university;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = post.status;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = post.syear;
textToInsert[i++] = "</td><td><span";
textToInsert[i++] = " title='Pogledaj/Izmeni' class='cv-icon ui-icon ui-icon-pencil cv-po-edit'></span><span ";
textToInsert[i++] = " title='Obrisi' class='cv-icon ui-icon ui-icon-trash cv-po-delete'></span>";
textToInsert[i++] = "<input id='po-hInput-"
textToInsert[i++] = post.id;
textToInsert[i++] = "' type='hidden' value='";
textToInsert[i++] = post.id;
textToInsert[i++] = "'/></td></tr>";
(jQuery)("#po-hInput-" + id).parent().parent().replaceWith(textToInsert.join(''));
(jQuery)(".cv-po-edit").unbind("click");
(jQuery)(".cv-po-edit").click(function () {
var facId = (jQuery)(this).next().next().val();
getPostgradInfo(facId);
});
(jQuery)(".cv-po-delete").unbind("click");
(jQuery)(".cv-po-delete").click(function () {
var facId = (jQuery)(this).next().val();
deletePostgrad(facId);
});
(jQuery)("#cv-loading-parent").remove();
(jQuery)("#po-stdForm").dialog("close");
getGlobalScore(student);
} else if (data1[0] == "postgrad_nsuccess") {
alert(data1[1]);
}
(jQuery)("#po-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
(jQuery)("#po-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
return post;
}
function deletePostgrad(id) {
(jQuery)("#po-stdFaculties").append("<div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div>");
text = "action=deletePostgrad&id=" + id + "&";
(jQuery).ajax({
data : text,
url : "cv/postgrad.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "postgrad_success") {
var index = -1;
for (var i = 0; i < student.postgrads.length; i++) {
if (student.postgrads[i].id == id) {
index = i;
break;
}
}
student.postgrads.splice(index, 1);
(jQuery)("#po-hInput-" + id).parent().parent().remove();
if (student.postgrads.length == 0) {
(jQuery)("#po-stdContent-Faculties").hide();
}
getGlobalScore(student);
} else if (data1[0] == "postgrad_nsuccess") {
alert(data1[1]);
}
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
}
(jQuery)("#dialog:ui-dialog").dialog("destroy");
(jQuery)("#ri-stdForm").dialog({
autoOpen : false,
height : 500,
width : 648,
modal : true,
draggable : false,
resizable : false,
title : "Dodaj novo radno iskustvo:"
});
(jQuery)(".cv-ri-delete").click(function () {
var id = (jQuery)(this).next().val();
(jQuery)(this).unbind("click");
deleteWork(id);
});
(jQuery)(".cv-ri-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getWorkInfo(id);
});
(jQuery)("#ri-stdAddNewWork").click(function () {
(jQuery)("#ri-stdForm").dialog("option", "buttons", [{
text : "Dodaj",
click : function () {
if (formCheck((jQuery)("#ri-stdForm"))) {
student.workexp[student.workexp.length] = AddNewWork();
(jQuery)("#ri-stdContent-Works").removeAttr('hidden');
return true;
} else
return false;
}
}, {
text : "Nazad",
click : function () {
(jQuery)(this).dialog("close");
}
}
]);
ClearForm((jQuery)("#ri-stdForm"));
(jQuery)("#ri-stdForm").dialog("open");
});
(jQuery)("#ri-stdStillWorking").click(function () {
if (this.checked) {
(jQuery)("#ri-stdEDate").val("");
(jQuery)("#ri-stdEDate").attr("disabled", "");
}
if (!this.checked) {
(jQuery)("#ri-stdEDate").removeAttr("disabled");
}
});
function AddNewWork() {
var work = new WorkExp();
work.company = (jQuery)("#ri-stdOrgKomp").val();
work.func = (jQuery)("#ri-stdFunction").val();
work.desc = (jQuery)("#ri-stdJob").val();
work.dbegin = (jQuery)("#ri-stdBDate").val();
if ((jQuery)("#ri-stdStillWorking").is(':checked') == true) {
work.dend = "Rad u toku";
} else {
work.dend = (jQuery)("#ri-stdEDate").val();
}
(jQuery)("#ri-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#ri-stdForm :input").attr("disabled", true);
(jQuery)("#ri-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
text = "action=addWork&data=" + encodeURIComponent(JSON.stringify(work)) + "&";
(jQuery).ajax({
data : text,
url : "cv/work.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "work_success") {
(jQuery)("#cv-loading-parent").remove();
work.id = data1[1];
var i = 0;
var textToInsert = [];
textToInsert[i++] = "<tr><td>";
textToInsert[i++] = work.company;
textToInsert[i++] = "</td><td>";
textToInsert[i++] = work.func;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = work.dbegin;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = work.dend == "Rad u toku" ? "Rad u toku" : work.dend;
textToInsert[i++] = "</td><td><span";
textToInsert[i++] = " title='Pogledaj/Izmeni' class='cv-icon ui-icon ui-icon-pencil cv-ri-edit'></span><span";
textToInsert[i++] = " title='Obrisi' class='cv-icon ui-icon ui-icon-trash cv-ri-delete'></span>";
textToInsert[i++] = "<input id='ri-hInput-"
textToInsert[i++] = work.id;
textToInsert[i++] = "' type='hidden' value='";
textToInsert[i++] = work.id;
textToInsert[i++] = "'/></td></tr>";
(jQuery)("#ri-stdContent-Works").append(textToInsert.join(''));
(jQuery)("#ri-stdContent-Works").show();
(jQuery)("#ri-stdForm").dialog("close");
(jQuery)(".cv-ri-edit").unbind("click");
(jQuery)(".cv-ri-edit").click(function () {
var facId = (jQuery)(this).next().next().val();
getWorkInfo(facId);
});
(jQuery)(".cv-ri-delete").unbind("click");
(jQuery)(".cv-ri-delete").click(function () {
var facId = (jQuery)(this).next().val();
deleteWork(facId);
});
getGlobalScore(student);
} else if (data1[0] == "work_nsuccess") {
alert(data1[1]);
}
(jQuery)("#ri-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
(jQuery)("#ri-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
return work;
}
function getWorkInfo(id) {
ClearForm((jQuery)("#ri-stdForm"));
for (var i = 0; i < student.workexp.length; i++) {
if (student.workexp[i].id == id)
break;
}
var work = student.workexp[i];
(jQuery)("#ri-stdForm").dialog("open");
(jQuery)("#ri-stdOrgKomp").val(work.company);
(jQuery)("#ri-stdFunction").val(work.func);
(jQuery)("#ri-stdJob").val(work.desc);
(jQuery)("#ri-stdBDate").val(work.dbegin);
if (work.dend == "Rad u toku") {
(jQuery)("#ri-stdStillWorking").attr("checked", true);
(jQuery)("#ri-stdEDate").val("");
(jQuery)("#ri-stdEDate").attr("disabled", true);
} else {
(jQuery)("#ri-stdEDate").val(work.dend);
}
(jQuery)("#ri-stdForm").dialog("option", "buttons", [{
text : "Izmeni",
click : function () {
if (formCheck((jQuery)("#ri-stdForm"))) {
saveWorkInfo(id);
return true;
}
return false;
}
}, {
text : "Nazad",
click : function () {
(jQuery)(this).dialog("close");
}
}
]);
}
function saveWorkInfo(id) {
var work = new WorkExp();
work.company = (jQuery)("#ri-stdOrgKomp").val();
work.func = (jQuery)("#ri-stdFunction").val();
work.desc = (jQuery)("#ri-stdJob").val();
work.dbegin = (jQuery)("#ri-stdBDate").val();
if ((jQuery)("#ri-stdStillWorking").is(':checked') == true) {
work.dend = "Rad u toku";
} else {
work.dend = (jQuery)("#ri-stdEDate").val();
}
work.id = id;
(jQuery)("#ri-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#ri-stdForm :input").attr("disabled", true);
(jQuery)("#ri-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
text = "action=saveWork&data=" + encodeURIComponent(JSON.stringify(work)) + "&";
(jQuery).ajax({
data : text,
url : "cv/work.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "work_success") {
(jQuery)("#cv-loading-parent").remove();
for (var i = 0; i < student.workexp.length; i++) {
if (student.workexp[i].id == id) {
student.workexp[i] = work;
break;
}
}
var i = 0;
var textToInsert = [];
textToInsert[i++] = "<tr><td>";
textToInsert[i++] = work.company;
textToInsert[i++] = "</td><td>";
textToInsert[i++] = work.func;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = work.dbegin;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = work.dend == "Rad u toku" ? "Rad u toku" : work.dend;
textToInsert[i++] = "</td><td><span";
textToInsert[i++] = " title='Pogledaj/Izmeni' class='cv-icon ui-icon ui-icon-pencil cv-ri-edit'></span><span";
textToInsert[i++] = " title='Obrisi' class='cv-icon ui-icon ui-icon-trash cv-ri-delete'></span>";
textToInsert[i++] = "<input id='ri-hInput-"
textToInsert[i++] = work.id;
textToInsert[i++] = "' type='hidden' value='";
textToInsert[i++] = work.id;
textToInsert[i++] = "'/></td></tr>";
(jQuery)("#ri-hInput-" + id).parent().parent().replaceWith(textToInsert.join(''));
(jQuery)("#ri-stdForm").dialog("close");
(jQuery)(".cv-ri-edit").unbind("click");
(jQuery)(".cv-ri-edit").click(function () {
var facId = (jQuery)(this).next().next().val();
getWorkInfo(facId);
});
(jQuery)(".cv-ri-delete").unbind("click");
(jQuery)(".cv-ri-delete").click(function () {
var facId = (jQuery)(this).next().val();
deleteWork(facId);
});
getGlobalScore(student);
} else if (data1[0] == "work_nsuccess") {
alert(data1[1]);
}
(jQuery)("#ri-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
(jQuery)("#ri-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
return work;
}
function deleteWork(id) {
(jQuery)("#ri-stdWorks").append("<div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div>");
text = "action=deleteWork&id=" + id + "&";
(jQuery).ajax({
data : text,
url : "cv/work.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "work_success") {
var index = -1;
for (var i = 0; i < student.workexp.length; i++) {
if (student.workexp[i].id == id) {
index = i;
break;
}
}
student.workexp.splice(index, 1);
(jQuery)("#ri-hInput-" + id).parent().parent().remove();
if (student.workexp.length == 0) {
(jQuery)("#ri-stdContent-Works").hide();
}
getGlobalScore(student);
} else if (data1[0] == "work_nsuccess") {
alert(data1[1]);
}
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
}
(jQuery)("#dialog:ui-dialog").dialog("destroy");
(jQuery)("#pr-stdForm").dialog({
autoOpen : false,
height : 530,
width : 648,
modal : true,
draggable : false,
resizable : false,
title : "Dodaj novi projekat:"
});
(jQuery)(".cv-pr-delete").click(function () {
var id = (jQuery)(this).next().val();
(jQuery)(this).unbind("click");
deleteProject(id);
});
(jQuery)(".cv-pr-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getProjectInfo(id);
});
(jQuery)("#pr-stdAddNewProject").click(function () {
(jQuery)("#pr-stdForm").dialog("option", "buttons", [{
text : "Dodaj",
click : function () {
if (formCheck((jQuery)("#pr-stdForm"))) {
student.projects[student.projects.length] = AddNewProject();
(jQuery)("#pr-stdContent-Projects").removeAttr('hidden');
return true;
} else
return false;
}
}, {
text : "Nazad",
click : function () {
(jQuery)(this).dialog("close");
}
}
]);
ClearForm((jQuery)("#pr-stdForm"));
(jQuery)("#pr-stdForm").dialog("open");
});
(jQuery)("#pr-stdStillWorking").click(function () {
if (this.checked) {
(jQuery)("#pr-stdEDate").val("");
(jQuery)("#pr-stdEDate").attr("disabled", "");
}
if (!this.checked) {
(jQuery)("#pr-stdEDate").removeAttr("disabled");
}
});
function AddNewProject() {
var project = new Project();
project.name = (jQuery)("#pr-stdName").val();
project.func = (jQuery)("#pr-stdFunction").val();
project.desc = (jQuery)("#pr-stdDesc").val();
project.dbegin = (jQuery)("#pr-stdBDate").val();
project.sert = (jQuery)("#pr-stdSert").val();
if ((jQuery)("#pr-stdStillWorking").is(':checked') == true) {
project.dend = "Rad u toku";
} else {
project.dend = (jQuery)("#pr-stdEDate").val();
}
(jQuery)("#pr-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#pr-stdForm :input").attr("disabled", true);
(jQuery)("#pr-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
text = "action=addProject&data=" + encodeURIComponent(JSON.stringify(project)) + "&";
(jQuery).ajax({
data : text,
url : "cv/project.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "project_success") {
(jQuery)("#cv-loading-parent").remove();
project.id = data1[1];
var i = 0;
var textToInsert = [];
textToInsert[i++] = "<tr><td>";
textToInsert[i++] = project.name;
textToInsert[i++] = "</td><td>";
textToInsert[i++] = project.func;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = project.dbegin;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = project.dend == "Rad u toku" ? "Rad u toku" : project.dend;
textToInsert[i++] = "</td><td><span";
textToInsert[i++] = " title='Pogledaj/Izmeni' class='cv-icon ui-icon ui-icon-pencil cv-pr-edit'></span><span";
textToInsert[i++] = " title='Obrisi' class='cv-icon ui-icon ui-icon-trash cv-pr-delete'></span>";
textToInsert[i++] = "<input id='pr-hInput-"
textToInsert[i++] = project.id;
textToInsert[i++] = "' type='hidden' value='";
textToInsert[i++] = project.id;
textToInsert[i++] = "'/></td></tr>";
(jQuery)("#pr-stdContent-Projects").append(textToInsert.join(''));
(jQuery)("#pr-stdContent-Projects").show();
(jQuery)("#pr-stdForm").dialog("close");
(jQuery)(".cv-pr-edit").unbind("click");
(jQuery)(".cv-pr-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getProjectInfo(id);
});
(jQuery)(".cv-pr-delete").unbind("click");
(jQuery)(".cv-pr-delete").click(function () {
var id = (jQuery)(this).next().val();
deleteProject(id);
});
getGlobalScore(student);
} else if (data1[0] == "project_nsuccess") {
alert(data1[1]);
}
(jQuery)("#pr-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
(jQuery)("#pr-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
return project;
}
function getProjectInfo(id) {
ClearForm((jQuery)("#pr-stdForm"));
for (var i = 0; i < student.projects.length; i++) {
if (student.projects[i].id == id)
break;
}
var project = student.projects[i];
(jQuery)("#pr-stdForm").dialog("open");
(jQuery)("#pr-stdName").val(project.name);
(jQuery)("#pr-stdFunction").val(project.func);
(jQuery)("#pr-stdDesc").val(project.desc);
(jQuery)("#pr-stdBDate").val(project.dbegin);
(jQuery)("#pr-stdSert").val(project.sert);
if (project.dend == "Rad u toku") {
(jQuery)("#pr-stdStillWorking").attr("checked", true);
(jQuery)("#pr-stdEDate").val("");
(jQuery)("#pr-stdEDate").attr("disabled", true);
} else {
(jQuery)("#pr-stdEDate").val(project.dend);
}
(jQuery)("#pr-stdForm").dialog("option", "buttons", [{
text : "Izmeni",
click : function () {
if (formCheck((jQuery)("#pr-stdForm"))) {
saveProjectInfo(id);
return true;
} else
return false;
}
}, {
text : "Nazad",
click : function () {
(jQuery)(this).dialog("close");
}
}
]);
}
function saveProjectInfo(id) {
var project = new Project();
project.name = (jQuery)("#pr-stdName").val();
project.func = (jQuery)("#pr-stdFunction").val();
project.desc = (jQuery)("#pr-stdDesc").val();
project.dbegin = (jQuery)("#pr-stdBDate").val();
project.sert = (jQuery)("#pr-stdSert").val();
if ((jQuery)("#pr-stdStillWorking").is(':checked') == true) {
project.dend = "Rad u toku";
} else {
project.dend = (jQuery)("#pr-stdEDate").val();
}
project.id = id;
(jQuery)("#pr-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#pr-stdForm :input").attr("disabled", true);
(jQuery)("#pr-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
text = "action=saveProject&data=" + encodeURIComponent(JSON.stringify(project)) + "&";
(jQuery).ajax({
data : text,
url : "cv/project.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "project_success") {
(jQuery)("#cv-loading-parent").remove();
for (var i = 0; i < student.projects.length; i++) {
if (student.projects[i].id == id) {
student.projects[i] = project;
break;
}
}
var i = 0;
var textToInsert = [];
textToInsert[i++] = "<tr><td>";
textToInsert[i++] = project.name;
textToInsert[i++] = "</td><td>";
textToInsert[i++] = project.func;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = project.dbegin;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = project.dend == "Rad u toku" ? "Rad u toku" : project.dend;
textToInsert[i++] = "</td><td><span";
textToInsert[i++] = " title='Pogledaj/Izmeni' class='cv-icon ui-icon ui-icon-pencil cv-pr-edit'></span><span";
textToInsert[i++] = " title='Obrisi' class='cv-icon ui-icon ui-icon-trash cv-pr-delete'></span>";
textToInsert[i++] = "<input id='pr-hInput-"
textToInsert[i++] = project.id;
textToInsert[i++] = "' type='hidden' value='";
textToInsert[i++] = project.id;
textToInsert[i++] = "'/></td></tr>";
(jQuery)("#pr-hInput-" + id).parent().parent().replaceWith(textToInsert.join(''));
(jQuery)("#pr-stdForm").dialog("close");
(jQuery)(".cv-pr-edit").unbind("click");
(jQuery)(".cv-pr-edit").click(function () {
var facId = (jQuery)(this).next().next().val();
getProjectInfo(facId);
});
(jQuery)(".cv-pr-delete").unbind("click");
(jQuery)(".cv-pr-delete").click(function () {
var facId = (jQuery)(this).next().val();
deleteProject(facId);
});
getGlobalScore(student);
} else if (data1[0] == "project_nsuccess") {
alert(data1[1]);
}
(jQuery)("#pr-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
(jQuery)("#pr-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
return project;
}
function deleteProject(id) {
(jQuery)("#pr-stdProjects").append("<div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div>");
var text = "action=deleteProject&id=" + id + "&";
(jQuery).ajax({
data : text,
url : "cv/project.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "project_success") {
var index = -1;
for (var i = 0; i < student.projects.length; i++) {
if (student.projects[i].id == id) {
index = i;
break;
}
}
student.projects.splice(index, 1);
(jQuery)("#pr-hInput-" + id).parent().parent().remove();
if (student.projects.length == 0) {
(jQuery)("#pr-stdContent-Projects").hide();
}
getGlobalScore(student);
} else if (data1[0] == "project_nsuccess") {
alert(data1[1]);
}
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
}
(jQuery)("#dialog:ui-dialog").dialog("destroy");
(jQuery)("#su-stdForm").dialog({
autoOpen : false,
height : 530,
width : 648,
modal : true,
draggable : false,
resizable : false,
title : "Dodaj novo strucno usavrsavanje:"
});
(jQuery)(".cv-su-delete").click(function () {
var id = (jQuery)(this).next().val();
(jQuery)(this).unbind("click");
deleteSpec(id);
});
(jQuery)(".cv-su-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getSpecInfo(id);
});
(jQuery)("#su-stdAddNewSpec").click(function () {
(jQuery)("#su-stdForm").dialog("option", "buttons", [{
text : "Dodaj",
click : function () {
if (formCheck((jQuery)("#su-stdForm"))) {
student.specs[student.specs.length] = AddNewSpec();
(jQuery)("#su-stdContent-Specs").removeAttr('hidden');
return true;
} else
return false;
}
}, {
text : "Nazad",
click : function () {
(jQuery)(this).dialog("close");
}
}
]);
ClearForm((jQuery)("#su-stdForm"));
(jQuery)("#su-stdForm").dialog("open");
});
(jQuery)("#su-stdStillWorking").click(function () {
if (this.checked) {
(jQuery)("#su-stdEDate").val("");
(jQuery)("#su-stdEDate").attr("disabled", "");
}
if (!this.checked) {
(jQuery)("#su-stdEDate").removeAttr("disabled");
}
});
function AddNewSpec() {
var spec = new Specialization();
spec.name = (jQuery)("#su-stdName").val();
spec.organizer = (jQuery)("#su-stdOrg").val();
spec.desc = (jQuery)("#su-stdDesc").val();
spec.dbegin = (jQuery)("#su-stdBDate").val();
spec.sert = (jQuery)("#su-stdSert").val();
if ((jQuery)("#su-stdStillWorking").is(':checked') == true) {
spec.dend = "Rad u toku";
} else {
spec.dend = (jQuery)("#su-stdEDate").val();
}
(jQuery)("#su-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#su-stdForm :input").attr("disabled", true);
(jQuery)("#su-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
text = "action=addSpec&data=" + encodeURIComponent(JSON.stringify(spec)) + "&";
(jQuery).ajax({
data : text,
url : "cv/specialization.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "spec_success") {
(jQuery)("#cv-loading-parent").remove();
spec.id = data1[1];
var i = 0;
var textToInsert = [];
textToInsert[i++] = "<tr><td>";
textToInsert[i++] = spec.name;
textToInsert[i++] = "</td><td>";
textToInsert[i++] = spec.organizer;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = spec.dbegin;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = spec.dend == "Rad u toku" ? "Rad u toku" : spec.dend;
textToInsert[i++] = "</td><td><span";
textToInsert[i++] = " title='Pogledaj/Izmeni' class='cv-icon ui-icon ui-icon-pencil cv-su-edit'></span><span";
textToInsert[i++] = " title='Obrisi' class='cv-icon ui-icon ui-icon-trash cv-su-delete'></span>";
textToInsert[i++] = "<input id='su-hInput-"
textToInsert[i++] = spec.id;
textToInsert[i++] = "' type='hidden' value='";
textToInsert[i++] = spec.id;
textToInsert[i++] = "'/></td></tr>";
(jQuery)("#su-stdContent-Specs").append(textToInsert.join(''));
(jQuery)("#su-stdContent-Specs").show();
(jQuery)("#su-stdForm").dialog("close");
(jQuery)(".cv-su-edit").unbind("click");
(jQuery)(".cv-su-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getSpecInfo(id);
});
(jQuery)(".cv-su-delete").unbind("click");
(jQuery)(".cv-su-delete").click(function () {
var id = (jQuery)(this).next().val();
deleteSpec(id);
});
getGlobalScore(student);
} else if (data1[0] == "spec_nsuccess") {
alert(data1[1]);
}
(jQuery)("#su-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
(jQuery)("#su-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
return spec;
}
function getSpecInfo(id) {
ClearForm((jQuery)("#su-stdForm"));
for (var i = 0; i < student.specs.length; i++) {
if (student.specs[i].id == id)
break;
}
var spec = student.specs[i];
(jQuery)("#su-stdForm").dialog("open");
(jQuery)("#su-stdName").val(spec.name);
(jQuery)("#su-stdOrg").val(spec.organizer);
(jQuery)("#su-stdDesc").val(spec.desc);
(jQuery)("#su-stdBDate").val(spec.dbegin);
(jQuery)("#su-stdSert").val(spec.sert);
if (spec.dend == "Rad u toku") {
(jQuery)("#su-stdStillWorking").attr("checked", true);
(jQuery)("#su-stdEDate").val("");
(jQuery)("#su-stdEDate").attr("disabled", true);
} else {
(jQuery)("#su-stdEDate").val(spec.dend);
}
(jQuery)("#su-stdForm").dialog("option", "buttons", [{
text : "Izmeni",
click : function () {
if (formCheck((jQuery)("#su-stdForm"))) {
saveSpecInfo(id);
return true;
} else
return false
}
}, {
text : "Nazad",
click : function () {
(jQuery)(this).dialog("close");
}
}
]);
}
function saveSpecInfo(id) {
var spec = new Specialization();
spec.name = (jQuery)("#su-stdName").val();
spec.organizer = (jQuery)("#su-stdOrg").val();
spec.desc = (jQuery)("#su-stdDesc").val();
spec.dbegin = (jQuery)("#su-stdBDate").val();
spec.sert = (jQuery)("#su-stdSert").val();
if ((jQuery)("#su-stdStillWorking").is(':checked') == true) {
spec.dend = "Rad u toku";
} else {
spec.dend = (jQuery)("#su-stdEDate").val();
}
spec.id = id;
(jQuery)("#su-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#su-stdForm :input").attr("disabled", true);
(jQuery)("#su-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
text = "action=saveSpec&data=" + encodeURIComponent(JSON.stringify(spec)) + "&";
(jQuery).ajax({
data : text,
url : "cv/specialization.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "spec_success") {
(jQuery)("#cv-loading-parent").remove();
for (var i = 0; i < student.specs.length; i++) {
if (student.specs[i].id == id) {
student.specs[i] = spec;
break;
}
}
var i = 0;
var textToInsert = [];
textToInsert[i++] = "<tr><td>";
textToInsert[i++] = spec.name;
textToInsert[i++] = "</td><td>";
textToInsert[i++] = spec.organizer;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = spec.dbegin;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = spec.dend == "Rad u toku" ? "Rad u toku" : spec.dend;
textToInsert[i++] = "</td><td><span";
textToInsert[i++] = " title='Pogledaj/Izmeni' class='cv-icon ui-icon ui-icon-pencil cv-su-edit'></span><span";
textToInsert[i++] = " title='Obrisi' class='cv-icon ui-icon ui-icon-trash cv-su-delete'></span>";
textToInsert[i++] = "<input id='su-hInput-"
textToInsert[i++] = spec.id;
textToInsert[i++] = "' type='hidden' value='";
textToInsert[i++] = spec.id;
textToInsert[i++] = "'/></td></tr>";
(jQuery)("#su-hInput-" + id).parent().parent().replaceWith(textToInsert.join(''));
(jQuery)("#su-stdForm").dialog("close");
(jQuery)(".cv-su-edit").unbind("click");
(jQuery)(".cv-su-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getSpecInfo(id);
});
(jQuery)(".cv-su-delete").unbind("click");
(jQuery)(".cv-su-delete").click(function () {
var id = (jQuery)(this).next().val();
deleteSpec(id);
});
getGlobalScore(student);
} else if (data1[0] == "spec_nsuccess") {
alert(data1[1]);
}
(jQuery)("#su-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
(jQuery)("#su-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
return spec;
}
function deleteSpec(id) {
(jQuery)("#su-stdSpecs").append("<div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div>");
var text = "action=deleteSpec&id=" + id + "&";
(jQuery).ajax({
data : text,
url : "cv/specialization.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "spec_success") {
var index = -1;
for (var i = 0; i < student.specs.length; i++) {
if (student.specs[i].id == id) {
index = i;
break;
}
}
student.specs.splice(index, 1);
(jQuery)("#su-hInput-" + id).parent().parent().remove();
if (student.specs.length == 0) {
(jQuery)("#su-stdContent-Specs").hide();
}
getGlobalScore(student);
} else if (data1[0] == "spec_nsuccess") {
alert(data1[1]);
}
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
}
(jQuery)("#dialog:ui-dialog").dialog("destroy");
(jQuery)("#pj-stdForm").dialog({
autoOpen : false,
height : 430,
width : 648,
modal : true,
draggable : false,
resizable : false,
title : "Dodaj novi jezik:"
});
(jQuery)(".cv-pj-delete").click(function () {
var id = (jQuery)(this).next().val();
(jQuery)(this).unbind("click");
deleteLanguage(id);
});
(jQuery)(".cv-pj-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getLanguageInfo(id);
});
(jQuery)("#pj-stdAddNewLang").click(function () {
(jQuery)("#pj-stdForm").dialog("option", "buttons", [{
text : "Dodaj",
click : function () {
if (formCheck((jQuery)("#pj-stdForm"))) {
student.languages[student.languages.length] = AddNewLanguage();
(jQuery)("#pj-stdContent-Langs").removeAttr('hidden');
return true;
} else
return false;
}
}, {
text : "Nazad",
click : function () {
(jQuery)(this).dialog("close");
}
}
]);
ClearForm((jQuery)("#pj-stdForm"));
(jQuery)("#pj-stdForm").dialog("open");
});
function AddNewLanguage() {
var language = new Language();
language.language = (jQuery)("#pj-stdName").val();
language.read = (jQuery)("#pj-stdRead").val();
language.write = (jQuery)("#pj-stdWrite").val();
language.understand = (jQuery)("#pj-stdUnd").val();
language.speak = (jQuery)("#pj-stdSpeak").val();
language.sert = (jQuery)("#pj-stdSert").val();
(jQuery)("#pj-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#pj-stdForm :input").attr("disabled", true);
(jQuery)("#pj-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
text = "action=addLanguage&data=" + encodeURIComponent(JSON.stringify(language)) + "&";
(jQuery).ajax({
data : text,
url : "cv/language.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "language_success") {
(jQuery)("#cv-loading-parent").remove();
language.id = data1[1];
var i = 0;
var textToInsert = [];
textToInsert[i++] = "<tr><td>";
textToInsert[i++] = language.language;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = language.read;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = language.write;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = language.understand;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = language.speak;
textToInsert[i++] = "</td><td><span";
textToInsert[i++] = " title='Pogledaj/Izmeni' class='cv-icon ui-icon ui-icon-pencil cv-pj-edit'></span><span";
textToInsert[i++] = " title='Obrisi' class='cv-icon ui-icon ui-icon-trash cv-pj-delete'></span>";
textToInsert[i++] = "<input id='pj-hInput-"
textToInsert[i++] = language.id;
textToInsert[i++] = "' type='hidden' value='";
textToInsert[i++] = language.id;
textToInsert[i++] = "'/></td></tr>";
(jQuery)("#pj-stdContent-Langs").append(textToInsert.join(''));
(jQuery)("#pj-stdContent-Langs").show();
(jQuery)("#pj-stdForm").dialog("close");
(jQuery)(".cv-pj-edit").unbind("click");
(jQuery)(".cv-pj-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getLanguageInfo(id);
});
(jQuery)(".cv-pj-delete").unbind("click");
(jQuery)(".cv-pj-delete").click(function () {
var id = (jQuery)(this).next().val();
deleteLanguage(id);
});
getGlobalScore(student);
} else if (data1[0] == "language_nsuccess") {
alert(data1[1]);
}
(jQuery)("#pj-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
(jQuery)("#pj-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
return language;
}
function getLanguageInfo(id) {
ClearForm((jQuery)("#pj-stdForm"));
for (var i = 0; i < student.languages.length; i++) {
if (student.languages[i].id == id)
break;
}
var language = student.languages[i];
(jQuery)("#pj-stdForm").dialog("open");
(jQuery)("#pj-stdName").val(language.language);
(jQuery)("#pj-stdRead").val(language.read);
(jQuery)("#pj-stdWrite").val(language.write);
(jQuery)("#pj-stdUnd").val(language.understand);
(jQuery)("#pj-stdSpeak").val(language.speak);
(jQuery)("#pj-stdSert").val(language.sert);
(jQuery)("#pj-stdForm").dialog("option", "buttons", [{
text : "Izmeni",
click : function () {
if (formCheck((jQuery)("#pj-stdForm"))) {
saveLanguageInfo(id);
return true;
} else
return false
}
}, {
text : "Nazad",
click : function () {
(jQuery)(this).dialog("close");
}
}
]);
}
function saveLanguageInfo(id) {
var language = new Language();
language.language = (jQuery)("#pj-stdName").val();
language.read = (jQuery)("#pj-stdRead").val();
language.write = (jQuery)("#pj-stdWrite").val();
language.understand = (jQuery)("#pj-stdUnd").val();
language.speak = (jQuery)("#pj-stdSpeak").val();
language.sert = (jQuery)("#pj-stdSert").val();
language.id = id;
(jQuery)("#pj-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#pj-stdForm :input").attr("disabled", true);
(jQuery)("#pj-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
text = "action=saveLanguage&data=" + encodeURIComponent(JSON.stringify(language)) + "&";
(jQuery).ajax({
data : text,
url : "cv/language.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "language_success") {
(jQuery)("#cv-loading-parent").remove();
for (var i = 0; i < student.languages.length; i++) {
if (student.languages[i].id == id) {
student.languages[i] = language;
break;
}
}
var i = 0;
var textToInsert = [];
textToInsert[i++] = "<tr><td>";
textToInsert[i++] = language.language;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = language.read;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = language.write;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = language.understand;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = language.speak;
textToInsert[i++] = "</td><td><span";
textToInsert[i++] = " title='Pogledaj/Izmeni' class='cv-icon ui-icon ui-icon-pencil cv-pj-edit'></span><span";
textToInsert[i++] = " title='Obrisi' class='cv-icon ui-icon ui-icon-trash cv-pj-delete'></span>";
textToInsert[i++] = "<input id='pj-hInput-"
textToInsert[i++] = language.id;
textToInsert[i++] = "' type='hidden' value='";
textToInsert[i++] = language.id;
textToInsert[i++] = "'/></td></tr>";
(jQuery)("#pj-hInput-" + id).parent().parent().replaceWith(textToInsert.join(''));
(jQuery)("#pj-stdForm").dialog("close");
(jQuery)(".cv-pj-edit").unbind("click");
(jQuery)(".cv-pj-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getLanguageInfo(id);
});
(jQuery)(".cv-pj-delete").unbind("click");
(jQuery)(".cv-pj-delete").click(function () {
var id = (jQuery)(this).next().val();
deleteExpertise(id);
});
getGlobalScore(student);
} else if (data1[0] == "language_nsuccess") {
alert(data1[1]);
}
(jQuery)("#pj-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
(jQuery)("#pj-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
return language;
}
function deleteLanguage(id) {
(jQuery)("#pj-stdLangs").append("<div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div>");
var text = "action=deleteLanguage&id=" + id + "&";
(jQuery).ajax({
data : text,
url : "cv/language.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "language_success") {
var index = -1;
for (var i = 0; i < student.languages.length; i++) {
if (student.languages[i].id == id) {
index = i;
break;
}
}
student.languages.splice(index, 1);
(jQuery)("#pj-hInput-" + id).parent().parent().remove();
if (student.languages.length == 0) {
(jQuery)("#pj-stdContent-Langs").hide();
}
getGlobalScore(student);
} else if (data1[0] == "language_nsuccess") {
alert(data1[1]);
}
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
}
(jQuery)("#dialog:ui-dialog").dialog("destroy");
(jQuery)("#sto-stdForm").dialog({
autoOpen : false,
height : 300,
width : 648,
modal : true,
draggable : false,
resizable : false,
title : "Dodaj novu oblast:"
});
(jQuery)(".cv-sto-delete").click(function () {
var id = (jQuery)(this).next().val();
(jQuery)(this).unbind("click");
deleteExpertise(id);
});
(jQuery)(".cv-sto-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getExpertiseInfo(id);
});
(jQuery)("#sto-stdAddNewExpt").click(function () {
(jQuery)("#sto-stdForm").dialog("option", "buttons", [{
text : "Dodaj",
click : function () {
if (formCheck((jQuery)("#sto-stdForm"))) {
student.expertises[student.expertises.length] = AddNewExpertise();
(jQuery)("#sto-stdContent-Expertises").removeAttr('hidden');
return true;
} else
return false;
}
}, {
text : "Nazad",
click : function () {
(jQuery)(this).dialog("close");
}
}
]);
ClearForm((jQuery)("#sto-stdForm"));
(jQuery)("#sto-stdForm").dialog("open");
});
function AddNewExpertise() {
var expertise = new Expertise();
expertise.name = (jQuery)("#sto-stdName").val();
expertise.level = (jQuery)("#sto-stdLevel").val();
expertise.sert = (jQuery)("#sto-stdSert").val();
(jQuery)("#sto-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#sto-stdForm :input").attr("disabled", true);
(jQuery)("#sto-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
text = "action=addExpertise&data=" + encodeURIComponent(JSON.stringify(expertise)) + "&";
(jQuery).ajax({
data : text,
url : "cv/expertise.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "expertise_success") {
(jQuery)("#cv-loading-parent").remove();
expertise.id = data1[1];
var i = 0;
var textToInsert = [];
textToInsert[i++] = "<tr><td>";
textToInsert[i++] = expertise.name;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = expertise.level;
textToInsert[i++] = "</td><td><span";
textToInsert[i++] = " title='Pogledaj/Izmeni' class='cv-icon ui-icon ui-icon-pencil cv-sto-edit'></span><span";
textToInsert[i++] = " title='Obrisi' class='cv-icon ui-icon ui-icon-trash cv-sto-delete'></span>";
textToInsert[i++] = "<input id='sto-hInput-"
textToInsert[i++] = expertise.id;
textToInsert[i++] = "' type='hidden' value='";
textToInsert[i++] = expertise.id;
textToInsert[i++] = "'/></td></tr>";
(jQuery)("#sto-stdContent-Expertises").append(textToInsert.join(''));
(jQuery)("#sto-stdContent-Expertises").show();
(jQuery)("#sto-stdForm").dialog("close");
(jQuery)(".cv-sto-edit").unbind("click");
(jQuery)(".cv-sto-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getExpertiseInfo(id);
});
(jQuery)(".cv-sto-delete").unbind("click");
(jQuery)(".cv-sto-delete").click(function () {
var id = (jQuery)(this).next().val();
deleteExpertise(id);
});
getGlobalScore(student);
} else if (data1[0] == "expertise_nsuccess") {
alert(data1[1]);
}
(jQuery)("#sto-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
(jQuery)("#sto-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
return expertise;
}
function getExpertiseInfo(id) {
ClearForm((jQuery)("#sto-stdForm"));
for (var i = 0; i < student.expertises.length; i++) {
if (student.expertises[i].id == id)
break;
}
var expertise = student.expertises[i];
(jQuery)("#sto-stdForm").dialog("open");
(jQuery)("#sto-stdName").val(expertise.name);
(jQuery)("#sto-stdLevel").val(expertise.level);
(jQuery)("#sto-stdSert").val(expertise.sert);
(jQuery)("#sto-stdForm").dialog("option", "buttons", [{
text : "Izmeni",
click : function () {
if (formCheck((jQuery)("#sto-stdForm"))) {
saveExpertiseInfo(id);
return true;
} else
return false
}
}, {
text : "Nazad",
click : function () {
(jQuery)(this).dialog("close");
}
}
]);
}
function saveExpertiseInfo(id) {
var expertise = new Expertise();
expertise.name = (jQuery)("#sto-stdName").val();
expertise.level = (jQuery)("#sto-stdLevel").val();
expertise.sert = (jQuery)("#sto-stdSert").val();
expertise.id = id;
(jQuery)("#sto-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#sto-stdForm :input").attr("disabled", true);
(jQuery)("#sto-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
text = "action=saveExpertise&data=" + encodeURIComponent(JSON.stringify(expertise)) + "&";
(jQuery).ajax({
data : text,
url : "cv/expertise.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "expertise_success") {
(jQuery)("#cv-loading-parent").remove();
for (var i = 0; i < student.expertises.length; i++) {
if (student.expertises[i].id == id) {
student.expertises[i] = expertise;
break;
}
}
var i = 0;
var textToInsert = [];
textToInsert[i++] = "<tr><td>";
textToInsert[i++] = expertise.name;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = expertise.level;
textToInsert[i++] = "</td><td><span";
textToInsert[i++] = " title='Pogledaj/Izmeni' class='cv-icon ui-icon ui-icon-pencil cv-sto-edit'></span><span";
textToInsert[i++] = " title='Obrisi' class='cv-icon ui-icon ui-icon-trash cv-sto-delete'></span>";
textToInsert[i++] = "<input id='sto-hInput-"
textToInsert[i++] = expertise.id;
textToInsert[i++] = "' type='hidden' value='";
textToInsert[i++] = expertise.id;
textToInsert[i++] = "'/></td></tr>";
(jQuery)("#sto-hInput-" + id).parent().parent().replaceWith(textToInsert.join(''));
(jQuery)("#sto-stdForm").dialog("close");
(jQuery)(".cv-sto-edit").unbind("click");
(jQuery)(".cv-sto-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getExpertiseInfo(id);
});
(jQuery)(".cv-sto-delete").unbind("click");
(jQuery)(".cv-sto-delete").click(function () {
var id = (jQuery)(this).next().val();
deleteExpertise(id);
});
getGlobalScore(student);
} else if (data1[0] == "expertise_nsuccess") {
alert(data1[1]);
}
(jQuery)("#sto-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
(jQuery)("#sto-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
return expertise;
}
function deleteExpertise(id) {
(jQuery)("#sto-stdExpertises").append("<div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div>");
var text = "action=deleteExpertise&id=" + id + "&";
(jQuery).ajax({
data : text,
url : "cv/expertise.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "expertise_success") {
var index = -1;
for (var i = 0; i < student.expertises.length; i++) {
if (student.expertises[i].id == id) {
index = i;
break;
}
}
student.expertises.splice(index, 1);
(jQuery)("#sto-hInput-" + id).parent().parent().remove();
if (student.expertises.length == 0) {
(jQuery)("#sto-stdContent-Expertises").hide();
}
getGlobalScore(student);
} else if (data1[0] == "expertise_nsuccess") {
alert(data1[1]);
}
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
}
(jQuery)("#dialog:ui-dialog").dialog("destroy");
(jQuery)("#rnr-stdForm").dialog({
autoOpen : false,
height : 300,
width : 648,
modal : true,
draggable : false,
resizable : false,
title : "Dodaj novu oblast:",
buttons : {
"Dodaj" : function () {},
"Nazad" : function () {
(jQuery)(this).dialog("close");
}
},
close : function () {}
});
(jQuery)(".cv-rnr-delete").click(function () {
var id = (jQuery)(this).next().val();
(jQuery)(this).unbind("click");
deleteComputing(id);
});
(jQuery)(".cv-rnr-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getComputingInfo(id);
});
(jQuery)("#rnr-stdAddNewCompSkill").click(function () {
(jQuery)("#rnr-stdForm").dialog("option", "buttons", [{
text : "Dodaj",
click : function () {
if (formCheck((jQuery)("#rnr-stdForm"))) {
student.computing[student.computing.length] = AddNewComputing();
(jQuery)("#rnr-stdContent-Computings").removeAttr('hidden');
return true;
} else
return false;
}
}, {
text : "Nazad",
click : function () {
(jQuery)(this).dialog("close");
}
}
]);
ClearForm((jQuery)("#rnr-stdForm"));
(jQuery)("#rnr-stdForm").dialog("open");
});
function AddNewComputing() {
var computing = new Computing();
computing.name = (jQuery)("#rnr-stdName").val();
computing.level = (jQuery)("#rnr-stdLevel").val();
computing.sert = (jQuery)("#rnr-stdSert").val();
(jQuery)("#rnr-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#rnr-stdForm :input").attr("disabled", true);
(jQuery)("#rnr-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
text = "action=addComputing&data=" + encodeURIComponent(JSON.stringify(computing)) + "&";
(jQuery).ajax({
data : text,
url : "cv/computing.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "computing_success") {
(jQuery)("#cv-loading-parent").remove();
computing.id = data1[1];
var i = 0;
var textToInsert = [];
textToInsert[i++] = "<tr><td>";
textToInsert[i++] = computing.name;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = computing.level;
textToInsert[i++] = "</td><td><span";
textToInsert[i++] = " title='Pogledaj/Izmeni' class='cv-icon ui-icon ui-icon-pencil cv-rnr-edit'></span><span";
textToInsert[i++] = " title='Obrisi' class='cv-icon ui-icon ui-icon-trash cv-rnr-delete'></span>";
textToInsert[i++] = "<input id='rnr-hInput-"
textToInsert[i++] = computing.id;
textToInsert[i++] = "' type='hidden' value='";
textToInsert[i++] = computing.id;
textToInsert[i++] = "'/></td></tr>";
(jQuery)("#rnr-stdContent-Computing").append(textToInsert.join(''));
(jQuery)("#rnr-stdContent-Computing").show();
(jQuery)("#rnr-stdForm").dialog("close");
(jQuery)(".cv-rnr-edit").unbind("click");
(jQuery)(".cv-rnr-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getComputingInfo(id);
});
(jQuery)(".cv-rnr-delete").unbind("click");
(jQuery)(".cv-rnr-delete").click(function () {
var id = (jQuery)(this).next().val();
deleteComputing(id);
});
getGlobalScore(student);
} else if (data1[0] == "computing_nsuccess") {
alert(data1[1]);
}
(jQuery)("#rnr-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
(jQuery)("#rnr-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
return computing;
}
function getComputingInfo(id) {
ClearForm((jQuery)("#rnr-stdForm"));
for (var i = 0; i < student.computing.length; i++) {
if (student.computing[i].id == id)
break;
}
var computing = student.computing[i];
(jQuery)("#rnr-stdForm").dialog("open");
(jQuery)("#rnr-stdName").val(computing.name);
(jQuery)("#rnr-stdLevel").val(computing.level);
(jQuery)("#rnr-stdSert").val(computing.sert);
(jQuery)("#rnr-stdForm").dialog("option", "buttons", [{
text : "Izmeni",
click : function () {
if (formCheck((jQuery)("#rnr-stdForm"))) {
saveComputingInfo(id);
return true;
} else
return false
}
}, {
text : "Nazad",
click : function () {
(jQuery)(this).dialog("close");
}
}
]);
}
function saveComputingInfo(id) {
var computing = new Computing();
computing.name = (jQuery)("#rnr-stdName").val();
computing.level = (jQuery)("#rnr-stdLevel").val();
computing.sert = (jQuery)("#rnr-stdSert").val();
computing.id = id;
(jQuery)("#rnr-stdForm").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div><center>");
(jQuery)("#rnr-stdForm :input").attr("disabled", true);
(jQuery)("#rnr-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", true);
text = "action=saveComputing&data=" + encodeURIComponent(JSON.stringify(computing)) + "&";
(jQuery).ajax({
data : text,
url : "cv/computing.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "computing_success") {
(jQuery)("#cv-loading-parent").remove();
for (var i = 0; i < student.computing.length; i++) {
if (student.computing[i].id == id) {
student.computing[i] = computing;
break;
}
}
var i = 0;
var textToInsert = [];
textToInsert[i++] = "<tr><td>";
textToInsert[i++] = computing.name;
textToInsert[i++] = "</td><td class='cv-table-centered-text'>";
textToInsert[i++] = computing.level;
textToInsert[i++] = "</td><td><span";
textToInsert[i++] = " title='Pogledaj/Izmeni' class='cv-icon ui-icon ui-icon-pencil cv-rnr-edit'></span><span";
textToInsert[i++] = " title='Obrisi' class='cv-icon ui-icon ui-icon-trash cv-rnr-delete'></span>";
textToInsert[i++] = "<input id='rnr-hInput-"
textToInsert[i++] = computing.id;
textToInsert[i++] = "' type='hidden' value='";
textToInsert[i++] = computing.id;
textToInsert[i++] = "'/></td></tr>";
(jQuery)("#rnr-hInput-" + id).parent().parent().replaceWith(textToInsert.join(''));
(jQuery)("#rnr-stdForm").dialog("close");
(jQuery)(".cv-rnr-edit").unbind("click");
(jQuery)(".cv-rnr-edit").click(function () {
var id = (jQuery)(this).next().next().val();
getComputingInfo(id);
});
(jQuery)(".cv-rnr-delete").unbind("click");
(jQuery)(".cv-rnr-delete").click(function () {
var id = (jQuery)(this).next().val();
deleteComputing(id);
});
getGlobalScore(student);
} else if (data1[0] == "computing_nsuccess") {
alert(data1[1]);
}
(jQuery)("#rnr-stdForm").next(".ui-dialog-buttonpane").children(".ui-dialog-buttonset").children().attr("disabled", false);
(jQuery)("#rnr-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
return computing;
}
function deleteComputing(id) {
(jQuery)("#rnr-stdComputing").append("<div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div>");
var text = "action=deleteComputing&id=" + id + "&";
(jQuery).ajax({
data : text,
url : "cv/computing.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "computing_success") {
var index = -1;
for (var i = 0; i < student.computing.length; i++) {
if (student.computing[i].id == id) {
index = i;
break;
}
}
student.computing.splice(index, 1);
(jQuery)("#rnr-hInput-" + id).parent().parent().remove();
if (student.computing.length == 0) {
(jQuery)("#rnr-stdContent-Computing").hide();
}
getGlobalScore(student);
} else if (data1[0] == "computing_nsuccess") {
alert(data1[1]);
}
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
}
function saveMisc() {
var stud = student;
stud.dlicense = (jQuery)("#oi-stdDriving").val();
stud.skills = (jQuery)("#oi-stdSkills").val();
stud.char = (jQuery)("#oi-stdTraits").val();
stud.interests = (jQuery)("#oi-stdIntrests").val();
stud.searchfor = new SearchFor();
if ((jQuery)("#oi-stdSearch-Practice").is(":checked")) {
stud.searchfor.practice = "true";
}
if ((jQuery)("#oi-stdSearch-Parttime").is(":checked")) {
stud.searchfor.parttime = "true";
}
if ((jQuery)("#oi-stdSearch-Fulltime").is(":checked")) {
stud.searchfor.fulltime = "true";
}
if ((jQuery)("#oi-stdSearch-Project").is(":checked")) {
stud.searchfor.project = "true";
}
if ((jQuery)("#oi-stdSearch-Volunteer").is(":checked")) {
stud.searchfor.volunteer = "true";
}
stud.newsBEST = (jQuery)("#oi-stdNewsJF").is(":checked") ? 1 : 0;
stud.newsJF = (jQuery)("#oi-stdNewsBEST").is(":checked") ? 1 : 0;
(jQuery)("#oi-stdForm :input").attr("disabled", true);
(jQuery)("#cv-menuMisc").html("Ostale informacije (Snimanje u toku...)");
(jQuery)("#cv-menuMisc").css("font-weight", "bold");
text = "action=saveMisc&data=" + encodeURIComponent(JSON.stringify(stud)) + "&";
(jQuery).ajax({
data : text,
url : "cv/student.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "misc_success") {
(jQuery)("#cv-menuMisc").css("font-weight", "normal");
student.dlicense = stud.dlicense;
student.skills = stud.skills;
student.char = stud.char;
student.interests = stud.interests;
student.searchfor = stud.searchfor;
getGlobalScore(student);
} else if (data1[0] == "misc_nsuccess") {
alert(data1[1]);
} else {
alert(data);
}
(jQuery)("#oi-stdForm :input").attr("disabled", false);
(jQuery)("#cv-menuMisc").html("Ostale informacije");
},
type : 'POST'
});
}
getGlobalScore(student);
}
function GoToLoginForm() {
(jQuery)("#cv-content").append("<center><div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div></center>");
(jQuery).ajax({
data : "action=loginForm",
url : "cv/login.php",
success : function (data) {
(jQuery)("#cv-content").html(data);
logInit();
},
type : 'POST'
});
}
function GoToRegisterForm() {
(jQuery)("#log-stdForm :input").attr("disabled", true);
(jQuery)("#log-stdForm").append("<div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div>");
(jQuery).ajax({
data : "action=registerForm",
url : "cv/register.php",
success : function (data) {
(jQuery)("#cv-content").html(data);
Recaptcha.create("6LeW6skSAAAAACNh72I6rbZYg_DNXbT6ia2WOha5", "cv-capthca", {
theme : "white"
});
regInit();
},
type : 'POST'
});
}
function GoToRecoveryForm() {
(jQuery)("#log-stdForm :input").attr("disabled", true);
(jQuery)("#log-stdForm").append("<div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div>");
(jQuery).ajax({
data : "action=recoveryForm",
url : "cv/recovery.php",
success : function (data) {
(jQuery)("#cv-content").html(data);
recoveryInit();
Recaptcha.create("6LeW6skSAAAAACNh72I6rbZYg_DNXbT6ia2WOha5", "cv-capthca", {
theme : "white"
});
},
type : 'POST'
});
}
function RecoverPass() {
var email = (jQuery)("#rec-stdEmail").val();
var captcha1 = (jQuery)("#recaptcha_challenge_field").val();
var captcha2 = (jQuery)("#recaptcha_response_field").val();
if (email == "") {
alert("Morate uneti E-mail adresu!");
return;
} else {
(jQuery)("#rec-stdForm :input").attr("disabled", true);
(jQuery)("#rec-stdForm").append("<div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div>");
(jQuery).ajax({
data : "action=sendMail&email=" + email + "&recaptcha_challenge_field=" + captcha1 + "&recaptcha_response_field=" + captcha2 + "&",
url : "cv/recovery.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "recovery_success") {
(jQuery)("#cv-content").html(data1[1]);
} else if (data1[0] == "cv-captcha-err") {
alert(data1[1]);
Recaptcha.reload();
} else if (data1[0] == "cv-user-nexists") {
alert(data1[1]);
} else if (data1[0] == "cv-user-success") {
(jQuery)("#rec-stdForm").replaceWith(data1[1]);
}
(jQuery)("#rec-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
}
}
function ClearForm(form) {
(jQuery)(form).find(".cv-alert").remove();
(jQuery)(':input', form).each(function () {
var type = this.type;
var tag = this.tagName.toLowerCase();
if (type == 'text' || tag == 'textarea') {
this.value = "";
(jQuery)(this).attr("disabled", false);
} else if (type == 'checkbox' || type == 'radio') {
this.checked = false;
} else if (tag == 'select') {
this.selectedIndex = 0;
(jQuery)(this).trigger("change");
}
});
}
function RegisterUser() {
if (!regFormCheck())
return;
(jQuery)("#reg-stdForm :input").attr("disabled", true);
(jQuery)("#reg-stdForm").append("<div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div>");
var stud = new Student();
stud.name = (jQuery)("#lp-stdName").val();
stud.pname = (jQuery)("#lp-stdPName").val();
stud.sname = (jQuery)("#lp-stdSName").val();
stud.gender = (jQuery)("#lp-stdGender").val();
stud.bdate = (jQuery)("#lp-stdBDate").val();
stud.email = (jQuery)("#lp-stdEmail").val();
stud.address1 = (jQuery)("#lp-stdAddress1").val();
stud.address2 = (jQuery)("#lp-stdAddress2").val();
stud.city1 = (jQuery)("#lp-stdCity1").val();
stud.city2 = (jQuery)("#lp-stdCity2").val();
stud.state1 = (jQuery)("#lp-stdState1").val();
stud.state2 = (jQuery)("#lp-stdState2").val();
stud.password = (jQuery)("#lp-stdPass").val();
stud.phone1 = (jQuery)("#lp-stdPhone1").val();
stud.phone2 = (jQuery)("#lp-stdPhone2").val();
stud.newsBEST = (jQuery)("#lp-stdNewsJF").is(":checked") ? 1 : 0;
stud.newsJF = (jQuery)("#lp-stdNewsBEST").is(":checked") ? 1 : 0;
var captcha = (jQuery)("#recaptcha_response_field").val();
var captchaChallenge = (jQuery)("#recaptcha_challenge_field").val();
var text = "action=registerUser&podaci=" + encodeURIComponent(JSON.stringify(stud));
text += "&recaptcha_response_field=" + captcha + "&recaptcha_challenge_field=" + captchaChallenge + "&";
(jQuery).ajax({
data : text,
url : "cv/register.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "cv-captcha-err") {
alert(data1[1]);
Recaptcha.reload();
} else if (data1[0] == "cv-user-exists") {
alert(data1[1]);
} else if (data1[0] == "register_success") {
(jQuery)("#reg-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
student = (jQuery).parseJSON(data1[2]);
(jQuery)("#cv-content").hide('blind', 'slow');
(jQuery)("#cv-content").html(data1[1]);
(jQuery)("#cv-content").show('blind', 'slow');
appInit();
}
(jQuery)("#reg-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
}
function formCheck(form) {
(jQuery)(form).find(".cv-alert").remove();
var retVal = true;
(jQuery)(form).find(".cv-mandatory").each(function () {
if (this.value == "") {
var fieldName = (jQuery)(this).parent().prev().children(":first-child").text();
fieldName = fieldName.substring(0, fieldName.length - 1);
var div = (jQuery)("<div class='cv-alert ui-state-error ui-corner-all' title='Morate popuniti polje: " + fieldName + " !'></div>");
(jQuery)(div).css("float", "left");
(jQuery)(div).width(16);
(jQuery)(div).append("<center><span class='ui-icon ui-icon-alert'></span></center>");
(jQuery)(this).parent().append(div);
retVal = false;
}
});
return retVal;
}
function regFormCheck() {
(jQuery)(".ui-state-error").remove();
if ((jQuery)("#lp-stdPass").val() != (jQuery)("#lp-stdPass1").val()) {
var div = (jQuery)("<div class='cv-alert ui-state-error ui-corner-all' title='Lozinke se ne podudaraju!'></div>");
(jQuery)(div).css("float", "left");
(jQuery)(div).width(16);
(jQuery)(div).append("<center><span class='ui-icon ui-icon-alert'></span></center>");
(jQuery)("#lp-stdPass1").parent().append(div);
}
var retVal = true;
(jQuery)(".cv-mandatory").each(function () {
if (this.value == "") {
var fieldName = (jQuery)(this).parent().prev().children(":first-child").text();
fieldName = fieldName.substring(0, fieldName.length - 1);
var div = (jQuery)("<div class='cv-alert ui-state-error ui-corner-all' title='Morate popuniti polje: " + fieldName + " !'></div>");
(jQuery)(div).css("float", "left");
(jQuery)(div).width(16);
(jQuery)(div).append("<center><span class='ui-icon ui-icon-alert'></span></center>");
(jQuery)(this).parent().append(div);
retVal = false;
}
});
return retVal;
}
function LoginUser() {
(jQuery)("#log-stdForm :input").attr("disabled", true);
(jQuery)("#log-stdForm").append("<div id='cv-loading-parent'><br/><label>Ucitavanje...</label><br/><div id='cv-loading'></div></div>");
var text = "action=loginUser&email=" + (jQuery)("#log-stdEmail").val();
text += "&pass=" + (jQuery)("#log-stdPass").val() + "&";
(jQuery).ajax({
data : text,
url : "cv/login.php",
success : function (data) {
var data1 = data.split("&&");
if (data1[0] == "cv-user-nexists") {
alert(data1[1]);
} else if (data1[0] == "cv-login-failed") {
alert(data1[1]);
} else if (data1[0] == "cv-login-success") {
(jQuery)("#log-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
student = (jQuery).parseJSON(data1[2]);
(jQuery)("#cv-content").hide('blind', 'slow');
(jQuery)("#cv-content").html(data1[1]);
(jQuery)("#cv-content").show('blind', 'slow');
appInit();
}
(jQuery)("#log-stdForm :input").attr("disabled", false);
(jQuery)("#cv-loading-parent").remove();
},
type : 'POST'
});
}
(jQuery)("#fb-labelDiv").click(function () {
var right = parseInt((jQuery)(".cv-Feedback").css("right"));
if (right == -274) {
(jQuery)("#fb-image").attr("src", "cv/images/feedback2.png");
} else {
(jQuery)("#fb-image").attr("src", "cv/images/feedback1.png");
}
(jQuery)(".cv-Feedback").animate({
right : right == -274 ? 0 : -274
});
});
(jQuery)("#fb-send").hover(function () {
this.addClass("ui-state-hover");
}, function () {
this.removeClass("ui-state-hover");
});
(jQuery)("#fb-send").click(function () {
if ((jQuery)("#fb-text").val().length <= 1024 && (jQuery)("#fb-text").val().length > 1) {
var text = (jQuery)("#fb-text").val();
(jQuery).ajax({
type : "POST",
url : "cv/sendfeedback.php",
data : {
idStudenta : student.id,
feedback : text
}
});
(jQuery)("#fb-text").val("");
(jQuery)("#fb-warning").html("Uspesno ste poslali feedback!").css('color', 'green');
} else if ((jQuery)("#fb-text").val().length < 1) {
(jQuery)("#fb-warning").html("Niste uneli text!").css('color', 'red');
}
});
(jQuery)("#fb-text").keyup(function () {
if ((jQuery)("#fb-text").val().length > 1024) {
(jQuery)("#fb-warning").html("Uneseni tekst je predug!").css('color', 'red');
} else {
(jQuery)("#fb-warning").html("");
}
});
function isPersonalDataChanged(stud) {
return !(stud.name == student.name && stud.pname == student.pname && stud.sname == student.sname && stud.gender == student.gender && stud.bdate == student.bdate && stud.email == student.email && stud.address1 == student.address1 && stud.city1 == student.city1 && stud.state1 == student.state1 && stud.address2 == student.address2 && stud.city2 == student.city2 && stud.state2 == student.state2 && stud.phone1 == student.phone1 && stud.phone2 == student.phone2);
}
function isHighSchoolChanged(school) {
return !(student.highschool.name == school.name && student.highschool.city == school.city && student.highschool.state == school.state && student.highschool.course == school.course && student.highschool.gyear == school.gyear && student.highschool.type == school.type);
}
})
jQuery.fn.forceNumeric = function (integersOnly) {
return this.each(function () {
(jQuery)(this).keydown(function (e) {
var key = e.which || e.keyCode;
if (integersOnly == 0) {
if (!e.shiftKey && !e.altKey && !e.ctrlKey && key >= 48 && key <= 57 || key >= 96 && key <= 105 || key == 8 || key == 9 || key == 13 || key == 35 || key == 36 || key == 37 || key == 39 || key == 46 || key == 45)
return true;
} else if (integersOnly == 1) {
if (!e.shiftKey && !e.altKey && !e.ctrlKey && key >= 48 && key <= 57 || key >= 96 && key <= 105 || key == 190 || key == 110 || key == 8 || key == 9 || key == 13 || key == 35 || key == 36 || key == 37 || key == 39 || key == 46 || key == 45)
return true;
} else {
if (!e.shiftKey && !e.altKey && !e.ctrlKey && key >= 48 && key <= 57 || key >= 96 && key <= 105 || key == 190 || key == 188 || key == 109 || key == 110 || key == 8 || key == 9 || key == 13 || key == 35 || key == 36 || key == 37 || key == 39 || key == 46 || key == 45)
return true;
}
return false;
});
});
}
function fblogin() {
FB.login(function (response) {
if (response.authResponse) {
console.log('Welcome! Fetching your information.... ');
FB.api('/me', function (response) {
console.log('Good to see you, ' + response.name + '.');
postActivity();
});
} else {
console.log('User cancelled login or did not fully authorize.');
}
});
}
function postActivity() {
FB.api('/me/jobfairnis-app:update' + '?cv=http://www.jobfairnis.rs/ostavicv&access_token=AAADRnAXgGYEBAEHOh7CZA9u8BDwvOtsrzPTFVpRT68NZA49BwaKAOa0Acy6SjgZClq5LxkqVjsWqNtuBdFASM308ZAHmXYEiBESgBbTbsOuo8X1qbGhI', 'post', function (response) {
if (!response || response.error) {
console.log(response.error.message);
} else {
console.log('Post was successful! Action ID: ' + response.id);
}
});
}
|
import React, { Component } from "react";
import { withRouter } from 'react-router-dom';
import { Row, Col, FormGroup, FormControl, Card } from "react-bootstrap";
import axios from 'axios';
import "../../app.css"
import "./forgot.css";
//Components
import Loader from '../Loader/Loader';
import Cancel from "../../components/common/Cancel"
class ForgotPass extends Component {
constructor(props) {
super(props);
this.state = {
email: "",
password: ""
};
this.handleChange = this.handleChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
}
// validateForm() {
// return this.state.email.length > 0 && this.state.password.length > 0;
// }
handleChange = event => {
this.setState({
[event.target.id]: event.target.value
});
}
handleSubmit = event => {
event.preventDefault();
//add axios here to auth/login
axios.post("/auth/forgot_password", {
email: this.state.email
})
.then((response) => {
this.setState({ loading: false })
// console.log(response);
if (response.data.hasE) {
const errorsJSON = JSON.parse(response.request.responseText);
const errors = errorsJSON.e;
let errorsList = '';
for (let i = 0; i < errors.length; i++) {
errorsList += '<li>' + errors[i].msg + '</li>';
}
alert(errorsList)
} else {
const message = response.data.message;
// console.log(message)
alert(message);
this.props.history.push('/');
}
})
.catch(function (error) {
console.log(error);
alert(error)
});
}
render() {
if (this.state.loading) return <Loader />;
return (
<Card>
<form onSubmit={this.handleSubmit}>
<FormGroup controlId="email">
<div className="center head">Forgot Password</div>
<Row>
<Col>
<div className="center"><FormControl
type="email"
value={this.state.email}
onChange={this.handleChange}
placeholder="Email"
margin="normal" />
</div>
</Col>
</Row>
</FormGroup>
<input className="btn forgotBtn center" type="submit" value="Submit" />
</form>
<Row>
<Col><div className="center"><Cancel /></div></Col>
</Row>
</Card>
);
}
}
export default withRouter(ForgotPass);
|
/* eslint-disable no-console */
const { Pool } = require('pg');
const pool = process.env.NODE_ENV === 'production'
? new Pool({
connectionString: process.env.DB_URI,
})
: new Pool({
user: process.env.LOCAL_USER,
host: 'localhost',
database: 'product_wrapper',
password: process.env.LOCAL_PASSWORD,
port: '5432',
});
const getAllImages = (cb) => {
const queryString = 'SELECT * FROM images';
console.log(pool.options);
pool.query(queryString, (err, result) => {
if (err) {
console.log(err);
return cb(err, null);
}
return cb(null, result.rows);
});
};
const getRandomProduct = (cb) => {
console.log(process.env.NODE_ENV);
// gets one random row from the database
const queryString = 'SELECT * FROM products ORDER BY RANDOM() LIMIT 1;';
pool.query(queryString, (err, result) => {
if (err) {
console.log(err);
return cb(err, null);
}
const shoeSizeQueryString = 'SELECT * FROM shoe_size;';
return pool.query(shoeSizeQueryString, (sizeErr, sizes) => {
if (sizeErr) {
console.log(err);
return cb(sizeErr, null);
}
const response = {
shoe_sizes: sizes.rows,
...result.rows[0],
};
return cb(null, response);
});
});
};
module.exports = {
pool,
getAllImages,
getRandomProduct,
};
|
import React, { Component } from 'react'
import styled from 'styled-components';
import {Portal, absolute} from 'Utilities';
import Icon from './Icon';
import {Card} from './Cards';
export default class Modal extends Component {
render() {
const { children, on, toggle } = this.props
return (
<Portal>
{on &&
<ModalWrapper>
<ModalCard>
<div>
<CloseButton onClick={toggle}>
<Icon name="close"/>
{/* add color="red" to change svg's color */}
</CloseButton>
{children}
</div>
</ModalCard>
<Background onClick={toggle} />
</ModalWrapper>
}
</Portal>
)
}
}
const ModalWrapper = styled.div`
${absolute({})};
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
`;
const ModalCard = styled(Card)`
position: relative;
z-index:10;
min-width: 320px;
max-width: 600px;
margin-bottom: 100x;
`;
const CloseButton = styled.button`
${absolute({
y: 'top',
x: 'right'
})};
border:none;
background: transparent;
padding: 10px;
`;
const Background = styled.div`
background-color: black;
${absolute({})};
width: 100%;
height: 100%;
opacity:0.5;
`;
|
(function () {
angular
.module('driverCheck')
.controller('employeeeditCtrl', employeeeditCtrl);
employeeeditCtrl.$inject = ['$location', '$routeParams', 'driverCheckData'];
function employeeeditCtrl($location, $routeParams, driverCheckData) {
var vm = this;
vm.pageHeader = {
title: 'Edit Employee'
};
vm.emp = { "name": "", "address": "" };
driverCheckData.getEmployeeById($routeParams.companyId, $routeParams.employeeId)
.then(function (res) {
vm.emp = res.data;
console.log(vm.emp);
}, function (e) {
vm.message = "Sorry, something's gone wrong, please try again later";
});
vm.onSubmit = function () {
vm.formError = "";
if (!vm.emp.name || !vm.emp.address) {
vm.formError = "All fields required, please try again";
return false;
} else {
driverCheckData.updateEmployee($routeParams.companyId, $routeParams.employeeId, vm.emp)
.then(function (res) {
$location.path('/auth/'+ $routeParams.companyId);
}, function (e) {
vm.message = "Sorry, something's gone wrong, please try again later";
});
}
};
}
})();
|
const datePicker = document.querySelector("#datePicker");
const submitBtn = document.querySelector("#submitBtn");
const resultDiv = document.querySelector("#result");
function reverseString(str) {
let charList = str.split("");
let reversedList = charList.reverse();
let reversedStr = reversedList.join("");
return reversedStr;
}
function isPalindrome(str) {
let reversedStr = reverseString(str);
if (reversedStr == str) {
return true;
} else {
return false;
}
}
function dateToString(date) {
let dateInStr = { day: "", month: "", year: "" };
if (date.day < 10) {
dateInStr.day = "0" + date.day.toString();
} else {
dateInStr.day = date.day.toString();
}
if (date.month < 10) {
dateInStr.month = "0" + date.month.toString();
} else {
dateInStr.month = date.month.toString();
}
dateInStr.year = date.year.toString();
return dateInStr;
}
function getVariations(dateInStr) {
let ddmmyyyy = dateInStr.day + dateInStr.month + dateInStr.year;
let mmddyyyy = dateInStr.month + dateInStr.day + dateInStr.year;
let yyyymmdd = dateInStr.year + dateInStr.month + dateInStr.day;
let ddmmyy = dateInStr.day + dateInStr.month + dateInStr.year.slice(-2);
let mmddyy = dateInStr.month + dateInStr.day + dateInStr.year.slice(-2);
let yymmdd = dateInStr.year.slice(-2) + dateInStr.month + dateInStr.day;
let variations = [ddmmyyyy, mmddyyyy, yyyymmdd, ddmmyy, mmddyy, yymmdd];
return variations;
}
function checkPalindromeForVariations(dateInStr) {
let allFormats = getVariations(dateInStr);
let result = false;
for (let i of allFormats) {
if (isPalindrome(i)) {
result = true;
}
}
return result;
}
function isLeapYear(year) {
// leap year if perfectly divisible by 400
if (year % 400 === 0) {
return true;
}
// not a leap year if divisible by 100 but not divisible by 400
else if (year % 100 === 0) {
return false;
}
// leap year if not divisible by 100 but divisible by 4
else if (year % 4 === 0) {
return true;
}
// all other years are not leap years
else {
return false;
}
}
function getPreviousDate(date) {
let month = date.month;
let year = date.year;
let day = date.day - 1;
let daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
if (day === 0) {
month -= 1;
if (month === 0) {
month = 12;
day = 31;
year -= 1;
} else if (month === 2) {
if (isLeapYear(year)) {
day = 29;
} else {
day = 28;
}
} else {
day = daysInMonth[month - 1];
}
}
let previousDate = { day: day, month: month, year: year };
return previousDate;
}
function getPreviousPalindromeDate(date) {
let previousDate = getPreviousDate(date);
let dateInStr = dateToString(previousDate);
let missedBy = 0;
let result = false;
while (1) {
missedBy++;
if (checkPalindromeForVariations(dateInStr)) {
return [missedBy, previousDate];
} else {
previousDate = getPreviousDate(previousDate);
dateInStr = dateToString(previousDate);
}
}
}
function getNextDate(date) {
let month = date.month;
let year = date.year;
let day = date.day + 1;
let daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
if (month === 2) {
if (isLeapYear(year)) {
if (day > 29) {
day = 1;
month = 3;
}
} else if (day === 29) {
day = 1;
month = 3;
}
} else {
if (day > daysInMonth[month - 1]) {
day = 1;
month++;
}
}
if (month > 12) {
month = 1;
year++;
}
let NextDate = { day: day, month: month, year: year };
return NextDate;
}
function getNextPalindromeDate(date) {
let NextDate = getNextDate(date);
let dateInStr = dateToString(NextDate);
let missedBy = 0;
let result = false;
while (1) {
missedBy++;
if (checkPalindromeForVariations(dateInStr)) {
return [missedBy, NextDate];
} else {
NextDate = getNextDate(NextDate);
dateInStr = dateToString(NextDate);
}
}
}
function getResult() {
let datePicked = datePicker.value;
if (datePicked !== "") {
let splitDate = datePicked.split("-");
let yyyy = splitDate[0];
let mm = splitDate[1];
let dd = splitDate[2];
var date = {
day: Number(dd),
month: Number(mm),
year: Number(yyyy),
};
let dateInStr = dateToString(date);
let result = checkPalindromeForVariations(dateInStr);
if (result) {
resultDiv.innerText = "Yoohooo! your birthday is a palindrome :)";
} else {
let [lastMissedBy, previousPal] = getPreviousPalindromeDate(date);
let [nextMissedBy, nextPal] = getNextPalindromeDate(date);
if (nextMissedBy < lastMissedBy) {
let nearestDate = nextPal;
let missedBy = nextMissedBy;
resultDiv.innerText = `Your birthday is not a palindrome. Next palindrome date
was ${nearestDate.day}-${nearestDate.month}-${nearestDate.year}.
You missed it by ${missedBy} ${missedBy > 1 ? "days" : "day"}`;
} else {
let nearestDate = previousPal;
let missedBy = lastMissedBy;
resultDiv.innerText = `Your birthday is not a palindrome. Last palindrome date
was ${nearestDate.day}-${nearestDate.month}-${nearestDate.year}.
You missed it by ${missedBy} ${missedBy > 1 ? "days" : "day"}`;
}
}
}
}
function clickHandler() {
resultDiv.innerText = "";
if (datePicker.value != "") {
let loadingImage = document.createElement("IMG");
loadingImage.setAttribute(
"src",
"./images/icons8-hourglass-transparent.gif"
);
loadingImage.setAttribute("alt", "Processing...");
resultDiv.appendChild(loadingImage);
setTimeout(function () {
getResult();
}, 3000);
} else {
resultDiv.innerText = `Input can't be empty. Please fill it and try again.`;
}
}
submitBtn.addEventListener("click", clickHandler);
|
/**
* 下一环节UI组件
* @param window
* @param $
*/
(function(window, $){
// UI类型常量
var UIType = {
"Text":"text",
"Radio":"radio",
"Check":"check",
"Select":"select",
"Input":"input",
"Textarea":"textarea",
"Tree":"tree",
"Next":"next",
"Hidden":"hidden",
'Combobox':'combobox'
};
/**
* 基类
*/
var __RhBase = function(opts) {
};
__RhBase.prototype.init = function(template, opts, args) {
this.$dom = $(template);
// 解析参数并渲染
this.render(opts);
// 设置必填
this.setNotNull(opts.notnull, true);
// 正则校验相关{'exp':'正则表达式', 'hint':'提示语句'}
this.regular = opts.regular;
// 是否是FormData
this.formData = !!opts.formData;
// 构造函数可以传递第二个参数,该参数为本组件的容器
var argsArr = Array.prototype.slice.call(args);
if (argsArr.length >= 2) {
var container = argsArr[1];
if (container) {
this.appendTo(container);
}
}
};
__RhBase.prototype.setNotNull = function(notnull, init) {
var _self = this;
var _set = function(){
var requireDom = _self.$dom.find(".space").first();
var normalDom = _self.$dom.find(".space").last();
if (notnull) {
requireDom.show();
normalDom.hide();
_self.notnull = true; // 是否必填
} else {
requireDom.hide();
normalDom.show();
_self.notnull = false;
}
};
if (init) {
_set();
} else { //解决在手机上原生select元素绑定onchange事件后,回调中操作dom经常出现影响原生select切换值的渲染
setTimeout(_set, 0);
}
};
__RhBase.prototype.render = function(opts) {
};
__RhBase.prototype.showError = function(msg) {
this.removeError();
this.$error = $('<li class="rh-error">'
+ '<label class="rh-label"></label>'
+ '<span class="space"> </span><span class="errorMsg">' + msg + '</span>'
+ '</li>');
this.$dom.first().after(this.$error);
};
__RhBase.prototype.removeError = function() {
if (this.$error) { // 校验通过
this.$error.remove();
}
};
__RhBase.prototype.get$Dom = function() {
return this.$dom;
};
__RhBase.prototype.appendTo = function(container) {
this.$dom.appendTo(container);
};
/**
* 添加到指定组件的后面
* @param other 目标组件
*/
__RhBase.prototype.insertAfter = function(other) {
if (other.$chooseLi) { // 树形组件$dom下面还有一行li
other.$chooseLi.after(this.$dom);
} else {
other.$dom.after(this.$dom);
}
};
/**
* 添加到指定组件的前面
* @param other 目标组件
*/
__RhBase.prototype.insertBefore = function(other) {
other.$dom.first().before(this.$dom);
};
__RhBase.prototype.setLabel = function(label){
this.$dom.find(".rh-label").text(label);
};
__RhBase.prototype.getLabel = function() {
return this.$dom.find(".rh-label").text();
};
__RhBase.prototype.setName = function(name) {
};
__RhBase.prototype.getName = function() {
return;
};
__RhBase.prototype.setValue = function(value) {
};
__RhBase.prototype.getValue = function() {
return;
};
/**
* 存储的值可能会有额外的数据
*/
__RhBase.prototype.getStoreValue = function() {
return this.getValue();
};
/**
* 设置值,该值来自本地存储
*/
__RhBase.prototype.setValueFromStore = function (value) {
this.setValue(value);
};
__RhBase.prototype.validate = function() {
var val = this.getValue();
// 必填校验未通过
if (this.notnull && (!val || val.length == 0)) {
// this.showError('该项必填');
this.showError(Language.transStatic("rh_ui_next_string1"));
return false;
}
// 正则校验
if (this.regular) {
if (!new RegExp(this.regular.exp).test(val)) {
this.showError(this.regular.hint);
return false;
}
}
this.removeError();
return true;
};
/**
* event可能为undefined
*/
__RhBase.prototype.valueChanged = function(value, event) {
// alert(value);
};
__RhBase.prototype.toString = function() {
return jQuery('<div></div>').append(this.$dom).clone().remove().html();
};
/**
* 简单文本
* @param opts {'type':'text', 'id':'', 'label':'', 'name':'', 'value':'', 'notnull':true, 'regular':{'exp':'', 'hit':''}}
*/
var __RhText = function(opts) {
var template = '<li class="rh-text">'
+ '<label class="rh-label"></label>'
+ '<span class="space require">*</span><span class="space"> </span><span class="rh-text-name"></span><input type="hidden" class="rh-text-value" />'
+ '</li>';
this.init(template, opts, arguments);
};
Tools.extend(__RhText, __RhBase); // 继承__RhBase
__RhText.prototype.render = function(opts) {
this.$dom.attr('id', '__RhText_' + opts.id);
this.id = opts.id;
this.setLabel(opts.label);
this.setName(opts.name);
this.setValue(opts.value);
};
__RhText.prototype.setName = function(name) {
this.$dom.find(".rh-text-name").text(name);
};
__RhText.prototype.getName = function() {
return this.$dom.find(".rh-text-name").text();
};
__RhText.prototype.setValue = function(value) {
this.$dom.find(".rh-text-value").val(value);
this.valueChanged(value);
};
__RhText.prototype.getValue = function() {
return this.$dom.find(".rh-text-value").val();
};
__RhText.prototype.setValueFromStore = function(value) {
if (value && value.indexOf('@@') >= 0) {
var valArr = value.split('@@');
this.setName(valArr[0]);
this.setValue(valArr[1]);
} else {
this.setName(value);
this.setValue(value);
}
};
__RhText.prototype.getStoreValue = function() {
return this.getName() + '@@' + this.getValue();
};
/**
* 单选框
* @param opts {'type':'radio', 'id':'', 'label':'', 'value':'', 'options':[{'name':'', 'value':'1'}, {'name':'', 'value':'2'}], 'notnull':true, 'regular':{'exp':'', 'hit':''}}
*/
var __RhRadio = function(opts) {
var template = '<li class="rh-radio">'
+ '<label class="rh-label"></label>'
+ '<span class="space require">*</span><span class="space"> </span><span class="rh-radio-container"></span>'
+ '</li>';
this.init(template, opts, arguments);
};
Tools.extend(__RhRadio, __RhBase); // 继承__RhBase
__RhRadio.prototype.render = function(opts) {
var that = this;
this.id = opts.id;
this.$dom.attr('id', '__RhRadio_' + opts.id);
this.setLabel(opts.label);
this.setOptions(opts.options);
this.$dom.find(".rh-radio-container :radio").change(function(event){
that.valueChanged(that.getValue(), event);
});
this.setValue(opts.value);
};
__RhRadio.prototype.setOptions = function(options) {
var that = this;
var $container = this.$dom.find(".rh-radio-container");
$container.empty();
$.each(options, function(index, option){
var tmpDom = $('<span class="radio-container"><input type="radio" value="' + option["value"] + '" name="' + that.id + '" /><span class="label">' + option["name"] + '</span></span>');
$container.append(tmpDom);
var $radio = tmpDom.find(":radio");
tmpDom.find(".label").click(function(event){
if (!$radio.attr("checked")) {
var val = $radio.val();
that.setValue(val, event);
}
});
});
};
__RhRadio.prototype.setValue = function(value) {
this.$dom.find(":radio").removeAttr("checked");
this.$dom.find(":radio[value='" + value + "']").attr("checked", true);
var args = Array.prototype.slice.call(arguments);
if (args.length >= 2) { // 第二个参数为事件event
this.valueChanged(value, args[1]);
} else {
this.valueChanged(value);
}
};
__RhRadio.prototype.getValue = function() {
return this.$dom.find(":radio[checked]").val();
};
/**
* 多选框
* @param opts {'type':'check', 'id':'', 'label':'', 'value':'', 'options':[{'name':'', 'value':'1'}, {'name':'', 'value':'2'}], 'notnull':true, 'regular':{'exp':'', 'hit':''}}
*/
var __RhCheck = function(opts) {
var template = '<li class="rh-check">'
+ '<label class="rh-label"></label>'
+ '<span class="space require">*</span><span class="space"> </span><span class="rh-check-container"></span>'
+ '</li>';
this.init(template, opts, arguments);
};
Tools.extend(__RhCheck, __RhBase); // 继承__RhBase
__RhCheck.prototype.render = function(opts) {
var that = this;
this.id = opts.id;
this.$dom.attr('id', '__RhCheck_' + this.id);
this.setLabel(opts.label);
this.setOptions(opts.options);
this.$dom.find(".rh-check-container :checkbox").change(function(event){
that.valueChanged(that.getValue(), event);
});
this.setValue(opts.value);
};
__RhCheck.prototype.setOptions = function(options) {
var that = this;
var $container = this.$dom.find(".rh-check-container");
$container.empty();
$.each(options, function(index, option){
var tmpDom = $('<span class="check-container"><input type="checkbox" value="' + option["value"] + '" name="' + that.id + '" /><span class="label">' + option["name"] + '</span></span>');
$container.append(tmpDom);
var $check = tmpDom.find(":checkbox");
tmpDom.find(".label").click(function(event){
var val = that.getValue(); // 当前值
var valArr = [];
if (val && val.length > 0) {
valArr = that.getValue().split(',');
}
var theVal = $check.val();
if ($check.attr("checked")) {
valArr.splice(valArr.indexOf(theVal), 1);
} else {
valArr.push(theVal);
}
that.setValue(valArr.join(','), event);
});
});
};
__RhCheck.prototype.setValue = function(value) {
var that = this;
this.$dom.find(":checkbox").removeAttr("checked");
$.each(value.split(','), function(index, val){
that.$dom.find(":checkbox[value='" + val + "']").attr("checked", true);
});
var args = Array.prototype.slice.call(arguments);
if (args.length >= 2) { // 第二个参数为事件event
this.valueChanged(value, args[1]);
} else {
this.valueChanged(value);
}
};
__RhCheck.prototype.getValue = function() {
var value = [];
$.each(this.$dom.find(":checkbox[checked]"), function(index, checked){
value.push($(checked).val());
});
return value.join(',');
};
/**
* 下拉框
* @param opts {'type':'select', 'id':'', 'label':'', 'value':'', 'options':[{'name':'', 'value':'1'}, {'name':'', 'value':'2'}], 'notnull':true, 'regular':{'exp':'', 'hit':''}, 'store_option':true}
* store_option 配置是否存储整个option
*/
var __RhSelect = function(opts) {
var template = '<li class="rh-select">'
+ '<label class="rh-label"></label>'
+ '<span class="space require">*</span><span class="space"> </span>'
+ '</li>';
this.init(template, opts, arguments);
this.storeOption = opts.store_option;
this.id = opts.id;
};
Tools.extend(__RhSelect, __RhBase); // 继承__RhBase
__RhSelect.prototype.render = function(opts) {
var that = this;
this.$dom.attr('id', '__RhSelect_' + opts.id);
this.setLabel(opts.label);
this.setOptions(opts.options);
this.setValue(opts.value);
};
__RhSelect.prototype.setOptions = function(options) {
var that = this;
var $select = this.$dom.find(".rh-next-select-container");
if ($select.length > 0) {
$select.remove();
}
$select = $('<select class="rh-next-select-container blank ui-select-default"></select>');
$.each(options, function(index, option){
var $option = $('<option value="' + option["value"] + '">' + option["name"] + '</option>');
$select.append($option);
});
$select.change(function(event){
that.valueChanged(that.getValue(), event, that.getName());
});
this.$dom.append($select);
};
__RhSelect.prototype.setValue = function(value) {
this.$dom.find("option[selected]").removeAttr("selected");
this.$dom.find("option[value='" + value + "']").attr("selected", true);
var args = Array.prototype.slice.call(arguments);
if (args.length >= 2) { // 第二个参数为事件event
this.valueChanged(value, args[1]);
} else {
this.valueChanged(value);
}
};
__RhSelect.prototype.getValue = function() {
var val = this.$dom.find("select").val();
if (val) {
return val;
}
return "";
};
__RhSelect.prototype.getName = function() {
return this.$dom.find("select").find('option:selected').text();
};
/**
* 重载该方法,根据是否存储option来决定获取哪些信息需要存储
*/
__RhSelect.prototype.getStoreValue = function() {
if (this.storeOption) {
return this.getValue() + "@@" + $.toJSON(this.getOptions());
} else {
return this.getValue();
}
};
__RhSelect.prototype.getOptions = function() {
var options = this.$dom.find("option");
var optArr = [];
options.each(function(index, option){
var $opt = $(option);
optArr.push({"name":$opt.text(), "value":$opt.val()});
});
return optArr;
};
/**
* 判断如果有短号则存储的是整个option
*/
__RhSelect.prototype.setValueFromStore = function(value) {
if (value && value.indexOf('@@') >= 0) {
var valArr = value.split('@@');
this.setOptions($.parseJSON(valArr[1]));
this.setValue(valArr[0]);
} else {
this.setValue(value);
}
};
__RhSelect.prototype.disable = function() {
jQuery(this.$dom).find(".rh-next-select-container").attr("disabled", "disabled");
}
__RhSelect.prototype.enable = function() {
jQuery(this.$dom).find(".rh-next-select-container").attr("disabled", false);
}
/**
* 单行文本
* @param opts {'type':'input', 'id':'', 'label':'', 'value':'', 'notnull':true, 'regular':{'exp':'', 'hit':''}}
*/
var __RhInput = function(opts) {
var template = '<li class="rh-input">'
+ '<label class="rh-label"></label>'
+ '<span class="space require">*</span><span class="space"> </span><input type="text" class="rh-input-value" />'
+ '</li>';
this.init(template, opts, arguments);
};
Tools.extend(__RhInput, __RhBase); // 继承__RhBase
__RhInput.prototype.render = function(opts) {
var that = this;
this.id = opts.id;
this.$dom.attr('id', '__RhInput_' + opts.id);
this.setLabel(opts.label);
this.setValue(opts.value);
this.$dom.find(".rh-input-value").change(function(event){
that.valueChanged($(this).val(), event);
});
};
__RhInput.prototype.setValue = function(value) {
this.$dom.find(".rh-input-value").val(value);
this.valueChanged(value);
};
__RhInput.prototype.getValue = function() {
return this.$dom.find(".rh-input-value").val();
};
/**
* 隐藏文本
* @param opts {'type':'hidden', 'id':'', 'label':'', 'value':''}
*/
var __RhHidden = function(opts) {
var template = '<li class="rh-hidden">'
+ '<label class="rh-label"></label>'
+ '<span class="space"> </span><input type="hidden" class="rh-hidden-value" />'
+ '</li>';
this.init(template, opts, arguments);
};
Tools.extend(__RhHidden, __RhBase); // 继承__RhBase
__RhHidden.prototype.render = function(opts) {
var that = this;
this.$dom.attr('id', '__RhHidden_' + opts.id);
this.setLabel(opts.label);
this.setValue(opts.value);
this.$dom.find(".rh-hidden-value").change(function(event){
that.valueChanged($(this).val(), event);
});
};
__RhHidden.prototype.setValue = function(value) {
this.$dom.find(".rh-hidden-value").val(value);
this.valueChanged(value);
};
__RhHidden.prototype.getValue = function() {
return this.$dom.find(".rh-hidden-value").val();
};
/**
* 多行文本
* @param opts {'type':'textarea', 'id':'', 'label':'', 'value':'', 'notnull':true, 'regular':{'exp':'', 'hit':''}}
*/
var __RhTextarea = function(opts) {
var template = '<li class="rh-textarea">'
+ '<label class="rh-label"></label>'
+ '<span class="space require">*</span><span class="space"> </span><textarea cols="5" class="rh-textarea-value" />'
+ '</li>';
this.init(template, opts, arguments);
};
Tools.extend(__RhTextarea, __RhBase); // 继承__RhBase
__RhTextarea.prototype.render = function(opts) {
var that = this;
this.$dom.attr('id', '__RhTextarea_' + opts.id);
this.setLabel(opts.label);
this.setValue(opts.value);
this.$dom.find(".rh-textarea-value").change(function(event){
that.valueChanged($(this).val(), event);
});
};
__RhTextarea.prototype.setValue = function(value) {
this.$dom.find(".rh-textarea-value").val(value);
this.valueChanged(value);
};
__RhTextarea.prototype.getValue = function() {
return this.$dom.find(".rh-textarea-value").val();
};
/**
* 树形选择
* @param opts {'type':'tree', 'dictConfig':'', 'id':'', 'label':'', 'name':'', 'value':'', 'notnull':true, 'regular':{'exp':'', 'hit':''}}
* dictConfig: SY_ORG_DEPT_USER,{'TYPE':'multi','CHECKBOX':true,'extendDicSetting':{'rhexpand':false,'expandLevel':1,'cascadecheck':true,'checkParent':false,'childOnly':true}}
*/
var __RhTree = function(opts) {
opts.hide = true;// 暂时屏蔽,等以后从流程上设置
var that = this;
this._itemCode = new Date().getTime() + "_" + opts.id; // 随机生成树取默认值的隐藏域的id
var template = '<li class="rh-tree';
if(opts.hide) {
template += " rh-hidden";
}
template += '"><label class="rh-label"></label>'
+ '<span class="space require">*</span><span class="space"> </span><textarea type="text" class="rh-tree-name" readonly></textarea><input type="hidden" class="rh-tree-value" />'
+ '<input type="hidden" id="' + this._itemCode + '" /><input type="hidden" id="' + this._itemCode + '__NAME" />'
+ '</li>';
var strChooseLi = '<li class="rh-tree-choose';
if(opts.hide) {
strChooseLi += ' rh-hidden';
}
strChooseLi += '"><label class="rh-label"></label><span class="space"> </span><a href="javascript:void(0);" class="reader-man-group">查找人员</a></li>';
this.$chooseLi = $(strChooseLi);
this.init(template, opts, arguments);
this.$dom.after(this.$chooseLi);
this.$chooseDom = this.$chooseLi.find(".reader-man-group");
this.$chooseDom.click(function(){
// var configStr = "@com.rh.core.serv.send.SimpleFenfaDict,{'TYPE':'multi','CHECKBOX':true,'extendDicSetting':{'rhexpand':false,'expandLevel':1,'cascadecheck':true,'checkParent':false,'childOnly':true}}";
var configStr = "SY_ORG_DEPT_USER,{'TYPE':'multi','CHECKBOX':true,'extendDicSetting':{'rhexpand':false,'expandLevel':1,'cascadecheck':true,'checkParent':false,'childOnly':true}}";
if (opts.dictConfig) { // 可以从外部传入字典的配置
configStr = opts.dictConfig;
}
var params = { // 传递给后台的额外处理参数
// "userSelectDict":"SY_ORG_DEPT_USER_SUB", // 用户字典
// "displaySendSchm":false, // 是否显示分发方案
// "includeSubOdept":true // 是否机构内用户
};
if (opts.params) { // 可以从外部传入
params = opts.params;
}
var options = {
"config":configStr,
"hide":"explode",
"show":"blind",
"itemCode":that._itemCode,
"replaceCallBack":function(value, name){
that.setValue(value);
that.setName(name);
that.setDefault(name, value);
},
"replaceData" : opts.treeData, // 外部传进来的树的数据
"dialogName":opts.name,
"params":params
};
if (System.getMB("mobile")) {
var dictView = new mb.vi.selectList(options);
dictView._bldWin(event);
} else {
var dictView = new rh.vi.rhDictTreeView(options);
}
dictView.show(event);
});
};
Tools.extend(__RhTree, __RhBase); // 继承__RhBase
__RhTree.prototype.render = function(opts) {
var that = this;
this.$dom.attr('id', '__RhTree_' + opts.id);
this.setLabel(opts.label);
this.initValue(opts.name, opts.value);
this.$dom.find(".rh-tree-value").change(function(event){
that.valueChanged($(this).val(), event);
});
};
__RhTree.prototype.initValue = function(name, value) {
this.setName(name);
this.setValue(value);
this.setDefault(name, value);
};
/**
* 设置树的默认显示值
*/
__RhTree.prototype.setDefault = function(name, value) {
this.$dom.find('#' + this._itemCode).val(value);
this.$dom.find('#' + this._itemCode + "__NAME").val(name);
};
__RhTree.prototype.appendTo = function(container) {
this.$dom.appendTo(container);
this.$chooseLi.appendTo(container);
};
__RhTree.prototype.setValue = function(value) {
this.$dom.find(".rh-tree-value").val(value);
this.valueChanged(value);
};
__RhTree.prototype.getValue = function() {
return this.$dom.find(".rh-tree-value").val();
};
__RhTree.prototype.setName = function(name) {
this.$dom.find(".rh-tree-name").val(name);
};
__RhTree.prototype.getName = function() {
return this.$dom.find(".rh-tree-name").val();
};
__RhTree.prototype.getStoreValue = function() {
return this.getName() + '@@' + this.getValue();
};
__RhTree.prototype.setValueFromStore = function(value) {
if (value && value.indexOf('@@') >= 0) {
var valArr = value.split('@@');
this.initValue(valArr[0], valArr[1]);
}
};
/**
* 由于RhTree的dom结构和RhBase不同,所以addError需要重载
*/
__RhTree.prototype.addError = function() {
this.$error.hide();
this.$chooseLi.after(this.$error);
};
/**
* 可选可输入
* @param opts {'type':'combobox', 'id':'', 'label':'', 'value':'', 'multi':false, 'options':[{'name':'', 'value':'1'}, {'name':'', 'value':'2'}], 'notnull':true, 'regular':{'exp':'', 'hit':''}, 'store_option':true}
* 如果有url参数则会请求后台suggestion,并且url优先
*/
var __RhCombobox = function(opts) {
var that = this;
// 是否多选模式,默认单选模式
this.multi = !!opts.multi;
// 关闭输入框没有内容有搜索的功能
this.enableLimit = !!opts.limit;
var template = '<li class="rh-combobox';
if(opts.hide) {
template += " rh-hidden";
}
template += '"><label class="rh-label"></label>'
+ '<span class="space require">*</span><span class="space"> </span>'
+ '<div class="rh-content-container"></div>'
+ '</li>';
this.init(template, opts, arguments);
this.storeOption = opts.store_option;
this.id = opts.id;
if (opts.url) { // 远程数据接口模式,查询字符串为keyword='测试',返回数据结构为:[{'value':'', 'name':''}]
this.url = opts.url;
} else if (opts.options) { // 本地数据模式,数据结构为:[{'value':'', 'name':''}]
this.options = opts.options;
} else {
// alert('数据接口和本地数据必须存在一种');
this.options = [];
}
// suggest值
this.suggestion = [];
// 选中的值,单选则是一个对象,多选是一个数组
this.values = undefined;
// 联想模板
this.suggestTemplate = '<ul class="rh-autocomplete-menu" style="display: none;"></ul>'
+ '<ul class="rh-autocomplete-menu-novalue" style="display: none;">'
// + '<li class="rh-menu-item"><div class="rh-menu-item-novalue-wrapper">没有结果</div></li>'
+ '<li class="rh-menu-item"><div class="rh-menu-item-novalue-wrapper">'+Language.transStatic("rh_ui_next_string2")+'</div></li>'
+ '</ul>';
// 初始化
this.initCombobox();
};
Tools.extend(__RhCombobox, __RhBase); // 继承__RhBase
__RhCombobox.prototype.initCombobox = function () {
this.values = [];
this.$dom.addClass('rh-combobox-multi');
this.contentTemplate = '<div class="rh-combobox-multi-container"><span class="rh-combobox-multi-choice"></span>'
+ '<input class="rh-combobox-input" autocomplete="off">'
+ '</div>';
this.$dom.find('.rh-content-container').empty();
this.$dom.find('.rh-content-container').append(this.contentTemplate);
this.$dom.find('.rh-content-container').append(this.suggestTemplate);
this._initMultiCombobox();
this._setupCombobox();
};
__RhCombobox.prototype._setupCombobox = function () {
var that = this;
// suggestion绑定点击事件
var $autocomplete = this.$dom.find('.rh-autocomplete-menu');
var $novalue = this.$dom.find('.rh-autocomplete-menu-novalue');
var $input = this.$dom.find('.rh-combobox-input');
$autocomplete.hover(function () {
$autocomplete.find('.rh-menu-item-wrapper').removeClass('rh-menu-item-wrapper-selected');
});
setTimeout(function () {
that.$dom.closest('.ui-dialog').on('click', function (event) {
if (!$(event.target).hasClass('rh-combobox-input')) {
$autocomplete.hide();
$novalue.hide();
}
});
}, 200);
this.$dom.find('.rh-combobox-multi-container').click(function (event) {
$input.focus();
var $target = $(event.target);
if (!$target.hasClass('rh-combobox-input') && !$target.hasClass('rh-menu-item')
&& !$target.hasClass('rh-menu-item-wrapper') && !$target.hasClass('rh-search-choice-close')) {
$input.click();
}
});
// 输入框值发生变化时触发suggest
var oldValue, selectIndex = -1;
var cpLock = false;
function selectItem(selectIndex) {
cpLock = true;
var $wrappers = $autocomplete.find('.rh-menu-item-wrapper');
$wrappers.removeClass('rh-menu-item-wrapper-selected');
var nextSelected;
$.each($wrappers, function(index, wrapper){
var $wrapper = $(wrapper);
if ($wrapper.attr('index') == selectIndex) {
nextSelected = $wrapper;
$wrapper.addClass('rh-menu-item-wrapper-selected');
}
});
/**
* 滚动到正确的位置
*/
var itemTop = nextSelected.position().top;
var itemHeight = nextSelected.outerHeight();
if (itemTop < 0) { // 往上滚动
$autocomplete.scrollTop($autocomplete.scrollTop() + itemTop);
} else if (itemHeight + itemTop > $autocomplete.height()) {
$autocomplete.scrollTop($autocomplete.scrollTop() + itemTop + itemHeight - $autocomplete.height());
}
cpLock = false;
}
$input.on('compositionstart', function () {
/**
* 53的chrome compositionstart compositionend input事件的先后顺序重现了变化
* compositionstart先触发,input后触发,compositionend最后触发
*/
if (!($.browser.chrome && $.browser.version > '52')) {
cpLock = true;
}
}).on('compositionend', function () {
cpLock = false;
}).on('input propertychange', function (e) {
if (cpLock) {
return;
}
if ($.browser.msie && ($.browser.version == "8.0")) { // 避免IE8第一次赋值触发的propertychange事件
if (!oldValue && oldValue != '') {
oldValue = $(this).val();
return;
}
}
selectIndex = -1;
var val = $(this).val();
if (val.length == 0) {
that._clearSuggest();
$autocomplete.hide();
$novalue.hide();
} else {
if (val != oldValue) { // IE8滚动到下一个选项也会触发propertychange事件
that.suggest(val);
}
}
oldValue = val;
}).keydown(function(e){
switch (e.keyCode) {
case 8: // 删除
$autocomplete.hide();
if ($input.val().length == 0) {
var $deleteItem = that.$dom.find('.rh-search-choice.delete');
if ($deleteItem.length > 0) {
$deleteItem.remove();
that.values.splice(that.values.length - 1, 1);
} else {
var $deleteItems = that.$dom.find('.rh-search-choice');
if ($deleteItems.length > 0) {
$($deleteItems[$deleteItems.length - 1]).addClass('delete');
}
}
} else {
that.$dom.find('.rh-search-choice').removeClass('delete');
}
break;
case 13: // 回车
cpLock = true;
if ($autocomplete.find('.rh-menu-item-wrapper-selected').length > 0) {
$autocomplete.hide();
if (selectIndex > -1) {
that.addValue(that.suggestion[selectIndex]);
$input.val('');
}
cpLock = false;
} else {
cpLock = false;
that.suggest($input.val());
}
selectIndex = -1;
break;
case 38: // 上键
selectIndex--;
if (selectIndex < 0) {
selectIndex = that.suggestion.length - 1;
}
if (selectIndex >= 0) {
selectItem(selectIndex);
}
break;
case 40: // 下键
selectIndex = ++selectIndex % that.suggestion.length;
if (selectIndex < that.suggestion.length) {
selectItem(selectIndex);
}
break;
default:
break;
}
}).click(function () {
var val = $input.val();
if (!val || val.length == 0) {
setTimeout(function () {
that.suggest('');
}, 0);
}
});
};
__RhCombobox.prototype.setMulti = function (bool) { // true为多选模式,false为单选模式
var that = this;
if (bool == this.multi) { // 已经是单选或多选模式
return;
}
this.multi = bool;
this.initCombobox();
};
__RhCombobox.prototype._initMultiCombobox = function () {
};
__RhCombobox.prototype.addValue = function (value) { // 多选模式添加值, {'value':'', 'name':''},
var that = this;
if (this.multi) {
var exists = false;
$.each(that.values, function (index, item) {
if (value['value'] == item['value']) {
exists = true;
return;
}
});
if (exists) {
return;
}
this.values.push(value);
} else {
this.values = [value];
this.$dom.find('.rh-combobox-multi-choice').empty();
}
var $itemDom = $('<span class="rh-search-choice">'
+ '<span class="rh-search-choice-name"></span>'
+ '<a class="rh-search-choice-close ui-icon ui-icon-close"></a>'
+ '</span>');
var name = this._filterName(value['name']);
$itemDom.find('.rh-search-choice-name').text(name);
$itemDom.find('.rh-search-choice-close').unbind('click').click(function () {
if (that.disableButton) {
return;
}
$itemDom.remove();
$.each(that.values, function (index, item) {
if (value['value'] == item['value']) {
that.values.splice(index, 1);
}
});
});
this.$dom.find('.rh-combobox-multi-choice').append($itemDom);
};
__RhCombobox.prototype._filterName = function(name) {
if(!name) {
return name;
}
if (name.indexOf("|") > 0) {
name = name.substring(0, name.indexOf("|"));
} else if (name.indexOf("[") > 0) {
name = name.replace(/\[[\s\S]+\]/g,"");
}
return name;
};
__RhCombobox.prototype.render = function(opts) {
var that = this;
this.$dom.attr('id', '__RhCombobox_' + opts.id);
this.setLabel(opts.label);
};
__RhCombobox.prototype.setValue = function (value) { // {'value':'', 'name':''},
var that = this;
this.$dom.find('.rh-combobox-multi-choice').empty();
if ($.isArray(value)) {
$.each(value, function (index, value) {
that.addValue(value);
});
} else {
this.values.length = 0;
that.addValue(value);
}
};
__RhCombobox.prototype.getName = function () {
if(!this.values) {
return "";
}
if(jQuery.isArray(this.values)) {
var len = this.values.length;
var results = "";
for(var i=0; i<len; i++) {
results += this.values[i].name + ",";
}
if(results.length > 2) {
return results.substring(0, results.length - 1);
}
} else {
return this.values.name;
}
return "";
};
__RhCombobox.prototype.getValue = function () {
if(!this.values) {
return "";
}
if(jQuery.isArray(this.values)) {
var len = this.values.length;
var results = "";
for(var i=0; i<len; i++) {
results += this.values[i].value + ",";
}
if(results.length > 2) {
return results.substring(0, results.length - 1);
}
} else {
return this.values.value;
}
return "";
};
__RhCombobox.prototype.getStoreValue = function() {
return this.values;
};
__RhCombobox.prototype.suggest = function (keyword, callback) {
var that = this;
if (that.disableButton) { // 如果只读了则不可suggest
return;
}
if (that.enableLimit && (!keyword || keyword.length == 0)) { // 启动了keyword长度限制,keyword存在才启动suggest
if (callback) {
callback();
}
return;
}
this.lookup(keyword, function (suggestion) {
that.suggestion = suggestion;
that._showSuggestion();
});
if (callback) {
callback();
}
};
__RhCombobox.prototype.lookup = function (keyword, callback) {
if (!keyword || keyword.length == 0) {
if (callback) { // 如果点击箭头keyword为空时显示备选结果
callback(this.options);
}
return [];
}
var suggestions = [];
if (this.options && this.options.length > 0) {
var that = this;
$.each(this.options, function(index, option){
var option = that.options[index];
if (option['name'].toLowerCase().indexOf(keyword.toLowerCase()) >= 0) {
suggestions.push(option);
}
});
callback(suggestions);
} else {
$.getJSON(this.url, {'keyword':keyword}, function (data) {
callback(data);
});
}
};
__RhCombobox.prototype._showSuggestion = function () {
var that = this;
var $autocomplete = this.$dom.find('.rh-autocomplete-menu');
var $novalue = this.$dom.find('.rh-autocomplete-menu-novalue');
var $input = this.$dom.find('.rh-combobox-input');
$autocomplete.empty();
if (!this.suggestion || this.suggestion.length == 0) {
$autocomplete.hide();
$novalue.show();
} else {
$.each(this.suggestion, function(index, option){
(function (theIndex) {
var $li = $('<li class="rh-menu-item"></li>');
$('<div index="' + theIndex + '" class="rh-menu-item-wrapper">' + option.name + '</div>').on('click', function (event) {
var attrIndex = $(this).attr('index');
that.addValue(that.suggestion[attrIndex]);
setTimeout(function () {
$autocomplete.hide();
$novalue.hide();
$input.val('');
}, 100);
event.stopPropagation();
}).appendTo($li);
$autocomplete.append($li);
})(index);
});
$autocomplete.show();
$novalue.hide();
}
};
__RhCombobox.prototype._clearSuggest = function () {
var $autocomplete = this.$dom.find('.rh-autocomplete-menu');
$autocomplete.empty();
this.suggestion = [];
};
/**
* 选中默认值
**/
__RhCombobox.prototype.initValue = function (name, value) {
this.values = [];
if(!name || !value) {
this.setValue([]);
return;
}
this.setValue({'name':name, 'value':value});
};
__RhCombobox.prototype.setOptions = function (datas) {
var opts = [];
if (!datas) {
this.options = opts;
return;
}
if (datas.length && datas.length > 0) {
var count = datas.length;
for (var i=0; i < count; i++) {
var data = datas[i];
var opt = {
"name" : data.NAME,
"value" : data.ID
};
opts.push(opt);
}
}
this.options = opts;
}
__RhCombobox.prototype.show = function () {
this.$dom.show();
};
__RhCombobox.prototype.hide = function () {
this.$dom.hide();
};
__RhCombobox.prototype.enable = function () {
this.$dom.find('.rh-combobox-input').removeAttr('disabled');
this.$dom.find('.rh-combobox-input').show();
this.$dom.find('.rh-combobox-multi-container').removeAttr("disabled", true);
this.$dom.find('.rh-search-choice-close').show();
this.disableButton = false;
};
__RhCombobox.prototype.disable = function () {
this.$dom.find('.rh-combobox-input').attr("disabled", true);
this.$dom.find('.rh-combobox-input').hide();
this.$dom.find('.rh-combobox-multi-container').attr("disabled", true);
this.$dom.find('.rh-search-choice-close').hide();
this.disableButton = true;
};
__RhCombobox.prototype.click = function (func) {
// this.$chooseDom.unbind("click").click(func);
};
/**
* 送下一环节
* @param opts 每一项的配置 [{}, {}]
* @param 第二个参数是需要添加到的容器jQuery对象,第三个参数是额外的配置
*/
var __RhNext = function(opts){
var that = this;
var template = '<ul></ul>';
this._items = {};
// 构造函数可以传递第三个参数,该参数为额外配置
var args = Array.prototype.slice.call(arguments);
if (args.length >= 3) {
var extra = args[2];
this.dataId = extra.dataId; // 数据ID
this.nodeId = extra.nodeId; // 节点ID
this.storeKey = this.dataId + "_" + this.nodeId;
} else {
this.storeKey = "default_key";
}
this.init(template, opts, arguments);
this.placeholder();
// this.$dom.prepend('<li class="buttons"><label class="rh-label"></label><span class="space"> </span><button id="save">保存</button><button id="confirm">确定</button><button id="cancel">取消</button></li>');
// this.$dom.append('<li class="mind"></li>');
this.$dom.append('<li class="mind rh-select" id="_rhMind"></li>');
// 注册保存事件
opts.diaFuns.save = function(){
if (!store.enabled) {
alert('Local storage is not supported by your browser. Please disable "Private Mode", or upgrade to a modern browser.')
return;
}
that.save();
};
// this.$dom.find("#save").click(opts.diaFuns.save);
// 注册确定事件
opts.diaFuns.confirm = function(){
if (!store.enabled) {
alert('Local storage is not supported by your browser. Please disable "Private Mode", or upgrade to a modern browser.')
return;
}
if (that.validate()) {
that.confirm().then(function(){
store.remove(that.storeKey);
opts.diaFuns.cancel(opts.dialog);
}, function(){ // 送下一环节失败
});
}
};
// this.$dom.find("#confirm").click(opts.diaFuns.confirm);
// 注册取消事件
opts.diaFuns.cancel = function(dialog){
// 查找最近的一个class为ui-dialog的父节点元素,然后查找ui-icon-closethick,模拟点击
dialog.remove();
// that.$dom.closest(".ui-dialog").find(".ui-icon-closethick").click();
// if (!store.enabled) {
// alert('Local storage is not supported by your browser. Please disable "Private Mode", or upgrade to a modern browser.')
// return
// }
// store.remove(that.storeKey);
};
// this.$dom.find("#cancel").click(opts.diaFuns.cancel);
};
Tools.extend(__RhNext, __RhBase); // 继承__RhBase
__RhNext.prototype.render = function(options) {
var that = this;
$.each(options, function(index, option){
if (that._items[option.id]) { // 避免id重复
// alert("已经存在组件:" + option.name);
alert(Language.transStatic("rh_ui_next_string3") + option.name);
return;
}
var item = that.createItem(option, that.$dom);
if (item) {
that._items[option.id] = item;
}
});
this.initWithStore();
};
__RhNext.prototype.createItem = function(option, container) {
if (!option.id || option.id.length == 0) {
// alert("组件的id必须提供!");
alert(Language.transStatic("rh_ui_next_string4"));
return;
}
var item;
switch (option.type) {
case UIType.Text:
item = new __RhText(option, container);
break;
case UIType.Radio:
item = new __RhRadio(option, container);
break;
case UIType.Check:
item = new __RhCheck(option, container);
break;
case UIType.Select:
item = new __RhSelect(option, container);
break;
case UIType.Input:
item = new __RhInput(option, container);
break;
case UIType.Textarea:
item = new __RhTextarea(option, container);
break;
case UIType.Tree:
item = new __RhTree(option, container);
break;
case UIType.Hidden:
item = new __RhHidden(option, container);
break;
case UIType.Combobox:
item = new __RhCombobox(option, container);
break;
default:
// alert("错误UI类型," + option.type);
alert(Language.transStatic("rh_ui_next_string5") + option.type);
}
return item;
};
__RhNext.prototype.initWithStore = function() {
// 取本地缓存里的值
if (!store.enabled) {
alert('Local storage is not supported by your browser. Please disable "Private Mode", or upgrade to a modern browser.')
return
}
var values = store.get(this.storeKey);
if (values) {
this.setValue(values);
}
};
__RhNext.prototype.setValue = function(values) {
if (!values) {
return;
}
$.each(this._items, function(key, item){
item.setValueFromStore(values[key]);
});
};
__RhNext.prototype.getStoreValueById = function(id) {
var values = store.get(this.storeKey);
var returnVal = "";
if (values) {
$.each(this._items, function(key, item){
if (key == id) {
returnVal = values[key];
}
});
}
return returnVal;
};
__RhNext.prototype.getValue = function() {
var values = {};
$.each(this._items, function(key, item){
values[key] = item.getValue();
});
return values;
};
__RhNext.prototype.getStoreValue = function() {
var values = {};
$.each(this._items, function(key, item){
values[key] = item.getStoreValue();
});
return values;
};
__RhNext.prototype.validate = function() {
var pass = true;
for (var key in this._items) {
if (!this._items[key].validate()) { // 只要一个校验没通过就整个不通过
pass = false;
}
}
return pass;
};
__RhNext.prototype.setItem = function(id, item) {
this._items[id] = item;
};
__RhNext.prototype.getItem = function(id) {
return this._items[id];
};
/**
* 获取属性formData为True的Item,并以数组形式返回。
*/
__RhNext.prototype.getFormDataItem = function() {
var results = new Array();
for (var key in this._items) {
var item = this._items[key];
if(item.formData) {
results.push(item);
}
}
return results;
}
/**
* 动态添加一个组件
* 以下的参数after和before都可以不传递,如果不传递的话则往后面添加
* @param option 组件配置参数
* @param insertAfterItemId 创建的新组件添加到id为insertAfterItemId组件的后面
* @param insertBeforeItemId 创建的新组件添加到id为insertBeforeItemId组件的前面
*/
__RhNext.prototype.addItem = function(option, insertAfterItemId, insertBeforeItemId) {
var item = this.createItem(option);
if (!item) { // 创建组件失败
return;
}
if (insertAfterItemId) {
var insertAfterItem = this.getItem(insertAfterItemId);
if (insertAfterItem) {
item.insertAfter(insertAfterItem);
} else {
// alert("id为" + insertAfterItemId + "的组件不存在!");
alert(Language.transArr("rh_ui_next_L1",[insertAfterItemId]));
}
} else if (insertBeforeItemId) {
var insertBeforeItem = this.getItem(insertBeforeItemId);
if (insertBeforeItem) {
item.insertBefore(insertBeforeItem);
} else if(this.$dom.find("#" + insertBeforeItemId)) {
// alert(insertBeforeItemId);
this.$dom.find("#" + insertBeforeItemId).first().before(item.$dom);
} else {
// alert("id为" + insertBeforeItemId + "的组件不存在!");
alert(Language.transArr("rh_ui_next_L1",[insertAfterItemId]));
}
} else {
item.appendTo(this.$dom);
}
this.setItem(option.id, item); // 该元素添加到RhNext里统一管理
return item;
};
__RhNext.prototype.placeholder = function() {
var that = this;
// ie8下设置placeholder
if(!('placeholder' in document.createElement('input'))) {
this.$dom.find('input[placeholder], textarea[placeholder]').each(function(){
var that = $(this), text = that.attr('placeholder');
if(that.val() === ""){
that.val(text).addClass('placeholder');
}
that.focus(function(){
if(that.val() === text){
that.val("").removeClass('placeholder');
}
}).blur(function(){
if(that.val() === ""){
that.val(text).addClass('placeholder');
}
})
});
}
};
__RhNext.prototype.save = function() {
store.set(this.storeKey, this.getStoreValue());
this.$dom.find("#cancel").click();
};
__RhNext.prototype.confirm = function() { // 返回的必须是promise
var deferred = $.Deferred();
// if (confirm("确定送下一环节")) {
if (confirm(Language.transStatic("rh_ui_next_string6"))) {
deferred.resolve();
} else {
deferred.reject();
}
return deferred.promise();
};
__RhNext.prototype.getMindCon = function(){
return this.$dom.find(".mind").first();
};
__RhNext.prototype.setNotNull = function() { // RhNext不用setNotNull
};
/**
* 删除Item
**/
__RhNext.prototype.removeItem = function(id) {
var item = this.getItem(id);
if(item) {
item.$dom.remove();
$(this._items).removeProp(id);
}
}
// 暴露全局变量
$.each(UIType, function(key, value){
window["Rh" + key] = eval("__Rh" + key);
});
})(window, jQuery);
|
const mongoose = require('mongoose')
const scheduleSchema = new mongoose.Schema({
title: {
type: String,
required: true
},
desc: {
type: String,
required: true
},
services: [
{
type: mongoose.ObjectId,
ref: 'Service',
required: true
}
],
days: [],
horarys: [],
servicesResp: [],
main: {
type: Boolean
},
user: {
type: mongoose.ObjectId,
ref: 'User',
required: true
}
})
module.exports = mongoose.model('schedule', scheduleSchema)
|
const formStyles = theme => ({
container: {
display: "flex",
flexWrap: "wrap",
flexDirection: "column"
}
});
export default formStyles;
|
/* This file was generated from TypeScript source C:/Users/autobuild/turbulenz/engine/tslib/webgl/ddsloader.ts */
// Copyright (c) 2011-2012 Turbulenz Limited
/*global TurbulenzEngine*/
/*global Uint8Array*/
/*global Uint16Array*/
/*global window*/
"use strict";
//
// DDSLoader
//
function DDSLoader() {
return this;
}
DDSLoader.prototype = {
version: 1,
DDSF_CAPS: // surface description flags
0x00000001,
DDSF_HEIGHT: 0x00000002,
DDSF_WIDTH: 0x00000004,
DDSF_PITCH: 0x00000008,
DDSF_PIXELFORMAT: 0x00001000,
DDSF_MIPMAPCOUNT: 0x00020000,
DDSF_LINEARSIZE: 0x00080000,
DDSF_DEPTH: 0x00800000,
DDSF_ALPHAPIXELS: // pixel format flags
0x00000001,
DDSF_FOURCC: 0x00000004,
DDSF_RGB: 0x00000040,
DDSF_RGBA: 0x00000041,
DDSF_COMPLEX: // dwCaps1 flags
0x00000008,
DDSF_TEXTURE: 0x00001000,
DDSF_MIPMAP: 0x00400000,
DDSF_CUBEMAP: // dwCaps2 flags
0x00000200,
DDSF_CUBEMAP_POSITIVEX: 0x00000400,
DDSF_CUBEMAP_NEGATIVEX: 0x00000800,
DDSF_CUBEMAP_POSITIVEY: 0x00001000,
DDSF_CUBEMAP_NEGATIVEY: 0x00002000,
DDSF_CUBEMAP_POSITIVEZ: 0x00004000,
DDSF_CUBEMAP_NEGATIVEZ: 0x00008000,
DDSF_CUBEMAP_ALL_FACES: 0x0000FC00,
DDSF_VOLUME: 0x00200000,
FOURCC_UNKNOWN: // compressed texture types
0,
FOURCC_R8G8B8: 20,
FOURCC_A8R8G8B8: 21,
FOURCC_X8R8G8B8: 22,
FOURCC_R5G6B5: 23,
FOURCC_X1R5G5B5: 24,
FOURCC_A1R5G5B5: 25,
FOURCC_A4R4G4B4: 26,
FOURCC_R3G3B2: 27,
FOURCC_A8: 28,
FOURCC_A8R3G3B2: 29,
FOURCC_X4R4G4B4: 30,
FOURCC_A2B10G10R10: 31,
FOURCC_A8B8G8R8: 32,
FOURCC_X8B8G8R8: 33,
FOURCC_G16R16: 34,
FOURCC_A2R10G10B10: 35,
FOURCC_A16B16G16R16: 36,
FOURCC_L8: 50,
FOURCC_A8L8: 51,
FOURCC_A4L4: 52,
FOURCC_DXT1: 0x31545844,
FOURCC_DXT2: //(MAKEFOURCC('D','X','T','1'))
0x32545844,
FOURCC_DXT3: //(MAKEFOURCC('D','X','T','1'))
0x33545844,
FOURCC_DXT4: //(MAKEFOURCC('D','X','T','3'))
0x34545844,
FOURCC_DXT5: //(MAKEFOURCC('D','X','T','3'))
0x35545844,
FOURCC_D16_LOCKABLE: //(MAKEFOURCC('D','X','T','5'))
70,
FOURCC_D32: 71,
FOURCC_D24X8: 77,
FOURCC_D16: 80,
FOURCC_D32F_LOCKABLE: 82,
FOURCC_L16: 81,
FOURCC_R16F: // Floating point surface formats
// s10e5 formats (16-bits per channel)
111,
FOURCC_G16R16F: 112,
FOURCC_A16B16G16R16F: 113,
FOURCC_R32F: // IEEE s23e8 formats (32-bits per channel)
114,
FOURCC_G32R32F: 115,
FOURCC_A32B32G32R32F: 116,
BGRPIXELFORMAT_B5G6R5: 1,
BGRPIXELFORMAT_B8G8R8A8: 2,
BGRPIXELFORMAT_B8G8R8: 3,
processBytes: function processBytesFn(bytes) {
if(!this.isValidHeader(bytes)) {
return;
}
// Skip signature
var offset = 4;
var header = this.parseHeader(bytes, offset);
offset += 31 * 4;
this.width = header.dwWidth;
this.height = header.dwHeight;
/*jshint bitwise: false*/
if((header.dwCaps2 & this.DDSF_VOLUME) && (header.dwDepth > 0)) {
this.depth = header.dwDepth;
} else {
this.depth = 1;
}
if(header.dwFlags & this.DDSF_MIPMAPCOUNT) {
this.numLevels = header.dwMipMapCount;
} else {
this.numLevels = 1;
}
if(header.dwCaps2 & this.DDSF_CUBEMAP) {
var numFaces = 0;
numFaces += ((header.dwCaps2 & this.DDSF_CUBEMAP_POSITIVEX) ? 1 : 0);
numFaces += ((header.dwCaps2 & this.DDSF_CUBEMAP_NEGATIVEX) ? 1 : 0);
numFaces += ((header.dwCaps2 & this.DDSF_CUBEMAP_POSITIVEY) ? 1 : 0);
numFaces += ((header.dwCaps2 & this.DDSF_CUBEMAP_NEGATIVEY) ? 1 : 0);
numFaces += ((header.dwCaps2 & this.DDSF_CUBEMAP_POSITIVEZ) ? 1 : 0);
numFaces += ((header.dwCaps2 & this.DDSF_CUBEMAP_NEGATIVEZ) ? 1 : 0);
if(numFaces !== 6 || this.width !== this.height) {
return;
}
this.numFaces = numFaces;
} else {
this.numFaces = 1;
}
var compressed = false;
var bpe = 0;
// figure out what the image format is
var gd = this.gd;
if(header.ddspf.dwFlags & this.DDSF_FOURCC) {
switch(header.ddspf.dwFourCC) {
case this.FOURCC_DXT1:
this.format = gd.PIXELFORMAT_DXT1;
bpe = 8;
compressed = true;
break;
case this.FOURCC_DXT2:
case this.FOURCC_DXT3:
this.format = gd.PIXELFORMAT_DXT3;
bpe = 16;
compressed = true;
break;
case this.FOURCC_DXT4:
case this.FOURCC_DXT5:
case this.FOURCC_RXGB:
this.format = gd.PIXELFORMAT_DXT5;
bpe = 16;
compressed = true;
break;
case this.FOURCC_R8G8B8:
this.bgrFormat = this.BGRPIXELFORMAT_B8G8R8;
bpe = 3;
break;
case this.FOURCC_A8R8G8B8:
this.bgrFormat = this.BGRPIXELFORMAT_B8G8R8A8;
bpe = 4;
break;
case this.FOURCC_R5G6B5:
this.bgrFormat = this.BGRPIXELFORMAT_B5G6R5;
bpe = 2;
break;
case this.FOURCC_A8:
this.format = gd.PIXELFORMAT_A8;
bpe = 1;
break;
case this.FOURCC_A8B8G8R8:
this.format = gd.PIXELFORMAT_R8G8B8A8;
bpe = 4;
break;
case this.FOURCC_L8:
this.format = gd.PIXELFORMAT_L8;
bpe = 1;
break;
case this.FOURCC_A8L8:
this.format = gd.PIXELFORMAT_L8A8;
bpe = 2;
break;
//these are unsupported for now
case this.FOURCC_UNKNOWN:
case this.FOURCC_ATI1:
case this.FOURCC_ATI2:
case this.FOURCC_X8R8G8B8:
case this.FOURCC_X8B8G8R8:
case this.FOURCC_A2B10G10R10:
case this.FOURCC_A2R10G10B10:
case this.FOURCC_A16B16G16R16:
case this.FOURCC_R16F:
case this.FOURCC_A16B16G16R16F:
case this.FOURCC_R32F:
case this.FOURCC_A32B32G32R32F:
case this.FOURCC_L16:
case this.FOURCC_X1R5G5B5:
case this.FOURCC_A1R5G5B5:
case this.FOURCC_A4R4G4B4:
case this.FOURCC_R3G3B2:
case this.FOURCC_A8R3G3B2:
case this.FOURCC_X4R4G4B4:
case this.FOURCC_A4L4:
case this.FOURCC_D16_LOCKABLE:
case this.FOURCC_D32:
case this.FOURCC_D24X8:
case this.FOURCC_D16:
case this.FOURCC_D32F_LOCKABLE:
case this.FOURCC_G16R16:
case this.FOURCC_G16R16F:
case this.FOURCC_G32R32F:
break;
default:
return;
}
} else if(header.ddspf.dwFlags === this.DDSF_RGBA && header.ddspf.dwRGBBitCount === 32) {
if(header.ddspf.dwRBitMask === 0x000000FF && header.ddspf.dwGBitMask === 0x0000FF00 && header.ddspf.dwBBitMask === 0x00FF0000 && header.ddspf.dwABitMask === 0xFF000000) {
this.format = gd.PIXELFORMAT_R8G8B8A8;
} else {
this.bgrFormat = this.BGRPIXELFORMAT_B8G8R8A8;
}
bpe = 4;
} else if(header.ddspf.dwFlags === this.DDSF_RGB && header.ddspf.dwRGBBitCount === 32) {
if(header.ddspf.dwRBitMask === 0x000000FF && header.ddspf.dwGBitMask === 0x0000FF00 && header.ddspf.dwBBitMask === 0x00FF0000) {
this.format = gd.PIXELFORMAT_R8G8B8A8;
} else {
this.bgrFormat = this.BGRPIXELFORMAT_B8G8R8A8;
}
bpe = 4;
} else if(header.ddspf.dwFlags === this.DDSF_RGB && header.ddspf.dwRGBBitCount === 24) {
if(header.ddspf.dwRBitMask === 0x000000FF && header.ddspf.dwGBitMask === 0x0000FF00 && header.ddspf.dwBBitMask === 0x00FF0000) {
this.format = gd.PIXELFORMAT_R8G8B8;
} else {
this.bgrFormat = this.BGRPIXELFORMAT_B8G8R8;
}
bpe = 3;
} else if(header.ddspf.dwFlags === this.DDSF_RGB && header.ddspf.dwRGBBitCount === 16) {
if(header.ddspf.dwRBitMask === 0x0000F800 && header.ddspf.dwGBitMask === 0x000007E0 && header.ddspf.dwBBitMask === 0x0000001F) {
this.format = gd.PIXELFORMAT_R5G6B5;
} else {
this.bgrFormat = this.BGRPIXELFORMAT_B5G6R5;
}
bpe = 2;
} else if(header.ddspf.dwRGBBitCount === 8) {
this.format = gd.PIXELFORMAT_L8;
bpe = 1;
} else {
return;
}
var size = 0;
for(var face = 0; face < this.numFaces; face += 1) {
var w = this.width, h = this.height, d = this.depth;
for(var level = 0; level < this.numLevels; level += 1) {
var ew = (compressed ? Math.floor((w + 3) / 4) : w);
var eh = (compressed ? Math.floor((h + 3) / 4) : h);
size += (ew * eh * d * bpe);
w = (w > 1 ? (w >> 1) : 1);
h = (h > 1 ? (h >> 1) : 1);
d = (d > 1 ? (d >> 1) : 1);
}
}
/*jshint bitwise: true*/
if(bytes.length < (offset + size)) {
return;
}
this.bytesPerPixel = bpe;
var data = bytes.subarray(offset);
bytes = null;
var swapBytes = false;
switch(this.bgrFormat) {
case this.BGRPIXELFORMAT_B8G8R8:
this.format = gd.PIXELFORMAT_R8G8B8;
swapBytes = true;
break;
case this.BGRPIXELFORMAT_B8G8R8A8:
this.format = gd.PIXELFORMAT_R8G8B8A8;
swapBytes = true;
break;
case this.BGRPIXELFORMAT_B5G6R5:
this.format = gd.PIXELFORMAT_R5G6B5;
swapBytes = true;
break;
default:
break;
}
if(swapBytes) {
data = this.convertBGR2RGB(data);
}
if(this.format === gd.PIXELFORMAT_DXT1) {
if(!gd.isSupported('TEXTURE_DXT1')) {
data = this.convertDXT1ToRGBA(data);
}
} else if(this.format === gd.PIXELFORMAT_DXT3) {
if(!gd.isSupported('TEXTURE_DXT3')) {
data = this.convertDXT3ToRGBA(data);
}
} else if(this.format === gd.PIXELFORMAT_DXT5) {
if(!gd.isSupported('TEXTURE_DXT5')) {
data = this.convertDXT5ToRGBA(data);
}
}
this.data = data;
},
parseHeader: function parseHeaderFn(bytes, offset) {
function readUInt32() {
var value = ((bytes[offset]) + (bytes[offset + 1] * 256) + (bytes[offset + 2] * 65536) + (bytes[offset + 3] * 16777216));
offset += 4;
return value;
}
function parsePixelFormatHeader() {
return {
dwSize: readUInt32(),
dwFlags: readUInt32(),
dwFourCC: readUInt32(),
dwRGBBitCount: readUInt32(),
dwRBitMask: readUInt32(),
dwGBitMask: readUInt32(),
dwBBitMask: readUInt32(),
dwABitMask: readUInt32()
};
}
var header = {
dwSize: readUInt32(),
dwFlags: readUInt32(),
dwHeight: readUInt32(),
dwWidth: readUInt32(),
dwPitchOrLinearSize: readUInt32(),
dwDepth: readUInt32(),
dwMipMapCount: readUInt32(),
dwReserved1: [
readUInt32(),
readUInt32(),
readUInt32(),
readUInt32(),
readUInt32(),
readUInt32(),
readUInt32(),
readUInt32(),
readUInt32(),
readUInt32(),
readUInt32()
],
ddspf: parsePixelFormatHeader(),
dwCaps1: readUInt32(),
dwCaps2: readUInt32(),
dwReserved2: [
readUInt32(),
readUInt32(),
readUInt32()
]
};
return header;
},
isValidHeader: function isValidHeaderFn(bytes) {
return (68 === bytes[0] && 68 === bytes[1] && 83 === bytes[2] && 32 === bytes[3]);
},
convertBGR2RGB: function convertBGR2RGBFn(data) {
// Rearrange the colors from BGR to RGB
var bytesPerPixel = this.bytesPerPixel;
var width = this.width;
var height = this.height;
var numLevels = this.numLevels;
var numFaces = this.numFaces;
var numPixels = 0;
for(var level = 0; level < numLevels; level += 1) {
numPixels += (width * height);
width = (width > 1 ? Math.floor(width / 2) : 1);
height = (height > 1 ? Math.floor(height / 2) : 1);
}
var size = (numPixels * bytesPerPixel * numFaces);
var offset = 0;
if(bytesPerPixel === 3 || bytesPerPixel === 4) {
do {
var tmp = data[offset];
data[offset] = data[offset + 2];
data[offset + 2] = tmp;
offset += bytesPerPixel;
}while(offset < size);
} else if(bytesPerPixel === 2) {
var dst = new Uint16Array(numPixels * numFaces);
var src = 0, dest = 0;
var r, g, b;
/*jshint bitwise: false*/
var mask5bit = ((1 << 5) - 1);
var midMask6bit = (((1 << 6) - 1) << 5);
do {
var value = ((data[src + 1] << 8) | data[src]);
src += 2;
r = (value & mask5bit) << 11;
g = (value & midMask6bit);
b = ((value >> 11) & mask5bit);
dst[dest] = r | g | b;
dest += 1;
}while(offset < size);
/*jshint bitwise: true*/
return dst;
}
return data;
},
decode565: function decode565Fn(value, color) {
/*jshint bitwise: false*/
var r = ((value >> 11) & 31);
var g = ((value >> 5) & 63);
var b = ((value) & 31);
color[0] = ((r << 3) | (r >> 2));
color[1] = ((g << 2) | (g >> 4));
color[2] = ((b << 3) | (b >> 2));
color[3] = 255;
/*jshint bitwise: true*/
return color;
},
decodeColor: function decodeColorFn(data, src, isDXT1, out, scratchpad) {
/*jshint bitwise: false*/
var cache = scratchpad.cache;
var decode565 = DDSLoader.prototype.decode565;
var col0 = ((data[src + 1] << 8) | data[src]);
src += 2;
var col1 = ((data[src + 1] << 8) | data[src]);
src += 2;
var c0, c1, c2, c3, i;
if(col0 !== col1) {
c0 = decode565(col0, cache[0]);
c1 = decode565(col1, cache[1]);
c2 = cache[2];
c3 = cache[3];
if(col0 > col1) {
for(i = 0; i < 3; i += 1) {
var c0i = c0[i];
var c1i = c1[i];
c2[i] = ((((c0i * 2) + c1i) / 3) | 0);
c3[i] = (((c0i + (c1i * 2)) / 3) | 0);
}
c2[3] = 255;
c3[3] = 255;
} else {
for(i = 0; i < 3; i += 1) {
c2[i] = ((c0[i] + c1[i]) >> 1);
c3[i] = 0;
}
c2[3] = 255;
c3[3] = 0;
}
} else {
c0 = decode565(col0, cache[0]);
c1 = c0;
c2 = c0;
c3 = cache[1];
for(i = 0; i < 4; i += 1) {
c3[i] = 0;
}
}
var c = scratchpad.colorArray;
c[0] = c0;
c[1] = c1;
c[2] = c2;
c[3] = c3;
// ((1 << 2) - 1) === 3;
var row, dest, color;
if(isDXT1) {
for(i = 0; i < 4; i += 1) {
row = data[src + i];
dest = out[i];
dest[0] = c[(row) & 3];
dest[1] = c[(row >> 2) & 3];
dest[2] = c[(row >> 4) & 3];
dest[3] = c[(row >> 6) & 3];
}
} else {
for(i = 0; i < 4; i += 1) {
row = data[src + i];
dest = out[i];
color = c[(row) & 3];
dest[0][0] = color[0];
dest[0][1] = color[1];
dest[0][2] = color[2];
dest[0][3] = color[3];
color = c[(row >> 2) & 3];
dest[1][0] = color[0];
dest[1][1] = color[1];
dest[1][2] = color[2];
dest[1][3] = color[3];
color = c[(row >> 4) & 3];
dest[2][0] = color[0];
dest[2][1] = color[1];
dest[2][2] = color[2];
dest[2][3] = color[3];
color = c[(row >> 6) & 3];
dest[3][0] = color[0];
dest[3][1] = color[1];
dest[3][2] = color[2];
dest[3][3] = color[3];
}
}
/*jshint bitwise: true*/
},
decodeDXT3Alpha: function decodeDXT3AlphaFn(data, src, out) {
/*jshint bitwise: false*/
// ((1 << 4) - 1) === 15;
for(var i = 0; i < 4; i += 1) {
var row = ((data[src + 1] << 8) | data[src]);
src += 2;
var dest = out[i];
if(row) {
dest[0][3] = ((row) & 15) * (255 / 15);
dest[1][3] = ((row >> 4) & 15) * (255 / 15);
dest[2][3] = ((row >> 8) & 15) * (255 / 15);
dest[3][3] = ((row >> 12) & 15) * (255 / 15);
} else {
dest[0][3] = 0;
dest[1][3] = 0;
dest[2][3] = 0;
dest[3][3] = 0;
}
}
/*jshint bitwise: true*/
},
decodeDXT5Alpha: function decodeDXT5AlphaFn(data, src, out, scratchpad) {
var a0 = data[src];
src += 1;
var a1 = data[src];
src += 1;
/*jshint bitwise: false*/
var a = scratchpad.alphaArray;
a[0] = a0;
a[1] = a1;
if(a0 > a1) {
a[2] = ((((a0 * 6) + (a1 * 1)) / 7) | 0);
a[3] = ((((a0 * 5) + (a1 * 2)) / 7) | 0);
a[4] = ((((a0 * 4) + (a1 * 3)) / 7) | 0);
a[5] = ((((a0 * 3) + (a1 * 4)) / 7) | 0);
a[6] = ((((a0 * 2) + (a1 * 5)) / 7) | 0);
a[7] = ((((a0 * 1) + (a1 * 6)) / 7) | 0);
} else if(a0 < a1) {
a[2] = ((((a0 * 4) + (a1 * 1)) / 5) | 0);
a[3] = ((((a0 * 3) + (a1 * 2)) / 5) | 0);
a[4] = ((((a0 * 2) + (a1 * 3)) / 5) | 0);
a[5] = ((((a0 * 1) + (a1 * 4)) / 5) | 0);
a[6] = 0;
a[7] = 255;
} else//if (a0 === a1)
{
a[2] = a0;
a[3] = a0;
a[4] = a0;
a[5] = a0;
a[6] = 0;
a[7] = 255;
}
// ((1 << 3) - 1) === 7
var dest;
for(var i = 0; i < 2; i += 1) {
var value = (data[src] | (data[src + 1] << 8) | (data[src + 2] << 16));
src += 3;
dest = out[(i * 2)];
dest[0][3] = a[(value) & 7];
dest[1][3] = a[(value >> 3) & 7];
dest[2][3] = a[(value >> 6) & 7];
dest[3][3] = a[(value >> 9) & 7];
dest = out[(i * 2) + 1];
dest[0][3] = a[(value >> 12) & 7];
dest[1][3] = a[(value >> 15) & 7];
dest[2][3] = a[(value >> 18) & 7];
dest[3][3] = a[(value >> 21) & 7];
}
/*jshint bitwise: true*/
},
convertDXT1ToRGBA: function convertDXT1ToRGBAFn(data) {
var decodeColor = this.decodeColor;
var scratchpad = {
cache: [
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4)
],
colorArray: new Array(4)
};
var encode;
if(this.hasDXT1Alpha(data)) {
this.format = this.gd.PIXELFORMAT_R5G5B5A1;
encode = this.encodeR5G5B5A1;
} else {
this.format = this.gd.PIXELFORMAT_R5G6B5;
encode = this.encodeR5G6B5;
}
data = this.convertToRGBA16(data, function decodeDXT1(data, src, out) {
decodeColor(data, src, true, out, scratchpad);
}, encode, 8);
return data;
},
convertDXT3ToRGBA: function convertDXT3ToRGBAFn(data) {
var decodeColor = this.decodeColor;
var decodeDXT3Alpha = this.decodeDXT3Alpha;
var scratchpad = {
cache: [
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4)
],
colorArray: new Array(4)
};
data = this.convertToRGBA16(data, function decodeDXT3(data, src, out) {
decodeColor(data, (src + 8), false, out, scratchpad);
decodeDXT3Alpha(data, src, out);
}, this.encodeR4G4B4A4, 16);
this.format = this.gd.PIXELFORMAT_R4G4B4A4;
return data;
},
convertDXT5ToRGBA: function convertDXT5ToRGBAFn(data) {
var decodeColor = this.decodeColor;
var decodeDXT5Alpha = this.decodeDXT5Alpha;
var scratchpad = {
cache: [
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4)
],
colorArray: new Array(4),
alphaArray: new Uint8Array(8)
};
data = this.convertToRGBA16(data, function decodeDXT5(data, src, out) {
decodeColor(data, (src + 8), false, out, scratchpad);
decodeDXT5Alpha(data, src, out, scratchpad);
}, this.encodeR4G4B4A4, 16);
this.format = this.gd.PIXELFORMAT_R4G4B4A4;
return data;
},
convertToRGBA32: function convertToRGBA32Fn(data, decode, srcStride) {
//var bpp = 4;
var level;
var width = this.width;
var height = this.height;
var numLevels = this.numLevels;
var numFaces = this.numFaces;
/*jshint bitwise: false*/
var numPixels = 0;
for(level = 0; level < numLevels; level += 1) {
numPixels += (width * height);
width = (width > 1 ? (width >> 1) : 1);
height = (height > 1 ? (height >> 1) : 1);
}
var dst = new Uint8Array(numPixels * 4 * numFaces);
var src = 0, dest = 0;
var color = [
[
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4)
],
[
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4)
],
[
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4)
],
[
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4)
]
];
for(var face = 0; face < numFaces; face += 1) {
width = this.width;
height = this.height;
for(var n = 0; n < numLevels; n += 1) {
var numColumns = (width > 4 ? 4 : width);
var numLines = (height > 4 ? 4 : height);
var heightInBlocks = ((height + 3) >> 2);
var widthInBlocks = ((width + 3) >> 2);
var desinationStride = (width * 4);
var desinationLineStride = (numColumns * 4);
var desinationBlockStride = (desinationStride * (numLines - 1));
for(var y = 0; y < heightInBlocks; y += 1) {
for(var x = 0; x < widthInBlocks; x += 1) {
decode(data, src, color);
var destLine = dest;
for(var line = 0; line < numLines; line += 1) {
var colorLine = color[line];
var destRGBA = destLine;
for(var i = 0; i < numColumns; i += 1) {
var rgba = colorLine[i];
dst[destRGBA] = rgba[0];
dst[destRGBA + 1] = rgba[1];
dst[destRGBA + 2] = rgba[2];
dst[destRGBA + 3] = rgba[3];
destRGBA += 4;
}
destLine += desinationStride;
}
src += srcStride;
dest += desinationLineStride;
}
dest += desinationBlockStride;
}
width = (width > 1 ? (width >> 1) : 1);
height = (height > 1 ? (height >> 1) : 1);
}
}
/*jshint bitwise: true*/
return dst;
},
hasDXT1Alpha: function hasDXT1AlphaFn(data) {
var length = data.length;
var n, i, row;
for(n = 0; n < length; n += 8) {
var col0 = ((data[n + 1] << 8) | data[n]);
var col1 = ((data[n + 3] << 8) | data[n + 2]);
if(col0 <= col1) {
for(i = 0; i < 4; i += 1) {
row = data[n + 4 + i];
if(row === 0) {
continue;
}
if(((row) & 3) === 3 || ((row >> 2) & 3) === 3 || ((row >> 4) & 3) === 3 || ((row >> 6) & 3) === 3) {
return true;
}
}
}
}
return false;
},
encodeR5G6B5: function encodeR5G6B5Fn(rgba) {
return (((rgba[2] & 0xf8) >>> 3) | ((rgba[1] & 0xfc) << 3) | ((rgba[0] & 0xf8) << 8));
},
encodeR5G5B5A1: function encodeR5G5B5A1Fn(rgba) {
return ((rgba[3] >>> 7) | ((rgba[2] & 0xf8) >>> 2) | ((rgba[1] & 0xf8) << 3) | ((rgba[0] & 0xf8) << 8));
},
encodeR4G4B4A4: function encodeR4G4B4A4Fn(rgba) {
return ((rgba[3] >>> 4) | (rgba[2] & 0xf0) | ((rgba[1] & 0xf0) << 4) | ((rgba[0] & 0xf0) << 8));
},
convertToRGBA16: function convertToRGBA16Fn(data, decode, encode, srcStride) {
//var bpp = 2;
var level;
var width = this.width;
var height = this.height;
var numLevels = this.numLevels;
var numFaces = this.numFaces;
/*jshint bitwise: false*/
var numPixels = 0;
for(level = 0; level < numLevels; level += 1) {
numPixels += (width * height);
width = (width > 1 ? (width >> 1) : 1);
height = (height > 1 ? (height >> 1) : 1);
}
var dst = new Uint16Array(numPixels * 1 * numFaces);
var src = 0, dest = 0;
var color = [
[
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4)
],
[
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4)
],
[
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4)
],
[
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4),
new Uint8Array(4)
]
];
for(var face = 0; face < numFaces; face += 1) {
width = this.width;
height = this.height;
for(var n = 0; n < numLevels; n += 1) {
var numColumns = (width > 4 ? 4 : width);
var numLines = (height > 4 ? 4 : height);
var heightInBlocks = ((height + 3) >> 2);
var widthInBlocks = ((width + 3) >> 2);
var desinationStride = (width * 1);
var desinationLineStride = (numColumns * 1);
var desinationBlockStride = (desinationStride * (numLines - 1));
for(var y = 0; y < heightInBlocks; y += 1) {
for(var x = 0; x < widthInBlocks; x += 1) {
decode(data, src, color);
var destLine = dest;
for(var line = 0; line < numLines; line += 1) {
var colorLine = color[line];
var destRGBA = destLine;
for(var i = 0; i < numColumns; i += 1) {
var rgba = colorLine[i];
dst[destRGBA] = encode(rgba);
destRGBA += 1;
}
destLine += desinationStride;
}
src += srcStride;
dest += desinationLineStride;
}
dest += desinationBlockStride;
}
width = (width > 1 ? (width >> 1) : 1);
height = (height > 1 ? (height >> 1) : 1);
}
}
/*jshint bitwise: true*/
return dst;
}
};
// Constructor function
DDSLoader.create = function ddsLoaderFn(params) {
var loader = new DDSLoader();
loader.gd = params.gd;
loader.onload = params.onload;
loader.onerror = params.onerror;
/*jshint bitwise: false*/
function MAKEFOURCC(c0, c1, c2, c3) {
return (c0.charCodeAt(0) + (c1.charCodeAt(0) * 256) + (c2.charCodeAt(0) * 65536) + (c3.charCodeAt(0) * 16777216));
}
/*jshint bitwise: true*/
loader.FOURCC_ATI1 = MAKEFOURCC('A', 'T', 'I', '1');
loader.FOURCC_ATI2 = MAKEFOURCC('A', 'T', 'I', '2');
loader.FOURCC_RXGB = MAKEFOURCC('R', 'X', 'G', 'B');
var src = params.src;
if(src) {
loader.src = src;
var xhr;
if(window.XMLHttpRequest) {
xhr = new window.XMLHttpRequest();
} else if(window.ActiveXObject) {
xhr = new window.ActiveXObject("Microsoft.XMLHTTP");
} else {
if(params.onerror) {
params.onerror("No XMLHTTPRequest object could be created");
}
return null;
}
xhr.onreadystatechange = function () {
if(xhr.readyState === 4) {
if(!TurbulenzEngine || !TurbulenzEngine.isUnloading()) {
var xhrStatus = xhr.status;
var xhrStatusText = xhr.status !== 0 && xhr.statusText || 'No connection';
// Sometimes the browser sets status to 200 OK when the connection is closed
// before the message is sent (weird!).
// In order to address this we fail any completely empty responses.
// Hopefully, nobody will get a valid response with no headers and no body!
if(xhr.getAllResponseHeaders() === "" && xhr.responseText === "" && xhrStatus === 200 && xhrStatusText === 'OK') {
loader.onload('', 0);
return;
}
if(xhrStatus === 200 || xhrStatus === 0) {
var buffer;
if(xhr.responseType === "arraybuffer") {
buffer = xhr.response;
} else if(xhr.mozResponseArrayBuffer) {
buffer = xhr.mozResponseArrayBuffer;
} else//if (xhr.responseText !== null)
{
/*jshint bitwise: false*/
var text = xhr.responseText;
var numChars = text.length;
buffer = [];
buffer.length = numChars;
for(var i = 0; i < numChars; i += 1) {
buffer[i] = (text.charCodeAt(i) & 0xff);
}
/*jshint bitwise: true*/
}
// Fix for loading from file
if(xhrStatus === 0 && window.location.protocol === "file:") {
xhrStatus = 200;
}
loader.processBytes(new Uint8Array(buffer));
if(loader.data) {
if(loader.onload) {
loader.onload(loader.data, loader.width, loader.height, loader.format, loader.numLevels, (loader.numFaces > 1), loader.depth, xhrStatus);
}
} else {
if(loader.onerror) {
loader.onerror();
}
}
} else {
if(loader.onerror) {
loader.onerror();
}
}
}
// break circular reference
xhr.onreadystatechange = null;
xhr = null;
}
};
xhr.open("GET", params.src, true);
if(xhr.hasOwnProperty && xhr.hasOwnProperty("responseType")) {
xhr.responseType = "arraybuffer";
} else if(xhr.overrideMimeType) {
xhr.overrideMimeType("text/plain; charset=x-user-defined");
} else {
xhr.setRequestHeader("Content-Type", "text/plain; charset=x-user-defined");
}
xhr.send(null);
} else {
loader.processBytes((params.data));
if(loader.data) {
if(loader.onload) {
loader.onload(loader.data, loader.width, loader.height, loader.format, loader.numLevels, (loader.numFaces > 1), loader.depth);
}
} else {
if(loader.onerror) {
loader.onerror();
}
}
}
return loader;
};
/* This file was generated from TypeScript source C:/Users/autobuild/turbulenz/engine/tslib/webgl/graphicsdevice.ts */
// Copyright (c) 2011-2013 Turbulenz Limited
/*global TurbulenzEngine*/
/*global TGALoader*/
/*global DDSLoader*/
/*global TARLoader*/
/*global Int8Array*/
/*global Int16Array*/
/*global Int32Array*/
/*global Uint8Array*/
/*global Uint8ClampedArray*/
/*global Uint16Array*/
/*global Uint32Array*/
/*global Float32Array*/
/*global ArrayBuffer*/
/*global DataView*/
/*global window*/
/*global debug*/
"use strict";
// -----------------------------------------------------------------------------
function TZWebGLTexture() {
return this;
}
TZWebGLTexture.prototype = {
version: 1,
setData: function textureSetDataFn(data) {
var gd = this.gd;
var target = this.target;
gd.bindTexture(target, this.glTexture);
this.updateData(data);
gd.bindTexture(target, null);
},
createGLTexture: // Internal
function createGLTextureFn(data) {
var gd = this.gd;
var gl = gd.gl;
var target;
if(this.cubemap) {
target = gl.TEXTURE_CUBE_MAP;
} else if(this.depth > 1) {
//target = gl.TEXTURE_3D;
// 3D textures are not supported yet
return false;
} else {
target = gl.TEXTURE_2D;
}
this.target = target;
var gltex = gl.createTexture();
this.glTexture = gltex;
gd.bindTexture(target, gltex);
gl.texParameteri(target, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
if(this.mipmaps || 1 < this.numDataLevels) {
gl.texParameteri(target, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_NEAREST);
} else {
gl.texParameteri(target, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
}
gl.texParameteri(target, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
gl.texParameteri(target, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
this.updateData(data);
gd.bindTexture(target, null);
return true;
},
updateData: function updateDataFn(data) {
var gd = this.gd;
var gl = gd.gl;
function log2(a) {
return Math.floor(Math.log(a) / Math.LN2);
}
var generateMipMaps = this.mipmaps && (this.numDataLevels !== (1 + Math.max(log2(this.width), log2(this.height))));
var format = this.format;
var internalFormat, gltype, srcStep, bufferData = null;
var compressedTexturesExtension;
if(format === gd.PIXELFORMAT_A8) {
internalFormat = gl.ALPHA;
gltype = gl.UNSIGNED_BYTE;
srcStep = 1;
if(data && !data.src) {
if(data instanceof Uint8Array) {
bufferData = data;
} else {
bufferData = new Uint8Array(data);
}
}
} else if(format === gd.PIXELFORMAT_L8) {
internalFormat = gl.LUMINANCE;
gltype = gl.UNSIGNED_BYTE;
srcStep = 1;
if(data && !data.src) {
if(data instanceof Uint8Array) {
bufferData = data;
} else {
bufferData = new Uint8Array(data);
}
}
} else if(format === gd.PIXELFORMAT_L8A8) {
internalFormat = gl.LUMINANCE_ALPHA;
gltype = gl.UNSIGNED_BYTE;
srcStep = 2;
if(data && !data.src) {
if(data instanceof Uint8Array) {
bufferData = data;
} else {
bufferData = new Uint8Array(data);
}
}
} else if(format === gd.PIXELFORMAT_R5G5B5A1) {
internalFormat = gl.RGBA;
gltype = gl.UNSIGNED_SHORT_5_5_5_1;
srcStep = 1;
if(data && !data.src) {
if(data instanceof Uint16Array) {
bufferData = data;
} else {
bufferData = new Uint16Array(data);
}
}
} else if(format === gd.PIXELFORMAT_R5G6B5) {
internalFormat = gl.RGB;
gltype = gl.UNSIGNED_SHORT_5_6_5;
srcStep = 1;
if(data && !data.src) {
if(data instanceof Uint16Array) {
bufferData = data;
} else {
bufferData = new Uint16Array(data);
}
}
} else if(format === gd.PIXELFORMAT_R4G4B4A4) {
internalFormat = gl.RGBA;
gltype = gl.UNSIGNED_SHORT_4_4_4_4;
srcStep = 1;
if(data && !data.src) {
if(data instanceof Uint16Array) {
bufferData = data;
} else {
bufferData = new Uint16Array(data);
}
}
} else if(format === gd.PIXELFORMAT_R8G8B8A8) {
internalFormat = gl.RGBA;
gltype = gl.UNSIGNED_BYTE;
srcStep = 4;
if(data && !data.src) {
if(data instanceof Uint8Array) {
// Some browsers consider Uint8ClampedArray to be
// an instance of Uint8Array (which is correct as
// per the spec), yet won't accept a
// Uint8ClampedArray as pixel data for a
// gl.UNSIGNED_BYTE Texture. If we have a
// Uint8ClampedArray then we can just reuse the
// underlying data.
if(typeof Uint8ClampedArray !== "undefined" && data instanceof Uint8ClampedArray) {
bufferData = new Uint8Array(data.buffer);
} else {
bufferData = data;
}
} else {
bufferData = new Uint8Array(data);
}
}
} else if(format === gd.PIXELFORMAT_R8G8B8) {
internalFormat = gl.RGB;
gltype = gl.UNSIGNED_BYTE;
srcStep = 3;
if(data && !data.src) {
if(data instanceof Uint8Array) {
// See comment above about Uint8ClampedArray
if(typeof Uint8ClampedArray !== "undefined" && data instanceof Uint8ClampedArray) {
bufferData = new Uint8Array(data.buffer);
} else {
bufferData = data;
}
} else {
bufferData = new Uint8Array(data);
}
}
} else if(format === gd.PIXELFORMAT_D24S8) {
//internalFormat = gl.DEPTH24_STENCIL8_EXT;
//gltype = gl.UNSIGNED_INT_24_8_EXT;
//internalFormat = gl.DEPTH_COMPONENT;
internalFormat = gl.DEPTH_STENCIL;
gltype = gl.UNSIGNED_INT;
srcStep = 1;
if(data && !data.src) {
bufferData = new Uint32Array(data);
}
} else if(format === gd.PIXELFORMAT_DXT1 || format === gd.PIXELFORMAT_DXT3 || format === gd.PIXELFORMAT_DXT5) {
compressedTexturesExtension = gd.compressedTexturesExtension;
if(compressedTexturesExtension) {
if(format === gd.PIXELFORMAT_DXT1) {
internalFormat = compressedTexturesExtension.COMPRESSED_RGBA_S3TC_DXT1_EXT;
srcStep = 8;
} else if(format === gd.PIXELFORMAT_DXT3) {
internalFormat = compressedTexturesExtension.COMPRESSED_RGBA_S3TC_DXT3_EXT;
srcStep = 16;
} else//if (format === gd.PIXELFORMAT_DXT5)
{
internalFormat = compressedTexturesExtension.COMPRESSED_RGBA_S3TC_DXT5_EXT;
srcStep = 16;
}
if(internalFormat === undefined) {
return;// Unsupported format
}
if(data && !data.src) {
if(data instanceof Uint8Array) {
bufferData = data;
} else {
bufferData = new Uint8Array(data);
}
}
} else {
return;// Unsupported format
}
} else {
return;//unknown/unsupported format
}
var numLevels = (data && 0 < this.numDataLevels ? this.numDataLevels : 1);
var w = this.width, h = this.height, offset = 0, target, n, levelSize, levelData;
if(this.cubemap) {
if(data && data instanceof WebGLVideo) {
return;//unknown/unsupported format
}
target = gl.TEXTURE_CUBE_MAP;
for(var f = 0; f < 6; f += 1) {
var faceTarget = (gl.TEXTURE_CUBE_MAP_POSITIVE_X + f);
for(n = 0; n < numLevels; n += 1) {
if(compressedTexturesExtension) {
levelSize = (Math.floor((w + 3) / 4) * Math.floor((h + 3) / 4) * srcStep);
if(bufferData) {
if(numLevels === 1) {
levelData = bufferData;
} else {
levelData = bufferData.subarray(offset, (offset + levelSize));
}
} else {
levelData = new Uint8Array(levelSize);
}
if(gd.WEBGL_compressed_texture_s3tc) {
gl.compressedTexImage2D(faceTarget, n, internalFormat, w, h, 0, levelData);
} else {
compressedTexturesExtension.compressedTexImage2D(faceTarget, n, internalFormat, w, h, 0, levelData);
}
} else {
levelSize = (w * h * srcStep);
if(bufferData) {
if(numLevels === 1) {
levelData = bufferData;
} else {
levelData = bufferData.subarray(offset, (offset + levelSize));
}
gl.texImage2D(faceTarget, n, internalFormat, w, h, 0, internalFormat, gltype, levelData);
} else if(data) {
gl.texImage2D(faceTarget, n, internalFormat, internalFormat, gltype, data);
} else {
if(gltype === gl.UNSIGNED_SHORT_5_6_5 || gltype === gl.UNSIGNED_SHORT_5_5_5_1 || gltype === gl.UNSIGNED_SHORT_4_4_4_4) {
levelData = new Uint16Array(levelSize);
} else {
levelData = new Uint8Array(levelSize);
}
gl.texImage2D(faceTarget, n, internalFormat, w, h, 0, internalFormat, gltype, levelData);
}
}
offset += levelSize;
w = (w > 1 ? Math.floor(w / 2) : 1);
h = (h > 1 ? Math.floor(h / 2) : 1);
}
w = this.width;
h = this.height;
}
} else if(data && data instanceof WebGLVideo) {
target = gl.TEXTURE_2D;
gl.texImage2D(target, 0, internalFormat, internalFormat, gltype, data.video);
} else {
target = gl.TEXTURE_2D;
for(n = 0; n < numLevels; n += 1) {
if(compressedTexturesExtension) {
levelSize = (Math.floor((w + 3) / 4) * Math.floor((h + 3) / 4) * srcStep);
if(bufferData) {
if(numLevels === 1) {
levelData = bufferData;
} else {
levelData = bufferData.subarray(offset, (offset + levelSize));
}
} else {
levelData = new Uint8Array(levelSize);
}
if(gd.WEBGL_compressed_texture_s3tc) {
gl.compressedTexImage2D(target, n, internalFormat, w, h, 0, levelData);
} else {
compressedTexturesExtension.compressedTexImage2D(target, n, internalFormat, w, h, 0, levelData);
}
} else {
levelSize = (w * h * srcStep);
if(bufferData) {
if(numLevels === 1) {
levelData = bufferData;
} else {
levelData = bufferData.subarray(offset, (offset + levelSize));
}
gl.texImage2D(target, n, internalFormat, w, h, 0, internalFormat, gltype, levelData);
} else if(data) {
gl.texImage2D(target, n, internalFormat, internalFormat, gltype, data);
} else {
if(gltype === gl.UNSIGNED_SHORT_5_6_5 || gltype === gl.UNSIGNED_SHORT_5_5_5_1 || gltype === gl.UNSIGNED_SHORT_4_4_4_4) {
levelData = new Uint16Array(levelSize);
} else {
levelData = new Uint8Array(levelSize);
}
gl.texImage2D(target, n, internalFormat, w, h, 0, internalFormat, gltype, levelData);
}
}
offset += levelSize;
w = (w > 1 ? Math.floor(w / 2) : 1);
h = (h > 1 ? Math.floor(h / 2) : 1);
}
}
if(generateMipMaps) {
gl.generateMipmap(target);
}
},
updateMipmaps: function updateMipmapsFn(face) {
if(this.mipmaps) {
if(this.depth > 1) {
(TurbulenzEngine).callOnError("3D texture mipmap generation unsupported");
return;
}
if(this.cubemap && face !== 5) {
return;
}
var gd = this.gd;
var gl = gd.gl;
var target = this.target;
gd.bindTexture(target, this.glTexture);
gl.generateMipmap(target);
gd.bindTexture(target, null);
}
},
destroy: function textureDestroyFn() {
var gd = this.gd;
if(gd) {
var glTexture = this.glTexture;
if(glTexture) {
var gl = gd.gl;
if(gl) {
gd.unbindTexture(glTexture);
gl.deleteTexture(glTexture);
}
delete this.glTexture;
}
delete this.sampler;
delete this.gd;
}
},
typedArrayIsValid: function textureTypedArrayIsValidFn(typedArray) {
var gd = this.gd;
var format = this.format;
if(gd) {
if((format === gd.PIXELFORMAT_A8) || (format === gd.PIXELFORMAT_L8) || (format === gd.PIXELFORMAT_S8)) {
return ((typedArray instanceof Uint8Array) || (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray)) && (typedArray.length === this.width * this.height * this.depth);
}
if(format === gd.PIXELFORMAT_L8A8) {
return ((typedArray instanceof Uint8Array) || (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray)) && (typedArray.length === 2 * this.width * this.height * this.depth);
}
if(format === gd.PIXELFORMAT_R8G8B8) {
return ((typedArray instanceof Uint8Array) || (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray)) && (typedArray.length === 3 * this.width * this.height * this.depth);
}
if(format === gd.PIXELFORMAT_R8G8B8A8) {
return ((typedArray instanceof Uint8Array) || (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray)) && (typedArray.length === 4 * this.width * this.height * this.depth);
}
if((format === gd.PIXELFORMAT_R5G5B5A1) || (format === gd.PIXELFORMAT_R5G6B5) || (format === gd.PIXELFORMAT_R4G4B4A4)) {
return (typedArray instanceof Uint16Array) && (typedArray.length === this.width * this.height * this.depth);
}
}
return false;
}
};
// Constructor function
TZWebGLTexture.create = function webGLTextureCreateFn(gd, params) {
var tex = new TZWebGLTexture();
tex.gd = gd;
tex.mipmaps = params.mipmaps;
tex.dynamic = params.dynamic;
tex.renderable = params.renderable;
tex.numDataLevels = 0;
var src = params.src;
if(src) {
tex.name = params.name || src;
var extension;
var data = params.data;
if(data) {
// do not trust file extensions if we got data...
if(data[0] === 137 && data[1] === 80 && data[2] === 78 && data[3] === 71) {
extension = '.png';
} else if(data[0] === 255 && data[1] === 216 && data[2] === 255 && (data[3] === 224 || data[3] === 225)) {
extension = '.jpg';
} else if(data[0] === 68 && data[1] === 68 && data[2] === 83 && data[3] === 32) {
extension = '.dds';
} else {
extension = src.slice(-4);
}
} else {
extension = src.slice(-4);
}
// DDS and TGA textures require out own image loaders
if(extension === '.dds' || extension === '.tga') {
if(extension === '.tga' && typeof TGALoader !== 'undefined') {
var tgaParams = {
gd: gd,
onload: function tgaLoadedFn(data, width, height, format, status) {
tex.width = width;
tex.height = height;
tex.depth = 1;
tex.format = format;
tex.cubemap = false;
var result = tex.createGLTexture(data);
if(params.onload) {
params.onload(result ? tex : null, status);
}
},
onerror: function tgaFailedFn() {
tex.failed = true;
if(params.onload) {
params.onload(null);
}
},
data: undefined,
src: undefined
};
if(data) {
tgaParams.data = data;
} else {
tgaParams.src = src;
}
TGALoader.create(tgaParams);
return tex;
} else if(extension === '.dds' && typeof DDSLoader !== 'undefined') {
var ddsParams = {
gd: gd,
onload: function ddsLoadedFn(data, width, height, format, numLevels, cubemap, depth, status) {
tex.width = width;
tex.height = height;
tex.format = format;
tex.cubemap = cubemap;
tex.depth = depth;
tex.numDataLevels = numLevels;
var result = tex.createGLTexture(data);
if(params.onload) {
params.onload(result ? tex : null, status);
}
},
onerror: function ddsFailedFn() {
tex.failed = true;
if(params.onload) {
params.onload(null);
}
},
data: undefined,
src: undefined
};
if(data) {
ddsParams.data = data;
} else {
ddsParams.src = src;
}
DDSLoader.create(ddsParams);
return tex;
} else {
(TurbulenzEngine).callOnError('Missing image loader required for ' + src);
tex = TZWebGLTexture.create(gd, {
name: (params.name || src),
width: 2,
height: 2,
depth: 1,
format: 'R8G8B8A8',
cubemap: false,
mipmaps: params.mipmaps,
dynamic: params.dynamic,
renderable: params.renderable,
data: [
255,
20,
147,
255,
255,
0,
0,
255,
255,
255,
255,
255,
255,
20,
147,
255
]
});
if(params.onload) {
if(TurbulenzEngine) {
TurbulenzEngine.setTimeout(function () {
params.onload(tex, 200);
}, 0);
} else {
window.setTimeout(function () {
params.onload(tex, 200);
}, 0);
}
}
return tex;
}
}
var img = new Image();
img.onload = function imageLoadedFn() {
tex.width = img.width;
tex.height = img.height;
tex.depth = 1;
tex.format = gd.PIXELFORMAT_R8G8B8A8;
tex.cubemap = false;
var result = tex.createGLTexture(img);
if(params.onload) {
params.onload(result ? tex : null, 200);
}
};
img.onerror = function imageFailedFn() {
tex.failed = true;
if(params.onload) {
params.onload(null);
}
};
if(data) {
if(extension === '.jpg' || extension === '.jpeg') {
src = 'data:image/jpeg;base64,' + (TurbulenzEngine).base64Encode(data);
} else if(extension === '.png') {
src = 'data:image/png;base64,' + (TurbulenzEngine).base64Encode(data);
}
} else {
img.crossOrigin = 'anonymous';
}
img.src = src;
} else {
// Invalid src values like "" fall through to here
if("" === src && params.onload) {
// Assume the caller intended to pass in a valid url.
return null;
}
var format = params.format;
if(typeof format === 'string') {
format = gd['PIXELFORMAT_' + format];
}
tex.width = params.width;
tex.height = params.height;
tex.depth = params.depth;
tex.format = format;
tex.cubemap = params.cubemap;
tex.name = params.name;
var result = tex.createGLTexture(params.data);
if(!result) {
tex = null;
}
// If this is a depth-texture, note the attachment type
// required, based on the format.
if(params.renderable) {
if(gd.PIXELFORMAT_D16 === format) {
tex.glDepthAttachment = gd.gl.DEPTH_ATTACHMENT;
} else if(gd.PIXELFORMAT_D24S8 === format) {
tex.glDepthAttachment = gd.gl.DEPTH_STENCIL_ATTACHMENT;
}
}
if(params.onload) {
params.onload(tex, 200);
}
}
return tex;
};
//
// WebGLVideo
//
function WebGLVideo() {
return this;
}
WebGLVideo.prototype = {
version: 1,
play: // Public API
function videoPlayFn(seek) {
var video = this.video;
if(!this.playing) {
this.playing = true;
this.paused = false;
}
if(seek === undefined) {
seek = 0;
}
if(0.01 < Math.abs(video.currentTime - seek)) {
try {
video.currentTime = seek;
} catch (e) {
// There does not seem to be any reliable way of seeking
}
}
video.play();
return true;
},
stop: function videoStopFn() {
var playing = this.playing;
if(playing) {
this.playing = false;
this.paused = false;
var video = this.video;
video.pause();
video.currentTime = 0;
}
return playing;
},
pause: function videoPauseFn() {
if(this.playing) {
if(!this.paused) {
this.paused = true;
this.video.pause();
}
return true;
}
return false;
},
resume: function videoResumeFn(seek) {
if(this.paused) {
this.paused = false;
var video = this.video;
if(seek !== undefined) {
if(0.01 < Math.abs(video.currentTime - seek)) {
try {
video.currentTime = seek;
} catch (e) {
// There does not seem to be any reliable way of seeking
}
}
}
video.play();
return true;
}
return false;
},
rewind: function videoRewindFn() {
if(this.playing) {
this.video.currentTime = 0;
return true;
}
return false;
},
destroy: function videoDestroyFn() {
this.stop();
if(this.video) {
if(this.elementAdded) {
this.elementAdded = false;
TurbulenzEngine.canvas.parentElement.removeChild(this.video);
}
this.video = null;
}
}
};
WebGLVideo.create = function webGLSoundSourceCreateFn(params) {
var v = new WebGLVideo();
var onload = params.onload;
var looping = params.looping;
var src = params.src;
var userAgent = navigator.userAgent.toLowerCase();
var video = (document.createElement('video'));
video.preload = 'auto';
video.autobuffer = true;
video.muted = true;
if(looping) {
if(video.loop !== undefined && !userAgent.match(/firefox/)) {
video.loop = true;
} else {
video.onended = function () {
video.src = src;
video.play();
};
}
} else {
video.onended = function () {
v.playing = false;
};
}
v.video = video;
v.src = src;
v.playing = false;
v.paused = false;
// Safari does not play the video unless is on the page...
if(userAgent.match(/safari/) && !userAgent.match(/chrome/)) {
//video.setAttribute("style", "display: none;");
video.setAttribute("style", "visibility: hidden;");
TurbulenzEngine.canvas.parentElement.appendChild(video);
v.elementAdded = true;
}
if(video.webkitDecodedFrameCount !== undefined) {
var lastFrameCount = -1, tell = 0;
Object.defineProperty(v, "tell", {
get: function tellFn() {
if(lastFrameCount !== this.video.webkitDecodedFrameCount) {
lastFrameCount = this.video.webkitDecodedFrameCount;
tell = this.video.currentTime;
}
return tell;
},
enumerable: true,
configurable: false
});
} else {
Object.defineProperty(v, "tell", {
get: function tellFn() {
return this.video.currentTime;
},
enumerable: true,
configurable: false
});
}
Object.defineProperty(v, "looping", {
get: function loopingFn() {
return looping;
},
enumerable: true,
configurable: false
});
var loadingVideoFailed = function loadingVideoFailedFn() {
/* e */ if(onload) {
onload(null);
onload = null;
}
video.removeEventListener("error", loadingVideoFailed);
video = null;
v.video = null;
v.playing = false;
};
video.addEventListener("error", loadingVideoFailed, false);
var videoCanPlay = function videoCanPlayFn() {
v.length = video.duration;
v.width = video.videoWidth;
v.height = video.videoHeight;
if(onload) {
onload(v, 200);
onload = null;
}
video.removeEventListener("progress", checkProgress);
video.removeEventListener("canplaythrough", videoCanPlay);
};
var checkProgress = function checkProgressFn() {
if(0 < video.buffered.length && video.buffered.end(0) >= video.duration) {
videoCanPlay();
}
};
video.addEventListener("progress", checkProgress, false);
video.addEventListener("canplaythrough", videoCanPlay, false);
video.crossorigin = 'anonymous';
video.src = src;
return v;
};
function WebGLRenderBuffer() {
return this;
}
WebGLRenderBuffer.prototype = {
version: 1,
destroy: function renderBufferDestroyFn() {
var gd = this.gd;
if(gd) {
var glBuffer = this.glBuffer;
if(glBuffer) {
var gl = gd.gl;
if(gl) {
gl.deleteRenderbuffer(glBuffer);
}
delete this.glBuffer;
}
delete this.gd;
}
}
};
// Constructor function
WebGLRenderBuffer.create = function webGLRenderBufferFn(gd, params) {
var renderBuffer = new WebGLRenderBuffer();
var width = params.width;
var height = params.height;
var format = params.format;
if(typeof format === 'string') {
format = gd['PIXELFORMAT_' + format];
}
if(format !== gd.PIXELFORMAT_D24S8 && format !== gd.PIXELFORMAT_D16) {
return null;
}
var gl = gd.gl;
var glBuffer = gl.createRenderbuffer();
gl.bindRenderbuffer(gl.RENDERBUFFER, glBuffer);
var internalFormat;
var attachment;
if(gd.PIXELFORMAT_D16 === format) {
internalFormat = gl.DEPTH_COMPONENT16;
attachment = gl.DEPTH_ATTACHMENT;
} else//if (gd.PIXELFORMAT_D24S8 === format)
{
internalFormat = gl.DEPTH_STENCIL;
attachment = gl.DEPTH_STENCIL_ATTACHMENT;
}
// else if (gd.PIXELFORMAT_S8 === format)
// {
// internalFormat = gl.STENCIL_INDEX8;
// }
gl.renderbufferStorage(gl.RENDERBUFFER, internalFormat, width, height);
renderBuffer.width = gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_WIDTH);
renderBuffer.height = gl.getRenderbufferParameter(gl.RENDERBUFFER, gl.RENDERBUFFER_HEIGHT);
gl.bindRenderbuffer(gl.RENDERBUFFER, null);
if(renderBuffer.width < width || renderBuffer.height < height) {
gl.deleteRenderbuffer(glBuffer);
return null;
}
renderBuffer.gd = gd;
renderBuffer.format = format;
renderBuffer.glDepthAttachment = attachment;
renderBuffer.glBuffer = glBuffer;
return renderBuffer;
};
function WebGLRenderTarget() {
return this;
}
WebGLRenderTarget.prototype = {
version: 1,
oldViewportBox: // Shared because there can only be one active at a time
[],
oldScissorBox: [],
copyBox: function copyBoxFn(dst, src) {
dst[0] = src[0];
dst[1] = src[1];
dst[2] = src[2];
dst[3] = src[3];
},
bind: function bindFn() {
var gd = this.gd;
var gl = gd.gl;
gd.unbindTexture(this.colorTexture0.glTexture);
if(this.depthTexture) {
gd.unbindTexture(this.depthTexture.glTexture);
}
gl.bindFramebuffer(gl.FRAMEBUFFER, this.glObject);
var state = gd.state;
this.copyBox(this.oldViewportBox, state.viewportBox);
this.copyBox(this.oldScissorBox, state.scissorBox);
gd.setViewport(0, 0, this.width, this.height);
gd.setScissor(0, 0, this.width, this.height);
return true;
},
unbind: function unbindFn() {
var gd = this.gd;
var gl = gd.gl;
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
gd.setViewport.apply(gd, this.oldViewportBox);
gd.setScissor.apply(gd, this.oldScissorBox);
this.colorTexture0.updateMipmaps(this.face);
if(this.depthTexture) {
this.depthTexture.updateMipmaps(this.face);
}
},
destroy: function renderTargetDestroyFn() {
var gd = this.gd;
if(gd) {
var glObject = this.glObject;
if(glObject) {
var gl = gd.gl;
if(gl) {
gl.deleteFramebuffer(glObject);
}
delete this.glObject;
}
delete this.colorTexture0;
delete this.colorTexture1;
delete this.colorTexture2;
delete this.colorTexture3;
delete this.depthBuffer;
delete this.depthTexture;
delete this.gd;
}
}
};
// Constructor function
WebGLRenderTarget.create = function webGLRenderTargetFn(gd, params) {
var renderTarget = new WebGLRenderTarget();
var colorTexture0 = params.colorTexture0;
var colorTexture1 = (colorTexture0 ? (params.colorTexture1 || null) : null);
var colorTexture2 = (colorTexture1 ? (params.colorTexture2 || null) : null);
var colorTexture3 = (colorTexture2 ? (params.colorTexture3 || null) : null);
var depthBuffer = params.depthBuffer || null;
var depthTexture = params.depthTexture || null;
var face = params.face;
var maxSupported = gd.maxSupported("RENDERTARGET_COLOR_TEXTURES");
if(colorTexture1 && maxSupported < 2) {
return null;
}
if(colorTexture2 && maxSupported < 3) {
return null;
}
if(colorTexture3 && maxSupported < 4) {
return null;
}
var gl = gd.gl;
var glObject = gl.createFramebuffer();
gl.bindFramebuffer(gl.FRAMEBUFFER, glObject);
var width, height;
if(colorTexture0) {
width = colorTexture0.width;
height = colorTexture0.height;
var glTexture = colorTexture0.glTexture;
if(glTexture === undefined) {
(TurbulenzEngine).callOnError("Color texture is not a Texture");
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
gl.deleteFramebuffer(glObject);
return null;
}
var colorAttachment0 = gl.COLOR_ATTACHMENT0;
if(colorTexture0.cubemap) {
gl.framebufferTexture2D(gl.FRAMEBUFFER, colorAttachment0, (gl.TEXTURE_CUBE_MAP_POSITIVE_X + face), glTexture, 0);
} else {
gl.framebufferTexture2D(gl.FRAMEBUFFER, colorAttachment0, gl.TEXTURE_2D, glTexture, 0);
}
if(colorTexture1) {
glTexture = colorTexture1.glTexture;
if(colorTexture1.cubemap) {
gl.framebufferTexture2D(gl.FRAMEBUFFER, (colorAttachment0 + 1), (gl.TEXTURE_CUBE_MAP_POSITIVE_X + face), glTexture, 0);
} else {
gl.framebufferTexture2D(gl.FRAMEBUFFER, (colorAttachment0 + 1), gl.TEXTURE_2D, glTexture, 0);
}
if(colorTexture2) {
glTexture = colorTexture2.glTexture;
if(colorTexture1.cubemap) {
gl.framebufferTexture2D(gl.FRAMEBUFFER, (colorAttachment0 + 2), (gl.TEXTURE_CUBE_MAP_POSITIVE_X + face), glTexture, 0);
} else {
gl.framebufferTexture2D(gl.FRAMEBUFFER, (colorAttachment0 + 2), gl.TEXTURE_2D, glTexture, 0);
}
if(colorTexture3) {
glTexture = colorTexture3.glTexture;
if(colorTexture1.cubemap) {
gl.framebufferTexture2D(gl.FRAMEBUFFER, (colorAttachment0 + 3), (gl.TEXTURE_CUBE_MAP_POSITIVE_X + face), glTexture, 0);
} else {
gl.framebufferTexture2D(gl.FRAMEBUFFER, (colorAttachment0 + 3), gl.TEXTURE_2D, glTexture, 0);
}
}
}
}
} else if(depthTexture) {
width = depthTexture.width;
height = depthTexture.height;
} else if(depthBuffer) {
width = depthBuffer.width;
height = depthBuffer.height;
} else {
(TurbulenzEngine).callOnError("No RenderBuffers or Textures specified for this RenderTarget");
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
gl.deleteFramebuffer(glObject);
return null;
}
if(depthTexture) {
gl.framebufferTexture2D(gl.FRAMEBUFFER, depthTexture.glDepthAttachment, gl.TEXTURE_2D, depthTexture.glTexture, 0);
} else if(depthBuffer) {
gl.framebufferRenderbuffer(gl.FRAMEBUFFER, depthBuffer.glDepthAttachment, gl.RENDERBUFFER, depthBuffer.glBuffer);
}
var status = gl.checkFramebufferStatus(gl.FRAMEBUFFER);
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
if(status !== gl.FRAMEBUFFER_COMPLETE) {
gl.deleteFramebuffer(glObject);
return null;
}
renderTarget.gd = gd;
renderTarget.glObject = glObject;
renderTarget.colorTexture0 = colorTexture0;
renderTarget.colorTexture1 = colorTexture1;
renderTarget.colorTexture2 = colorTexture2;
renderTarget.colorTexture3 = colorTexture3;
renderTarget.depthBuffer = depthBuffer;
renderTarget.depthTexture = depthTexture;
renderTarget.width = width;
renderTarget.height = height;
renderTarget.face = face;
return renderTarget;
};
function WebGLIndexBuffer() {
return this;
}
WebGLIndexBuffer.prototype = {
version: 1,
map: function indexBufferMapFn(offset, numIndices) {
if(offset === undefined) {
offset = 0;
}
if(numIndices === undefined) {
numIndices = this.numIndices;
}
var gd = this.gd;
var gl = gd.gl;
var format = this.format;
var data;
if(format === gl.UNSIGNED_BYTE) {
data = new Uint8Array(numIndices);
} else if(format === gl.UNSIGNED_SHORT) {
data = new Uint16Array(numIndices);
} else//if (format === gl.UNSIGNED_INT)
{
data = new Uint32Array(numIndices);
}
var numValues = 0;
var writer = function indexBufferWriterFn() {
var numArguments = arguments.length;
for(var n = 0; n < numArguments; n += 1) {
data[numValues] = arguments[n];
numValues += 1;
}
};
writer.write = writer;
writer.data = data;
writer.offset = offset;
writer.getNumWrittenIndices = function getNumWrittenIndicesFn() {
return numValues;
};
writer.write = writer;
return writer;
},
unmap: function indexBufferUnmapFn(writer) {
if(writer) {
var gd = this.gd;
var gl = gd.gl;
var data = writer.data;
delete writer.data;
var offset = writer.offset;
delete writer.write;
var numIndices = writer.getNumWrittenIndices();
if(!numIndices) {
return;
}
if(numIndices < data.length) {
data = data.subarray(0, numIndices);
}
gd.setIndexBuffer(this);
if(numIndices < this.numIndices) {
gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, offset, data);
} else {
gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, data, this.usage);
}
}
},
setData: function indexBufferSetDataFn(data, offset, numIndices) {
if(offset === undefined) {
offset = 0;
}
if(numIndices === undefined) {
numIndices = this.numIndices;
}
var gd = this.gd;
var gl = gd.gl;
var bufferData;
var format = this.format;
if(format === gl.UNSIGNED_BYTE) {
if(data instanceof Uint8Array) {
bufferData = data;
} else {
bufferData = new Uint8Array(data);
}
} else if(format === gl.UNSIGNED_SHORT) {
if(data instanceof Uint16Array) {
bufferData = data;
} else {
bufferData = new Uint16Array(data);
}
offset *= 2;
} else if(format === gl.UNSIGNED_INT) {
if(data instanceof Uint32Array) {
bufferData = data;
} else {
bufferData = new Uint32Array(data);
}
offset *= 4;
}
data = undefined;
if(numIndices < bufferData.length) {
bufferData = bufferData.subarray(0, numIndices);
}
gd.setIndexBuffer(this);
if(numIndices < this.numIndices) {
gl.bufferSubData(gl.ELEMENT_ARRAY_BUFFER, offset, bufferData);
} else {
gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, bufferData, this.usage);
}
},
destroy: function indexBufferDestroyFn() {
var gd = this.gd;
if(gd) {
var glBuffer = this.glBuffer;
if(glBuffer) {
var gl = gd.gl;
if(gl) {
gd.unsetIndexBuffer(this);
gl.deleteBuffer(glBuffer);
}
delete this.glBuffer;
}
delete this.gd;
}
}
};
// Constructor function
WebGLIndexBuffer.create = function webGLIndexBufferCreateFn(gd, params) {
var gl = gd.gl;
var ib = new WebGLIndexBuffer();
ib.gd = gd;
var numIndices = params.numIndices;
ib.numIndices = numIndices;
var format = params.format;
if(typeof format === "string") {
format = gd['INDEXFORMAT_' + format];
}
ib.format = format;
var stride;
if(format === gl.UNSIGNED_BYTE) {
stride = 1;
} else if(format === gl.UNSIGNED_SHORT) {
stride = 2;
} else//if (format === gl.UNSIGNED_INT)
{
stride = 4;
}
ib.stride = stride;
/*jshint sub: true*/
// Avoid dot notation lookup to prevent Google Closure complaining about transient being a keyword
ib['transient'] = (params['transient'] || false);
ib.dynamic = (params.dynamic || ib['transient']);
ib.usage = (ib['transient'] ? gl.STREAM_DRAW : (ib.dynamic ? gl.DYNAMIC_DRAW : gl.STATIC_DRAW));
/*jshint sub: false*/
ib.glBuffer = gl.createBuffer();
if(params.data) {
ib.setData(params.data, 0, numIndices);
} else {
gd.setIndexBuffer(ib);
gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, (numIndices * stride), ib.usage);
}
return ib;
};
// TODO:
function WebGLSemantics() {
return this;
}
WebGLSemantics.prototype = {
version: 1
};
// Constructor function
WebGLSemantics.create = function webGLSemanticsCreateFn(gd, attributes) {
var semantics = new WebGLSemantics();
var numAttributes = attributes.length;
semantics.length = numAttributes;
for(var i = 0; i < numAttributes; i += 1) {
var attribute = attributes[i];
if(typeof attribute === "string") {
semantics[i] = gd['SEMANTIC_' + attribute];
} else {
semantics[i] = attribute;
}
}
return semantics;
};
function WebGLVertexBuffer() {
return this;
}
WebGLVertexBuffer.prototype = {
version: 1,
map: function vertexBufferMapFn(offset, numVertices) {
if(offset === undefined) {
offset = 0;
}
if(numVertices === undefined) {
numVertices = this.numVertices;
}
var gd = this.gd;
var gl = gd.gl;
var numValuesPerVertex = this.stride;
var attributes = this.attributes;
var numAttributes = attributes.length;
var data, writer;
var numValues = 0;
if(this.hasSingleFormat) {
var maxNumValues = (numVertices * numValuesPerVertex);
var format = attributes[0].format;
if(format === gl.BYTE) {
data = new Int8Array(maxNumValues);
} else if(format === gl.UNSIGNED_BYTE) {
data = new Uint8Array(maxNumValues);
} else if(format === gl.SHORT) {
data = new Int16Array(maxNumValues);
} else if(format === gl.UNSIGNED_SHORT) {
data = new Uint16Array(maxNumValues);
} else if(format === gl.INT) {
data = new Int32Array(maxNumValues);
} else if(format === gl.UNSIGNED_INT) {
data = new Uint32Array(maxNumValues);
} else if(format === gl.FLOAT) {
data = new Float32Array(maxNumValues);
}
writer = function vertexBufferWriterSingleFn() {
var numArguments = arguments.length;
var currentArgument = 0;
for(var a = 0; a < numAttributes; a += 1) {
var attribute = attributes[a];
var numComponents = attribute.numComponents;
var currentComponent = 0, j;
do {
if(currentArgument < numArguments) {
var value = arguments[currentArgument];
currentArgument += 1;
if(typeof value === "number") {
if(attribute.normalized) {
value *= attribute.normalizationScale;
}
data[numValues] = value;
numValues += 1;
currentComponent += 1;
} else if(currentComponent === 0) {
var numSubArguments = value.length;
if(numSubArguments > numComponents) {
numSubArguments = numComponents;
}
if(attribute.normalized) {
var scale = attribute.normalizationScale;
for(j = 0; j < numSubArguments; j += 1) {
data[numValues] = (value[j] * scale);
numValues += 1;
currentComponent += 1;
}
} else {
for(j = 0; j < numSubArguments; j += 1) {
data[numValues] = value[j];
numValues += 1;
currentComponent += 1;
}
}
while(currentComponent < numComponents) {
// No need to clear to zeros
numValues += 1;
currentComponent += 1;
}
break;
} else {
(TurbulenzEngine).callOnError('Missing values for attribute ' + a);
return null;
}
} else {
// No need to clear to zeros
numValues += 1;
currentComponent += 1;
}
}while(currentComponent < numComponents);
}
};
} else {
var destOffset = 0;
var bufferSize = (numVertices * this.strideInBytes);
data = new ArrayBuffer(bufferSize);
if(typeof DataView !== 'undefined' && 'setFloat32' in DataView.prototype) {
var dataView = new DataView(data);
writer = function vertexBufferWriterDataViewFn() {
var numArguments = arguments.length;
var currentArgument = 0;
for(var a = 0; a < numAttributes; a += 1) {
var attribute = attributes[a];
var numComponents = attribute.numComponents;
var setter = attribute.typedSetter;
var componentStride = attribute.componentStride;
var currentComponent = 0, j;
do {
if(currentArgument < numArguments) {
var value = arguments[currentArgument];
currentArgument += 1;
if(typeof value === "number") {
if(attribute.normalized) {
value *= attribute.normalizationScale;
}
setter.call(dataView, destOffset, value, true);
destOffset += componentStride;
currentComponent += 1;
numValues += 1;
} else if(currentComponent === 0) {
var numSubArguments = value.length;
if(numSubArguments > numComponents) {
numSubArguments = numComponents;
}
if(attribute.normalized) {
var scale = attribute.normalizationScale;
for(j = 0; j < numSubArguments; j += 1) {
setter.call(dataView, destOffset, (value[j] * scale), true);
destOffset += componentStride;
currentComponent += 1;
numValues += 1;
}
} else {
for(j = 0; j < numSubArguments; j += 1) {
setter.call(dataView, destOffset, value[j], true);
destOffset += componentStride;
currentComponent += 1;
numValues += 1;
}
}
while(currentComponent < numComponents) {
// No need to clear to zeros
numValues += 1;
currentComponent += 1;
}
break;
} else {
(TurbulenzEngine).callOnError('Missing values for attribute ' + a);
return null;
}
} else {
// No need to clear to zeros
numValues += 1;
currentComponent += 1;
}
}while(currentComponent < numComponents);
}
};
} else {
writer = function vertexBufferWriterMultiFn() {
var numArguments = arguments.length;
var currentArgument = 0;
var dest;
for(var a = 0; a < numAttributes; a += 1) {
var attribute = attributes[a];
var numComponents = attribute.numComponents;
dest = new attribute.typedArray(data, destOffset, numComponents);
destOffset += attribute.stride;
var currentComponent = 0, j;
do {
if(currentArgument < numArguments) {
var value = arguments[currentArgument];
currentArgument += 1;
if(typeof value === "number") {
if(attribute.normalized) {
value *= attribute.normalizationScale;
}
dest[currentComponent] = value;
currentComponent += 1;
numValues += 1;
} else if(currentComponent === 0) {
var numSubArguments = value.length;
if(numSubArguments > numComponents) {
numSubArguments = numComponents;
}
if(attribute.normalized) {
var scale = attribute.normalizationScale;
for(j = 0; j < numSubArguments; j += 1) {
dest[currentComponent] = (value[j] * scale);
currentComponent += 1;
numValues += 1;
}
} else {
for(j = 0; j < numSubArguments; j += 1) {
dest[currentComponent] = value[j];
currentComponent += 1;
numValues += 1;
}
}
while(currentComponent < numComponents) {
// No need to clear to zeros
currentComponent += 1;
numValues += 1;
}
break;
} else {
(TurbulenzEngine).callOnError('Missing values for attribute ' + a);
return null;
}
} else {
// No need to clear to zeros
currentComponent += 1;
numValues += 1;
}
}while(currentComponent < numComponents);
}
};
}
}
writer.data = data;
writer.offset = offset;
writer.getNumWrittenVertices = function getNumWrittenVerticesFn() {
return Math.floor(numValues / numValuesPerVertex);
};
writer.getNumWrittenValues = function getNumWrittenValuesFn() {
return numValues;
};
writer.write = writer;
return writer;
},
unmap: function vertexBufferUnmapFn(writer) {
if(writer) {
var data = writer.data;
delete writer.data;
delete writer.write;
var numVertices = writer.getNumWrittenVertices();
if(!numVertices) {
return;
}
var offset = writer.offset;
var stride = this.strideInBytes;
if(this.hasSingleFormat) {
var numValues = writer.getNumWrittenValues();
if(numValues < data.length) {
data = data.subarray(0, numValues);
}
} else {
var numBytes = (numVertices * stride);
if(numBytes < data.byteLength) {
data = data.slice(0, numBytes);
}
}
var gd = this.gd;
var gl = gd.gl;
gd.bindVertexBuffer(this.glBuffer);
if(numVertices < this.numVertices) {
gl.bufferSubData(gl.ARRAY_BUFFER, (offset * stride), data);
} else {
gl.bufferData(gl.ARRAY_BUFFER, data, this.usage);
}
}
},
setData: function vertexBufferSetDataFn(data, offset, numVertices) {
if(offset === undefined) {
offset = 0;
}
if(numVertices === undefined) {
numVertices = this.numVertices;
}
var gd = this.gd;
var gl = gd.gl;
var strideInBytes = this.strideInBytes;
// Fast path for ArrayBuffer data
if(data.constructor === ArrayBuffer) {
gd.bindVertexBuffer(this.glBuffer);
if(numVertices < this.numVertices) {
gl.bufferSubData(gl.ARRAY_BUFFER, (offset * strideInBytes), data);
} else {
gl.bufferData(gl.ARRAY_BUFFER, data, this.usage);
}
return;
}
var attributes = this.attributes;
var numAttributes = this.numAttributes;
var attribute, format, bufferData, TypedArrayConstructor;
if(this.hasSingleFormat) {
attribute = attributes[0];
format = attribute.format;
if(format === gl.BYTE) {
if(!(data instanceof Int8Array)) {
TypedArrayConstructor = Int8Array;
}
} else if(format === gl.UNSIGNED_BYTE) {
if(!(data instanceof Uint8Array)) {
TypedArrayConstructor = Uint8Array;
}
} else if(format === gl.SHORT) {
if(!(data instanceof Int16Array)) {
TypedArrayConstructor = Int16Array;
}
} else if(format === gl.UNSIGNED_SHORT) {
if(!(data instanceof Uint16Array)) {
TypedArrayConstructor = Uint16Array;
}
} else if(format === gl.INT) {
if(!(data instanceof Int32Array)) {
TypedArrayConstructor = Int32Array;
}
} else if(format === gl.UNSIGNED_INT) {
if(!(data instanceof Uint32Array)) {
TypedArrayConstructor = Uint32Array;
}
} else if(format === gl.FLOAT) {
if(!(data instanceof Float32Array)) {
TypedArrayConstructor = Float32Array;
}
}
var numValuesPerVertex = this.stride;
var numValues = (numVertices * numValuesPerVertex);
if(TypedArrayConstructor) {
// Data has to be put into a Typed Array and
// potentially normalized.
if(attribute.normalized) {
data = this.scaleValues(data, attribute.normalizationScale, numValues);
}
bufferData = new TypedArrayConstructor(data);
if(numValues < bufferData.length) {
bufferData = bufferData.subarray(0, numValues);
}
} else {
bufferData = data;
}
if(numValues < data.length) {
bufferData = bufferData.subarray(0, numValues);
}
} else {
var bufferSize = (numVertices * strideInBytes);
bufferData = new ArrayBuffer(bufferSize);
var srcOffset = 0, destOffset = 0, v, c, a, numComponents, componentStride, scale;
if(typeof DataView !== 'undefined' && 'setFloat32' in DataView.prototype) {
var dataView = new DataView(bufferData);
for(v = 0; v < numVertices; v += 1) {
for(a = 0; a < numAttributes; a += 1) {
attribute = attributes[a];
numComponents = attribute.numComponents;
componentStride = attribute.componentStride;
var setter = attribute.typedSetter;
if(attribute.normalized) {
scale = attribute.normalizationScale;
for(c = 0; c < numComponents; c += 1) {
setter.call(dataView, destOffset, (data[srcOffset] * scale), true);
destOffset += componentStride;
srcOffset += 1;
}
} else {
for(c = 0; c < numComponents; c += 1) {
setter.call(dataView, destOffset, data[srcOffset], true);
destOffset += componentStride;
srcOffset += 1;
}
}
}
}
} else {
for(v = 0; v < numVertices; v += 1) {
for(a = 0; a < numAttributes; a += 1) {
attribute = attributes[a];
numComponents = attribute.numComponents;
var dest = new attribute.typedArray(bufferData, destOffset, numComponents);
destOffset += attribute.stride;
if(attribute.normalized) {
scale = attribute.normalizationScale;
for(c = 0; c < numComponents; c += 1) {
dest[c] = (data[srcOffset] * scale);
srcOffset += 1;
}
} else {
for(c = 0; c < numComponents; c += 1) {
dest[c] = data[srcOffset];
srcOffset += 1;
}
}
}
}
}
}
data = undefined;
gd.bindVertexBuffer(this.glBuffer);
if(numVertices < this.numVertices) {
gl.bufferSubData(gl.ARRAY_BUFFER, (offset * strideInBytes), bufferData);
} else {
gl.bufferData(gl.ARRAY_BUFFER, bufferData, this.usage);
}
},
scaleValues: // Internal
function scaleValuesFn(values, scale, numValues) {
if(numValues === undefined) {
numValues = values.length;
}
var scaledValues = new values.constructor(numValues);
for(var n = 0; n < numValues; n += 1) {
scaledValues[n] = (values[n] * scale);
}
return scaledValues;
},
bindAttributes: function bindAttributesFn(numAttributes, attributes, offset) {
var gd = this.gd;
var gl = gd.gl;
var vertexAttributes = this.attributes;
var stride = this.strideInBytes;
var attributeMask = 0;
/*jshint bitwise: false*/
for(var n = 0; n < numAttributes; n += 1) {
var vertexAttribute = vertexAttributes[n];
var attribute = attributes[n];
attributeMask |= (1 << attribute);
gl.vertexAttribPointer(attribute, vertexAttribute.numComponents, vertexAttribute.format, vertexAttribute.normalized, stride, offset);
offset += vertexAttribute.stride;
}
/*jshint bitwise: true*/
return attributeMask;
},
setAttributes: function setAttributesFn(attributes) {
var gd = this.gd;
var numAttributes = attributes.length;
this.numAttributes = numAttributes;
this.attributes = [];
var stride = 0, numValuesPerVertex = 0, hasSingleFormat = true;
for(var i = 0; i < numAttributes; i += 1) {
var format = attributes[i];
if(typeof format === "string") {
format = gd['VERTEXFORMAT_' + format];
}
this.attributes[i] = format;
stride += format.stride;
numValuesPerVertex += format.numComponents;
if(hasSingleFormat && i) {
if(format.format !== this.attributes[i - 1].format) {
hasSingleFormat = false;
}
}
}
this.strideInBytes = stride;
this.stride = numValuesPerVertex;
this.hasSingleFormat = hasSingleFormat;
return stride;
},
resize: function resizeFn(size) {
if(size !== (this.strideInBytes * this.numVertices)) {
var gd = this.gd;
var gl = gd.gl;
gd.bindVertexBuffer(this.glBuffer);
var bufferType = gl.ARRAY_BUFFER;
gl.bufferData(bufferType, size, this.usage);
var bufferSize = gl.getBufferParameter(bufferType, gl.BUFFER_SIZE);
this.numVertices = Math.floor(bufferSize / this.strideInBytes);
}
},
destroy: function vertexBufferDestroyFn() {
var gd = this.gd;
if(gd) {
var glBuffer = this.glBuffer;
if(glBuffer) {
var gl = gd.gl;
if(gl) {
gd.unbindVertexBuffer(glBuffer);
gl.deleteBuffer(glBuffer);
}
delete this.glBuffer;
}
delete this.gd;
}
}
};
// Constructor function
WebGLVertexBuffer.create = function webGLVertexBufferCreateFn(gd, params) {
var gl = gd.gl;
var vb = new WebGLVertexBuffer();
vb.gd = gd;
var numVertices = params.numVertices;
vb.numVertices = numVertices;
var strideInBytes = vb.setAttributes(params.attributes);
/*jshint sub: true*/
// Avoid dot notation lookup to prevent Google Closure complaining
// about transient being a keyword
vb['transient'] = (params['transient'] || false);
vb.dynamic = (params.dynamic || vb['transient']);
vb.usage = (vb['transient'] ? gl.STREAM_DRAW : (vb.dynamic ? gl.DYNAMIC_DRAW : gl.STATIC_DRAW));
/*jshint sub: false*/
vb.glBuffer = gl.createBuffer();
var bufferSize = (numVertices * strideInBytes);
if(params.data) {
vb.setData(params.data, 0, numVertices);
} else {
gd.bindVertexBuffer(vb.glBuffer);
gl.bufferData(gl.ARRAY_BUFFER, bufferSize, vb.usage);
}
return vb;
};
function WebGLPass() {
return this;
}
WebGLPass.prototype = {
version: 1,
updateParametersData: function updateParametersDataFn(gd) {
var gl = gd.gl;
this.dirty = false;
// Set parameters
var parameters = this.parameters;
for(var p in parameters) {
if(parameters.hasOwnProperty(p)) {
var parameter = parameters[p];
if(parameter.dirty) {
parameter.dirty = 0;
var paramInfo = parameter.info;
var location = parameter.location;
if(paramInfo && null !== location) {
var parameterValues = paramInfo.values;
var numColumns;
if(paramInfo.type === 'float') {
numColumns = paramInfo.columns;
if(4 === numColumns) {
gl.uniform4fv(location, parameterValues);
} else if(3 === numColumns) {
gl.uniform3fv(location, parameterValues);
} else if(2 === numColumns) {
gl.uniform2fv(location, parameterValues);
} else if(1 === paramInfo.rows) {
gl.uniform1f(location, parameterValues[0]);
} else//if (1 === numColumns)
{
gl.uniform1fv(location, parameterValues);
}
} else if(paramInfo.sampler !== undefined) {
gd.setTexture(parameter.textureUnit, parameterValues, paramInfo.sampler);
} else {
numColumns = paramInfo.columns;
if(4 === numColumns) {
gl.uniform4iv(location, parameterValues);
} else if(3 === numColumns) {
gl.uniform3iv(location, parameterValues);
} else if(2 === numColumns) {
gl.uniform2iv(location, parameterValues);
} else if(1 === paramInfo.rows) {
gl.uniform1i(location, parameterValues[0]);
} else//if (1 === numColumns)
{
gl.uniform1iv(location, parameterValues);
}
}
}
}
}
}
},
initializeParameters: function passInitializeParametersFn(gd) {
var gl = gd.gl;
var glProgram = this.glProgram;
gd.setProgram(glProgram);
var passParameters = this.parameters;
for(var p in passParameters) {
if(passParameters.hasOwnProperty(p)) {
var parameter = passParameters[p];
var paramInfo = parameter.info;
if(paramInfo) {
var location = gl.getUniformLocation(glProgram, p);
if(null !== location) {
parameter.location = location;
if(paramInfo.sampler) {
gl.uniform1i(location, parameter.textureUnit);
} else {
var parameterValues = paramInfo.values;
var numColumns;
if(paramInfo.type === 'float') {
numColumns = paramInfo.columns;
if(4 === numColumns) {
gl.uniform4fv(location, parameterValues);
} else if(3 === numColumns) {
gl.uniform3fv(location, parameterValues);
} else if(2 === numColumns) {
gl.uniform2fv(location, parameterValues);
} else if(1 === paramInfo.rows) {
gl.uniform1f(location, parameterValues[0]);
} else//if (1 === numColumns)
{
gl.uniform1fv(location, parameterValues);
}
} else {
numColumns = paramInfo.columns;
if(4 === numColumns) {
gl.uniform4iv(location, parameterValues);
} else if(3 === numColumns) {
gl.uniform3iv(location, parameterValues);
} else if(2 === numColumns) {
gl.uniform2iv(location, parameterValues);
} else if(1 === paramInfo.rows) {
gl.uniform1i(location, parameterValues[0]);
} else//if (1 === numColumns)
{
gl.uniform1iv(location, parameterValues);
}
}
}
}
}
}
}
},
destroy: function passDestroyFn() {
delete this.glProgram;
delete this.semanticsMask;
delete this.parameters;
var states = this.states;
if(states) {
states.length = 0;
delete this.states;
}
}
};
// Constructor function
WebGLPass.create = function webGLPassCreateFn(gd, shader, params) {
var gl = gd.gl;
var pass = new WebGLPass();
pass.name = (params.name || null);
var programs = shader.programs;
var parameters = shader.parameters;
var parameterNames = params.parameters;
var programNames = params.programs;
var semanticNames = params.semantics;
var states = params.states;
var compoundProgramName = programNames.join(':');
var linkedProgram = shader.linkedPrograms[compoundProgramName];
var glProgram, semanticsMask, p, s;
if(linkedProgram === undefined) {
// Create GL program
glProgram = gl.createProgram();
var numPrograms = programNames.length;
for(p = 0; p < numPrograms; p += 1) {
var glShader = programs[programNames[p]];
if(glShader) {
gl.attachShader(glProgram, glShader);
}
}
/*jshint bitwise: false*/
var numSemantics = semanticNames.length;
semanticsMask = 0;
for(s = 0; s < numSemantics; s += 1) {
var semanticName = semanticNames[s];
var attribute = gd['SEMANTIC_' + semanticName];
if(attribute !== undefined) {
semanticsMask |= (1 << attribute);
gl.bindAttribLocation(glProgram, attribute, ("ATTR" + attribute));
}
}
/*jshint bitwise: true*/
gl.linkProgram(glProgram);
shader.linkedPrograms[compoundProgramName] = {
glProgram: glProgram,
semanticsMask: semanticsMask
};
} else {
//console.log('Reused program ' + compoundProgramName);
glProgram = linkedProgram.glProgram;
semanticsMask = linkedProgram.semanticsMask;
}
pass.glProgram = glProgram;
pass.semanticsMask = semanticsMask;
// Set parameters
var numTextureUnits = 0;
var passParameters = {
};
pass.parameters = passParameters;
var numParameters = parameterNames ? parameterNames.length : 0;
for(p = 0; p < numParameters; p += 1) {
var parameterName = parameterNames[p];
var parameter = {
};
passParameters[parameterName] = parameter;
var paramInfo = parameters[parameterName];
parameter.info = paramInfo;
if(paramInfo) {
parameter.location = null;
if(paramInfo.sampler) {
parameter.textureUnit = numTextureUnits;
numTextureUnits += 1;
} else {
parameter.textureUnit = undefined;
}
}
}
pass.numTextureUnits = numTextureUnits;
pass.numParameters = numParameters;
function equalRenderStates(defaultValues, values) {
var numDefaultValues = defaultValues.length;
var n;
for(n = 0; n < numDefaultValues; n += 1) {
if(defaultValues[n] !== values[n]) {
return false;
}
}
return true;
}
var stateHandlers = gd.stateHandlers;
var passStates = [];
var passStatesSet = {
};
pass.states = passStates;
pass.statesSet = passStatesSet;
for(s in states) {
if(states.hasOwnProperty(s)) {
var stateHandler = stateHandlers[s];
if(stateHandler) {
var values = stateHandler.parse(states[s]);
if(values !== null) {
if(equalRenderStates(stateHandler.defaultValues, values)) {
continue;
}
passStates.push({
name: s,
set: stateHandler.set,
reset: stateHandler.reset,
values: values
});
passStatesSet[s] = true;
} else {
(TurbulenzEngine).callOnError('Unknown value for state ' + s + ': ' + states[s]);
}
}
}
}
return pass;
};
//
// Technique
//
function Technique() {
return this;
}
Technique.prototype = {
version: 1,
getPass: function getPassFn(id) {
var passes = this.passes;
var numPasses = passes.length;
if(typeof id === "string") {
for(var n = 0; n < numPasses; n += 1) {
var pass = passes[n];
if(pass.name === id) {
return pass;
}
}
} else {
/*jshint bitwise: false*/
id = (id | 0);
/*jshint bitwise: true*/
if(id < numPasses) {
return passes[id];
}
}
return null;
},
activate: function activateFn(gd) {
this.device = gd;
if(!this.initialized) {
this.shader.initialize(gd);
this.initialize(gd);
}
if(debug) {
gd.metrics.techniqueChanges += 1;
}
},
deactivate: function deactivateFn() {
this.device = null;
},
checkProperties: function checkPropertiesFn(gd) {
// Check for parameters set directly into the technique...
var fakeTechniqueParameters = {
}, p;
for(p in this) {
if(p !== 'version' && p !== 'name' && p !== 'passes' && p !== 'numPasses' && p !== 'device' && p !== 'numParameters') {
fakeTechniqueParameters[p] = this[p];
}
}
if(fakeTechniqueParameters) {
var passes = this.passes;
if(passes.length === 1) {
gd.setParametersImmediate(gd, passes, fakeTechniqueParameters);
} else {
gd.setParametersDeferred(gd, passes, fakeTechniqueParameters);
}
for(p in fakeTechniqueParameters) {
if(fakeTechniqueParameters.hasOwnProperty(p)) {
delete this[p];
}
}
}
},
initialize: function techniqueInitializeFn(gd) {
if(this.initialized) {
return;
}
var passes = this.passes;
if(passes) {
var numPasses = passes.length;
var n;
for(n = 0; n < numPasses; n += 1) {
passes[n].initializeParameters(gd);
}
}
if(Object.defineProperty) {
this.initializeParametersSetters(gd);
}
this.initialized = true;
},
initializeParametersSetters: function initializeParametersSettersFn(gd) {
var gl = gd.gl;
function make_sampler_setter(pass, parameter) {
return function (parameterValues) {
if(this.device) {
gd.setTexture(parameter.textureUnit, parameterValues, parameter.info.sampler);
} else {
pass.dirty = true;
parameter.dirty = 1;
parameter.info.values = parameterValues;
}
};
}
function make_float_uniform_setter(pass, parameter) {
var paramInfo = parameter.info;
var location = parameter.location;
function setDeferredParameter(parameterValues) {
if(typeof parameterValues !== 'number') {
var values = paramInfo.values;
var numValues = Math.min(paramInfo.numValues, parameterValues.length);
for(var v = 0; v < numValues; v += 1) {
values[v] = parameterValues[v];
}
parameter.dirty = Math.max(numValues, (parameter.dirty || 0));
} else {
paramInfo.values[0] = parameterValues;
parameter.dirty = (parameter.dirty || 1);
}
pass.dirty = true;
}
switch(paramInfo.columns) {
case 1:
if(1 === paramInfo.numValues) {
return function (parameterValues) {
if(this.device) {
gl.uniform1f(location, parameterValues);
} else {
setDeferredParameter(parameterValues);
}
};
}
return function (parameterValues) {
if(this.device) {
gl.uniform1fv(location, parameterValues);
} else {
setDeferredParameter(parameterValues);
}
};
case 2:
return function (parameterValues) {
if(this.device) {
gl.uniform2fv(location, parameterValues);
} else {
setDeferredParameter(parameterValues);
}
};
case 3:
return function (parameterValues) {
if(this.device) {
gl.uniform3fv(location, parameterValues);
} else {
setDeferredParameter(parameterValues);
}
};
case 4:
return function (parameterValues) {
if(this.device) {
gl.uniform4fv(location, parameterValues);
} else {
setDeferredParameter(parameterValues);
}
};
default:
return null;
}
}
function make_int_uniform_setter(pass, parameter) {
var paramInfo = parameter.info;
var location = parameter.location;
function setDeferredParameter(parameterValues) {
if(typeof parameterValues !== 'number') {
var values = paramInfo.values;
var numValues = Math.min(paramInfo.numValues, parameterValues.length);
for(var v = 0; v < numValues; v += 1) {
values[v] = parameterValues[v];
}
parameter.dirty = Math.max(numValues, (parameter.dirty || 0));
} else {
paramInfo.values[0] = parameterValues;
parameter.dirty = (parameter.dirty || 1);
}
pass.dirty = true;
}
switch(paramInfo.columns) {
case 1:
if(1 === paramInfo.numValues) {
return function (parameterValues) {
if(this.device) {
gl.uniform1i(location, parameterValues);
} else {
setDeferredParameter(parameterValues);
}
};
}
return function (parameterValues) {
if(this.device) {
gl.uniform1iv(location, parameterValues);
} else {
setDeferredParameter(parameterValues);
}
};
case 2:
return function (parameterValues) {
if(this.device) {
gl.uniform2iv(location, parameterValues);
} else {
setDeferredParameter(parameterValues);
}
};
case 3:
return function (parameterValues) {
if(this.device) {
gl.uniform3iv(location, parameterValues);
} else {
setDeferredParameter(parameterValues);
}
};
case 4:
return function (parameterValues) {
if(this.device) {
gl.uniform4iv(location, parameterValues);
} else {
setDeferredParameter(parameterValues);
}
};
default:
return null;
}
}
var passes = this.passes;
var numPasses = passes.length;
var pass, parameters, p, parameter, paramInfo, setter;
if(numPasses === 1) {
pass = passes[0];
parameters = pass.parameters;
for(p in parameters) {
if(parameters.hasOwnProperty(p)) {
parameter = parameters[p];
paramInfo = parameter.info;
if(paramInfo) {
if(undefined !== parameter.location) {
if(paramInfo.sampler) {
setter = make_sampler_setter(pass, parameter);
} else {
if(paramInfo.type === 'float') {
setter = make_float_uniform_setter(pass, parameter);
} else {
setter = make_int_uniform_setter(pass, parameter);
}
}
Object.defineProperty(this, p, {
set: setter,
enumerable: false,
configurable: false
});
}
}
}
}
this.checkProperties = null;
} else {
Object.defineProperty(this, 'device', {
writable: true,
enumerable: false,
configurable: false
});
Object.defineProperty(this, 'version', {
writable: false,
enumerable: false,
configurable: false
});
Object.defineProperty(this, 'name', {
writable: false,
enumerable: false,
configurable: false
});
Object.defineProperty(this, 'passes', {
writable: false,
enumerable: false,
configurable: false
});
Object.defineProperty(this, 'numParameters', {
writable: false,
enumerable: false,
configurable: false
});
}
},
destroy: function techniqueDestroyFn() {
var passes = this.passes;
if(passes) {
var numPasses = passes.length;
var n;
for(n = 0; n < numPasses; n += 1) {
passes[n].destroy();
}
passes.length = 0;
delete this.passes;
}
delete this.device;
}
};
// Constructor function
Technique.create = function webGLTechniqueCreateFn(gd, shader, name, passes) {
var technique = new Technique();
technique.initialized = false;
technique.shader = shader;
technique.name = name;
var numPasses = passes.length, n;
var numParameters = 0;
technique.passes = [];
technique.numPasses = numPasses;
for(n = 0; n < numPasses; n += 1) {
var passParams = passes[n];
if(passParams.parameters) {
numParameters += passParams.parameters.length;
}
technique.passes[n] = WebGLPass.create(gd, shader, passParams);
}
technique.numParameters = numParameters;
technique.device = null;
return technique;
};
//
// Shader
//
function Shader() {
return this;
}
Shader.prototype = {
version: 1,
getTechnique: function getTechniqueFn(name) {
if(typeof name === "string") {
return this.techniques[name];
} else {
var techniques = this.techniques;
for(var t in techniques) {
if(techniques.hasOwnProperty(t)) {
if(name === 0) {
return techniques[t];
} else {
name -= 1;
}
}
}
return null;
}
},
getParameter: function getParameterFn(name) {
if(typeof name === "string") {
return this.parameters[name];
} else {
/*jshint bitwise: false*/
name = (name | 0);
/*jshint bitwise: true*/
var parameters = this.parameters;
for(var p in parameters) {
if(parameters.hasOwnProperty(p)) {
if(name === 0) {
return parameters[p];
} else {
name -= 1;
}
}
}
return null;
}
},
initialize: function shaderInitializeFn(gd) {
if(this.initialized) {
return;
}
var gl = gd.gl;
var p;
// Check copmpiled programs as late as possible
var shaderPrograms = this.programs;
for(p in shaderPrograms) {
if(shaderPrograms.hasOwnProperty(p)) {
var compiledProgram = shaderPrograms[p];
var compiled = gl.getShaderParameter(compiledProgram, gl.COMPILE_STATUS);
if(!compiled) {
var compilerInfo = gl.getShaderInfoLog(compiledProgram);
(TurbulenzEngine).callOnError('Program "' + p + '" failed to compile: ' + compilerInfo);
}
}
}
// Check linked programs as late as possible
var linkedPrograms = this.linkedPrograms;
for(p in linkedPrograms) {
if(linkedPrograms.hasOwnProperty(p)) {
var linkedProgram = linkedPrograms[p];
var glProgram = linkedProgram.glProgram;
if(glProgram) {
var linked = gl.getProgramParameter(glProgram, gl.LINK_STATUS);
if(!linked) {
var linkerInfo = gl.getProgramInfoLog(glProgram);
(TurbulenzEngine).callOnError('Program "' + p + '" failed to link: ' + linkerInfo);
}
}
}
}
this.initialized = true;
},
destroy: function shaderDestroyFn() {
var gd = this.gd;
if(gd) {
var gl = gd.gl;
var p;
var techniques = this.techniques;
if(techniques) {
for(p in techniques) {
if(techniques.hasOwnProperty(p)) {
techniques[p].destroy();
}
}
delete this.techniques;
}
var linkedPrograms = this.linkedPrograms;
if(linkedPrograms) {
if(gl) {
for(p in linkedPrograms) {
if(linkedPrograms.hasOwnProperty(p)) {
var linkedProgram = linkedPrograms[p];
var glProgram = linkedProgram.glProgram;
if(glProgram) {
gl.deleteProgram(glProgram);
delete linkedProgram.glProgram;
}
}
}
}
delete this.linkedPrograms;
}
var programs = this.programs;
if(programs) {
if(gl) {
for(p in programs) {
if(programs.hasOwnProperty(p)) {
gl.deleteShader(programs[p]);
}
}
}
delete this.programs;
}
delete this.samplers;
delete this.parameters;
delete this.gd;
}
}
};
// Constructor function
Shader.create = function webGLShaderCreateFn(gd, params) {
var gl = gd.gl;
var shader = new Shader();
shader.initialized = false;
var techniques = params.techniques;
var parameters = params.parameters;
var programs = params.programs;
var samplers = params.samplers;
var p;
shader.gd = gd;
shader.name = params.name;
// Compile programs as early as possible
var shaderPrograms = {
};
shader.programs = shaderPrograms;
for(p in programs) {
if(programs.hasOwnProperty(p)) {
var program = programs[p];
var glShaderType;
if(program.type === 'fragment') {
glShaderType = gl.FRAGMENT_SHADER;
} else if(program.type === 'vertex') {
glShaderType = gl.VERTEX_SHADER;
}
var glShader = gl.createShader(glShaderType);
gl.shaderSource(glShader, program.code);
gl.compileShader(glShader);
shaderPrograms[p] = glShader;
}
}
var linkedPrograms = {
};
shader.linkedPrograms = linkedPrograms;
// Samplers
var defaultSampler = gd.DEFAULT_SAMPLER;
var maxAnisotropy = gd.maxAnisotropy;
shader.samplers = {
};
var sampler;
for(p in samplers) {
if(samplers.hasOwnProperty(p)) {
sampler = samplers[p];
var samplerMaxAnisotropy = sampler.MaxAnisotropy;
if(samplerMaxAnisotropy) {
if(samplerMaxAnisotropy > maxAnisotropy) {
samplerMaxAnisotropy = maxAnisotropy;
}
} else {
samplerMaxAnisotropy = defaultSampler.maxAnisotropy;
}
sampler = {
minFilter: (sampler.MinFilter || defaultSampler.minFilter),
magFilter: (sampler.MagFilter || defaultSampler.magFilter),
wrapS: (sampler.WrapS || defaultSampler.wrapS),
wrapT: (sampler.WrapT || defaultSampler.wrapT),
wrapR: (sampler.WrapR || defaultSampler.wrapR),
maxAnisotropy: samplerMaxAnisotropy
};
if(sampler.wrapS === 0x2900) {
sampler.wrapS = gl.CLAMP_TO_EDGE;
}
if(sampler.wrapT === 0x2900) {
sampler.wrapT = gl.CLAMP_TO_EDGE;
}
if(sampler.wrapR === 0x2900) {
sampler.wrapR = gl.CLAMP_TO_EDGE;
}
shader.samplers[p] = gd.createSampler(sampler);
}
}
// Parameters
var numParameters = 0;
shader.parameters = {
};
for(p in parameters) {
if(parameters.hasOwnProperty(p)) {
var parameter = parameters[p];
if(!parameter.columns) {
parameter.columns = 1;
}
if(!parameter.rows) {
parameter.rows = 1;
}
parameter.numValues = (parameter.columns * parameter.rows);
var parameterType = parameter.type;
if(parameterType === "float" || parameterType === "int" || parameterType === "bool") {
var parameterValues = parameter.values;
if(parameterValues) {
if(parameterType === "float") {
parameter.values = new Float32Array(parameterValues);
} else {
parameter.values = new Int32Array(parameterValues);
}
} else {
if(parameterType === "float") {
parameter.values = new Float32Array(parameter.numValues);
} else {
parameter.values = new Int32Array(parameter.numValues);
}
}
parameter.sampler = undefined;
} else// Sampler
{
sampler = shader.samplers[p];
if(!sampler) {
sampler = defaultSampler;
shader.samplers[p] = defaultSampler;
}
parameter.sampler = sampler;
parameter.values = null;
}
parameter.name = p;
shader.parameters[p] = parameter;
numParameters += 1;
}
}
shader.numParameters = numParameters;
// Techniques and passes
var shaderTechniques = {
};
var numTechniques = 0;
shader.techniques = shaderTechniques;
for(p in techniques) {
if(techniques.hasOwnProperty(p)) {
shaderTechniques[p] = Technique.create(gd, shader, p, techniques[p]);
numTechniques += 1;
}
}
shader.numTechniques = numTechniques;
return shader;
};
function TechniqueParameters() {
return this;
}
// Constructor function
TechniqueParameters.create = function TechniqueParametersFn(params) {
var techniqueParameters = new TechniqueParameters();
if(params) {
for(var p in params) {
if(params.hasOwnProperty(p)) {
techniqueParameters[p] = params[p];
}
}
}
return techniqueParameters;
};
//
// TechniqueParameterBuffer
//
var techniqueParameterBufferCreate = function techniqueParameterBufferCreateFn(params) {
if(Float32Array.prototype.map === undefined) {
Float32Array.prototype.map = function techniqueParameterBufferMap(offset, numFloats) {
if(offset === undefined) {
offset = 0;
}
var buffer = this;
if(numFloats === undefined) {
numFloats = this.length;
}
function techniqueParameterBufferWriter() {
var numArguments = arguments.length;
for(var a = 0; a < numArguments; a += 1) {
var value = arguments[a];
if(typeof value === 'number') {
buffer[offset] = value;
offset += 1;
} else {
buffer.setData(value, offset, value.length);
offset += value.length;
}
}
}
return techniqueParameterBufferWriter;
};
Float32Array.prototype.unmap = function techniqueParameterBufferUnmap() {
/* writer */ };
Float32Array.prototype.setData = function techniqueParameterBufferSetData(data, offset, numValues) {
if(offset === undefined) {
offset = 0;
}
if(numValues === undefined) {
numValues = this.length;
}
for(var n = 0; n < numValues; n += 1 , offset += 1) {
this[offset] = data[n];
}
};
}
return new Float32Array(params.numFloats);
};
function DrawParameters() {
// Streams, TechniqueParameters and Instances are stored as indexed properties
this.endStreams = 0;
this.endTechniqueParameters = (16 * 3);
this.endInstances = ((16 * 3) + 8);
this.firstIndex = 0;
this.count = 0;
this.sortKey = 0;
this.technique = null;
this.indexBuffer = null;
this.primitive = -1;
this.userData = null;
// Initialize for 1 Stream, 2 TechniqueParameters and 8 Instances
this[0] = undefined;
this[1] = undefined;
this[2] = undefined;
this[(16 * 3) + 0] = undefined;
this[(16 * 3) + 1] = undefined;
this[((16 * 3) + 8) + 0] = undefined;
this[((16 * 3) + 8) + 1] = undefined;
this[((16 * 3) + 8) + 2] = undefined;
this[((16 * 3) + 8) + 3] = undefined;
this[((16 * 3) + 8) + 4] = undefined;
this[((16 * 3) + 8) + 5] = undefined;
this[((16 * 3) + 8) + 6] = undefined;
this[((16 * 3) + 8) + 7] = undefined;
return this;
}
DrawParameters.prototype = {
version: 1,
setTechniqueParameters: function setTechniqueParametersFn(indx, techniqueParameters) {
if(indx < 8) {
indx += (16 * 3);
this[indx] = techniqueParameters;
var endTechniqueParameters = this.endTechniqueParameters;
if(techniqueParameters) {
if(endTechniqueParameters <= indx) {
this.endTechniqueParameters = (indx + 1);
}
} else {
while((16 * 3) < endTechniqueParameters && !this[endTechniqueParameters - 1]) {
endTechniqueParameters -= 1;
}
this.endTechniqueParameters = endTechniqueParameters;
}
}
},
setVertexBuffer: function setVertexBufferFn(indx, vertexBuffer) {
if(indx < 16) {
indx *= 3;
this[indx] = vertexBuffer;
var endStreams = this.endStreams;
if(vertexBuffer) {
if(endStreams <= indx) {
this.endStreams = (indx + 3);
}
} else {
while(0 < endStreams && !this[endStreams - 3]) {
endStreams -= 3;
}
this.endStreams = endStreams;
}
}
},
setSemantics: function setSemanticsFn(indx, semantics) {
if(indx < 16) {
this[(indx * 3) + 1] = semantics;
}
},
setOffset: function setOffsetFn(indx, offset) {
if(indx < 16) {
this[(indx * 3) + 2] = offset;
}
},
getTechniqueParameters: function getTechniqueParametersFn(indx) {
if(indx < 8) {
return this[indx + (16 * 3)];
} else {
return undefined;
}
},
getVertexBuffer: function getVertexBufferFn(indx) {
if(indx < 16) {
return this[(indx * 3) + 0];
} else {
return undefined;
}
},
getSemantics: function getSemanticsFn(indx) {
if(indx < 16) {
return this[(indx * 3) + 1];
} else {
return undefined;
}
},
getOffset: function getOffsetFn(indx) {
if(indx < 16) {
return this[(indx * 3) + 2];
} else {
return undefined;
}
},
addInstance: function drawParametersAddInstanceFn(instanceParameters) {
if(instanceParameters) {
var endInstances = this.endInstances;
this.endInstances = (endInstances + 1);
this[endInstances] = instanceParameters;
}
},
removeInstances: function drawParametersRemoveInstancesFn() {
this.endInstances = ((16 * 3) + 8);
},
getNumInstances: function drawParametersGetNumInstancesFn() {
return (this.endInstances - ((16 * 3) + 8));
}
};
// Constructor function
DrawParameters.create = function webGLDrawParametersFn() {
/* params */ return new DrawParameters();
};
function WebGLGraphicsDevice() {
return this;
}
WebGLGraphicsDevice.prototype = {
version: 1,
SEMANTIC_POSITION: 0,
SEMANTIC_POSITION0: 0,
SEMANTIC_BLENDWEIGHT: 1,
SEMANTIC_BLENDWEIGHT0: 1,
SEMANTIC_NORMAL: 2,
SEMANTIC_NORMAL0: 2,
SEMANTIC_COLOR: 3,
SEMANTIC_COLOR0: 3,
SEMANTIC_COLOR1: 4,
SEMANTIC_SPECULAR: 4,
SEMANTIC_FOGCOORD: 5,
SEMANTIC_TESSFACTOR: 5,
SEMANTIC_PSIZE0: 6,
SEMANTIC_BLENDINDICES: 7,
SEMANTIC_BLENDINDICES0: 7,
SEMANTIC_TEXCOORD: 8,
SEMANTIC_TEXCOORD0: 8,
SEMANTIC_TEXCOORD1: 9,
SEMANTIC_TEXCOORD2: 10,
SEMANTIC_TEXCOORD3: 11,
SEMANTIC_TEXCOORD4: 12,
SEMANTIC_TEXCOORD5: 13,
SEMANTIC_TEXCOORD6: 14,
SEMANTIC_TEXCOORD7: 15,
SEMANTIC_TANGENT: 14,
SEMANTIC_TANGENT0: 14,
SEMANTIC_BINORMAL0: 15,
SEMANTIC_BINORMAL: 15,
SEMANTIC_PSIZE: 6,
SEMANTIC_ATTR0: 0,
SEMANTIC_ATTR1: 1,
SEMANTIC_ATTR2: 2,
SEMANTIC_ATTR3: 3,
SEMANTIC_ATTR4: 4,
SEMANTIC_ATTR5: 5,
SEMANTIC_ATTR6: 6,
SEMANTIC_ATTR7: 7,
SEMANTIC_ATTR8: 8,
SEMANTIC_ATTR9: 9,
SEMANTIC_ATTR10: 10,
SEMANTIC_ATTR11: 11,
SEMANTIC_ATTR12: 12,
SEMANTIC_ATTR13: 13,
SEMANTIC_ATTR14: 14,
SEMANTIC_ATTR15: 15,
PIXELFORMAT_A8: 0,
PIXELFORMAT_L8: 1,
PIXELFORMAT_L8A8: 2,
PIXELFORMAT_R5G5B5A1: 3,
PIXELFORMAT_R5G6B5: 4,
PIXELFORMAT_R4G4B4A4: 5,
PIXELFORMAT_R8G8B8A8: 6,
PIXELFORMAT_R8G8B8: 7,
PIXELFORMAT_D24S8: 8,
PIXELFORMAT_D16: 9,
PIXELFORMAT_DXT1: 10,
PIXELFORMAT_DXT3: 11,
PIXELFORMAT_DXT5: 12,
drawIndexed: function drawIndexedFn(primitive, numIndices, first) {
var gl = this.gl;
var indexBuffer = this.activeIndexBuffer;
var offset;
if(first) {
offset = (first * indexBuffer.stride);
} else {
offset = 0;
}
var format = indexBuffer.format;
var attributeMask = this.attributeMask;
var activeTechnique = this.activeTechnique;
var passes = activeTechnique.passes;
var numPasses = passes.length;
var mask;
if(activeTechnique.checkProperties) {
activeTechnique.checkProperties(this);
}
/*jshint bitwise: false*/
if(1 === numPasses) {
mask = (passes[0].semanticsMask & attributeMask);
if(mask !== this.clientStateMask) {
this.enableClientState(mask);
}
gl.drawElements(primitive, numIndices, format, offset);
if(debug) {
this.metrics.addPrimitives(primitive, numIndices);
}
} else {
for(var p = 0; p < numPasses; p += 1) {
var pass = passes[p];
mask = (pass.semanticsMask & attributeMask);
if(mask !== this.clientStateMask) {
this.enableClientState(mask);
}
this.setPass(pass);
gl.drawElements(primitive, numIndices, format, offset);
if(debug) {
this.metrics.addPrimitives(primitive, numIndices);
}
}
}
/*jshint bitwise: true*/
},
draw: function drawFn(primitive, numVertices, first) {
var gl = this.gl;
var attributeMask = this.attributeMask;
var activeTechnique = this.activeTechnique;
var passes = activeTechnique.passes;
var numPasses = passes.length;
var mask;
if(activeTechnique.checkProperties) {
activeTechnique.checkProperties(this);
}
/*jshint bitwise: false*/
if(1 === numPasses) {
mask = (passes[0].semanticsMask & attributeMask);
if(mask !== this.clientStateMask) {
this.enableClientState(mask);
}
gl.drawArrays(primitive, first, numVertices);
if(debug) {
this.metrics.addPrimitives(primitive, numVertices);
}
} else {
for(var p = 0; p < numPasses; p += 1) {
var pass = passes[p];
mask = (pass.semanticsMask & attributeMask);
if(mask !== this.clientStateMask) {
this.enableClientState(mask);
}
this.setPass(pass);
gl.drawArrays(primitive, first, numVertices);
if(debug) {
this.metrics.addPrimitives(primitive, numVertices);
}
}
}
/*jshint bitwise: true*/
},
setTechniqueParameters: function setTechniqueParametersFn() {
var activeTechnique = this.activeTechnique;
var passes = activeTechnique.passes;
var setParameters = (1 === passes.length ? this.setParametersImmediate : this.setParametersDeferred);
var numTechniqueParameters = arguments.length;
for(var t = 0; t < numTechniqueParameters; t += 1) {
setParameters(this, passes, arguments[t]);
}
},
setParametersImmediate: //Internal
function setParametersImmediateFn(gd, passes, techniqueParameters) {
var gl = gd.gl;
var parameters = passes[0].parameters;
/*jshint forin: true*/
for(var p in techniqueParameters) {
var parameter = parameters[p];
if(parameter !== undefined) {
var parameterValues = techniqueParameters[p];
if(parameterValues !== undefined) {
var paramInfo = parameter.info;
var numColumns, location;
if(paramInfo.type === 'float') {
numColumns = paramInfo.columns;
location = parameter.location;
if(4 === numColumns) {
gl.uniform4fv(location, parameterValues);
} else if(3 === numColumns) {
gl.uniform3fv(location, parameterValues);
} else if(2 === numColumns) {
gl.uniform2fv(location, parameterValues);
} else if(1 === paramInfo.rows) {
gl.uniform1f(location, parameterValues);
} else//if (1 === numColumns)
{
gl.uniform1fv(location, parameterValues);
}
} else if(paramInfo.sampler !== undefined) {
gd.setTexture(parameter.textureUnit, parameterValues, paramInfo.sampler);
} else {
numColumns = paramInfo.columns;
location = parameter.location;
if(4 === numColumns) {
gl.uniform4iv(location, parameterValues);
} else if(3 === numColumns) {
gl.uniform3iv(location, parameterValues);
} else if(2 === numColumns) {
gl.uniform2iv(location, parameterValues);
} else if(1 === paramInfo.rows) {
gl.uniform1i(location, parameterValues);
} else//if (1 === numColumns)
{
gl.uniform1iv(location, parameterValues);
}
}
} else {
delete techniqueParameters[p];
}
}
}
/*jshint forin: false*/
},
setParametersCaching: // ONLY USE FOR SINGLE PASS TECHNIQUES ON DRAWARRAY
function setParametersCachingFn(gd, passes, techniqueParameters) {
var gl = gd.gl;
var parameters = passes[0].parameters;
/*jshint forin: true*/
for(var p in techniqueParameters) {
var parameter = parameters[p];
if(parameter !== undefined) {
var parameterValues = techniqueParameters[p];
if(parameter.value !== parameterValues) {
if(parameterValues !== undefined) {
parameter.value = parameterValues;
var paramInfo = parameter.info;
var numColumns, location;
if(paramInfo.type === 'float') {
numColumns = paramInfo.columns;
location = parameter.location;
if(4 === numColumns) {
gl.uniform4fv(location, parameterValues);
} else if(3 === numColumns) {
gl.uniform3fv(location, parameterValues);
} else if(2 === numColumns) {
gl.uniform2fv(location, parameterValues);
} else if(1 === paramInfo.rows) {
gl.uniform1f(location, parameterValues);
} else//if (1 === numColumns)
{
gl.uniform1fv(location, parameterValues);
}
} else if(paramInfo.sampler !== undefined) {
gd.setTexture(parameter.textureUnit, parameterValues, paramInfo.sampler);
} else {
numColumns = paramInfo.columns;
location = parameter.location;
if(4 === numColumns) {
gl.uniform4iv(location, parameterValues);
} else if(3 === numColumns) {
gl.uniform3iv(location, parameterValues);
} else if(2 === numColumns) {
gl.uniform2iv(location, parameterValues);
} else if(1 === paramInfo.rows) {
gl.uniform1i(location, parameterValues);
} else//if (1 === numColumns)
{
gl.uniform1iv(location, parameterValues);
}
}
} else {
delete techniqueParameters[p];
}
}
}
}
/*jshint forin: false*/
},
setParametersDeferred: function setParametersDeferredFn(gd, passes, techniqueParameters) {
var numPasses = passes.length;
var min = Math.min;
var max = Math.max;
for(var n = 0; n < numPasses; n += 1) {
var pass = passes[n];
var parameters = pass.parameters;
pass.dirty = true;
/*jshint forin: true*/
for(var p in techniqueParameters) {
var parameter = parameters[p];
if(parameter) {
var parameterValues = techniqueParameters[p];
if(parameterValues !== undefined) {
var paramInfo = parameter.info;
if(paramInfo.sampler) {
paramInfo.values = parameterValues;
parameter.dirty = 1;
} else if(typeof parameterValues !== 'number') {
var values = paramInfo.values;
var numValues = min(paramInfo.numValues, parameterValues.length);
for(var v = 0; v < numValues; v += 1) {
values[v] = parameterValues[v];
}
parameter.dirty = max(numValues, (parameter.dirty || 0));
} else {
paramInfo.values[0] = parameterValues;
parameter.dirty = (parameter.dirty || 1);
}
} else {
delete techniqueParameters[p];
}
}
}
/*jshint forin: false*/
}
},
setTechnique: function setTechniqueFn(technique) {
var activeTechnique = this.activeTechnique;
if(activeTechnique !== technique) {
if(activeTechnique) {
activeTechnique.deactivate();
}
this.activeTechnique = technique;
technique.activate(this);
var passes = technique.passes;
if(1 === passes.length) {
this.setPass(passes[0]);
}
}
},
setTechniqueCaching: // ONLY USE FOR SINGLE PASS TECHNIQUES ON DRAWARRAY
function setTechniqueCachingFn(technique) {
var pass = technique.passes[0];
var activeTechnique = this.activeTechnique;
if(activeTechnique !== technique) {
if(activeTechnique) {
activeTechnique.deactivate();
}
this.activeTechnique = technique;
technique.activate(this);
this.setPass(pass);
}
var parameters = pass.parameters;
for(var p in parameters) {
if(parameters.hasOwnProperty(p)) {
parameters[p].value = null;
}
}
},
setStream: function setStreamFn(vertexBuffer, semantics, offset) {
debug.assert(vertexBuffer instanceof WebGLVertexBuffer);
debug.assert(semantics instanceof WebGLSemantics);
if(offset) {
offset *= vertexBuffer.strideInBytes;
} else {
offset = 0;
}
this.bindVertexBuffer(vertexBuffer.glBuffer);
var attributes = semantics;
var numAttributes = attributes.length;
if(numAttributes > vertexBuffer.numAttributes) {
numAttributes = vertexBuffer.numAttributes;
}
/*jshint bitwise: false*/
this.attributeMask |= vertexBuffer.bindAttributes(numAttributes, attributes, offset);
/*jshint bitwise: true*/
},
setIndexBuffer: function setIndexBufferFn(indexBuffer) {
if(this.activeIndexBuffer !== indexBuffer) {
this.activeIndexBuffer = indexBuffer;
var glBuffer;
if(indexBuffer) {
glBuffer = indexBuffer.glBuffer;
} else {
glBuffer = null;
}
var gl = this.gl;
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, glBuffer);
if(debug) {
this.metrics.indexBufferChanges += 1;
}
}
},
drawArray: function drawArrayFn(drawParametersArray, globalTechniqueParametersArray, sortMode) {
var gl = this.gl;
var ELEMENT_ARRAY_BUFFER = gl.ELEMENT_ARRAY_BUFFER;
var setParametersCaching = this.setParametersCaching;
var setParametersDeferred = this.setParametersDeferred;
var numGlobalTechniqueParameters = globalTechniqueParametersArray.length;
var numDrawParameters = drawParametersArray.length;
if(numDrawParameters > 1 && sortMode) {
if(sortMode > 0) {
drawParametersArray.sort(function drawArraySortPositive(a, b) {
return (b.sortKey - a.sortKey);
});
} else//if (sortMode < 0)
{
drawParametersArray.sort(function drawArraySortNegative(a, b) {
return (a.sortKey - b.sortKey);
});
}
}
var activeIndexBuffer = this.activeIndexBuffer;
var attributeMask = this.attributeMask;
var setParameters = null;
var lastTechnique = null;
var lastEndStreams = -1;
var lastDrawParameters = null;
var techniqueParameters = null;
var v = 0;
var streamsMatch = false;
var vertexBuffer = null;
var passes = null;
var p = null;
var pass = null;
var indexFormat = 0;
var indexStride = 0;
var numPasses = 0;
var mask = 0;
var t = 0;
if(activeIndexBuffer) {
indexFormat = activeIndexBuffer.format;
indexStride = activeIndexBuffer.stride;
}
for(var n = 0; n < numDrawParameters; n += 1) {
var drawParameters = drawParametersArray[n];
var technique = drawParameters.technique;
var endTechniqueParameters = drawParameters.endTechniqueParameters;
var endStreams = drawParameters.endStreams;
var endInstances = drawParameters.endInstances;
var indexBuffer = drawParameters.indexBuffer;
var primitive = drawParameters.primitive;
var count = drawParameters.count;
var firstIndex = drawParameters.firstIndex;
if(lastTechnique !== technique) {
lastTechnique = technique;
passes = technique.passes;
numPasses = passes.length;
if(1 === numPasses) {
this.setTechniqueCaching(technique);
setParameters = setParametersCaching;
mask = (passes[0].semanticsMask & attributeMask);
if(mask !== this.clientStateMask) {
this.enableClientState(mask);
}
} else {
this.setTechnique(technique);
setParameters = setParametersDeferred;
}
if(technique.checkProperties) {
technique.checkProperties(this);
}
for(t = 0; t < numGlobalTechniqueParameters; t += 1) {
setParameters(this, passes, globalTechniqueParametersArray[t]);
}
}
for(t = (16 * 3); t < endTechniqueParameters; t += 1) {
techniqueParameters = drawParameters[t];
if(techniqueParameters) {
setParameters(this, passes, techniqueParameters);
}
}
streamsMatch = (lastEndStreams === endStreams);
for(v = 0; streamsMatch && v < endStreams; v += 3) {
streamsMatch = (lastDrawParameters[v] === drawParameters[v] && lastDrawParameters[v + 1] === drawParameters[v + 1] && lastDrawParameters[v + 2] === drawParameters[v + 2]);
}
if(!streamsMatch) {
lastEndStreams = endStreams;
lastDrawParameters = drawParameters;
for(v = 0; v < endStreams; v += 3) {
vertexBuffer = drawParameters[v];
if(vertexBuffer) {
this.setStream(vertexBuffer, drawParameters[v + 1], drawParameters[v + 2]);
}
}
attributeMask = this.attributeMask;
if(1 === numPasses) {
mask = (passes[0].semanticsMask & attributeMask);
if(mask !== this.clientStateMask) {
this.enableClientState(mask);
}
}
}
/*jshint bitwise: false*/
if(indexBuffer) {
if(activeIndexBuffer !== indexBuffer) {
activeIndexBuffer = indexBuffer;
gl.bindBuffer(ELEMENT_ARRAY_BUFFER, indexBuffer.glBuffer);
indexFormat = indexBuffer.format;
indexStride = indexBuffer.stride;
if(debug) {
this.metrics.indexBufferChanges += 1;
}
}
firstIndex *= indexStride;
if(1 === numPasses) {
t = ((16 * 3) + 8);
if(t < endInstances) {
do {
setParameters(this, passes, drawParameters[t]);
gl.drawElements(primitive, count, indexFormat, firstIndex);
if(debug) {
this.metrics.addPrimitives(primitive, count);
}
t += 1;
}while(t < endInstances);
} else {
gl.drawElements(primitive, count, indexFormat, firstIndex);
if(debug) {
this.metrics.addPrimitives(primitive, count);
}
}
} else {
t = ((16 * 3) + 8);
if(t < endInstances) {
do {
setParameters(this, passes, drawParameters[t]);
for(p = 0; p < numPasses; p += 1) {
pass = passes[p];
mask = (pass.semanticsMask & attributeMask);
if(mask !== this.clientStateMask) {
this.enableClientState(mask);
}
this.setPass(pass);
gl.drawElements(primitive, count, indexFormat, firstIndex);
if(debug) {
this.metrics.addPrimitives(primitive, count);
}
}
t += 1;
}while(t < endInstances);
} else {
for(p = 0; p < numPasses; p += 1) {
pass = passes[p];
mask = (pass.semanticsMask & attributeMask);
if(mask !== this.clientStateMask) {
this.enableClientState(mask);
}
this.setPass(pass);
gl.drawElements(primitive, count, indexFormat, firstIndex);
if(debug) {
this.metrics.addPrimitives(primitive, count);
}
}
}
}
} else {
if(1 === numPasses) {
t = ((16 * 3) + 8);
if(t < endInstances) {
do {
setParameters(this, passes, drawParameters[t]);
gl.drawArrays(primitive, firstIndex, count);
if(debug) {
this.metrics.addPrimitives(primitive, count);
}
t += 1;
}while(t < endInstances);
} else {
gl.drawArrays(primitive, firstIndex, count);
if(debug) {
this.metrics.addPrimitives(primitive, count);
}
}
} else {
t = ((16 * 3) + 8);
if(t < endInstances) {
do {
setParameters(this, passes, drawParameters[t]);
for(p = 0; p < numPasses; p += 1) {
pass = passes[p];
mask = (pass.semanticsMask & attributeMask);
if(mask !== this.clientStateMask) {
this.enableClientState(mask);
}
this.setPass(pass);
gl.drawArrays(primitive, firstIndex, count);
}
if(debug) {
this.metrics.addPrimitives(primitive, count);
}
t += 1;
}while(t < endInstances);
} else {
for(p = 0; p < numPasses; p += 1) {
pass = passes[p];
mask = (pass.semanticsMask & attributeMask);
if(mask !== this.clientStateMask) {
this.enableClientState(mask);
}
this.setPass(pass);
gl.drawArrays(primitive, firstIndex, count);
if(debug) {
this.metrics.addPrimitives(primitive, count);
}
}
}
}
}
/*jshint bitwise: true*/
}
this.activeIndexBuffer = activeIndexBuffer;
},
beginDraw: function beginDrawFn(primitive, numVertices, formats, semantics) {
this.immediatePrimitive = primitive;
if(numVertices) {
var n;
var immediateSemantics = this.immediateSemantics;
var attributes = semantics;
var numAttributes = attributes.length;
immediateSemantics.length = numAttributes;
for(n = 0; n < numAttributes; n += 1) {
var attribute = attributes[n];
if(typeof attribute === "string") {
attribute = this['SEMANTIC_' + attribute];
}
immediateSemantics[n] = attribute;
}
var immediateVertexBuffer = this.immediateVertexBuffer;
var oldStride = immediateVertexBuffer.strideInBytes;
var oldSize = (oldStride * immediateVertexBuffer.numVertices);
var stride = immediateVertexBuffer.setAttributes(formats);
if(stride !== oldStride) {
immediateVertexBuffer.numVertices = Math.floor(oldSize / stride);
}
var size = (stride * numVertices);
if(size > oldSize) {
immediateVertexBuffer.resize(size);
}
return immediateVertexBuffer.map(0, numVertices);
}
return null;
},
endDraw: function endDrawFn(writer) {
var immediateVertexBuffer = this.immediateVertexBuffer;
var numVerticesWritten = writer.getNumWrittenVertices();
immediateVertexBuffer.unmap(writer);
if(numVerticesWritten) {
var gl = this.gl;
var stride = immediateVertexBuffer.strideInBytes;
var offset = 0;
/*jshint bitwise: false*/
var vertexAttributes = immediateVertexBuffer.attributes;
var semantics = this.immediateSemantics;
var numSemantics = semantics.length;
var deltaAttributeMask = 0;
for(var n = 0; n < numSemantics; n += 1) {
var vertexAttribute = vertexAttributes[n];
var attribute = semantics[n];
deltaAttributeMask |= (1 << attribute);
gl.vertexAttribPointer(attribute, vertexAttribute.numComponents, vertexAttribute.format, vertexAttribute.normalized, stride, offset);
offset += vertexAttribute.stride;
}
this.attributeMask |= deltaAttributeMask;
/*jshint bitwise: true*/
this.draw(this.immediatePrimitive, numVerticesWritten, 0);
}
},
setViewport: function setViewportFn(x, y, w, h) {
var currentBox = this.state.viewportBox;
if(currentBox[0] !== x || currentBox[1] !== y || currentBox[2] !== w || currentBox[3] !== h) {
currentBox[0] = x;
currentBox[1] = y;
currentBox[2] = w;
currentBox[3] = h;
this.gl.viewport(x, y, w, h);
}
},
setScissor: function setScissorFn(x, y, w, h) {
var currentBox = this.state.scissorBox;
if(currentBox[0] !== x || currentBox[1] !== y || currentBox[2] !== w || currentBox[3] !== h) {
currentBox[0] = x;
currentBox[1] = y;
currentBox[2] = w;
currentBox[3] = h;
this.gl.scissor(x, y, w, h);
}
},
clear: function clearFn(color, depth, stencil) {
var gl = this.gl;
var state = this.state;
var clearMask = 0;
if(color) {
clearMask += gl.COLOR_BUFFER_BIT;
var currentColor = state.clearColor;
var color0 = color[0];
var color1 = color[1];
var color2 = color[2];
var color3 = color[3];
if(currentColor[0] !== color0 || currentColor[1] !== color1 || currentColor[2] !== color2 || currentColor[3] !== color3) {
currentColor[0] = color0;
currentColor[1] = color1;
currentColor[2] = color2;
currentColor[3] = color3;
gl.clearColor(color0, color1, color2, color3);
}
}
if(typeof depth === 'number') {
clearMask += gl.DEPTH_BUFFER_BIT;
if(state.clearDepth !== depth) {
state.clearDepth = depth;
gl.clearDepth(depth);
}
if(typeof stencil === 'number') {
clearMask += gl.STENCIL_BUFFER_BIT;
if(state.clearStencil !== stencil) {
state.clearStencil = stencil;
gl.clearStencil(stencil);
}
}
}
if(clearMask) {
var colorMask = state.colorMask;
var colorMaskEnabled = (colorMask[0] || colorMask[1] || colorMask[2] || colorMask[3]);
var depthMask = state.depthMask;
var program = state.program;
if(color) {
if(!colorMaskEnabled) {
// This is posibly a mistake, enable it for this call
gl.colorMask(true, true, true, true);
}
}
if(depth !== undefined) {
if(!depthMask) {
// This is posibly a mistake, enable it for this call
gl.depthMask(true);
}
}
if(program) {
gl.useProgram(null)// Work around for Mac crash bug.
;
}
gl.clear(clearMask);
if(color) {
if(!colorMaskEnabled) {
gl.colorMask(false, false, false, false);
}
}
if(depth !== undefined) {
if(!depthMask) {
gl.depthMask(false);
}
}
if(program) {
gl.useProgram(program);
}
}
},
beginFrame: function beginFrameFn() {
var gl = this.gl;
this.attributeMask = 0;
/*jshint bitwise: false*/
var clientStateMask = this.clientStateMask;
var n;
if(clientStateMask) {
for(n = 0; n < 16; n += 1) {
if(clientStateMask & (1 << n)) {
gl.disableVertexAttribArray(n);
}
}
this.clientStateMask = 0;
}
/*jshint bitwise: true*/
this.resetStates();
this.setScissor(0, 0, this.width, this.height);
this.setViewport(0, 0, this.width, this.height);
if(debug) {
this.metrics.renderTargetChanges = 0;
this.metrics.textureChanges = 0;
this.metrics.renderStateChanges = 0;
this.metrics.vertexBufferChanges = 0;
this.metrics.indexBufferChanges = 0;
this.metrics.techniqueChanges = 0;
this.metrics.drawCalls = 0;
this.metrics.primitives = 0;
}
return !(document.hidden || document['webkitHidden']);
},
beginRenderTarget: function beginRenderTargetFn(renderTarget) {
this.activeRenderTarget = renderTarget;
if(debug) {
this.metrics.renderTargetChanges += 1;
}
return renderTarget.bind();
},
endRenderTarget: function endRenderTargetFn() {
this.activeRenderTarget.unbind();
this.activeRenderTarget = null;
},
beginOcclusionQuery: function beginOcclusionQueryFn() {
return false;
},
endOcclusionQuery: function endOcclusionQueryFn() {
},
endFrame: function endFrameFn() {
var gl = this.gl;
//gl.flush();
if(this.activeTechnique) {
this.activeTechnique.deactivate();
this.activeTechnique = null;
}
if(this.activeIndexBuffer) {
this.setIndexBuffer(null);
}
var state = this.state;
if(state.program) {
state.program = null;
gl.useProgram(null);
}
this.numFrames += 1;
var currentFrameTime = TurbulenzEngine.getTime();
var diffTime = (currentFrameTime - this.previousFrameTime);
if(diffTime >= 1000.0) {
this.fps = (this.numFrames / (diffTime * 0.001));
this.numFrames = 0;
this.previousFrameTime = currentFrameTime;
}
var canvas = gl.canvas;
var width = (gl.drawingBufferWidth || canvas.width);
var height = (gl.drawingBufferHeight || canvas.height);
if(this.width !== width || this.height !== height) {
this.width = width;
this.height = height;
this.setViewport(0, 0, width, height);
this.setScissor(0, 0, width, height);
}
this.checkFullScreen();
},
createTechniqueParameters: function createTechniqueParametersFn(params) {
return TechniqueParameters.create(params);
},
createSemantics: function createSemanticsFn(attributes) {
return WebGLSemantics.create(this, attributes);
},
createVertexBuffer: function createVertexBufferFn(params) {
return WebGLVertexBuffer.create(this, params);
},
createIndexBuffer: function createIndexBufferFn(params) {
return WebGLIndexBuffer.create(this, params);
},
createTexture: function createTextureFn(params) {
return TZWebGLTexture.create(this, params);
},
createVideo: function createVideoFn(params) {
return WebGLVideo.create(params);
},
createShader: function createShaderFn(params) {
return Shader.create(this, params);
},
createTechniqueParameterBuffer: function createTechniqueParameterBufferFn(params) {
return techniqueParameterBufferCreate(params);
},
createRenderBuffer: function createRenderBufferFn(params) {
return WebGLRenderBuffer.create(this, params);
},
createRenderTarget: function createRenderTargetFn(params) {
return WebGLRenderTarget.create(this, params);
},
createOcclusionQuery: function createOcclusionQueryFn() {
/* params */ return null;
},
createDrawParameters: function createDrawParametersFn(params) {
return DrawParameters.create(params);
},
isSupported: function isSupportedFn(name) {
var gl = this.gl;
if("OCCLUSION_QUERIES" === name) {
return false;
} else if("NPOT_MIPMAPPED_TEXTURES" === name) {
return false;
} else if("TEXTURE_DXT1" === name || "TEXTURE_DXT3" === name || "TEXTURE_DXT5" === name) {
var compressedTexturesExtension = this.compressedTexturesExtension;
if(compressedTexturesExtension) {
var compressedFormats = gl.getParameter(gl.COMPRESSED_TEXTURE_FORMATS);
if(compressedFormats) {
var requestedFormat;
if("TEXTURE_DXT1" === name) {
requestedFormat = compressedTexturesExtension.COMPRESSED_RGBA_S3TC_DXT1_EXT;
} else if("TEXTURE_DXT3" === name) {
requestedFormat = compressedTexturesExtension.COMPRESSED_RGBA_S3TC_DXT3_EXT;
} else//if ("TEXTURE_DXT5" === name)
{
requestedFormat = compressedTexturesExtension.COMPRESSED_RGBA_S3TC_DXT5_EXT;
}
var numCompressedFormats = compressedFormats.length;
for(var n = 0; n < numCompressedFormats; n += 1) {
if(compressedFormats[n] === requestedFormat) {
return true;
}
}
}
}
return false;
} else if("TEXTURE_ETC1" === name) {
return false;
} else if("INDEXFORMAT_UINT" === name) {
if(gl.getExtension('OES_element_index_uint')) {
return true;
}
return false;
} else if("FILEFORMAT_WEBM" === name) {
return ("webm" in this.supportedVideoExtensions);
} else if("FILEFORMAT_MP4" === name) {
return ("mp4" in this.supportedVideoExtensions);
} else if("FILEFORMAT_JPG" === name) {
return true;
} else if("FILEFORMAT_PNG" === name) {
return true;
} else if("FILEFORMAT_DDS" === name) {
return typeof DDSLoader !== 'undefined';
} else if("FILEFORMAT_TGA" === name) {
return typeof TGALoader !== 'undefined';
}
return undefined;
},
maxSupported: function maxSupportedFn(name) {
var gl = this.gl;
if("ANISOTROPY" === name) {
return this.maxAnisotropy;
} else if("TEXTURE_SIZE" === name) {
return gl.getParameter(gl.MAX_TEXTURE_SIZE);
} else if("CUBEMAP_TEXTURE_SIZE" === name) {
return gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE);
} else if("3D_TEXTURE_SIZE" === name) {
return 0;
} else if("RENDERTARGET_COLOR_TEXTURES" === name) {
return 1;
} else if("RENDERBUFFER_SIZE" === name) {
return gl.getParameter(gl.MAX_RENDERBUFFER_SIZE);
}
return 0;
},
loadTexturesArchive: function loadTexturesArchiveFn(params) {
var src = params.src;
if(typeof TARLoader !== 'undefined') {
TARLoader.create({
gd: this,
src: src,
mipmaps: params.mipmaps,
ontextureload: function tarTextureLoadedFn(texture) {
params.ontextureload(texture);
},
onload: function tarLoadedFn(success, status) {
if(params.onload) {
params.onload(true, status);
}
},
onerror: function tarFailedFn() {
if(params.onload) {
params.onload(false, status);
}
}
});
return true;
} else {
(TurbulenzEngine).callOnError('Missing archive loader required for ' + src);
return false;
}
},
getScreenshot: function getScreenshotFn(compress, x, y, width, height) {
var gl = this.gl;
var canvas = gl.canvas;
if(compress) {
return canvas.toDataURL('image/jpeg');
} else {
if(x === undefined) {
x = 0;
}
if(y === undefined) {
y = 0;
}
var target = this.activeRenderTarget;
if(!target) {
target = canvas;
}
if(width === undefined) {
width = target.width;
}
if(height === undefined) {
height = target.height;
}
var pixels = new Uint8Array(4 * width * height);
gl.readPixels(x, y, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
return pixels;
}
},
flush: function flush() {
this.gl.flush();
},
finish: function finish() {
this.gl.finish();
},
checkFullScreen: // private
function checkFullScreenFn() {
var fullscreen = this.fullscreen;
if(this.oldFullscreen !== fullscreen) {
this.oldFullscreen = fullscreen;
this.requestFullScreen(fullscreen);
}
},
requestFullScreen: function requestFullScreenFn(fullscreen) {
if(fullscreen) {
var canvas = this.gl.canvas;
if(canvas.webkitRequestFullScreenWithKeys) {
canvas.webkitRequestFullScreenWithKeys();
} else if(canvas.requestFullScreenWithKeys) {
canvas.requestFullScreenWithKeys();
} else if(canvas.webkitRequestFullScreen) {
canvas.webkitRequestFullScreen(canvas.ALLOW_KEYBOARD_INPUT);
} else if(canvas.mozRequestFullScreen) {
canvas.mozRequestFullScreen();
} else if(canvas.requestFullScreen) {
canvas.requestFullScreen();
} else if(canvas.requestFullscreen) {
canvas.requestFullscreen();
}
} else {
if(document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
} else if(document.cancelFullScreen) {
document.cancelFullScreen();
} else if(document.exitFullscreen) {
document.exitFullscreen();
}
}
},
createSampler: function createSamplerFn(sampler) {
var samplerKey = sampler.minFilter.toString() + ':' + sampler.magFilter.toString() + ':' + sampler.wrapS.toString() + ':' + sampler.wrapT.toString() + ':' + sampler.wrapR.toString() + ':' + sampler.maxAnisotropy.toString();
var cachedSamplers = this.cachedSamplers;
var cachedSampler = cachedSamplers[samplerKey];
if(!cachedSampler) {
cachedSamplers[samplerKey] = sampler;
return sampler;
}
return cachedSampler;
},
unsetIndexBuffer: function unsetIndexBufferFn(indexBuffer) {
if(this.activeIndexBuffer === indexBuffer) {
this.activeIndexBuffer = null;
var gl = this.gl;
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
}
},
bindVertexBuffer: function bindVertexBufferFn(buffer) {
if(this.bindedVertexBuffer !== buffer) {
this.bindedVertexBuffer = buffer;
var gl = this.gl;
gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
if(debug) {
this.metrics.vertexBufferChanges += 1;
}
}
},
unbindVertexBuffer: function unbindVertexBufferFn(buffer) {
if(this.bindedVertexBuffer === buffer) {
this.bindedVertexBuffer = null;
var gl = this.gl;
gl.bindBuffer(gl.ARRAY_BUFFER, null);
}
},
bindTextureUnit: function bindTextureUnitFn(unit, target, texture) {
var state = this.state;
var gl = this.gl;
if(state.activeTextureUnit !== unit) {
state.activeTextureUnit = unit;
gl.activeTexture(gl.TEXTURE0 + unit);
}
gl.bindTexture(target, texture);
},
bindTexture: function bindTextureFn(target, texture) {
var state = this.state;
var gl = this.gl;
var dummyUnit = (state.maxTextureUnit - 1);
if(state.activeTextureUnit !== dummyUnit) {
state.activeTextureUnit = dummyUnit;
gl.activeTexture(gl.TEXTURE0 + dummyUnit);
}
gl.bindTexture(target, texture);
},
unbindTexture: function unbindTextureFn(texture) {
var state = this.state;
var lastMaxTextureUnit = state.lastMaxTextureUnit;
var textureUnits = state.textureUnits;
for(var u = 0; u < lastMaxTextureUnit; u += 1) {
var textureUnit = textureUnits[u];
if(textureUnit.texture === texture) {
textureUnit.texture = null;
this.bindTextureUnit(u, textureUnit.target, null);
}
}
},
setSampler: function setSamplerFn(sampler, target) {
if(sampler) {
var gl = this.gl;
gl.texParameteri(target, gl.TEXTURE_MIN_FILTER, sampler.minFilter);
gl.texParameteri(target, gl.TEXTURE_MAG_FILTER, sampler.magFilter);
gl.texParameteri(target, gl.TEXTURE_WRAP_S, sampler.wrapS);
gl.texParameteri(target, gl.TEXTURE_WRAP_T, sampler.wrapT);
/*
if (sSupports3DTextures)
{
gl.texParameteri(target, gl.TEXTURE_WRAP_R, sampler.wrapR);
}
*/
if(this.TEXTURE_MAX_ANISOTROPY_EXT) {
gl.texParameteri(target, this.TEXTURE_MAX_ANISOTROPY_EXT, sampler.maxAnisotropy);
}
}
},
setPass: function setPassFn(pass) {
var gl = this.gl;
var state = this.state;
// Set renderstates
var renderStatesSet = pass.statesSet;
var renderStates = pass.states;
var numRenderStates = renderStates.length;
var r, renderState;
for(r = 0; r < numRenderStates; r += 1) {
renderState = renderStates[r];
renderState.set.apply(renderState, renderState.values);
}
// Reset previous renderstates
var renderStatesToReset = state.renderStatesToReset;
var numRenderStatesToReset = renderStatesToReset.length;
for(r = 0; r < numRenderStatesToReset; r += 1) {
renderState = renderStatesToReset[r];
if(!(renderState.name in renderStatesSet)) {
renderState.reset();
}
}
// Copy set renderstates to be reset later
renderStatesToReset.length = numRenderStates;
for(r = 0; r < numRenderStates; r += 1) {
renderStatesToReset[r] = renderStates[r];
}
// Reset texture units
var lastMaxTextureUnit = state.lastMaxTextureUnit;
var textureUnits = state.textureUnits;
var currentMaxTextureUnit = pass.numTextureUnits;
if(currentMaxTextureUnit < lastMaxTextureUnit) {
var u = currentMaxTextureUnit;
do {
var textureUnit = textureUnits[u];
if(textureUnit.texture) {
textureUnit.texture = null;
this.bindTextureUnit(u, textureUnit.target, null);
}
u += 1;
}while(u < lastMaxTextureUnit);
}
state.lastMaxTextureUnit = currentMaxTextureUnit;
var program = pass.glProgram;
if(state.program !== program) {
state.program = program;
gl.useProgram(program);
}
if(pass.dirty) {
pass.updateParametersData(this);
}
},
enableClientState: function enableClientStateFn(mask) {
var gl = this.gl;
var oldMask = this.clientStateMask;
this.clientStateMask = mask;
/*jshint bitwise: false*/
var disableMask = (oldMask & (~mask));
var enableMask = ((~oldMask) & mask);
var n;
if(disableMask) {
if((disableMask & 0xff) === 0) {
disableMask >>= 8;
n = 8;
} else {
n = 0;
}
do {
if(0 !== (0x01 & disableMask)) {
gl.disableVertexAttribArray(n);
}
n += 1;
disableMask >>= 1;
}while(disableMask);
}
if(enableMask) {
if((enableMask & 0xff) === 0) {
enableMask >>= 8;
n = 8;
} else {
n = 0;
}
do {
if(0 !== (0x01 & enableMask)) {
gl.enableVertexAttribArray(n);
}
n += 1;
enableMask >>= 1;
}while(enableMask);
}
/*jshint bitwise: true*/
},
setTexture: function setTextureFn(textureUnitIndex, texture, sampler) {
var state = this.state;
var gl = this.gl;
var textureUnit = state.textureUnits[textureUnitIndex];
var oldgltarget = textureUnit.target;
var oldglobject = textureUnit.texture;
if(texture) {
var gltarget = texture.target;
var globject = texture.glTexture;
if(oldglobject !== globject || oldgltarget !== gltarget) {
textureUnit.target = gltarget;
textureUnit.texture = globject;
if(state.activeTextureUnit !== textureUnitIndex) {
state.activeTextureUnit = textureUnitIndex;
gl.activeTexture(gl.TEXTURE0 + textureUnitIndex);
}
if(oldgltarget !== gltarget && oldglobject) {
gl.bindTexture(oldgltarget, null);
}
gl.bindTexture(gltarget, globject);
if(texture.sampler !== sampler) {
texture.sampler = sampler;
this.setSampler(sampler, gltarget);
}
if(debug) {
this.metrics.textureChanges += 1;
}
}
} else {
if(oldgltarget && oldglobject) {
textureUnit.target = 0;
textureUnit.texture = null;
if(state.activeTextureUnit !== textureUnitIndex) {
state.activeTextureUnit = textureUnitIndex;
gl.activeTexture(gl.TEXTURE0 + textureUnitIndex);
}
gl.bindTexture(oldgltarget, null);
}
}
},
setProgram: function setProgramFn(program) {
var state = this.state;
if(state.program !== program) {
state.program = program;
this.gl.useProgram(program);
}
},
syncState: function syncStateFn() {
var state = this.state;
var gl = this.gl;
if(state.depthTestEnable) {
gl.enable(gl.DEPTH_TEST);
} else {
gl.disable(gl.DEPTH_TEST);
}
gl.depthFunc(state.depthFunc);
gl.depthMask(state.depthMask);
if(state.blendEnable) {
gl.enable(gl.BLEND);
} else {
gl.disable(gl.BLEND);
}
gl.blendFunc(state.blendSrc, state.blendDst);
if(state.cullFaceEnable) {
gl.enable(gl.CULL_FACE);
} else {
gl.disable(gl.CULL_FACE);
}
gl.cullFace(state.cullFace);
gl.frontFace(state.frontFace);
var colorMask = state.colorMask;
gl.colorMask(colorMask[0], colorMask[1], colorMask[2], colorMask[3]);
if(state.stencilTestEnable) {
gl.enable(gl.STENCIL_TEST);
} else {
gl.disable(gl.STENCIL_TEST);
}
gl.stencilFunc(state.stencilFunc, state.stencilRef, state.stencilMask);
gl.stencilOp(state.stencilFail, state.stencilZFail, state.stencilZPass);
if(state.polygonOffsetFillEnable) {
gl.enable(gl.POLYGON_OFFSET_FILL);
} else {
gl.disable(gl.POLYGON_OFFSET_FILL);
}
gl.polygonOffset(state.polygonOffsetFactor, state.polygonOffsetUnits);
gl.lineWidth(state.lineWidth);
gl.activeTexture(gl.TEXTURE0 + state.activeTextureUnit);
var currentBox = this.state.viewportBox;
gl.viewport(currentBox[0], currentBox[1], currentBox[2], currentBox[3]);
currentBox = this.state.scissorBox;
gl.scissor(currentBox[0], currentBox[1], currentBox[2], currentBox[3]);
var currentColor = state.clearColor;
gl.clearColor(currentColor[0], currentColor[1], currentColor[2], currentColor[3]);
gl.clearDepth(state.clearDepth);
gl.clearStencil(state.clearStencil);
},
resetStates: function resetStatesFn() {
var state = this.state;
var lastMaxTextureUnit = state.lastMaxTextureUnit;
var textureUnits = state.textureUnits;
for(var u = 0; u < lastMaxTextureUnit; u += 1) {
var textureUnit = textureUnits[u];
if(textureUnit.texture) {
this.bindTextureUnit(u, textureUnit.target, null);
textureUnit.texture = null;
textureUnit.target = 0;
}
}
},
destroy: function graphicsDeviceDestroyFn() {
delete this.activeTechnique;
delete this.activeIndexBuffer;
delete this.bindedVertexBuffer;
if(this.immediateVertexBuffer) {
this.immediateVertexBuffer.destroy();
delete this.immediateVertexBuffer;
}
delete this.gl;
}
};
// Constructor function
WebGLGraphicsDevice.create = function webGLGraphicsDeviceCreateFn(canvas, params) {
var getAvailableContext = function getAvailableContextFn(canvas, params, contextList) {
if(canvas.getContext) {
var canvasParams = {
alpha: false,
stencil: true,
antialias: false
};
var multisample = params.multisample;
if(multisample !== undefined && 1 < multisample) {
canvasParams.antialias = true;
}
var numContexts = contextList.length, i;
for(i = 0; i < numContexts; i += 1) {
try {
var context = canvas.getContext(contextList[i], canvasParams);
if(context) {
return context;
}
} catch (ex) {
}
}
}
return null;
};
// TODO: Test if we can also use "webkit-3d" and "moz-webgl"
var gl = getAvailableContext(canvas, params, [
'webgl',
'experimental-webgl'
]);
if(!gl) {
return null;
}
var width = (gl.drawingBufferWidth || canvas.width);
var height = (gl.drawingBufferHeight || canvas.height);
gl.enable(gl.SCISSOR_TEST);
gl.depthRange(0.0, 1.0);
gl.pixelStorei(gl.UNPACK_ALIGNMENT, 1);
//gl.hint(gl.GENERATE_MIPMAP_HINT, gl.NICEST);
var gd = new WebGLGraphicsDevice();
gd.gl = gl;
gd.width = width;
gd.height = height;
var extensions = gl.getSupportedExtensions();
if(extensions) {
extensions = extensions.join(' ');
} else {
extensions = '';
}
gd.extensions = extensions;
gd.shadingLanguageVersion = gl.getParameter(gl.SHADING_LANGUAGE_VERSION);
gd.rendererVersion = gl.getParameter(gl.VERSION);
gd.renderer = gl.getParameter(gl.RENDERER);
gd.vendor = gl.getParameter(gl.VENDOR);
if(extensions.indexOf('WEBGL_compressed_texture_s3tc') !== -1) {
gd.WEBGL_compressed_texture_s3tc = true;
if(extensions.indexOf('WEBKIT_WEBGL_compressed_texture_s3tc') !== -1) {
gd.compressedTexturesExtension = gl.getExtension('WEBKIT_WEBGL_compressed_texture_s3tc');
} else if(extensions.indexOf('MOZ_WEBGL_compressed_texture_s3tc') !== -1) {
gd.compressedTexturesExtension = gl.getExtension('MOZ_WEBGL_compressed_texture_s3tc');
} else {
gd.compressedTexturesExtension = gl.getExtension('WEBGL_compressed_texture_s3tc');
}
} else if(extensions.indexOf('WEBKIT_WEBGL_compressed_textures') !== -1) {
gd.compressedTexturesExtension = gl.getExtension('WEBKIT_WEBGL_compressed_textures');
}
var anisotropyExtension;
if(extensions.indexOf('EXT_texture_filter_anisotropic') !== -1) {
if(extensions.indexOf('MOZ_EXT_texture_filter_anisotropic') !== -1) {
anisotropyExtension = gl.getExtension('MOZ_EXT_texture_filter_anisotropic');
} else if(extensions.indexOf('WEBKIT_EXT_texture_filter_anisotropic') !== -1) {
anisotropyExtension = gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic');
} else {
anisotropyExtension = gl.getExtension('EXT_texture_filter_anisotropic');
}
}
if(anisotropyExtension) {
gd.TEXTURE_MAX_ANISOTROPY_EXT = anisotropyExtension.TEXTURE_MAX_ANISOTROPY_EXT;
gd.maxAnisotropy = gl.getParameter(anisotropyExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT);
} else {
gd.maxAnisotropy = 1;
}
// Enable OES_element_index_uint extension
gl.getExtension('OES_element_index_uint');
gd.PRIMITIVE_POINTS = gl.POINTS;
gd.PRIMITIVE_LINES = gl.LINES;
gd.PRIMITIVE_LINE_LOOP = gl.LINE_LOOP;
gd.PRIMITIVE_LINE_STRIP = gl.LINE_STRIP;
gd.PRIMITIVE_TRIANGLES = gl.TRIANGLES;
gd.PRIMITIVE_TRIANGLE_STRIP = gl.TRIANGLE_STRIP;
gd.PRIMITIVE_TRIANGLE_FAN = gl.TRIANGLE_FAN;
gd.INDEXFORMAT_UBYTE = gl.UNSIGNED_BYTE;
gd.INDEXFORMAT_USHORT = gl.UNSIGNED_SHORT;
gd.INDEXFORMAT_UINT = gl.UNSIGNED_INT;
var getNormalizationScale = function getNormalizationScaleFn(format) {
if(format === gl.BYTE) {
return 0x7f;
} else if(format === gl.UNSIGNED_BYTE) {
return 0xff;
} else if(format === gl.SHORT) {
return 0x7fff;
} else if(format === gl.UNSIGNED_SHORT) {
return 0xffff;
} else if(format === gl.INT) {
return 0x7fffffff;
} else if(format === gl.UNSIGNED_INT) {
return 0xffffffff;
} else//if (format === gl.FLOAT)
{
return 1;
}
};
var makeVertexformat = function makeVertexformatFn(n, c, s, f, name) {
var attributeFormat = {
numComponents: c,
stride: s,
componentStride: (s / c),
format: f,
name: name,
normalized: undefined,
normalizationScale: undefined,
typedSetter: undefined,
typedArray: undefined
};
if(n) {
attributeFormat.normalized = true;
attributeFormat.normalizationScale = getNormalizationScale(f);
} else {
attributeFormat.normalized = false;
attributeFormat.normalizationScale = 1;
}
if(typeof DataView !== 'undefined' && 'setFloat32' in DataView.prototype) {
if(f === gl.BYTE) {
attributeFormat.typedSetter = DataView.prototype.setInt8;
} else if(f === gl.UNSIGNED_BYTE) {
attributeFormat.typedSetter = DataView.prototype.setUint8;
} else if(f === gl.SHORT) {
attributeFormat.typedSetter = DataView.prototype.setInt16;
} else if(f === gl.UNSIGNED_SHORT) {
attributeFormat.typedSetter = DataView.prototype.setUint16;
} else if(f === gl.INT) {
attributeFormat.typedSetter = DataView.prototype.setInt32;
} else if(f === gl.UNSIGNED_INT) {
attributeFormat.typedSetter = DataView.prototype.setUint32;
} else//if (f === gl.FLOAT)
{
attributeFormat.typedSetter = DataView.prototype.setFloat32;
}
} else {
if(f === gl.BYTE) {
attributeFormat.typedArray = Int8Array;
} else if(f === gl.UNSIGNED_BYTE) {
attributeFormat.typedArray = Uint8Array;
} else if(f === gl.SHORT) {
attributeFormat.typedArray = Int16Array;
} else if(f === gl.UNSIGNED_SHORT) {
attributeFormat.typedArray = Uint16Array;
} else if(f === gl.INT) {
attributeFormat.typedArray = Int32Array;
} else if(f === gl.UNSIGNED_INT) {
attributeFormat.typedArray = Uint32Array;
} else//if (f === gl.FLOAT)
{
attributeFormat.typedArray = Float32Array;
}
}
return attributeFormat;
};
gd.VERTEXFORMAT_BYTE4 = makeVertexformat(0, 4, 4, gl.BYTE, 'BYTE4');
gd.VERTEXFORMAT_BYTE4N = makeVertexformat(1, 4, 4, gl.BYTE, 'BYTE4N');
gd.VERTEXFORMAT_UBYTE4 = makeVertexformat(0, 4, 4, gl.UNSIGNED_BYTE, 'UBYTE4');
gd.VERTEXFORMAT_UBYTE4N = makeVertexformat(1, 4, 4, gl.UNSIGNED_BYTE, 'UBYTE4N');
gd.VERTEXFORMAT_SHORT2 = makeVertexformat(0, 2, 4, gl.SHORT, 'SHORT2');
gd.VERTEXFORMAT_SHORT2N = makeVertexformat(1, 2, 4, gl.SHORT, 'SHORT2N');
gd.VERTEXFORMAT_SHORT4 = makeVertexformat(0, 4, 8, gl.SHORT, 'SHORT4');
gd.VERTEXFORMAT_SHORT4N = makeVertexformat(1, 4, 8, gl.SHORT, 'SHORT4N');
gd.VERTEXFORMAT_USHORT2 = makeVertexformat(0, 2, 4, gl.UNSIGNED_SHORT, 'USHORT2');
gd.VERTEXFORMAT_USHORT2N = makeVertexformat(1, 2, 4, gl.UNSIGNED_SHORT, 'USHORT2N');
gd.VERTEXFORMAT_USHORT4 = makeVertexformat(0, 4, 8, gl.UNSIGNED_SHORT, 'USHORT4');
gd.VERTEXFORMAT_USHORT4N = makeVertexformat(1, 4, 8, gl.UNSIGNED_SHORT, 'USHORT4N');
gd.VERTEXFORMAT_FLOAT1 = makeVertexformat(0, 1, 4, gl.FLOAT, 'FLOAT1');
gd.VERTEXFORMAT_FLOAT2 = makeVertexformat(0, 2, 8, gl.FLOAT, 'FLOAT2');
gd.VERTEXFORMAT_FLOAT3 = makeVertexformat(0, 3, 12, gl.FLOAT, 'FLOAT3');
gd.VERTEXFORMAT_FLOAT4 = makeVertexformat(0, 4, 16, gl.FLOAT, 'FLOAT4');
gd.DEFAULT_SAMPLER = {
minFilter: gl.LINEAR_MIPMAP_LINEAR,
magFilter: gl.LINEAR,
wrapS: gl.REPEAT,
wrapT: gl.REPEAT,
wrapR: gl.REPEAT,
maxAnisotropy: 1
};
gd.cachedSamplers = {
};
var maxTextureUnit = 1;
var maxUnit = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);
if(maxTextureUnit < maxUnit) {
maxTextureUnit = maxUnit;
}
maxUnit = gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
if(maxTextureUnit < maxUnit) {
maxTextureUnit = maxUnit;
}
var textureUnits = [];
textureUnits.length = maxTextureUnit;
for(var t = 0; t < maxTextureUnit; t += 1) {
textureUnits[t] = {
texture: null,
target: 0
};
}
var defaultDepthFunc = gl.LEQUAL;
var defaultBlendFuncSrc = gl.SRC_ALPHA;
var defaultBlendFuncDst = gl.ONE_MINUS_SRC_ALPHA;
var defaultCullFace = gl.BACK;
var defaultFrontFace = gl.CCW;
var defaultStencilFunc = gl.ALWAYS;
var defaultStencilOp = gl.KEEP;
var currentState = {
depthTestEnable: true,
blendEnable: false,
cullFaceEnable: true,
stencilTestEnable: false,
polygonOffsetFillEnable: false,
depthMask: true,
depthFunc: defaultDepthFunc,
blendSrc: defaultBlendFuncSrc,
blendDst: defaultBlendFuncDst,
cullFace: defaultCullFace,
frontFace: defaultFrontFace,
colorMask: [
true,
true,
true,
true
],
stencilFunc: defaultStencilFunc,
stencilRef: 0,
stencilMask: 0xffffffff,
stencilFail: defaultStencilOp,
stencilZFail: defaultStencilOp,
stencilZPass: defaultStencilOp,
polygonOffsetFactor: 0,
polygonOffsetUnits: 0,
lineWidth: 1,
renderStatesToReset: [],
viewportBox: [
0,
0,
width,
height
],
scissorBox: [
0,
0,
width,
height
],
clearColor: [
0,
0,
0,
1
],
clearDepth: 1.0,
clearStencil: 0,
activeTextureUnit: 0,
maxTextureUnit: maxTextureUnit,
lastMaxTextureUnit: 0,
textureUnits: textureUnits,
program: null
};
gd.state = currentState;
if(debug) {
gd.metrics = {
renderTargetChanges: 0,
textureChanges: 0,
renderStateChanges: 0,
vertexBufferChanges: 0,
indexBufferChanges: 0,
techniqueChanges: 0,
drawCalls: 0,
primitives: 0,
addPrimitives: function addPrimitivesFn(primitive, count) {
this.drawCalls += 1;
switch(primitive) {
case 0x0000:
//POINTS
this.primitives += count;
break;
case 0x0001:
//LINES
this.primitives += (count >> 1);
break;
case 0x0002:
//LINE_LOOP
this.primitives += count;
break;
case 0x0003:
//LINE_STRIP
this.primitives += count - 1;
break;
case 0x0004:
//TRIANGLES
this.primitives += (count / 3) | 0;
break;
case 0x0005:
//TRIANGLE_STRIP
this.primitives += count - 2;
break;
case 0x0006:
//TRIANGLE_FAN
this.primitives += count - 2;
break;
}
}
};
}
// State handlers
function setDepthTestEnable(enable) {
if(currentState.depthTestEnable !== enable) {
currentState.depthTestEnable = enable;
if(enable) {
gl.enable(gl.DEPTH_TEST);
} else {
gl.disable(gl.DEPTH_TEST);
}
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function setDepthFunc(func) {
if(currentState.depthFunc !== func) {
currentState.depthFunc = func;
gl.depthFunc(func);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function setDepthMask(enable) {
if(currentState.depthMask !== enable) {
currentState.depthMask = enable;
gl.depthMask(enable);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function setBlendEnable(enable) {
if(currentState.blendEnable !== enable) {
currentState.blendEnable = enable;
if(enable) {
gl.enable(gl.BLEND);
} else {
gl.disable(gl.BLEND);
}
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function setBlendFunc(src, dst) {
if(currentState.blendSrc !== src || currentState.blendDst !== dst) {
currentState.blendSrc = src;
currentState.blendDst = dst;
gl.blendFunc(src, dst);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function setCullFaceEnable(enable) {
if(currentState.cullFaceEnable !== enable) {
currentState.cullFaceEnable = enable;
if(enable) {
gl.enable(gl.CULL_FACE);
} else {
gl.disable(gl.CULL_FACE);
}
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function setCullFace(face) {
if(currentState.cullFace !== face) {
currentState.cullFace = face;
gl.cullFace(face);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function setFrontFace(face) {
if(currentState.frontFace !== face) {
currentState.frontFace = face;
gl.frontFace(face);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function setColorMask(mask0, mask1, mask2, mask3) {
var colorMask = currentState.colorMask;
if(colorMask[0] !== mask0 || colorMask[1] !== mask1 || colorMask[2] !== mask2 || colorMask[3] !== mask3) {
colorMask[0] = mask0;
colorMask[1] = mask1;
colorMask[2] = mask2;
colorMask[3] = mask3;
gl.colorMask(mask0, mask1, mask2, mask3);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function setStencilTestEnable(enable) {
if(currentState.stencilTestEnable !== enable) {
currentState.stencilTestEnable = enable;
if(enable) {
gl.enable(gl.STENCIL_TEST);
} else {
gl.disable(gl.STENCIL_TEST);
}
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function setStencilFunc(stencilFunc, stencilRef, stencilMask) {
if(currentState.stencilFunc !== stencilFunc || currentState.stencilRef !== stencilRef || currentState.stencilMask !== stencilMask) {
currentState.stencilFunc = stencilFunc;
currentState.stencilRef = stencilRef;
currentState.stencilMask = stencilMask;
gl.stencilFunc(stencilFunc, stencilRef, stencilMask);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function setStencilOp(stencilFail, stencilZfail, stencilZpass) {
if(currentState.stencilFail !== stencilFail || currentState.stencilZFail !== stencilZfail || currentState.stencilZPass !== stencilZpass) {
currentState.stencilFail = stencilFail;
currentState.stencilZFail = stencilZfail;
currentState.stencilZPass = stencilZpass;
gl.stencilOp(stencilFail, stencilZfail, stencilZpass);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function setPolygonOffsetFillEnable(enable) {
if(currentState.polygonOffsetFillEnable !== enable) {
currentState.polygonOffsetFillEnable = enable;
if(enable) {
gl.enable(gl.POLYGON_OFFSET_FILL);
} else {
gl.disable(gl.POLYGON_OFFSET_FILL);
}
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function setPolygonOffset(factor, units) {
if(currentState.polygonOffsetFactor !== factor || currentState.polygonOffsetUnits !== units) {
currentState.polygonOffsetFactor = factor;
currentState.polygonOffsetUnits = units;
gl.polygonOffset(factor, units);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function setLineWidth(lineWidth) {
if(currentState.lineWidth !== lineWidth) {
currentState.lineWidth = lineWidth;
gl.lineWidth(lineWidth);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function resetDepthTestEnable() {
//setDepthTestEnable(true);
if(!currentState.depthTestEnable) {
currentState.depthTestEnable = true;
gl.enable(gl.DEPTH_TEST);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function resetDepthFunc() {
//setDepthFunc(defaultDepthFunc);
var func = defaultDepthFunc;
if(currentState.depthFunc !== func) {
currentState.depthFunc = func;
gl.depthFunc(func);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function resetDepthMask() {
//setDepthMask(true);
if(!currentState.depthMask) {
currentState.depthMask = true;
gl.depthMask(true);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function resetBlendEnable() {
//setBlendEnable(false);
if(currentState.blendEnable) {
currentState.blendEnable = false;
gl.disable(gl.BLEND);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function resetBlendFunc() {
//setBlendFunc(defaultBlendFuncSrc, defaultBlendFuncDst);
var src = defaultBlendFuncSrc;
var dst = defaultBlendFuncDst;
if(currentState.blendSrc !== src || currentState.blendDst !== dst) {
currentState.blendSrc = src;
currentState.blendDst = dst;
gl.blendFunc(src, dst);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function resetCullFaceEnable() {
//setCullFaceEnable(true);
if(!currentState.cullFaceEnable) {
currentState.cullFaceEnable = true;
gl.enable(gl.CULL_FACE);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function resetCullFace() {
//setCullFace(defaultCullFace);
var face = defaultCullFace;
if(currentState.cullFace !== face) {
currentState.cullFace = face;
gl.cullFace(face);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function resetFrontFace() {
//setFrontFace(defaultFrontFace);
var face = defaultFrontFace;
if(currentState.frontFace !== face) {
currentState.frontFace = face;
gl.frontFace(face);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function resetColorMask() {
//setColorMask(true, true, true, true);
var colorMask = currentState.colorMask;
if(colorMask[0] !== true || colorMask[1] !== true || colorMask[2] !== true || colorMask[3] !== true) {
colorMask[0] = true;
colorMask[1] = true;
colorMask[2] = true;
colorMask[3] = true;
gl.colorMask(true, true, true, true);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function resetStencilTestEnable() {
//setStencilTestEnable(false);
if(currentState.stencilTestEnable) {
currentState.stencilTestEnable = false;
gl.disable(gl.STENCIL_TEST);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function resetStencilFunc() {
//setStencilFunc(defaultStencilFunc, 0, 0xffffffff);
var stencilFunc = defaultStencilFunc;
if(currentState.stencilFunc !== stencilFunc || currentState.stencilRef !== 0 || currentState.stencilMask !== 0xffffffff) {
currentState.stencilFunc = stencilFunc;
currentState.stencilRef = 0;
currentState.stencilMask = 0xffffffff;
gl.stencilFunc(stencilFunc, 0, 0xffffffff);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function resetStencilOp() {
//setStencilOp(defaultStencilOp, defaultStencilOp, defaultStencilOp);
var stencilOp = defaultStencilOp;
if(currentState.stencilFail !== stencilOp || currentState.stencilZFail !== stencilOp || currentState.stencilZPass !== stencilOp) {
currentState.stencilFail = stencilOp;
currentState.stencilZFail = stencilOp;
currentState.stencilZPass = stencilOp;
gl.stencilOp(stencilOp, stencilOp, stencilOp);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function resetPolygonOffsetFillEnable() {
//setPolygonOffsetFillEnable(false);
if(currentState.polygonOffsetFillEnable) {
currentState.polygonOffsetFillEnable = false;
gl.disable(gl.POLYGON_OFFSET_FILL);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function resetPolygonOffset() {
//setPolygonOffset(0, 0);
if(currentState.polygonOffsetFactor !== 0 || currentState.polygonOffsetUnits !== 0) {
currentState.polygonOffsetFactor = 0;
currentState.polygonOffsetUnits = 0;
gl.polygonOffset(0, 0);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function resetLineWidth() {
//setLineWidth(1);
if(currentState.lineWidth !== 1) {
currentState.lineWidth = 1;
gl.lineWidth(1);
if(debug) {
gd.metrics.renderStateChanges += 1;
}
}
}
function parseBoolean(state) {
if(typeof state !== 'boolean') {
return [
(state ? true : false)
];
}
return [
state
];
}
function parseEnum(state) {
if(typeof state !== 'number') {
// TODO
return null;
}
return [
state
];
}
function parseEnum2(state) {
if(typeof state === 'object') {
var value0 = state[0], value1 = state[1];
if(typeof value0 !== 'number') {
// TODO
return null;
}
if(typeof value1 !== 'number') {
// TODO
return null;
}
return [
value0,
value1
];
}
return null;
}
function parseEnum3(state) {
if(typeof state === 'object') {
var value0 = state[0], value1 = state[1], value2 = state[2];
if(typeof value0 !== 'number') {
// TODO
return null;
}
if(typeof value1 !== 'number') {
// TODO
return null;
}
if(typeof value2 !== 'number') {
// TODO
return null;
}
return [
value0,
value1,
value2
];
}
return null;
}
function parseFloat(state) {
if(typeof state !== 'number') {
// TODO
return null;
}
return [
state
];
}
function parseFloat2(state) {
if(typeof state === 'object') {
var value0 = state[0], value1 = state[1];
if(typeof value0 !== 'number') {
// TODO
return null;
}
if(typeof value1 !== 'number') {
// TODO
return null;
}
return [
value0,
value1
];
}
return null;
}
function parseColorMask(state) {
if(typeof state === 'object') {
var value0 = state[0], value1 = state[1], value2 = state[2], value3 = state[3];
if(typeof value0 !== 'number') {
// TODO
return null;
}
if(typeof value1 !== 'number') {
// TODO
return null;
}
if(typeof value2 !== 'number') {
// TODO
return null;
}
if(typeof value3 !== 'number') {
// TODO
return null;
}
return [
value0,
value1,
value2,
value3
];
}
return null;
}
var stateHandlers = {
};
var addStateHandler = function addStateHandlerFn(name, sf, rf, pf, dv) {
stateHandlers[name] = {
set: sf,
reset: rf,
parse: pf,
defaultValues: dv
};
};
addStateHandler("DepthTestEnable", setDepthTestEnable, resetDepthTestEnable, parseBoolean, [
true
]);
addStateHandler("DepthFunc", setDepthFunc, resetDepthFunc, parseEnum, [
defaultDepthFunc
]);
addStateHandler("DepthMask", setDepthMask, resetDepthMask, parseBoolean, [
true
]);
addStateHandler("BlendEnable", setBlendEnable, resetBlendEnable, parseBoolean, [
false
]);
addStateHandler("BlendFunc", setBlendFunc, resetBlendFunc, parseEnum2, [
defaultBlendFuncSrc,
defaultBlendFuncDst
]);
addStateHandler("CullFaceEnable", setCullFaceEnable, resetCullFaceEnable, parseBoolean, [
true
]);
addStateHandler("CullFace", setCullFace, resetCullFace, parseEnum, [
defaultCullFace
]);
addStateHandler("FrontFace", setFrontFace, resetFrontFace, parseEnum, [
defaultFrontFace
]);
addStateHandler("ColorMask", setColorMask, resetColorMask, parseColorMask, [
true,
true,
true,
true
]);
addStateHandler("StencilTestEnable", setStencilTestEnable, resetStencilTestEnable, parseBoolean, [
false
]);
addStateHandler("StencilFunc", setStencilFunc, resetStencilFunc, parseEnum3, [
defaultStencilFunc,
0,
0xffffffff
]);
addStateHandler("StencilOp", setStencilOp, resetStencilOp, parseEnum3, [
defaultStencilOp,
defaultStencilOp,
defaultStencilOp
]);
addStateHandler("PolygonOffsetFillEnable", setPolygonOffsetFillEnable, resetPolygonOffsetFillEnable, parseBoolean, [
false
]);
addStateHandler("PolygonOffset", setPolygonOffset, resetPolygonOffset, parseFloat2, [
0,
0
]);
addStateHandler("LineWidth", setLineWidth, resetLineWidth, parseFloat, [
1
]);
gd.stateHandlers = stateHandlers;
gd.syncState();
gd.videoRam = 0;
gd.desktopWidth = window.screen.width;
gd.desktopHeight = window.screen.height;
if(Object.defineProperty) {
Object.defineProperty(gd, "fullscreen", {
get: function getFullscreenFn() {
return (document.fullscreenEnabled || document.mozFullScreen || document.webkitIsFullScreen || false);
},
set: function setFullscreenFn(newFullscreen) {
gd.requestFullScreen(newFullscreen);
},
enumerable: true,
configurable: false
});
gd.checkFullScreen = function dummyCheckFullScreenFn() {
};
} else {
gd.fullscreen = false;
gd.oldFullscreen = false;
}
gd.clientStateMask = 0;
gd.attributeMask = 0;
gd.activeTechnique = null;
gd.activeIndexBuffer = null;
gd.bindedVertexBuffer = null;
gd.activeRenderTarget = null;
gd.immediateVertexBuffer = gd.createVertexBuffer({
numVertices: (256 * 1024 / 16),
attributes: [
'FLOAT4'
],
dynamic: true,
'transient': true
});
gd.immediatePrimitive = -1;
gd.immediateSemantics = WebGLSemantics.create(this, []);
gd.fps = 0;
gd.numFrames = 0;
gd.previousFrameTime = TurbulenzEngine.getTime();
// Need a temporary elements to test capabilities
var video = document.createElement('video');
var supportedVideoExtensions = {
};
if(video.canPlayType('video/webm')) {
supportedVideoExtensions.webm = true;
}
if(video.canPlayType('video/mp4')) {
supportedVideoExtensions.mp4 = true;
}
gd.supportedVideoExtensions = supportedVideoExtensions;
video = null;
return gd;
};
/* This file was generated from TypeScript source C:/Users/autobuild/turbulenz/engine/tslib/webgl/inputdevice.ts */
function WebGLInputDevice() {
return this;
}
WebGLInputDevice.prototype = {
version: 1,
update: // Public API
function inputDeviceUpdateFn() {
if(!this.isWindowFocused) {
return;
}
this.updateGamePad();
},
addEventListener: function addEventListenerFn(eventType, eventListener) {
var i;
var length;
var eventHandlers;
if(this.handlers.hasOwnProperty(eventType)) {
eventHandlers = this.handlers[eventType];
if(eventListener) {
// Check handler is not already stored
length = eventHandlers.length;
for(i = 0; i < length; i += 1) {
if(eventHandlers[i] === eventListener) {
// Event handler has already been added
return;
}
}
eventHandlers.push(eventListener);
}
}
},
removeEventListener: function removeEventListenerFn(eventType, eventListener) {
var i;
var length;
var eventHandlers;
if(this.handlers.hasOwnProperty(eventType)) {
eventHandlers = this.handlers[eventType];
if(eventListener) {
length = eventHandlers.length;
for(i = 0; i < length; i += 1) {
if(eventHandlers[i] === eventListener) {
eventHandlers.splice(i, 1);
break;
}
}
}
}
},
lockMouse: function lockMouseFn() {
if(this.isHovering && this.isWindowFocused) {
this.isMouseLocked = true;
this.hideMouse();
this.requestBrowserLock();
this.setEventHandlersLock();
return true;
} else {
return false;
}
},
unlockMouse: function unlockMouseFn() {
if(this.isMouseLocked) {
this.isMouseLocked = false;
this.showMouse();
this.requestBrowserUnlock();
this.setEventHandlersUnlock();
if(this.isOutsideEngine) {
this.isOutsideEngine = false;
this.isHovering = false;
this.setEventHandlersMouseLeave();
// Send mouseout event
this.sendEventToHandlers(this.handlers.mouseleave);
}
// Send mouselocklost event
this.sendEventToHandlers(this.handlers.mouselocklost);
return true;
} else {
return false;
}
},
isLocked: function isLockedFn() {
return this.isMouseLocked;
},
hideMouse: function hideMouseFn() {
if(this.isHovering) {
if(!this.isCursorHidden) {
this.isCursorHidden = true;
this.previousCursor = document.body.style.cursor;
document.body.style.cursor = 'none';
if(this.webkit) {
this.ignoreNextMouseMoves = 2;
}
}
return true;
} else {
return false;
}
},
showMouse: function showMouseFn() {
if(this.isCursorHidden && !this.isMouseLocked) {
this.isCursorHidden = false;
document.body.style.cursor = this.previousCursor;
return true;
} else {
return false;
}
},
isHidden: function isHiddenFn() {
return this.isCursorHidden;
},
isFocused: function isFocused() {
return this.isWindowFocused;
},
convertToUnicode: // Cannot convert keycodes to unicode in javascript so return empty strings
function convertToUnicodeFn(keyCodeArray) {
var keyCodeToUnicode = this.keyCodeToUnicode;
var result = {
};
var length = keyCodeArray.length;
var i;
var keyCode;
for(i = 0; i < length; i += 1) {
keyCode = keyCodeArray[i];
result[keyCode] = keyCodeToUnicode[keyCode] || "";
}
return result;
},
keyCodes: // KeyCodes: List of key codes and their values
{
A: 0,
B: 1,
C: 2,
D: 3,
E: 4,
F: 5,
G: 6,
H: 7,
I: 8,
J: 9,
K: 10,
L: 11,
M: 12,
N: 13,
O: 14,
P: 15,
Q: 16,
R: 17,
S: 18,
T: 19,
U: 20,
V: 21,
W: 22,
X: 23,
Y: 24,
Z: 25,
NUMBER_0: 100,
NUMBER_1: 101,
NUMBER_2: 102,
NUMBER_3: 103,
NUMBER_4: 104,
NUMBER_5: 105,
NUMBER_6: 106,
NUMBER_7: 107,
NUMBER_8: 108,
NUMBER_9: 109,
LEFT: 200,
RIGHT: 201,
UP: 202,
DOWN: 203,
LEFT_SHIFT: 300,
RIGHT_SHIFT: 301,
LEFT_CONTROL: 302,
RIGHT_CONTROL: 303,
LEFT_ALT: 304,
RIGHT_ALT: 305,
ESCAPE: 400,
TAB: 401,
SPACE: 402,
BACKSPACE: 403,
RETURN: 404,
GRAVE: 500,
MINUS: 501,
EQUALS: 502,
LEFT_BRACKET: 503,
RIGHT_BRACKET: 504,
SEMI_COLON: 505,
APOSTROPHE: 506,
COMMA: 507,
PERIOD: 508,
SLASH: 509,
BACKSLASH: 510,
F1: 600,
F2: 601,
F3: 602,
F4: 603,
F5: 604,
F6: 605,
F7: 606,
F8: 607,
F9: 608,
F10: 609,
F11: 610,
F12: 611,
NUMPAD_0: 612,
NUMPAD_1: 613,
NUMPAD_2: 614,
NUMPAD_3: 615,
NUMPAD_4: 616,
NUMPAD_5: 617,
NUMPAD_6: 618,
NUMPAD_7: 619,
NUMPAD_8: 620,
NUMPAD_9: 621,
NUMPAD_ENTER: 622,
NUMPAD_DIVIDE: 623,
NUMPAD_MULTIPLY: 624,
NUMPAD_ADD: 625,
NUMPAD_SUBTRACT: 626,
LEFT_WIN: 627,
RIGHT_WIN: 628,
LEFT_OPTION: 629,
RIGHT_OPTION: 630,
CAPS_LOCK: 631,
INSERT: 632,
DELETE: 633,
HOME: 634,
END: 635,
PAGE_UP: 636,
PAGE_DOWN: 637,
BACK: 638
},
mouseCodes: {
BUTTON_0: 0,
BUTTON_1: 1,
BUTTON_2: 2,
DELTA_X: 100,
DELTA_Y: 101,
MOUSE_WHEEL: 102
},
padCodes: {
UP: 0,
LEFT: 1,
DOWN: 2,
RIGHT: 3,
A: 4,
B: 5,
X: 6,
Y: 7,
LEFT_TRIGGER: 8,
RIGHT_TRIGGER: 9,
LEFT_SHOULDER: 10,
RIGHT_SHOULDER: 11,
LEFT_THUMB: 12,
LEFT_THUMB_X: 13,
LEFT_THUMB_Y: 14,
RIGHT_THUMB: 15,
RIGHT_THUMB_X: 16,
RIGHT_THUMB_Y: 17,
START: 18,
BACK: 19
},
sendEventToHandlers: // Private API
function sendEventToHandlersFn(eventHandlers, arg0, arg1, arg2, arg3, arg4, arg5) {
var i;
var length = eventHandlers.length;
if(length) {
for(i = 0; i < length; i += 1) {
eventHandlers[i](arg0, arg1, arg2, arg3, arg4, arg5);
}
}
},
sendEventToHandlersASync: function sendEventToHandlersASyncFn(handlers, a0, a1, a2, a3, a4, a5) {
var sendEvent = WebGLInputDevice.prototype.sendEventToHandlers;
TurbulenzEngine.setTimeout(function callSendEventToHandlersFn() {
sendEvent(handlers, a0, a1, a2, a3, a4, a5);
}, 0);
},
updateGamePad: function updateGamePadFn() {
var magnitude;
var normalizedMagnitude;
var gamepads = (navigator.gamepads || navigator.webkitGamepads || (navigator.webkitGetGamepads && navigator.webkitGetGamepads()));
if(gamepads) {
var deadZone = this.padAxisDeadZone;
var maxAxisRange = this.maxAxisRange;
var sendEvent = this.sendEventToHandlersASync;
var handlers = this.handlers;
var padButtons = this.padButtons;
var padMap = this.padMap;
var leftThumbX = 0;
var leftThumbY = 0;
var rightThumbX = 0;
var rightThumbY = 0;
var numGamePads = gamepads.length;
for(var i = 0; i < numGamePads; i += 1) {
var gamepad = gamepads[i];
if(gamepad) {
// Update button states
var buttons = gamepad.buttons;
if(this.padTimestampUpdate < gamepad.timestamp) {
this.padTimestampUpdate = gamepad.timestamp;
var numButtons = buttons.length;
for(var n = 0; n < numButtons; n += 1) {
var value = buttons[n];
if(padButtons[n] !== value) {
padButtons[n] = value;
var padCode = padMap[n];
if(padCode !== undefined) {
if(value) {
sendEvent(handlers.paddown, padCode);
} else {
sendEvent(handlers.padup, padCode);
}
}
}
}
}
// Update axes states
var axes = gamepad.axes;
if(axes.length <= 4) {
// Axis 1 & 2
var lX = axes[0];
var lY = -axes[1];
magnitude = ((lX * lX) + (lY * lY));
if(magnitude > (deadZone * deadZone)) {
magnitude = Math.sqrt(magnitude);
// Normalize lX and lY
lX = (lX / magnitude);
lY = (lY / magnitude);
// Clip the magnitude at its max possible value
if(magnitude > maxAxisRange) {
magnitude = maxAxisRange;
}
// Adjust magnitude relative to the end of the dead zone
magnitude -= deadZone;
// Normalize the magnitude
normalizedMagnitude = (magnitude / (maxAxisRange - deadZone));
leftThumbX = (lX * normalizedMagnitude);
leftThumbY = (lY * normalizedMagnitude);
}
// Axis 3 & 4
var rX = axes[2];
var rY = -axes[3];
magnitude = ((rX * rX) + (rY * rY));
if(magnitude > (deadZone * deadZone)) {
magnitude = Math.sqrt(magnitude);
// Normalize lX and lY
rX = (rX / magnitude);
rY = (rY / magnitude);
// Clip the magnitude at its max possible value
if(magnitude > maxAxisRange) {
magnitude = maxAxisRange;
}
// Adjust magnitude relative to the end of the dead zone
magnitude -= deadZone;
// Normalize the magnitude
normalizedMagnitude = (magnitude / (maxAxisRange - deadZone));
rightThumbX = (rX * normalizedMagnitude);
rightThumbY = (rY * normalizedMagnitude);
}
sendEvent(handlers.padmove, leftThumbX, leftThumbY, buttons[6], rightThumbX, rightThumbY, buttons[7]);
}
// Our API only supports one active pad...
break;
}
}
}
},
getLocale: // Cannot detect locale in canvas mode
function getLocaleFn() {
return "";
},
getCanvasPosition: // Returns the local coordinates of the event (i.e. position in Canvas coords)
function getCanvasPositionFn(event, position) {
if(event.offsetX !== undefined) {
position.x = event.offsetX;
position.y = event.offsetY;
} else if(event.layerX !== undefined) {
position.x = event.layerX;
position.y = event.layerY;
}
},
resetKeyStates: // Called when blurring
function resetKeyStatesFn() {
var k;
var pressedKeys = this.pressedKeys;
var keyUpHandlers = this.handlers.keyup;
for(k in pressedKeys) {
if(pressedKeys.hasOwnProperty(k) && pressedKeys[k]) {
k = parseInt(k, 10);
pressedKeys[k] = false;
this.sendEventToHandlers(keyUpHandlers, k);
}
}
},
onMouseOver: // Private mouse event methods
function onMouseOverFn(event) {
var position = {
};
var mouseOverHandlers = this.handlers.mouseover;
event.stopPropagation();
event.preventDefault();
this.getCanvasPosition(event, position);
this.lastX = event.screenX;
this.lastY = event.screenY;
this.sendEventToHandlers(mouseOverHandlers, position.x, position.y);
},
onMouseMove: function onMouseMoveFn(event) {
var mouseMoveHandlers = this.handlers.mousemove;
var deltaX, deltaY;
event.stopPropagation();
event.preventDefault();
if(this.ignoreNextMouseMoves) {
this.ignoreNextMouseMoves -= 1;
return;
}
if(event.movementX !== undefined) {
deltaX = event.movementX;
deltaY = event.movementY;
} else if(event.mozMovementX !== undefined) {
deltaX = event.mozMovementX;
deltaY = event.mozMovementY;
} else if(event.webkitMovementX !== undefined) {
deltaX = event.webkitMovementX;
deltaY = event.webkitMovementY;
} else {
deltaX = (event.screenX - this.lastX);
deltaY = (event.screenY - this.lastY);
if(0 === deltaX && 0 === deltaY) {
return;
}
}
this.lastX = event.screenX;
this.lastY = event.screenY;
this.sendEventToHandlers(mouseMoveHandlers, deltaX, deltaY);
},
onWheel: function onWheelFn(event) {
var mouseWheelHandlers = this.handlers.mousewheel;
var scrollDelta;
event.stopPropagation();
event.preventDefault();
if(event.wheelDelta) {
if(window.opera) {
scrollDelta = event.wheelDelta < 0 ? 1 : -1;
} else {
scrollDelta = event.wheelDelta > 0 ? 1 : -1;
}
} else {
scrollDelta = event.detail < 0 ? 1 : -1;
}
this.sendEventToHandlers(mouseWheelHandlers, scrollDelta);
},
emptyEvent: function emptyEventFn(event) {
event.stopPropagation();
event.preventDefault();
},
onWindowFocus: function onWindowFocusFn() {
if(this.isHovering && window.document.activeElement === this.canvas) {
this.addInternalEventListener(window, 'mousedown', this.onMouseDown);
}
},
onFocus: function onFocusFn() {
var canvas = this.canvas;
var handlers = this.handlers;
var focusHandlers = handlers.focus;
if(!this.isWindowFocused) {
this.isWindowFocused = true;
window.focus();
canvas.focus();
this.setEventHandlersFocus();
canvas.oncontextmenu = function () {
return false;
};
this.sendEventToHandlers(focusHandlers);
}
},
onBlur: function onBlurFn() {
var canvas = this.canvas;
var handlers = this.handlers;
var blurHandlers = handlers.blur;
if(this.isMouseLocked) {
this.unlockMouse();
}
if(this.isWindowFocused) {
this.isWindowFocused = false;
this.resetKeyStates();
this.setEventHandlersBlur();
canvas.oncontextmenu = null;
this.sendEventToHandlers(blurHandlers);
}
},
onMouseDown: function onMouseDownFn(event) {
var handlers = this.handlers;
if(this.isHovering) {
var mouseDownHandlers = handlers.mousedown;
var button = event.button;
var position = {
};
this.onFocus();
event.stopPropagation();
event.preventDefault();
if(button < 3) {
button = this.mouseMap[button];
}
this.getCanvasPosition(event, position);
this.sendEventToHandlers(mouseDownHandlers, button, position.x, position.y);
} else {
this.onBlur();
}
},
onMouseUp: function onMouseUpFn(event) {
var mouseUpHandlers = this.handlers.mouseup;
if(this.isHovering) {
var button = event.button;
var position = {
};
event.stopPropagation();
event.preventDefault();
if(button < 3) {
button = this.mouseMap[button];
}
this.getCanvasPosition(event, position);
this.sendEventToHandlers(mouseUpHandlers, button, position.x, position.y);
}
},
onKeyDown: // Private key event methods
function onKeyDownFn(event) {
var keyDownHandlers = this.handlers.keydown;
var pressedKeys = this.pressedKeys;
var keyCodes = this.keyCodes;
event.stopPropagation();
event.preventDefault();
var keyCode = event.keyCode;
keyCode = this.keyMap[keyCode];
var keyLocation = event.keyLocation || event.location;
if(undefined !== keyCode && (keyCodes.ESCAPE !== keyCode)) {
// Handle left / right key locations
// DOM_KEY_LOCATION_STANDARD = 0x00;
// DOM_KEY_LOCATION_LEFT = 0x01;
// DOM_KEY_LOCATION_RIGHT = 0x02;
// DOM_KEY_LOCATION_NUMPAD = 0x03;
// DOM_KEY_LOCATION_MOBILE = 0x04;
// DOM_KEY_LOCATION_JOYSTICK = 0x05;
if(2 === keyLocation) {
// The Turbulenz KeyCodes are such that CTRL, SHIFT
// and ALT have their RIGHT versions exactly one above
// the LEFT versions.
keyCode = keyCode + 1;
}
if(!pressedKeys[keyCode]) {
pressedKeys[keyCode] = true;
this.sendEventToHandlers(keyDownHandlers, keyCode);
}
}
},
onKeyUp: function onKeyUpFn(event) {
var keyUpHandlers = this.handlers.keyup;
var pressedKeys = this.pressedKeys;
var keyCodes = this.keyCodes;
event.stopPropagation();
event.preventDefault();
var keyCode = event.keyCode;
keyCode = this.keyMap[keyCode];
var keyLocation = event.keyLocation || event.location;
if(keyCode === keyCodes.ESCAPE) {
this.unlockMouse();
} else if(undefined !== keyCode) {
// Handle LEFT / RIGHT. (See OnKeyDown)
if(2 === keyLocation) {
keyCode = keyCode + 1;
}
if(pressedKeys[keyCode]) {
pressedKeys[keyCode] = false;
this.sendEventToHandlers(keyUpHandlers, keyCode);
// Nasty hack for mac to deal with the missing KeyUp
// signals when CMD is released. #1016.
if((627 === keyCode || 628 === keyCode) && (this.macosx)) {
this.resetKeyStates();
}
}
}
},
onTouchStart: // Private touch event methods
function onTouchStartFn(event) {
var eventHandlers = this.handlers.touchstart;
event.preventDefault();
// Store new touches
this.addTouches(event.changedTouches);
event = this.convertW3TouchEventToTurbulenzTouchEvent(event);
this.sendEventToHandlers(eventHandlers, event);
},
onTouchEnd: function onTouchEndFn(event) {
var eventHandlers = this.handlers.touchend;
event.preventDefault();
event = this.convertW3TouchEventToTurbulenzTouchEvent(event);
// Remove ended touches
this.removeTouches(event.changedTouches);
this.sendEventToHandlers(eventHandlers, event);
},
onTouchMove: function onTouchMoveFn(event) {
var eventHandlers = this.handlers.touchmove;
event.preventDefault();
this.addTouches(event.changedTouches);
event = this.convertW3TouchEventToTurbulenzTouchEvent(event);
this.sendEventToHandlers(eventHandlers, event);
},
onTouchEnter: function onTouchEnterFn(event) {
var eventHandlers = this.handlers.touchenter;
event.preventDefault();
event = this.convertW3TouchEventToTurbulenzTouchEvent(event);
this.sendEventToHandlers(eventHandlers, event);
},
onTouchLeave: function onTouchLeaveFn(event) {
var eventHandlers = this.handlers.touchleave;
event.preventDefault();
event = this.convertW3TouchEventToTurbulenzTouchEvent(event);
this.sendEventToHandlers(eventHandlers, event);
},
onTouchCancel: function onTouchCancelFn(event) {
var eventHandlers = this.handlers.touchcancel;
event.preventDefault();
event = this.convertW3TouchEventToTurbulenzTouchEvent(event);
// Remove canceled touches
this.removeTouches(event.changedTouches);
this.sendEventToHandlers(eventHandlers, event);
},
convertW3TouchEventToTurbulenzTouchEvent: function convertW3TouchEventToTurbulenzTouchEventFn(w3TouchEvent) {
// Initialize changedTouches
var changedTouches = this.convertW3TouchListToTurbulenzTouchList(w3TouchEvent.changedTouches);
// Initialize gameTouches
var gameTouches = this.convertW3TouchListToTurbulenzTouchList(w3TouchEvent.targetTouches);
// Initialize touches
var touches = this.convertW3TouchListToTurbulenzTouchList(w3TouchEvent.touches);
var touchEventParams = {
changedTouches: changedTouches,
gameTouches: gameTouches,
touches: touches
};
return WebGLTouchEvent.create(touchEventParams);
},
convertW3TouchListToTurbulenzTouchList: function convertW3TouchListToTurbulenzTouchListFn(w3TouchList) {
// Set changedTouches
var w3TouchListLength = w3TouchList.length;
var touchList = [];
var touch;
var touchIndex;
touchList.length = w3TouchListLength;
for(touchIndex = 0; touchIndex < w3TouchListLength; touchIndex += 1) {
touch = this.getTouchById(w3TouchList[touchIndex].identifier);
touchList[touchIndex] = touch;
}
return touchList;
},
convertW3TouchToTurbulenzTouch: function convertW3TouchToTurbulenzTouchFn(w3Touch) {
var canvasElement = this.canvas;
var canvasRect = canvasElement.getBoundingClientRect();
var touchParams = {
force: (w3Touch.force || w3Touch.webkitForce || 0),
identifier: w3Touch.identifier,
isGameTouch: (w3Touch.target === canvasElement),
positionX: (w3Touch.pageX - canvasRect.left),
positionY: (w3Touch.pageY - canvasRect.top),
radiusX: (w3Touch.radiusX || w3Touch.webkitRadiusX || 1),
radiusY: (w3Touch.radiusY || w3Touch.webkitRadiusY || 1),
rotationAngle: (w3Touch.rotationAngle || w3Touch.webkitRotationAngle || 0)
};
return Touch.create(touchParams);
},
addTouches: function addTouchesFn(w3TouchList) {
var w3TouchListLength = w3TouchList.length;
var touchIndex;
var touch;
for(touchIndex = 0; touchIndex < w3TouchListLength; touchIndex += 1) {
touch = this.convertW3TouchToTurbulenzTouch(w3TouchList[touchIndex]);
this.addTouch(touch);
}
},
removeTouches: function removeTouchesFn(w3TouchList) {
var w3TouchListLength = w3TouchList.length;
var touchIndex;
var touchId;
for(touchIndex = 0; touchIndex < w3TouchListLength; touchIndex += 1) {
touchId = w3TouchList[touchIndex].identifier;
this.removeTouchById(touchId);
}
},
addTouch: function addTouchFn(touch) {
this.touches[touch.identifier] = touch;
},
getTouchById: function getTouchByIdFn(id) {
return this.touches[id];
},
removeTouchById: function removeTouchByIdFn(id) {
delete this.touches[id];
},
canvasOnMouseOver: // Canvas event handlers
function canvasOnMouseOverFn(event) {
var mouseEnterHandlers = this.handlers.mouseenter;
if(!this.isMouseLocked) {
this.isHovering = true;
this.lastX = event.screenX;
this.lastY = event.screenY;
this.setEventHandlersMouseEnter();
// Send mouseover event
this.sendEventToHandlers(mouseEnterHandlers);
} else {
this.isOutsideEngine = false;
}
},
canvasOnMouseOut: function canvasOnMouseOutFn() {
/* event */ var mouseLeaveHandlers = this.handlers.mouseleave;
if(!this.isMouseLocked) {
this.isHovering = false;
if(this.isCursorHidden) {
this.showMouse();
}
this.setEventHandlersMouseLeave();
// Send mouseout event
this.sendEventToHandlers(mouseLeaveHandlers);
} else {
this.isOutsideEngine = true;
}
},
canvasOnMouseDown: // This is required in order to detect hovering when we missed the initial mouseover event
function canvasOnMouseDownFn(event) {
var mouseEnterHandlers = this.handlers.mouseenter;
this.canvas.onmousedown = null;
if(!this.isHovering) {
this.isHovering = true;
this.lastX = event.screenX;
this.lastY = event.screenY;
this.setEventHandlersMouseEnter();
this.sendEventToHandlers(mouseEnterHandlers);
this.onMouseDown(event);
}
return false;
},
onFullscreenChanged: // Window event handlers
function onFullscreenChangedFn() {
/* event */ if(this.isMouseLocked) {
if(document.fullscreenEnabled || document.mozFullScreen || document.webkitIsFullScreen) {
this.ignoreNextMouseMoves = 2// Some browsers will send 2 mouse events with a massive delta
;
this.requestBrowserLock();
} else {
// Browsers capture the escape key whilst in fullscreen
this.unlockMouse();
}
}
},
setEventHandlersMouseEnter: // Set event handler methods
function setEventHandlersMouseEnterFn() {
// Add event listener to get focus event
if(!this.isFocused()) {
this.addInternalEventListener(window, 'mousedown', this.onMouseDown);
}
this.addInternalEventListener(window, 'mouseup', this.onMouseUp);
this.addInternalEventListener(window, 'mousemove', this.onMouseOver);
this.addInternalEventListener(window, 'DOMMouseScroll', this.onWheel);
this.addInternalEventListener(window, 'mousewheel', this.onWheel);
this.addInternalEventListener(window, 'click', this.emptyEvent);
},
setEventHandlersMouseLeave: function setEventHandlersMouseLeaveFn() {
// We do not need a mousedown listener if not focused
if(!this.isFocused()) {
this.removeInternalEventListener(window, 'mousedown', this.onMouseDown);
}
// Remove mouse event listeners
this.removeInternalEventListener(window, 'mouseup', this.onMouseUp);
this.removeInternalEventListener(window, 'mousemove', this.onMouseOver);
this.removeInternalEventListener(window, 'DOMMouseScroll', this.onWheel);
this.removeInternalEventListener(window, 'mousewheel', this.onWheel);
this.removeInternalEventListener(window, 'click', this.emptyEvent);
},
setEventHandlersFocus: function setEventHandlersFocusFn() {
this.addInternalEventListener(window, 'keydown', this.onKeyDown);
this.addInternalEventListener(window, 'keyup', this.onKeyUp);
},
setEventHandlersBlur: function setEventHandlersBlurFn() {
this.removeInternalEventListener(window, 'keydown', this.onKeyDown);
this.removeInternalEventListener(window, 'keyup', this.onKeyUp);
this.removeInternalEventListener(window, 'mousedown', this.onMouseDown);
},
setEventHandlersLock: function setEventHandlersLockFn() {
this.removeInternalEventListener(window, 'mousemove', this.onMouseOver);
this.addInternalEventListener(window, 'mousemove', this.onMouseMove);
this.addInternalEventListener(window, 'fullscreenchange', this.onFullscreenChanged);
this.addInternalEventListener(window, 'mozfullscreenchange', this.onFullscreenChanged);
this.addInternalEventListener(window, 'webkitfullscreenchange', this.onFullscreenChanged);
},
setEventHandlersUnlock: function setEventHandlersUnlockFn() {
this.removeInternalEventListener(window, 'webkitfullscreenchange', this.onFullscreenChanged);
this.removeInternalEventListener(window, 'mozfullscreenchange', this.onFullscreenChanged);
this.removeInternalEventListener(window, 'fullscreenchange', this.onFullscreenChanged);
this.removeInternalEventListener(window, 'mousemove', this.onMouseMove);
this.addInternalEventListener(window, 'mousemove', this.onMouseOver);
},
setEventHandlersCanvas: function setEventHandlersCanvasFn() {
var canvas = this.canvas;
this.addInternalEventListener(canvas, 'mouseover', this.canvasOnMouseOver);
this.addInternalEventListener(canvas, 'mouseout', this.canvasOnMouseOut);
this.addInternalEventListener(canvas, 'mousedown', this.canvasOnMouseDown);
},
setEventHandlersWindow: function setEventHandlersWindowFn() {
this.addInternalEventListener(window, 'blur', this.onBlur);
this.addInternalEventListener(window, 'focus', this.onWindowFocus);
},
removeEventHandlersWindow: function removeEventHandlersWindowFn() {
this.removeInternalEventListener(window, 'blur', this.onBlur);
this.removeInternalEventListener(window, 'focus', this.onWindowFocus);
},
setEventHandlersTouch: function setEventHandlersTouchFn() {
var canvas = this.canvas;
this.addInternalEventListener(canvas, 'touchstart', this.onTouchStart);
this.addInternalEventListener(canvas, 'touchend', this.onTouchEnd);
this.addInternalEventListener(canvas, 'touchenter', this.onTouchEnter);
this.addInternalEventListener(canvas, 'touchleave', this.onTouchLeave);
this.addInternalEventListener(canvas, 'touchmove', this.onTouchMove);
this.addInternalEventListener(canvas, 'touchcancel', this.onTouchCancel);
},
addInternalEventListener: // Helper methods
function addInternalEventListenerFn(element, eventName, eventHandler) {
var elementEventFlag = this.elementEventFlags[element];
if(!elementEventFlag) {
this.elementEventFlags[element] = elementEventFlag = {
};
}
if(!elementEventFlag[eventName]) {
elementEventFlag[eventName] = true;
var boundEventHandler = this.boundFunctions[eventHandler];
if(!boundEventHandler) {
this.boundFunctions[eventHandler] = boundEventHandler = eventHandler.bind(this);
}
element.addEventListener(eventName, boundEventHandler, false);
}
},
removeInternalEventListener: function removeInternalEventListenerFn(element, eventName, eventHandler) {
var elementEventFlag = this.elementEventFlags[element];
if(elementEventFlag) {
if(elementEventFlag[eventName]) {
elementEventFlag[eventName] = false;
var boundEventHandler = this.boundFunctions[eventHandler];
element.removeEventListener(eventName, boundEventHandler, false);
}
}
},
destroy: function destroyFn() {
// Remove all event listeners
if(this.isLocked()) {
this.setEventHandlersUnlock();
}
if(this.isHovering) {
this.setEventHandlersMouseLeave();
}
if(this.isWindowFocused) {
this.setEventHandlersBlur();
}
this.removeEventHandlersWindow();
var canvas = this.canvas;
canvas.onmouseover = null;
canvas.onmouseout = null;
canvas.onmousedown = null;
},
isSupported: function inputDevice_isSupportedFn(name) {
var canvas = this.canvas;
if((canvas) && (name === "POINTER_LOCK")) {
// Currently Firefox requires full screen mode for pointer
// lock to work.
var fullscreenEnabled = (document.fullscreenEnabled || document.mozFullScreen || document.webkitIsFullScreen);
// This check prevents allowing pointer lock in Firefox
// until this requirement is removed. Allows chrome to
// lock whenever.
var navStr = window.navigator.userAgent;
var allowPointerLock = (navStr.indexOf('Chrome') >= 0) || fullscreenEnabled;
var havePointerLock = ('pointerLockElement' in document) || ('mozPointerLockElement' in document) || ('webkitPointerLockElement' in document);
var requestPointerLock = (canvas.requestPointerLock || canvas.mozRequestPointerLock || canvas.webkitRequestPointerLock);
if(allowPointerLock && havePointerLock && requestPointerLock) {
return true;
}
}
return false;
}
};
// Constructor function
WebGLInputDevice.create = function webGLInputDeviceFn(canvas/*, params */ ) {
var id = new WebGLInputDevice();
id.lastX = 0;
id.lastY = 0;
id.touches = {
};
id.boundFunctions = {
};
id.elementEventFlags = {
};
id.canvas = canvas;
id.isMouseLocked = false;
id.isHovering = false;
id.isWindowFocused = false;
id.isCursorHidden = false;
id.isOutsideEngine = false// Used for determining where we are when unlocking
;
id.previousCursor = '';
id.ignoreNextMouseMoves = 0;
// Used to screen out auto-repeats, dictionary from keycode to bool,
// true for each key currently pressed down
id.pressedKeys = {
};
// Game event handlers
id.handlers = {
keydown: [],
keyup: [],
mousedown: [],
mouseup: [],
mousewheel: [],
mouseover: [],
mousemove: [],
paddown: [],
padup: [],
padmove: [],
mouseenter: [],
mouseleave: [],
focus: [],
blur: [],
mouselocklost: [],
touchstart: [],
touchend: [],
touchenter: [],
touchleave: [],
touchmove: [],
touchcancel: []
};
// Populate the keyCodeToUnicodeTable. Just use the 'key' part of
// the keycodes, overriding some special cases.
var keyCodeToUnicodeTable = {
};
var keyCodes = id.keyCodes;
for(var k in keyCodes) {
if(keyCodes.hasOwnProperty(k)) {
var code = keyCodes[k];
keyCodeToUnicodeTable[code] = k;
}
}
keyCodeToUnicodeTable[keyCodes.SPACE] = ' ';
keyCodeToUnicodeTable[keyCodes.NUMBER_0] = '0';
keyCodeToUnicodeTable[keyCodes.NUMBER_1] = '1';
keyCodeToUnicodeTable[keyCodes.NUMBER_2] = '2';
keyCodeToUnicodeTable[keyCodes.NUMBER_3] = '3';
keyCodeToUnicodeTable[keyCodes.NUMBER_4] = '4';
keyCodeToUnicodeTable[keyCodes.NUMBER_5] = '5';
keyCodeToUnicodeTable[keyCodes.NUMBER_6] = '6';
keyCodeToUnicodeTable[keyCodes.NUMBER_7] = '7';
keyCodeToUnicodeTable[keyCodes.NUMBER_8] = '8';
keyCodeToUnicodeTable[keyCodes.NUMBER_9] = '9';
keyCodeToUnicodeTable[keyCodes.GRAVE] = '`';
keyCodeToUnicodeTable[keyCodes.MINUS] = '-';
keyCodeToUnicodeTable[keyCodes.EQUALS] = '=';
keyCodeToUnicodeTable[keyCodes.LEFT_BRACKET] = '[';
keyCodeToUnicodeTable[keyCodes.RIGHT_BRACKET] = ']';
keyCodeToUnicodeTable[keyCodes.SEMI_COLON] = ';';
keyCodeToUnicodeTable[keyCodes.APOSTROPHE] = "'";
keyCodeToUnicodeTable[keyCodes.COMMA] = ',';
keyCodeToUnicodeTable[keyCodes.PERIOD] = '.';
keyCodeToUnicodeTable[keyCodes.SLASH] = '/';
keyCodeToUnicodeTable[keyCodes.BACKSLASH] = '\\';
// KeyMap: Maps JavaScript keycodes to Turbulenz keycodes - some
// keycodes are consistent across all browsers and some mappings
// are browser specific.
var keyMap = {
};
// A-Z
keyMap[65] = 0// A
;
keyMap[66] = 1// B
;
keyMap[67] = 2// C
;
keyMap[68] = 3// D
;
keyMap[69] = 4// E
;
keyMap[70] = 5// F
;
keyMap[71] = 6// G
;
keyMap[72] = 7// H
;
keyMap[73] = 8// I
;
keyMap[74] = 9// J
;
keyMap[75] = 10// K
;
keyMap[76] = 11// L
;
keyMap[77] = 12// M
;
keyMap[78] = 13// N
;
keyMap[79] = 14// O
;
keyMap[80] = 15// P
;
keyMap[81] = 16// Q
;
keyMap[82] = 17// R
;
keyMap[83] = 18// S
;
keyMap[84] = 19// T
;
keyMap[85] = 20// U
;
keyMap[86] = 21// V
;
keyMap[87] = 22// X
;
keyMap[88] = 23// W
;
keyMap[89] = 24// Y
;
keyMap[90] = 25// Z
;
// 0-9
keyMap[48] = 100// 0
;
keyMap[49] = 101// 1
;
keyMap[50] = 102// 2
;
keyMap[51] = 103// 3
;
keyMap[52] = 104// 4
;
keyMap[53] = 105// 5
;
keyMap[54] = 106// 6
;
keyMap[55] = 107// 7
;
keyMap[56] = 108// 8
;
keyMap[57] = 109// 9
;
// Arrow keys
keyMap[37] = 200// LEFT
;
keyMap[39] = 201// RIGHT
;
keyMap[38] = 202// UP
;
keyMap[40] = 203// DOWN
;
// Modifier keys
keyMap[16] = 300// LEFT_SHIFT
;
//keyMap[16] = 301; // RIGHT_SHIFT
keyMap[17] = 302// LEFT_CONTROL
;
//keyMap[17] = 303; // RIGHT_CONTROL
keyMap[18] = 304// LEFT_ALT
;
keyMap[0] = 305// RIGHT_ALT
;
// Special keys
keyMap[27] = 400// ESCAPE
;
keyMap[9] = 401// TAB
;
keyMap[32] = 402// SPACE
;
keyMap[8] = 403// BACKSPACE
;
keyMap[13] = 404// RETURN
;
// Punctuation keys
keyMap[223] = 500// GRAVE
;
keyMap[173] = 501// MINUS (mozilla - gecko)
;
keyMap[189] = 501// MINUS (ie + webkit)
;
keyMap[61] = 502// EQUALS (mozilla - gecko)
;
keyMap[187] = 502// EQUALS (ie + webkit)
;
keyMap[219] = 503// LEFT_BRACKET
;
keyMap[221] = 504// RIGHT_BRACKET
;
keyMap[59] = 505// SEMI_COLON (mozilla - gecko)
;
keyMap[186] = 505// SEMI_COLON (ie + webkit)
;
keyMap[192] = 500// GRAVE
;
keyMap[188] = 507// COMMA
;
keyMap[190] = 508// PERIOD
;
keyMap[222] = 506// APOSTROPHE
;
// if Mac OS GRAVE can sometimes come through as 0
if(navigator.appVersion.indexOf("Mac") !== -1) {
keyMap[0] = 500// GRAVE (mac gecko + safari 5.1)
;
}
// Non-standard keys
keyMap[112] = 600// F1
;
keyMap[113] = 601// F2
;
keyMap[114] = 602// F3
;
keyMap[115] = 603// F4
;
keyMap[116] = 604// F5
;
keyMap[117] = 605// F6
;
keyMap[118] = 606// F7
;
keyMap[119] = 607// F8
;
keyMap[120] = 608// F9
;
keyMap[121] = 609// F10
;
keyMap[122] = 610// F11
;
keyMap[123] = 611// F12
;
//keyMap[45 : 612, // NUMPAD_0 (numlock on/off)
keyMap[96] = 612// NUMPAD_0 (numlock on/off)
;
//keyMap[35] = 613;, // NUMPAD_1 (numlock on/off)
keyMap[97] = 613// NUMPAD_1 (numlock on/off)
;
//keyMap[40] = 614; // NUMPAD_2 (numlock on/off)
keyMap[98] = 614// NUMPAD_2 (numlock on/off)
;
//keyMap[34] = 615; // NUMPAD_3 (numlock on/off)
keyMap[99] = 615// NUMPAD_3 (numlock on/off)
;
//keyMap[37] = 616;, // NUMPAD_4 (numlock on/off)
keyMap[100] = 616// NUMPAD_4 (numlock on/off)
;
keyMap[12] = 617// NUMPAD_5 (numlock on/off)
;
keyMap[101] = 617// NUMPAD_5 (numlock on/off)
;
keyMap[144] = 617// NUMPAD_5 (numlock on/off) and NUMPAD_NUM
;
//keyMap[39] = 618; // NUMPAD_6 (numlock on/off)
keyMap[102] = 618// NUMPAD_6 (numlock on/off)
;
//keyMap[36] = 619; // NUMPAD_7 (numlock on/off)
keyMap[103] = 619// NUMPAD_7 (numlock on/off)
;
//keyMap[38] = 620; // NUMPAD_8 (numlock on/off)
keyMap[104] = 620// NUMPAD_8 (numlock on/off)
;
//keyMap[33] = 621; // NUMPAD_9 (numlock on/off)
keyMap[105] = 621// NUMPAD_9 (numlock on/off)
;
//keyMap[13] = 622; // NUMPAD_ENTER (numlock on/off)
keyMap[111] = 623// NUMPAD_DIVIDE (numlock on/off)
;
keyMap[191] = 623// NUMPAD_DIVIDE (numlock on/off), mac chrome
;
keyMap[106] = 624// NUMPAD_MULTIPLY (numlock on/off)
;
keyMap[107] = 625// NUMPAD_ADD (numlock on/off)
;
keyMap[109] = 626// NUMPAD_SUBTRACT (numlock on/off)
;
keyMap[91] = 627// LEFT_WIN
;
keyMap[224] = 627// LEFT_WIN (mac, firefox)
;
keyMap[92] = 628// RIGHT_WIN
;
keyMap[93] = 628// RIGHT_WIN (mac, chrome)
;
//: 629, // LEFT_OPTION
//: 630, // RIGHT_OPTION
keyMap[20] = 631// CAPS_LOCK
;
keyMap[45] = 632// INSERT
;
keyMap[46] = 633// DELETE
;
keyMap[36] = 634// HOME
;
keyMap[35] = 635// END
;
keyMap[33] = 636// PAGE_UP
;
keyMap[34] = 637// PAGE_DOWN
;
id.keyMap = keyMap;
// MouseMap: Maps current mouse controls to new controls
var mouseMap = {
0: 0,
1: 2,
2: 1
};
id.mouseMap = mouseMap;
// padMap: Maps current pad buttons to new buttons
var padMap = {
0: 4,
1: // A
5,
2: // B
6,
3: // X
7,
4: // Y
10,
5: // LEFT_SHOULDER
11,
8: // RIGHT_SHOULDER
19,
9: // BACK
18,
10: // START
12,
11: // LEFT_THUMB
15,
12: // RIGHT_THUMB
0,
13: // UP
2,
14: // DOWN
1,
15: // LEFT
3
};
// RIGHT
id.padMap = padMap;
id.keyCodeToUnicode = keyCodeToUnicodeTable;
id.padButtons = [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
];
id.padMap = padMap;
id.padAxisDeadZone = 0.26;
id.maxAxisRange = 1.0;
id.padTimestampUpdate = 0;
// Pointer locking
var requestPointerLock = (canvas.requestPointerLock || canvas.mozRequestPointerLock || canvas.webkitRequestPointerLock);
if(requestPointerLock) {
var exitPointerLock = (document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock);
id.requestBrowserLock = function requestBrowserLockFn() {
var pointerLockElement = (document.pointerLockElement || document.mozPointerLockElement || document.webkitPointerLockElement);
if(pointerLockElement !== canvas) {
requestPointerLock.call(canvas);
}
};
id.requestBrowserUnlock = function requestBrowserUnlockFn() {
var pointerLockElement = (document.pointerLockElement || document.mozPointerLockElement || document.webkitPointerLockElement);
if(pointerLockElement === canvas) {
exitPointerLock.call(document);
}
};
} else {
var pointer = (navigator.pointer || navigator.webkitPointer);
if(pointer) {
id.requestBrowserLock = function requestBrowserLockFn() {
if(!pointer.isLocked) {
pointer.lock(canvas);
}
};
id.requestBrowserUnlock = function requestBrowserUnlockFn() {
if(pointer.isLocked) {
pointer.unlock();
}
};
} else {
id.requestBrowserLock = function requestBrowserLockFn() {
};
id.requestBrowserUnlock = function requestBrowserUnlockFn() {
};
}
}
// Add canvas mouse event listeners
id.setEventHandlersCanvas();
// Add window blur event listener
id.setEventHandlersWindow();
// Add canvas touch event listeners
id.setEventHandlersTouch();
// Record the platforms so that we can enable workarounds, etc.
var sysInfo = TurbulenzEngine.getSystemInfo();
id.macosx = ("Darwin" === sysInfo.osName);
id.webkit = (/WebKit/.test(navigator.userAgent));
return id;
};
/* This file was generated from TypeScript source C:/Users/autobuild/turbulenz/engine/tslib/webgl/networkdevice.ts */
// Copyright (c) 2011-2012 Turbulenz Limited
/*global window*/
"use strict";
function WebGLNetworkDevice() {
return this;
}
WebGLNetworkDevice.prototype = {
version: 1,
WebSocketConstructor: (window.WebSocket ? window.WebSocket : window.MozWebSocket),
createWebSocket: function createWebSocketdFn(url, protocol) {
var WebSocketConstructor = this.WebSocketConstructor;
if(WebSocketConstructor) {
var ws;
if(protocol) {
ws = new WebSocketConstructor(url, protocol);
} else {
ws = new WebSocketConstructor(url);
}
if(typeof ws.destroy === "undefined") {
ws.destroy = function websocketDestroyFn() {
this.onopen = null;
this.onerror = null;
this.onclose = null;
this.onmessage = null;
this.close();
};
}
return ws;
} else {
return null;
}
},
update: function networkDeviceUpdateFn() {
}
};
WebGLNetworkDevice.create = function networkDeviceCreateFn() {
/* params */ var nd = new WebGLNetworkDevice();
return nd;
};
/* This file was generated from TypeScript source C:/Users/autobuild/turbulenz/engine/tslib/webgl/sounddevice.ts */
// Copyright (c) 2011-2013 Turbulenz Limited
/*global TurbulenzEngine: false*/
/*global SoundTARLoader: false*/
/*global Audio: false*/
/*global VMath: false*/
/*global window: false*/
/*global Uint8Array: false*/
"use strict";
//
// WebGLSound
//
function WebGLSound() {
return this;
}
WebGLSound.prototype = {
version: 1,
destroy: function soundDestroyFn() {
var audioContext = this.audioContext;
if(audioContext) {
delete this.audioContext;
delete this.buffer;
} else {
delete this.audio;
}
}
};
WebGLSound.create = function webGLSoundCreateFn(sd, params) {
var sound = new WebGLSound();
var soundPath = params.src;
sound.name = (params.name || soundPath);
sound.frequency = 0;
sound.channels = 0;
sound.bitrate = 0;
sound.length = 0;
sound.compressed = (!params.uncompress);
var onload = params.onload;
var data, numSamples, numChannels, samplerRate;
var audioContext = sd.audioContext;
if(audioContext) {
sound.audioContext = audioContext;
var buffer;
if(soundPath) {
if(!sd.isResourceSupported(soundPath)) {
if(onload) {
onload(null);
}
return null;
}
var bufferCreated = function bufferCreatedFn(buffer) {
if(buffer) {
sound.buffer = buffer;
sound.frequency = buffer.sampleRate;
sound.channels = buffer.numberOfChannels;
sound.bitrate = (sound.frequency * sound.channels * 2 * 8);
sound.length = buffer.duration;
if(onload) {
onload(sound, 200);
}
} else {
if(onload) {
onload(null);
}
}
};
var bufferFailed = function bufferFailedFn() {
if(onload) {
onload(null);
}
};
data = params.data;
if(data) {
if(audioContext.decodeAudioData) {
audioContext.decodeAudioData(data, bufferCreated, bufferFailed);
} else {
buffer = audioContext.createBuffer(data, false);
bufferCreated(buffer);
}
} else {
var xhr;
if(window.XMLHttpRequest) {
xhr = new window.XMLHttpRequest();
} else if(window.ActiveXObject) {
xhr = new window.ActiveXObject("Microsoft.XMLHTTP");
} else {
if(onload) {
onload(null);
}
return null;
}
xhr.onreadystatechange = function () {
if(xhr.readyState === 4) {
if(!TurbulenzEngine || !TurbulenzEngine.isUnloading()) {
var xhrStatus = xhr.status;
var xhrStatusText = (xhrStatus !== 0 && xhr.statusText || 'No connection');
var response = xhr.response;
// Sometimes the browser sets status to 200 OK when the connection is closed
// before the message is sent (weird!).
// In order to address this we fail any completely empty responses.
// Hopefully, nobody will get a valid response with no headers and no body!
if(xhr.getAllResponseHeaders() === "" && !response && xhrStatus === 200 && xhrStatusText === 'OK') {
if(onload) {
onload(null);
}
} else if(xhrStatus === 200 || xhrStatus === 0) {
if(audioContext.decodeAudioData) {
audioContext.decodeAudioData(response, bufferCreated, bufferFailed);
} else {
var buffer = audioContext.createBuffer(response, false);
bufferCreated(buffer);
}
} else {
if(onload) {
onload(null);
}
}
}
// break circular reference
xhr.onreadystatechange = null;
xhr = null;
}
};
xhr.open("GET", soundPath, true);
xhr.responseType = "arraybuffer";
xhr.setRequestHeader("Content-Type", "text/plain");
xhr.send(null);
}
return sound;
} else {
data = params.data;
if(data) {
numSamples = data.length;
numChannels = (params.channels || 1);
samplerRate = params.frequency;
var contextSampleRate = Math.min(audioContext.sampleRate, 96000);
var c, channel, i, j;
if(contextSampleRate === samplerRate) {
buffer = audioContext.createBuffer(numChannels, (numSamples / numChannels), samplerRate);
// De-interleave data
for(c = 0; c < numChannels; c += 1) {
channel = buffer.getChannelData(c);
for(i = c , j = 0; i < numSamples; i += numChannels , j += 1) {
channel[j] = data[i];
}
}
} else {
var ratio = (samplerRate / contextSampleRate);
/*jshint bitwise: false*/
var bufferLength = ((numSamples / (ratio * numChannels)) | 0);
/*jshint bitwise: true*/
buffer = audioContext.createBuffer(numChannels, bufferLength, contextSampleRate);
// De-interleave data
for(c = 0; c < numChannels; c += 1) {
channel = buffer.getChannelData(c);
for(j = 0; j < bufferLength; j += 1) {
/*jshint bitwise: false*/
channel[j] = data[c + (((j * ratio) | 0) * numChannels)];
/*jshint bitwise: true*/
}
}
}
if(buffer) {
sound.buffer = buffer;
sound.frequency = samplerRate;
sound.channels = numChannels;
sound.bitrate = (samplerRate * numChannels * 2 * 8);
sound.length = (numSamples / (samplerRate * numChannels));
if(onload) {
onload(sound, 200);
}
return sound;
}
}
}
} else {
var audio;
if(soundPath) {
var extension = soundPath.slice(-3);
data = params.data;
if(data) {
var dataArray;
if(data instanceof Uint8Array) {
dataArray = data;
} else {
dataArray = new Uint8Array(data);
}
// Check extension based on data
if(dataArray[0] === 79 && dataArray[1] === 103 && dataArray[2] === 103 && dataArray[3] === 83) {
extension = 'ogg';
soundPath = 'data:audio/ogg;base64,';
} else if(dataArray[0] === 82 && dataArray[1] === 73 && dataArray[2] === 70 && dataArray[3] === 70) {
extension = 'wav';
soundPath = 'data:audio/wav;base64,';
} else {
// Assume it's an mp3?
extension = 'mp3';
soundPath = 'data:audio/mpeg;base64,';
}
// Mangle data into a data URI
soundPath = soundPath + (TurbulenzEngine).base64Encode(dataArray);
}
if(!sd.supportedExtensions[extension]) {
if(onload) {
onload(null);
}
return null;
}
audio = new Audio();
audio.preload = 'auto';
audio.autobuffer = true;
audio.src = soundPath;
audio.onerror = function loadingSoundFailedFn() {
/* e */ if(onload) {
onload(null);
onload = null;
}
};
sd.addLoadingSound(function checkLoadedFn() {
if(3 <= audio.readyState) {
sound.frequency = (audio.sampleRate || audio.mozSampleRate);
sound.channels = (audio.channels || audio.mozChannels);
sound.bitrate = (sound.frequency * sound.channels * 2 * 8);
sound.length = audio.duration;
if(audio.buffered && audio.buffered.length && 0 < audio.buffered.end(0)) {
if(isNaN(sound.length) || sound.length === Number.POSITIVE_INFINITY) {
sound.length = audio.buffered.end(0);
}
if(onload) {
onload(sound, 200);
onload = null;
}
} else {
// Make sure the data is actually loaded
var forceLoading = function forceLoadingFn() {
audio.pause();
audio.removeEventListener('play', forceLoading, false);
if(onload) {
onload(sound, 200);
onload = null;
}
};
audio.addEventListener('play', forceLoading, false);
audio.volume = 0;
audio.play();
}
return true;
}
return false;
});
sound.audio = audio;
return sound;
} else {
data = params.data;
if(data) {
audio = new Audio();
if(audio.mozSetup) {
numSamples = data.length;
numChannels = (params.channels || 1);
samplerRate = params.frequency;
audio.mozSetup(numChannels, samplerRate);
sound.data = data;
sound.frequency = samplerRate;
sound.channels = numChannels;
sound.bitrate = (samplerRate * numChannels * 2 * 8);
sound.length = (numSamples / (samplerRate * numChannels));
sound.audio = audio;
if(onload) {
onload(sound, 200);
}
return sound;
} else {
audio = null;
}
}
}
}
if(onload) {
onload(null);
}
return null;
};
//
// WebGLSoundSource
//
function WebGLSoundSource() {
return this;
}
WebGLSoundSource.prototype = {
version: 1,
play: // Public API
function sourcePlayFn(sound, seek) {
var audioContext = this.audioContext;
if(audioContext) {
var bufferNode = this.bufferNode;
if(this.sound !== sound) {
if(bufferNode) {
bufferNode.stop(0);
}
} else {
if(bufferNode) {
return this.seek(seek);
}
}
bufferNode = this.createBufferNode(sound);
this.sound = sound;
if(!this.playing) {
this.playing = true;
this.paused = false;
this.sd.addPlayingSource(this);
}
if(seek === undefined) {
seek = 0;
}
if(0 < seek) {
var buffer = sound.buffer;
if(bufferNode.loop) {
bufferNode.start(0, seek, buffer.duration);
} else {
bufferNode.start(0, seek, (buffer.duration - seek));
}
this.playStart = (audioContext.currentTime - seek);
} else {
bufferNode.start(0);
this.playStart = audioContext.currentTime;
}
} else {
var audio;
if(this.sound !== sound) {
this.stop();
if(sound.data) {
audio = new Audio();
audio.mozSetup(sound.channels, sound.frequency);
} else {
audio = sound.audio.cloneNode(true);
}
this.sound = sound;
this.audio = audio;
audio.loop = this.looping;
audio.addEventListener('ended', this.loopAudio, false);
} else {
if(this.playing && !this.paused) {
if(this.looping) {
return true;
}
}
audio = this.audio;
}
if(!this.playing) {
this.playing = true;
this.paused = false;
this.sd.addPlayingSource(this);
}
if(seek === undefined) {
seek = 0;
}
if(0.05 < Math.abs(audio.currentTime - seek)) {
try {
audio.currentTime = seek;
} catch (e) {
// There does not seem to be any reliable way of seeking
}
}
if(sound.data) {
audio.mozWriteAudio(sound.data);
} else {
audio.play();
}
}
return true;
},
stop: function sourceStopFn() {
var playing = this.playing;
if(playing) {
this.playing = false;
this.paused = false;
var audioContext = this.audioContext;
if(audioContext) {
this.sound = null;
var bufferNode = this.bufferNode;
if(bufferNode) {
bufferNode.stop(0);
bufferNode.disconnect();
this.bufferNode = null;
}
} else {
var audio = this.audio;
if(audio) {
this.sound = null;
this.audio = null;
audio.pause();
audio.removeEventListener('ended', this.loopAudio, false);
audio = null;
}
}
this.sd.removePlayingSource(this);
}
return playing;
},
pause: function sourcePauseFn() {
if(this.playing) {
if(!this.paused) {
this.paused = true;
var audioContext = this.audioContext;
if(audioContext) {
this.playPaused = audioContext.currentTime;
this.bufferNode.stop(0);
this.bufferNode.disconnect();
this.bufferNode = null;
} else {
this.audio.pause();
}
this.sd.removePlayingSource(this);
}
return true;
}
return false;
},
resume: function sourceResumeFn(seek) {
if(this.paused) {
this.paused = false;
var audioContext = this.audioContext;
if(audioContext) {
if(seek === undefined) {
seek = (this.playPaused - this.playStart);
}
var bufferNode = this.createBufferNode(this.sound);
if(0 < seek) {
var buffer = this.sound.buffer;
if(bufferNode.loop) {
bufferNode.start(0, seek, buffer.duration);
} else {
bufferNode.start(0, seek, (buffer.duration - seek));
}
this.playStart = (audioContext.currentTime - seek);
} else {
bufferNode.start(0);
this.playStart = audioContext.currentTime;
}
} else {
var audio = this.audio;
if(seek !== undefined) {
if(0.05 < Math.abs(audio.currentTime - seek)) {
try {
audio.currentTime = seek;
} catch (e) {
// There does not seem to be any reliable way of seeking
}
}
}
audio.play();
}
this.sd.addPlayingSource(this);
return true;
}
return false;
},
rewind: function sourceRewindFn() {
if(this.playing) {
var audioContext = this.audioContext;
if(audioContext) {
var bufferNode = this.bufferNode;
if(bufferNode) {
bufferNode.stop(0);
}
bufferNode = this.createBufferNode(this.sound);
bufferNode.start(0);
this.playStart = audioContext.currentTime;
return true;
} else {
var audio = this.audio;
if(audio) {
audio.currentTime = 0;
return true;
}
}
}
return false;
},
seek: function sourceSeekFn(seek) {
if(this.playing) {
var audioContext = this.audioContext;
if(audioContext) {
if(0.05 < Math.abs((audioContext.currentTime - this.playStart) - seek)) {
var bufferNode = this.bufferNode;
if(bufferNode) {
bufferNode.stop(0);
}
bufferNode = this.createBufferNode(this.sound);
if(0 < seek) {
var buffer = this.sound.buffer;
if(bufferNode.loop) {
bufferNode.start(0, seek, buffer.duration);
} else {
bufferNode.start(0, seek, (buffer.duration - seek));
}
this.playStart = (audioContext.currentTime - seek);
} else {
bufferNode.start(0);
this.playStart = audioContext.currentTime;
}
}
return true;
} else {
var audio = this.audio;
if(audio) {
// There does not seem to be any reliable way of seeking
if(audio.currentTime > seek) {
try {
audio.currentTime = seek;
} catch (e) {
}
}
return true;
}
}
}
return false;
},
clear: function sourceClearFn() {
this.stop();
},
setAuxiliarySendFilter: function setAuxiliarySendFilterFn() {
},
setDirectFilter: function setDirectFilterFn() {
},
destroy: function sourceDestroyFn() {
this.stop();
var audioContext = this.audioContext;
if(audioContext) {
var pannerNode = this.pannerNode;
if(pannerNode) {
pannerNode.disconnect();
delete this.pannerNode;
}
delete this.audioContext;
}
}
};
WebGLSoundSource.create = function webGLSoundSourceCreateFn(sd, id, params) {
var source = new WebGLSoundSource();
source.sd = sd;
source.id = id;
source.sound = null;
source.playing = false;
source.paused = false;
var gain = (typeof params.gain === "number" ? params.gain : 1);
var looping = (params.looping || false);
var pitch = (params.pitch || 1);
var position, direction, velocity;
var audioContext = sd.audioContext;
if(audioContext) {
source.audioContext = audioContext;
source.bufferNode = null;
source.playStart = -1;
source.playPaused = -1;
var masterGainNode = sd.gainNode;
var pannerNode = audioContext.createPanner();
source.pannerNode = pannerNode;
pannerNode.connect(masterGainNode);
var gainNode = (audioContext.createGain ? audioContext.createGain() : audioContext.createGainNode());
source.gainNode = gainNode;
if(sd.linearDistance) {
if(typeof pannerNode.distanceModel === "string") {
pannerNode.distanceModel = "linear";
} else if(typeof pannerNode.LINEAR_DISTANCE === "number") {
pannerNode.distanceModel = pannerNode.LINEAR_DISTANCE;
}
}
if(typeof pannerNode.panningModel === "string") {
pannerNode.panningModel = "equalpower";
} else {
pannerNode.panningModel = pannerNode.EQUALPOWER;
}
Object.defineProperty(source, "position", {
get: function getPositionFn() {
return position.slice();
},
set: function setPositionFn(newPosition) {
position = VMath.v3Copy(newPosition, position);
if(!source.relative) {
this.pannerNode.setPosition(newPosition[0], newPosition[1], newPosition[2]);
}
},
enumerable: true,
configurable: false
});
Object.defineProperty(source, "direction", {
get: function getDirectionFn() {
return direction.slice();
},
set: function setDirectionFn(newDirection) {
direction = VMath.v3Copy(newDirection, direction);
this.pannerNode.setOrientation(newDirection[0], newDirection[1], newDirection[2]);
},
enumerable: true,
configurable: false
});
Object.defineProperty(source, "velocity", {
get: function getVelocityFn() {
return velocity.slice();
},
set: function setVelocityFn(newVelocity) {
velocity = VMath.v3Copy(newVelocity, velocity);
this.pannerNode.setVelocity(newVelocity[0], newVelocity[1], newVelocity[2]);
},
enumerable: true,
configurable: false
});
Object.defineProperty(source, "gain", {
get: function getGainFn() {
return gain;
},
set: function setGainFn(newGain) {
gain = newGain;
this.gainNode.gain.value = newGain;
},
enumerable: true,
configurable: false
});
source.createBufferNode = function createBufferNodeFn(sound) {
var buffer = sound.buffer;
var bufferNode = audioContext.createBufferSource();
bufferNode.buffer = buffer;
bufferNode.loop = looping;
bufferNode.playbackRate.value = pitch;
bufferNode.connect(gainNode);
gainNode.disconnect();
if(1 < sound.channels) {
// We do not support panning of stereo sources
gainNode.connect(masterGainNode);
} else {
gainNode.connect(pannerNode);
}
// Backwards compatibility
if(!bufferNode.start) {
bufferNode.start = function audioStart(when, offset, duration) {
if(arguments.length <= 1) {
this.noteOn(when);
} else {
this.noteGrainOn(when, offset, duration);
}
};
}
if(!bufferNode.stop) {
bufferNode.stop = function audioStop(when) {
this.noteOff(when);
};
}
this.bufferNode = bufferNode;
return bufferNode;
};
Object.defineProperty(source, "looping", {
get: function getLoopingFn() {
return looping;
},
set: function setLoopingFn(newLooping) {
looping = newLooping;
var bufferNode = this.bufferNode;
if(bufferNode) {
bufferNode.loop = newLooping;
}
},
enumerable: true,
configurable: false
});
Object.defineProperty(source, "pitch", {
get: function getPitchFn() {
return pitch;
},
set: function setPitchFn(newPitch) {
pitch = newPitch;
var bufferNode = this.bufferNode;
if(bufferNode) {
bufferNode.playbackRate.value = newPitch;
}
},
enumerable: true,
configurable: false
});
Object.defineProperty(source, "tell", {
get: function tellFn() {
if(this.playing) {
if(this.paused) {
return (this.playPaused - this.playStart);
} else {
return (audioContext.currentTime - this.playStart);
}
} else {
return 0;
}
},
enumerable: true,
configurable: false
});
Object.defineProperty(source, "minDistance", {
get: function getMinDistanceFn() {
return pannerNode.refDistance;
},
set: function setMinDistanceFn(minDistance) {
if(this.pannerNode.maxDistance === minDistance) {
minDistance = this.pannerNode.maxDistance * 0.999;
}
this.pannerNode.refDistance = minDistance;
},
enumerable: true,
configurable: false
});
Object.defineProperty(source, "maxDistance", {
get: function getMaxDistanceFn() {
return pannerNode.maxDistance;
},
set: function setMaxDistanceFn(maxDistance) {
if(this.pannerNode.refDistance === maxDistance) {
maxDistance = this.pannerNode.refDistance * 1.001;
}
this.pannerNode.maxDistance = maxDistance;
},
enumerable: true,
configurable: false
});
Object.defineProperty(source, "rollOff", {
get: function getRolloffFactorFn() {
return pannerNode.rolloffFactor;
},
set: function setRolloffFactorFn(rollOff) {
this.pannerNode.rolloffFactor = rollOff;
},
enumerable: true,
configurable: false
});
} else {
source.audio = null;
source.gainFactor = 1;
source.pitch = pitch;
source.updateAudioVolume = function updateAudioVolumeFn() {
var audio = this.audio;
if(audio) {
var volume = Math.min((this.gainFactor * gain), 1);
audio.volume = volume;
if(0 >= volume) {
audio.muted = true;
} else {
audio.muted = false;
}
}
};
Object.defineProperty(source, "position", {
get: function getPositionFn() {
return position.slice();
},
set: function setPositionFn(newPosition) {
position = VMath.v3Copy(newPosition, position);
},
enumerable: true,
configurable: false
});
Object.defineProperty(source, "direction", {
get: function getDirectionFn() {
return direction.slice();
},
set: function setDirectionFn(newDirection) {
direction = VMath.v3Copy(newDirection, direction);
},
enumerable: true,
configurable: false
});
Object.defineProperty(source, "velocity", {
get: function getVelocityFn() {
return velocity.slice();
},
set: function setVelocityFn(newVelocity) {
velocity = VMath.v3Copy(newVelocity, velocity);
},
enumerable: true,
configurable: false
});
Object.defineProperty(source, "gain", {
get: function getGainFn() {
return gain;
},
set: function setGainFn(newGain) {
gain = newGain;
source.gainFactor = -1;
},
enumerable: true,
configurable: false
});
if(sd.loopingSupported) {
Object.defineProperty(source, "looping", {
get: function getLoopingFn() {
return looping;
},
set: function setLoopingFn(newLooping) {
looping = newLooping;
var audio = source.audio;
if(audio) {
audio.loop = newLooping;
}
},
enumerable: true,
configurable: false
});
source.loopAudio = function loopAudioFn() {
var audio = source.audio;
if(audio) {
source.playing = false;
source.sd.removePlayingSource(source);
}
};
} else {
source.looping = looping;
source.loopAudio = function loopAudioFn() {
var audio = source.audio;
if(audio) {
if(source.looping) {
audio.currentTime = 0;
audio.play();
} else {
source.playing = false;
source.sd.removePlayingSource(source);
}
}
};
}
Object.defineProperty(source, "tell", {
get: function tellFn() {
var audio = source.audio;
if(audio) {
return audio.currentTime;
} else {
return 0;
}
},
enumerable: true,
configurable: false
});
}
source.relative = params.relative;
source.position = (params.position || VMath.v3BuildZero());
source.direction = (params.direction || VMath.v3BuildZero());
source.velocity = (params.velocity || VMath.v3BuildZero());
source.minDistance = (params.minDistance || 1);
source.maxDistance = (params.maxDistance || 3.402823466e+38);
source.rollOff = (params.rollOff || 1);
return source;
};
//
// WebGLSoundDevice
//
function WebGLSoundDevice() {
return this;
}
WebGLSoundDevice.prototype = {
version: 1,
vendor: "Turbulenz",
createSource: // Public API
function createSourceFn(params) {
this.lastSourceID += 1;
return WebGLSoundSource.create(this, this.lastSourceID, params);
},
createSound: function createSoundFn(params) {
return WebGLSound.create(this, params);
},
loadSoundsArchive: function loadSoundsArchiveFn(params) {
var src = params.src;
if(typeof SoundTARLoader !== 'undefined') {
SoundTARLoader.create({
sd: this,
src: src,
uncompress: params.uncompress,
onsoundload: function tarSoundLoadedFn(texture) {
params.onsoundload(texture);
},
onload: function soundTarLoadedFn(success/*, status */ ) {
if(params.onload) {
params.onload(success);
}
},
onerror: function soundTarFailedFn() {
if(params.onload) {
params.onload(false);
}
}
});
return true;
} else {
(TurbulenzEngine).callOnError('Missing archive loader required for ' + src);
return false;
}
},
createEffect: function createEffectFn() {
/* params */ return null;
},
createEffectSlot: function createEffectSlotFn() {
/* params */ return null;
},
createFilter: function createFilterFn() {
/* params */ return null;
},
update: function soundUpdateFn() {
var sqrt = Math.sqrt;
var listenerTransform = this.listenerTransform;
var listenerPosition0 = listenerTransform[9];
var listenerPosition1 = listenerTransform[10];
var listenerPosition2 = listenerTransform[11];
var listenerGain = this.listenerGain;
var linearDistance = this.linearDistance;
var playingSources = this.playingSources;
var id;
for(id in playingSources) {
if(playingSources.hasOwnProperty(id)) {
var source = playingSources[id];
// Change volume depending on distance to listener
var minDistance = source.minDistance;
var maxDistance = source.maxDistance;
var position = source.position;
var position0 = position[0];
var position1 = position[1];
var position2 = position[2];
var distanceSq;
if(source.relative) {
distanceSq = ((position0 * position0) + (position1 * position1) + (position2 * position2));
} else {
var delta0 = (listenerPosition0 - position0);
var delta1 = (listenerPosition1 - position1);
var delta2 = (listenerPosition2 - position2);
distanceSq = ((delta0 * delta0) + (delta1 * delta1) + (delta2 * delta2));
}
var gainFactor;
if(distanceSq <= (minDistance * minDistance)) {
gainFactor = 1;
} else if(distanceSq >= (maxDistance * maxDistance)) {
gainFactor = 0;
} else {
var distance = sqrt(distanceSq);
if(linearDistance) {
gainFactor = ((maxDistance - distance) / (maxDistance - minDistance));
} else {
gainFactor = minDistance / (minDistance + (source.rollOff * (distance - minDistance)));
}
}
gainFactor *= listenerGain;
if(source.gainFactor !== gainFactor) {
source.gainFactor = gainFactor;
source.updateAudioVolume();
}
}
}
},
isSupported: function isSupportedFn(name) {
if("FILEFORMAT_OGG" === name) {
return this.supportedExtensions.ogg;
} else if("FILEFORMAT_MP3" === name) {
return this.supportedExtensions.mp3;
} else if("FILEFORMAT_WAV" === name) {
return this.supportedExtensions.wav;
}
return false;
},
addLoadingSound: // Private API
function addLoadingSoundFn(soundCheckCall) {
var loadingSounds = this.loadingSounds;
loadingSounds[loadingSounds.length] = soundCheckCall;
var loadingInterval = this.loadingInterval;
var that = this;
if(loadingInterval === null) {
this.loadingInterval = loadingInterval = window.setInterval(function checkLoadingSources() {
var numLoadingSounds = loadingSounds.length;
var n = 0;
do {
var soundCheck = loadingSounds[n];
if(soundCheck()) {
numLoadingSounds -= 1;
if(n < numLoadingSounds) {
loadingSounds[n] = loadingSounds[numLoadingSounds];
}
loadingSounds.length = numLoadingSounds;
} else {
n += 1;
}
}while(n < numLoadingSounds);
if(numLoadingSounds === 0) {
window.clearInterval(loadingInterval);
that.loadingInterval = null;
}
}, 100);
}
},
addPlayingSource: function addPlayingSourceFn(source) {
this.playingSources[source.id] = source;
},
removePlayingSource: function removePlayingSourceFn(source) {
delete this.playingSources[source.id];
},
isResourceSupported: function isResourceSupportedFn(soundPath) {
var extension = soundPath.slice(-3).toLowerCase();
return this.supportedExtensions[extension];
},
destroy: function soundDeviceDestroyFn() {
var loadingInterval = this.loadingInterval;
if(loadingInterval !== null) {
window.clearInterval(loadingInterval);
this.loadingInterval = null;
}
var loadingSounds = this.loadingSounds;
if(loadingSounds) {
loadingSounds.length = 0;
this.loadingSounds = null;
}
var playingSources = this.playingSources;
var id;
if(playingSources) {
for(id in playingSources) {
if(playingSources.hasOwnProperty(id)) {
var source = playingSources[id];
if(source) {
source.stop();
}
}
}
this.playingSources = null;
}
}
};
// Constructor function
WebGLSoundDevice.create = function webGLSoundDeviceFn(params) {
var sd = new WebGLSoundDevice();
sd.extensions = '';
sd.renderer = 'HTML5 Audio';
sd.alcVersion = "0";
sd.alcExtensions = '';
sd.alcEfxVersion = "0";
sd.alcMaxAuxiliarySends = 0;
sd.deviceSpecifier = (params.deviceSpecifier || null);
sd.frequency = (params.frequency || 44100);
sd.dopplerFactor = (params.dopplerFactor || 1);
sd.dopplerVelocity = (params.dopplerVelocity || 1);
sd.speedOfSound = (params.speedOfSound || 343.29998779296875);
sd.linearDistance = (params.linearDistance !== undefined ? params.linearDistance : true);
sd.loadingSounds = [];
sd.loadingInterval = null;
sd.playingSources = {
};
sd.lastSourceID = 0;
var AudioContextConstructor = (window.AudioContext || window.webkitAudioContext);
if(AudioContextConstructor) {
var audioContext;
try {
audioContext = new AudioContextConstructor();
} catch (error) {
(TurbulenzEngine).callOnError('Failed to create AudioContext:' + error);
return null;
}
if(audioContext.sampleRate === 0) {
return null;
}
sd.renderer = 'WebAudio';
sd.audioContext = audioContext;
sd.frequency = audioContext.sampleRate;
sd.gainNode = (audioContext.createGain ? audioContext.createGain() : audioContext.createGainNode());
sd.gainNode.connect(audioContext.destination);
var listener = audioContext.listener;
listener.dopplerFactor = sd.dopplerFactor;
listener.speedOfSound = sd.speedOfSound;
var listenerTransform, listenerVelocity;
Object.defineProperty(sd, "listenerTransform", {
get: function getListenerTransformFn() {
return listenerTransform.slice();
},
set: function setListenerTransformFn(transform) {
listenerTransform = VMath.m43Copy(transform, listenerTransform);
var position0 = transform[9];
var position1 = transform[10];
var position2 = transform[11];
listener.setPosition(position0, position1, position2);
listener.setOrientation(-transform[6], -transform[7], -transform[8], transform[3], transform[4], transform[5]);
},
enumerable: true,
configurable: false
});
Object.defineProperty(sd, "listenerVelocity", {
get: function getListenerVelocityFn() {
return listenerVelocity.slice();
},
set: function setListenerVelocityFn(velocity) {
listenerVelocity = VMath.v3Copy(velocity, listenerVelocity);
listener.setVelocity(velocity[0], velocity[1], velocity[2]);
},
enumerable: true,
configurable: false
});
sd.update = function soundDeviceUpdate() {
this.gainNode.gain.value = this.listenerGain;
var listenerPosition0 = listenerTransform[9];
var listenerPosition1 = listenerTransform[10];
var listenerPosition2 = listenerTransform[11];
var playingSources = this.playingSources;
var stopped = [];
var id;
for(id in playingSources) {
if(playingSources.hasOwnProperty(id)) {
var source = playingSources[id];
var tell = (audioContext.currentTime - source.playStart);
if(source.bufferNode.buffer.duration < tell) {
if(source.looping) {
source.playStart = (audioContext.currentTime - (tell - source.bufferNode.buffer.duration));
} else {
source.playing = false;
source.sound = null;
source.bufferNode.disconnect();
source.bufferNode = null;
stopped[stopped.length] = id;
continue;
}
}
if(source.relative) {
var position = source.position;
var pannerNode = source.pannerNode;
pannerNode.setPosition(position[0] + listenerPosition0, position[1] + listenerPosition1, position[2] + listenerPosition2);
}
}
}
var numStopped = stopped.length;
var n;
for(n = 0; n < numStopped; n += 1) {
delete playingSources[stopped[n]];
}
};
}
sd.listenerTransform = (params.listenerTransform || VMath.m43BuildIdentity());
sd.listenerVelocity = (params.listenerVelocity || VMath.v3BuildZero());
sd.listenerGain = (typeof params.listenerGain === "number" ? params.listenerGain : 1);
// Need a temporary Audio element to test capabilities
var audio = new Audio();
if(sd.audioContext) {
sd.loopingSupported = true;
} else {
if(audio.mozSetup) {
try {
audio.mozSetup(1, 22050);
} catch (e) {
return null;
}
}
// Check for looping support
sd.loopingSupported = (typeof audio.loop === 'boolean');
}
// Check for supported extensions
var supportedExtensions = {
ogg: false,
mp3: false,
wav: false
};
if(audio.canPlayType('application/ogg')) {
supportedExtensions.ogg = true;
}
if(audio.canPlayType('audio/mp3')) {
supportedExtensions.mp3 = true;
}
if(audio.canPlayType('audio/wav')) {
supportedExtensions.wav = true;
}
sd.supportedExtensions = supportedExtensions;
audio = null;
return sd;
};
/* This file was generated from TypeScript source C:/Users/autobuild/turbulenz/engine/tslib/webgl/soundtarloader.ts */
// Copyright (c) 2011-2012 Turbulenz Limited
/*global TurbulenzEngine*/
/*global Uint8Array*/
/*global window*/
"use strict";
/// <reference path="sounddevice.ts" />
// Some old browsers had a broken implementation of ArrayBuffer without a "slice" method
if((typeof ArrayBuffer !== "undefined") && (ArrayBuffer.prototype !== undefined) && (ArrayBuffer.prototype.slice === undefined)) {
ArrayBuffer.prototype.slice = function ArrayBufferSlice(s, e) {
var length = this.byteLength;
if(s === undefined) {
s = 0;
} else if(s < 0) {
s += length;
}
if(e === undefined) {
e = length;
} else if(e < 0) {
e += length;
}
length = (e - s);
if(0 < length) {
var src = new Uint8Array(this, s, length);
var dst = new Uint8Array(src);
return dst.buffer;
} else {
return new ArrayBuffer(0);
}
};
}
function SoundTARLoader() {
return this;
}
SoundTARLoader.prototype = {
version: 1,
processBytes: function processBytesFn(bytes) {
var offset = 0;
var totalSize = bytes.length;
function skip(limit) {
offset += limit;
}
function getString(limit) {
var index = offset;
var nextOffset = (index + limit);
var c = bytes[index];
var ret;
if(c && 0 < limit) {
index += 1;
var s = new Array(limit);
var n = 0;
do {
s[n] = c;
n += 1;
c = bytes[index];
index += 1;
}while(c && n < limit);
// remove padding whitespace
while(s[n - 1] === 32) {
n -= 1;
}
s.length = n;
ret = String.fromCharCode.apply(null, s);
} else {
ret = '';
}
offset = nextOffset;
return ret;
}
function getNumber(text) {
/*jshint regexp: false*/
text = text.replace(/[^\d]/g, '');
/*jshint regexp: true*/
return parseInt('0' + text, 8);
}
var header = {
fileName: null,
length: //mode : null,
//uid : null,
//gid : null,
0,
fileType: //lastModified : null,
//checkSum : null,
null,
ustarSignature: //linkName : null,
null,
fileNamePrefix: //ustarVersion : null,
//ownerUserName : null,
//ownerGroupName : null,
//deviceMajor : null,
//deviceMinor : null,
null
};
function parseHeader(header) {
header.fileName = getString(100);
skip(8)//header.mode = getString(8);
;
skip(8)//header.uid = getString(8);
;
skip(8)//header.gid = getString(8);
;
header.length = getNumber(getString(12));
skip(12)//header.lastModified = getString(12);
;
skip(8)//header.checkSum = getString(8);
;
header.fileType = getString(1);
skip(100)//header.linkName = getString(100);
;
header.ustarSignature = getString(6);
skip(2)//header.ustarVersion = getString(2);
;
skip(32)//header.ownerUserName = getString(32);
;
skip(32)//header.ownerGroupName = getString(32);
;
skip(8)//header.deviceMajor = getString(8);
;
skip(8)//header.deviceMinor = getString(8);
;
header.fileNamePrefix = getString(155);
offset += 12;
}
var sd = this.sd;
var uncompress = this.uncompress;
var onsoundload = this.onsoundload;
var result = true;
// This function is called for each sound in the archive,
// synchronously if there is an immediate error,
// asynchronously otherwise. If one fails, the load result
// for the whole archive is false.
this.soundsLoading = 0;
var that = this;
function onload(sound) {
that.soundsLoading -= 1;
if(sound) {
onsoundload(sound);
} else {
result = false;
}
}
while((offset + 512) <= totalSize) {
parseHeader(header);
if(0 < header.length) {
var fileName;
if(header.fileName === "././@LongLink") {
// name in next chunk
fileName = getString(256);
offset += 256;
parseHeader(header);
} else {
if(header.fileNamePrefix && header.ustarSignature === "ustar") {
fileName = (header.fileNamePrefix + header.fileName);
} else {
fileName = header.fileName;
}
}
if('' === header.fileType || '0' === header.fileType) {
//console.log('Loading "' + fileName + '" (' + header.length + ')');
this.soundsLoading += 1;
sd.createSound({
src: fileName,
data: (sd.audioContext ? bytes.buffer.slice(offset, (offset + header.length)) : bytes.subarray(offset, (offset + header.length))),
uncompress: uncompress,
onload: onload
});
}
offset += (Math.floor((header.length + 511) / 512) * 512);
}
}
bytes = null;
return result;
},
isValidHeader: function isValidHeaderFn() {
/* header */ return true;
}
};
// Constructor function
SoundTARLoader.create = function tgaLoaderFn(params) {
var loader = new SoundTARLoader();
loader.sd = params.sd;
loader.uncompress = params.uncompress;
loader.onsoundload = params.onsoundload;
loader.onload = params.onload;
loader.onerror = params.onerror;
loader.soundsLoading = 0;
var src = params.src;
if(src) {
loader.src = src;
var xhr;
if(window.XMLHttpRequest) {
xhr = new window.XMLHttpRequest();
} else if(window.ActiveXObject) {
xhr = new window.ActiveXObject("Microsoft.XMLHTTP");
} else {
if(params.onerror) {
params.onerror("No XMLHTTPRequest object could be created");
}
return null;
}
xhr.onreadystatechange = function () {
if(xhr.readyState === 4) {
if(!TurbulenzEngine || !TurbulenzEngine.isUnloading()) {
var xhrStatus = xhr.status;
var xhrStatusText = xhr.status !== 0 && xhr.statusText || 'No connection';
// Sometimes the browser sets status to 200 OK when the connection is closed
// before the message is sent (weird!).
// In order to address this we fail any completely empty responses.
// Hopefully, nobody will get a valid response with no headers and no body!
if(xhr.getAllResponseHeaders() === "" && xhr.responseText === "" && xhrStatus === 200 && xhrStatusText === 'OK') {
loader.onload(false, 0);
return;
}
if(xhrStatus === 200 || xhrStatus === 0) {
var buffer;
if(xhr.responseType === "arraybuffer") {
buffer = xhr.response;
} else if(xhr.mozResponseArrayBuffer) {
buffer = xhr.mozResponseArrayBuffer;
} else//if (xhr.responseText !== null)
{
/*jshint bitwise: false*/
var text = xhr.responseText;
var numChars = text.length;
var i;
buffer = [];
buffer.length = numChars;
for(i = 0; i < numChars; i += 1) {
buffer[i] = (text.charCodeAt(i) & 0xff);
}
/*jshint bitwise: true*/
}
// Fix for loading from file
if(xhrStatus === 0 && window.location.protocol === "file:") {
xhrStatus = 200;
}
// processBytes returns false if any of the
// entries in the archive was not supported or
// couldn't be loaded as a sound.
var archiveResult = loader.processBytes(new Uint8Array(buffer));
// Wait until all sounds have been loaded (or
// failed) and return the result.
if(loader.onload) {
var callOnload = function callOnloadFn() {
if(0 < loader.soundsLoading) {
if(!TurbulenzEngine || !TurbulenzEngine.isUnloading()) {
window.setTimeout(callOnload, 100);
}
} else {
loader.onload(archiveResult, xhrStatus);
}
};
callOnload();
}
} else {
if(loader.onerror) {
loader.onerror();
}
}
}
// break circular reference
xhr.onreadystatechange = null;
xhr = null;
}
};
xhr.open("GET", params.src, true);
if(xhr.hasOwnProperty && xhr.hasOwnProperty("responseType")) {
xhr.responseType = "arraybuffer";
} else if(xhr.overrideMimeType) {
xhr.overrideMimeType("text/plain; charset=x-user-defined");
} else {
xhr.setRequestHeader("Content-Type", "text/plain; charset=x-user-defined");
}
xhr.send(null);
}
return loader;
};
/* This file was generated from TypeScript source C:/Users/autobuild/turbulenz/engine/tslib/webgl/tarloader.ts */
// Copyright (c) 2011-2012 Turbulenz Limited
/*global TurbulenzEngine*/
/*global Uint8Array*/
/*global window*/
"use strict";
function TARLoader() {
return this;
}
TARLoader.prototype = {
version: 1,
processBytes: function processBytesFn(bytes) {
var offset = 0;
var totalSize = bytes.length;
function skip(limit) {
offset += limit;
}
function getString(limit) {
var index = offset;
var nextOffset = (index + limit);
var c = bytes[index];
var ret;
if(c && 0 < limit) {
index += 1;
var s = new Array(limit);
var n = 0;
do {
s[n] = c;
n += 1;
c = bytes[index];
index += 1;
}while(c && n < limit);
// remove padding whitespace
while(s[n - 1] === 32) {
n -= 1;
}
s.length = n;
ret = String.fromCharCode.apply(null, s);
} else {
ret = '';
}
offset = nextOffset;
return ret;
}
function getNumber(text) {
/*jshint regexp: false*/
text = text.replace(/[^\d]/g, '');
/*jshint regexp: true*/
return parseInt('0' + text, 8);
}
var header = {
fileName: null,
length: //mode : null,
//uid : null,
//gid : null,
0,
fileType: //lastModified : null,
//checkSum : null,
null,
ustarSignature: //linkName : null,
null,
fileNamePrefix: //ustarVersion : null,
//ownerUserName : null,
//ownerGroupName : null,
//deviceMajor : null,
//deviceMinor : null,
null
};
function parseHeader(header) {
header.fileName = getString(100);
skip(8)//header.mode = getString(8);
;
skip(8)//header.uid = getString(8);
;
skip(8)//header.gid = getString(8);
;
header.length = getNumber(getString(12));
skip(12)//header.lastModified = getString(12);
;
skip(8)//header.checkSum = getString(8);
;
header.fileType = getString(1);
skip(100)//header.linkName = getString(100);
;
header.ustarSignature = getString(6);
skip(2)//header.ustarVersion = getString(2);
;
skip(32)//header.ownerUserName = getString(32);
;
skip(32)//header.ownerGroupName = getString(32);
;
skip(8)//header.deviceMajor = getString(8);
;
skip(8)//header.deviceMinor = getString(8);
;
header.fileNamePrefix = getString(155);
offset += 12;
}
var gd = this.gd;
var mipmaps = this.mipmaps;
var ontextureload = this.ontextureload;
var result = true;
this.texturesLoading = 0;
var that = this;
function onload(texture) {
that.texturesLoading -= 1;
if(texture) {
ontextureload(texture);
} else {
offset = totalSize;
result = false;
}
}
while((offset + 512) <= totalSize) {
parseHeader(header);
if(0 < header.length) {
var fileName;
if(header.fileName === "././@LongLink") {
// name in next chunk
fileName = getString(256);
offset += 256;
parseHeader(header);
} else {
if(header.fileNamePrefix && header.ustarSignature === "ustar") {
fileName = (header.fileNamePrefix + header.fileName);
} else {
fileName = header.fileName;
}
}
if('' === header.fileType || '0' === header.fileType) {
//console.log('Loading "' + fileName + '" (' + header.length + ')');
this.texturesLoading += 1;
gd.createTexture({
src: fileName,
data: bytes.subarray(offset, (offset + header.length)),
mipmaps: mipmaps,
onload: onload
});
}
offset += (Math.floor((header.length + 511) / 512) * 512);
}
}
bytes = null;
return result;
},
isValidHeader: function isValidHeaderFn() {
/* header */ return true;
}
};
// Constructor function
TARLoader.create = function TarLoaderCreateFn(params) {
var loader = new TARLoader();
loader.gd = params.gd;
loader.mipmaps = params.mipmaps;
loader.ontextureload = params.ontextureload;
loader.onload = params.onload;
loader.onerror = params.onerror;
loader.texturesLoading = 0;
var src = params.src;
if(src) {
loader.src = src;
var xhr;
if(window.XMLHttpRequest) {
xhr = new window.XMLHttpRequest();
} else if(window.ActiveXObject) {
xhr = new window.ActiveXObject("Microsoft.XMLHTTP");
} else {
if(params.onerror) {
params.onerror("No XMLHTTPRequest object could be created");
}
return null;
}
xhr.onreadystatechange = function () {
if(xhr.readyState === 4) {
if(!TurbulenzEngine || !TurbulenzEngine.isUnloading()) {
var xhrStatus = xhr.status;
var xhrStatusText = xhr.status !== 0 && xhr.statusText || 'No connection';
// Sometimes the browser sets status to 200 OK when the connection is closed
// before the message is sent (weird!).
// In order to address this we fail any completely empty responses.
// Hopefully, nobody will get a valid response with no headers and no body!
if(xhr.getAllResponseHeaders() === "" && xhr.responseText === "" && xhrStatus === 200 && xhrStatusText === 'OK') {
loader.onload(false, 0);
return;
}
if(xhrStatus === 200 || xhrStatus === 0) {
var buffer;
if(xhr.responseType === "arraybuffer") {
buffer = xhr.response;
} else if(xhr.mozResponseArrayBuffer) {
buffer = xhr.mozResponseArrayBuffer;
} else//if (xhr.responseText !== null)
{
/*jshint bitwise: false*/
var text = xhr.responseText;
var numChars = text.length;
buffer = [];
buffer.length = numChars;
for(var i = 0; i < numChars; i += 1) {
buffer[i] = (text.charCodeAt(i) & 0xff);
}
/*jshint bitwise: true*/
}
// Fix for loading from file
if(xhrStatus === 0 && window.location.protocol === "file:") {
xhrStatus = 200;
}
if(loader.processBytes(new Uint8Array(buffer))) {
if(loader.onload) {
var callOnload = function callOnloadFn() {
if(0 < loader.texturesLoading) {
if(!TurbulenzEngine || !TurbulenzEngine.isUnloading()) {
window.setTimeout(callOnload, 100);
}
} else {
loader.onload(true, xhrStatus);
}
};
callOnload();
}
} else {
if(loader.onerror) {
loader.onerror();
}
}
} else {
if(loader.onerror) {
loader.onerror();
}
}
}
// break circular reference
xhr.onreadystatechange = null;
xhr = null;
}
};
xhr.open("GET", params.src, true);
if(xhr.hasOwnProperty && xhr.hasOwnProperty("responseType")) {
xhr.responseType = "arraybuffer";
} else if(xhr.overrideMimeType) {
xhr.overrideMimeType("text/plain; charset=x-user-defined");
} else {
xhr.setRequestHeader("Content-Type", "text/plain; charset=x-user-defined");
}
xhr.send(null);
}
return loader;
};
/* This file was generated from TypeScript source C:/Users/autobuild/turbulenz/engine/tslib/webgl/tgaloader.ts */
// Copyright (c) 2011-2012 Turbulenz Limited
/*global TurbulenzEngine*/
/*global Uint8Array*/
/*global Uint16Array*/
/*global window*/
"use strict";
function TGALoader() {
return this;
}
TGALoader.prototype = {
version: 1,
TYPE_MAPPED: 1,
TYPE_COLOR: 2,
TYPE_GRAY: 3,
TYPE_MAPPED_RLE: 9,
TYPE_COLOR_RLE: 10,
TYPE_GRAY_RLE: 11,
DESC_ABITS: 0x0f,
DESC_HORIZONTAL: 0x10,
DESC_VERTICAL: 0x20,
SIGNATURE: "TRUEVISION-XFILE",
RLE_PACKETSIZE: 0x80,
processBytes: function processBytesFn(bytes) {
var header = this.parseHeader(bytes);
if(!this.isValidHeader(header)) {
return;
}
var offset = 18;
this.width = header.width;
this.height = header.height;
this.bytesPerPixel = Math.floor(header.bpp / 8);
/*jshint bitwise: false*/
this.horzRev = (header.descriptor & this.DESC_HORIZONTAL);
this.vertRev = !(header.descriptor & this.DESC_VERTICAL);
/*jshint bitwise: true*/
var rle = false;
var gd = this.gd;
switch(header.imageType) {
case this.TYPE_MAPPED_RLE:
rle = true;
if(header.colorMapSize > 24) {
this.format = gd.PIXELFORMAT_R8G8B8A8;
} else if(header.colorMapSize > 16) {
this.format = gd.PIXELFORMAT_R8G8B8;
} else {
this.format = gd.PIXELFORMAT_R5G5B5A1;
}
break;
case this.TYPE_MAPPED:
if(header.colorMapSize > 24) {
this.format = gd.PIXELFORMAT_R8G8B8A8;
} else if(header.colorMapSize > 16) {
this.format = gd.PIXELFORMAT_R8G8B8;
} else {
this.format = gd.PIXELFORMAT_R5G5B5A1;
}
break;
case this.TYPE_GRAY_RLE:
rle = true;
this.format = gd.PIXELFORMAT_L8;
break;
case this.TYPE_GRAY:
this.format = gd.PIXELFORMAT_L8;
break;
case this.TYPE_COLOR_RLE:
rle = true;
switch(this.bytesPerPixel) {
case 4:
this.format = gd.PIXELFORMAT_R8G8B8A8;
break;
case 3:
this.format = gd.PIXELFORMAT_R8G8B8;
break;
case 2:
this.format = gd.PIXELFORMAT_R5G5B5A1;
break;
default:
return;
}
break;
case this.TYPE_COLOR:
switch(this.bytesPerPixel) {
case 4:
this.format = gd.PIXELFORMAT_R8G8B8A8;
break;
case 3:
this.format = gd.PIXELFORMAT_R8G8B8;
break;
case 2:
this.format = gd.PIXELFORMAT_R5G5B5A1;
break;
default:
return;
}
break;
default:
return;
}
// Skip the image ID field.
if(header.idLength) {
offset += header.idLength;
if(offset > bytes.length) {
return;
}
}
if(this.TYPE_MAPPED_RLE === header.imageType || this.TYPE_MAPPED === header.imageType) {
if(header.colorMapType !== 1) {
return;
}
} else if(header.colorMapType !== 0) {
return;
}
if(header.colorMapType === 1) {
var index = header.colorMapIndex;
var length = header.colorMapLength;
if(length === 0) {
return;
}
var pelbytes = Math.floor(header.colorMapSize / 8);
var numColors = (length + index);
var colorMap = [];
colorMap.length = (numColors * pelbytes);
this.colorMap = colorMap;
this.colorMapBytesPerPixel = pelbytes;
// Zero the entries up to the beginning of the map
var j;
for(j = 0; j < (index * pelbytes); j += 1) {
colorMap[j] = 0;
}
// Read in the rest of the colormap
for(j = (index * pelbytes); j < (index * pelbytes); j += 1 , offset += 1) {
colorMap[j] = bytes[offset];
}
offset += (length * pelbytes);
if(offset > bytes.length) {
return;
}
if(pelbytes >= 3) {
// Rearrange the colors from BGR to RGB
for(j = (index * pelbytes); j < (length * pelbytes); j += pelbytes) {
var tmp = colorMap[j];
colorMap[j] = colorMap[j + 2];
colorMap[j + 2] = tmp;
}
}
}
var data = bytes.subarray(offset);
bytes = null;
if(rle) {
data = this.expandRLE(data);
}
var size = (this.width * this.height * this.bytesPerPixel);
if(data.length < size) {
return;
}
if(this.horzRev) {
this.flipHorz(data);
}
if(this.vertRev) {
this.flipVert(data);
}
if(this.colorMap) {
data = this.expandColorMap(data);
} else if(2 < this.bytesPerPixel) {
this.convertBGR2RGB(data);
} else if(2 === this.bytesPerPixel) {
data = this.convertARGB2RGBA(data);
}
this.data = data;
},
parseHeader: function parseHeaderFn(bytes) {
/*jshint bitwise: false*/
var header = {
idLength: bytes[0],
colorMapType: bytes[1],
imageType: bytes[2],
colorMapIndex: ((bytes[4] << 8) | bytes[3]),
colorMapLength: ((bytes[6] << 8) | bytes[5]),
colorMapSize: bytes[7],
xOrigin: ((bytes[9] << 8) | bytes[8]),
yOrigin: ((bytes[11] << 8) | bytes[10]),
width: ((bytes[13] << 8) | bytes[12]),
height: ((bytes[15] << 8) | bytes[14]),
bpp: bytes[16],
descriptor: // Image descriptor:
// 3-0: attribute bpp
// 4: left-to-right
// 5: top-to-bottom
// 7-6: zero
bytes[17]
};
/*jshint bitwise: true*/
return header;
},
isValidHeader: function isValidHeaderFn(header) {
if(this.TYPE_MAPPED_RLE === header.imageType || this.TYPE_MAPPED === header.imageType) {
if(header.colorMapType !== 1) {
return false;
}
} else if(header.colorMapType !== 0) {
return false;
}
if(header.colorMapType === 1) {
if(header.colorMapLength === 0) {
return false;
}
}
switch(header.imageType) {
case this.TYPE_MAPPED_RLE:
case this.TYPE_MAPPED:
break;
case this.TYPE_GRAY_RLE:
case this.TYPE_GRAY:
break;
case this.TYPE_COLOR_RLE:
case this.TYPE_COLOR:
switch(Math.floor(header.bpp / 8)) {
case 4:
case 3:
case 2:
break;
default:
return false;
}
break;
default:
return false;
}
if(16384 < header.width) {
return false;
}
if(16384 < header.height) {
return false;
}
return true;
},
expandRLE: function expandRLEFn(data) {
var pelbytes = this.bytesPerPixel;
var width = this.width;
var height = this.height;
var datasize = pelbytes;
var size = (width * height * pelbytes);
var RLE_PACKETSIZE = this.RLE_PACKETSIZE;
var dst = new Uint8Array(size);
var src = 0, dest = 0, n, k;
do {
var count = data[src];
src += 1;
/*jshint bitwise: false*/
var bytes = (((count & ~RLE_PACKETSIZE) + 1) * datasize);
if(count & RLE_PACKETSIZE) {
// Optimized case for single-byte encoded data
if(datasize === 1) {
var r = data[src];
src += 1;
for(n = 0; n < bytes; n += 1) {
dst[dest + k] = r;
}
} else {
// Fill the buffer with the next value
for(n = 0; n < datasize; n += 1) {
dst[dest + n] = data[src + n];
}
src += datasize;
for(k = datasize; k < bytes; k += datasize) {
for(n = 0; n < datasize; n += 1) {
dst[dest + k + n] = dst[dest + n];
}
}
}
} else {
// Read in the buffer
for(n = 0; n < bytes; n += 1) {
dst[dest + n] = data[src + n];
}
src += bytes;
}
/*jshint bitwise: true*/
dest += bytes;
}while(dest < size);
return dst;
},
expandColorMap: function expandColorMapFn(data) {
// Unpack image
var pelbytes = this.bytesPerPixel;
var width = this.width;
var height = this.height;
var size = (width * height * pelbytes);
var dst = new Uint8Array(size);
var dest = 0, src = 0;
var palette = this.colorMap;
delete this.colorMap;
if(pelbytes === 2 || pelbytes === 3 || pelbytes === 4) {
do {
var index = (data[src] * pelbytes);
src += 1;
for(var n = 0; n < pelbytes; n += 1) {
dst[dest] = palette[index + n];
dest += 1;
}
}while(dest < size);
}
if(pelbytes === 2) {
dst = this.convertARGB2RGBA(dst);
}
return dst;
},
flipHorz: function flipHorzFn(data) {
var pelbytes = this.bytesPerPixel;
var width = this.width;
var height = this.height;
var halfWidth = Math.floor(width / 2);
var pitch = (width * pelbytes);
for(var i = 0; i < height; i += 1) {
for(var j = 0; j < halfWidth; j += 1) {
for(var k = 0; k < pelbytes; k += 1) {
var tmp = data[j * pelbytes + k];
data[j * pelbytes + k] = data[(width - j - 1) * pelbytes + k];
data[(width - j - 1) * pelbytes + k] = tmp;
}
}
data += pitch;
}
},
flipVert: function flipVertFn(data) {
var pelbytes = this.bytesPerPixel;
var width = this.width;
var height = this.height;
var halfHeight = Math.floor(height / 2);
var pitch = (width * pelbytes);
for(var i = 0; i < halfHeight; i += 1) {
var srcRow = (i * pitch);
var destRow = ((height - i - 1) * pitch);
for(var j = 0; j < pitch; j += 1) {
var tmp = data[srcRow + j];
data[srcRow + j] = data[destRow + j];
data[destRow + j] = tmp;
}
}
},
convertBGR2RGB: function convertBGR2RGBFn(data) {
// Rearrange the colors from BGR to RGB
var bytesPerPixel = this.bytesPerPixel;
var width = this.width;
var height = this.height;
var size = (width * height * bytesPerPixel);
var offset = 0;
do {
var tmp = data[offset];
data[offset] = data[offset + 2];
data[offset + 2] = tmp;
offset += bytesPerPixel;
}while(offset < size);
},
convertARGB2RGBA: function convertARGB2RGBAFn(data) {
// Rearrange the colors from ARGB to RGBA (2 bytes)
var bytesPerPixel = this.bytesPerPixel;
if(bytesPerPixel === 2) {
var width = this.width;
var height = this.height;
var size = (width * height * bytesPerPixel);
var dst = new Uint16Array(width * height);
var src = 0, dest = 0;
var r, g, b, a;
/*jshint bitwise: false*/
var mask = ((1 << 5) - 1);
var blueMask = mask;
var greenMask = (mask << 5);
var redMask = (mask << 10);
//var alphaMask = (1 << 15);
do {
var value = ((src[1] << 8) | src[0]);
src += 2;
b = (value & blueMask) << 1;
g = (value & greenMask) << 1;
r = (value & redMask) << 1;
a = (value >> 15);
dst[dest] = r | g | b | a;
dest += 1;
}while(src < size);
/*jshint bitwise: true*/
return dst;
} else {
return data;
}
}
};
// Constructor function
TGALoader.create = function tgaLoaderFn(params) {
var loader = new TGALoader();
loader.gd = params.gd;
loader.onload = params.onload;
loader.onerror = params.onerror;
var src = params.src;
if(src) {
loader.src = src;
var xhr;
if(window.XMLHttpRequest) {
xhr = new window.XMLHttpRequest();
} else if(window.ActiveXObject) {
xhr = new window.ActiveXObject("Microsoft.XMLHTTP");
} else {
if(params.onerror) {
params.onerror("No XMLHTTPRequest object could be created");
}
return null;
}
xhr.onreadystatechange = function () {
if(xhr.readyState === 4) {
if(!TurbulenzEngine || !TurbulenzEngine.isUnloading()) {
var xhrStatus = xhr.status;
var xhrStatusText = xhr.status !== 0 && xhr.statusText || 'No connection';
// Sometimes the browser sets status to 200 OK when the connection is closed
// before the message is sent (weird!).
// In order to address this we fail any completely empty responses.
// Hopefully, nobody will get a valid response with no headers and no body!
if(xhr.getAllResponseHeaders() === "" && xhr.responseText === "" && xhrStatus === 200 && xhrStatusText === 'OK') {
loader.onload(new Uint8Array(0), 0, 0, 0, 0);
return;
}
if(xhrStatus === 200 || xhrStatus === 0) {
var buffer;
if(xhr.responseType === "arraybuffer") {
buffer = xhr.response;
} else if(xhr.mozResponseArrayBuffer) {
buffer = xhr.mozResponseArrayBuffer;
} else//if (xhr.responseText !== null)
{
/*jshint bitwise: false*/
var text = xhr.responseText;
var numChars = text.length;
buffer = [];
buffer.length = numChars;
for(var i = 0; i < numChars; i += 1) {
buffer[i] = (text.charCodeAt(i) & 0xff);
}
/*jshint bitwise: true*/
}
// Fix for loading from file
if(xhrStatus === 0 && window.location.protocol === "file:") {
xhrStatus = 200;
}
loader.processBytes(new Uint8Array(buffer));
if(loader.data) {
if(loader.onload) {
loader.onload(loader.data, loader.width, loader.height, loader.format, xhrStatus);
}
} else {
if(loader.onerror) {
loader.onerror();
}
}
} else {
if(loader.onerror) {
loader.onerror();
}
}
}
// break circular reference
xhr.onreadystatechange = null;
xhr = null;
}
};
xhr.open("GET", params.src, true);
if(xhr.hasOwnProperty && xhr.hasOwnProperty("responseType")) {
xhr.responseType = "arraybuffer";
} else if(xhr.overrideMimeType) {
xhr.overrideMimeType("text/plain; charset=x-user-defined");
} else {
xhr.setRequestHeader("Content-Type", "text/plain; charset=x-user-defined");
}
xhr.send(null);
} else {
loader.processBytes(params.data);
if(loader.data) {
if(loader.onload) {
loader.onload(loader.data, loader.width, loader.height, loader.format, 200);
}
} else {
if(loader.onerror) {
loader.onerror();
}
}
}
return loader;
};
/* This file was generated from TypeScript source C:/Users/autobuild/turbulenz/engine/tslib/webgl/touch.ts */
// TODO: params should be Touch, but
// that requires decls for W3Touch
function Touch() {
return this;
}
Touch.create = function touchCreateFn(params) {
var touch = new Touch();
touch.force = params.force;
touch.identifier = params.identifier;
touch.isGameTouch = params.isGameTouch;
touch.positionX = params.positionX;
touch.positionY = params.positionY;
touch.radiusX = params.radiusX;
touch.radiusY = params.radiusY;
touch.rotationAngle = params.rotationAngle;
return touch;
};
/* This file was generated from TypeScript source C:/Users/autobuild/turbulenz/engine/tslib/webgl/touchevent.ts */
// Copyright (c) 2012 Turbulenz Limited
/// <reference path="../turbulenz.d.ts" />
/// <reference path="touch.ts" />
var WebGLTouchEvent = (function () {
function WebGLTouchEvent() { }
WebGLTouchEvent.create = function create(params) {
var touchEvent = new WebGLTouchEvent();
touchEvent.changedTouches = params.changedTouches;
touchEvent.gameTouches = params.gameTouches;
touchEvent.touches = params.touches;
return touchEvent;
};
return WebGLTouchEvent;
})();
/* This file was generated from TypeScript source C:/Users/autobuild/turbulenz/engine/tslib/webgl/turbulenzengine.ts */
//
// WebGLTurbulenzEngine
//
var WebGLTurbulenzEngine = (function () {
function WebGLTurbulenzEngine() {
this.version = '0.26.1.0';
}
WebGLTurbulenzEngine.prototype.setInterval = function (f, t) {
var that = this;
return window.setInterval(function () {
that.updateTime();
f();
}, t);
};
WebGLTurbulenzEngine.prototype.clearInterval = function (i) {
return window.clearInterval(i);
};
WebGLTurbulenzEngine.prototype.createGraphicsDevice = function (params) {
if(this.graphicsDevice) {
this.callOnError('GraphicsDevice already created');
return null;
} else {
var graphicsDevice = WebGLGraphicsDevice.create(this.canvas, params);
this.graphicsDevice = graphicsDevice;
return graphicsDevice;
}
};
WebGLTurbulenzEngine.prototype.createPhysicsDevice = function (params) {
if(this.physicsDevice) {
this.callOnError('PhysicsDevice already created');
return null;
} else {
var physicsDevice;
var plugin = this.getPluginObject();
if(plugin) {
physicsDevice = plugin.createPhysicsDevice(params);
} else {
physicsDevice = WebGLPhysicsDevice.create()/* params */ ;
}
this.physicsDevice = physicsDevice;
return physicsDevice;
}
};
WebGLTurbulenzEngine.prototype.createSoundDevice = function (params) {
if(this.soundDevice) {
this.callOnError('SoundDevice already created');
return null;
} else {
var soundDevice;
var plugin = this.getPluginObject();
if(plugin) {
soundDevice = plugin.createSoundDevice(params);
} else {
soundDevice = WebGLSoundDevice.create(params);
}
this.soundDevice = soundDevice;
return soundDevice;
}
};
WebGLTurbulenzEngine.prototype.createInputDevice = function (params) {
if(this.inputDevice) {
this.callOnError('InputDevice already created');
return null;
} else {
var inputDevice = WebGLInputDevice.create(this.canvas/*, params*/ );
this.inputDevice = inputDevice;
return inputDevice;
}
};
WebGLTurbulenzEngine.prototype.createNetworkDevice = function (params) {
if(this.networkDevice) {
throw 'NetworkDevice already created';
} else {
var networkDevice = WebGLNetworkDevice.create()/* params */ ;
this.networkDevice = networkDevice;
return networkDevice;
}
};
WebGLTurbulenzEngine.prototype.createMathDevice = function (params) {
// Check if the browser supports using apply with Float32Array
try {
var testVector = new Float32Array([
1,
2,
3
]);
VMath.v3Build.apply(VMath, testVector);
// Clamp FLOAT_MAX
testVector[0] = VMath.FLOAT_MAX;
VMath.FLOAT_MAX = testVector[0];
} catch (e) {
}
return VMath;
};
WebGLTurbulenzEngine.prototype.createNativeMathDevice = function (params) {
return VMath;
};
WebGLTurbulenzEngine.prototype.getGraphicsDevice = function () {
var graphicsDevice = this.graphicsDevice;
if(graphicsDevice === null) {
this.callOnError("GraphicsDevice not created yet.");
}
return graphicsDevice;
};
WebGLTurbulenzEngine.prototype.getPhysicsDevice = function () {
return this.physicsDevice;
};
WebGLTurbulenzEngine.prototype.getSoundDevice = function () {
return this.soundDevice;
};
WebGLTurbulenzEngine.prototype.getInputDevice = function () {
return this.inputDevice;
};
WebGLTurbulenzEngine.prototype.getNetworkDevice = function () {
return this.networkDevice;
};
WebGLTurbulenzEngine.prototype.getMathDevice = function () {
return VMath;
};
WebGLTurbulenzEngine.prototype.getNativeMathDevice = function () {
return VMath;
};
WebGLTurbulenzEngine.prototype.getObjectStats = function () {
return null;
};
WebGLTurbulenzEngine.prototype.flush = function () {
};
WebGLTurbulenzEngine.prototype.run = function () {
};
WebGLTurbulenzEngine.prototype.encrypt = function (msg) {
return msg;
};
WebGLTurbulenzEngine.prototype.decrypt = function (msg) {
return msg;
};
WebGLTurbulenzEngine.prototype.generateSignature = function (msg) {
return null;
};
WebGLTurbulenzEngine.prototype.verifySignature = function (msg, sig) {
return true;
};
WebGLTurbulenzEngine.prototype.onerror = function (msg) {
console.error(msg);
};
WebGLTurbulenzEngine.prototype.onwarning = function (msg) {
console.warn(msg);
};
WebGLTurbulenzEngine.prototype.getSystemInfo = function () {
return this.systemInfo;
};
WebGLTurbulenzEngine.prototype.request = function (url, callback) {
var that = this;
var xhr;
if(window.XMLHttpRequest) {
xhr = new window.XMLHttpRequest();
} else if(window.ActiveXObject) {
xhr = new window.ActiveXObject("Microsoft.XMLHTTP");
} else {
that.callOnError("No XMLHTTPRequest object could be created");
return;
}
function httpRequestCallback() {
if(xhr.readyState === 4)/* 4 == complete */
{
if(!that.isUnloading()) {
var xhrResponseText = xhr.responseText;
var xhrStatus = xhr.status;
if("" === xhrResponseText) {
xhrResponseText = null;
}
// Fix for loading from file
if(xhrStatus === 0 && xhrResponseText && window.location.protocol === "file:") {
xhrStatus = 200;
} else if(null === xhr.getResponseHeader("Content-Type") && "" === xhr.getAllResponseHeaders()) {
// Sometimes the browser sets status to 200 OK
// when the connection is closed before the
// message is sent (weird!). In order to address
// this we fail any completely empty responses.
// Hopefully, nobody will get a valid response
// with no headers and no body!
// Except that for cross domain requests getAllResponseHeaders ALWAYS returns an empty string
// even for valid responses...
callback(null, 0);
return;
}
// Invoke the callback
if(xhrStatus !== 0) {
// Under these conditions, we return a null
// response text.
if(404 === xhrStatus) {
xhrResponseText = null;
}
callback(xhrResponseText, xhrStatus);
} else {
// Checking xhr.statusText when xhr.status is
// 0 causes a silent error
callback(xhrResponseText, 0);
}
}
// break circular reference
xhr.onreadystatechange = null;
xhr = null;
callback = null;
}
}
xhr.open('GET', url, true);
if(callback) {
xhr.onreadystatechange = httpRequestCallback;
}
xhr.send();
};
WebGLTurbulenzEngine.prototype.destroy = // Internals
function () {
if(this.networkDevice) {
delete this.networkDevice;
}
if(this.inputDevice) {
this.inputDevice.destroy();
delete this.inputDevice;
}
if(this.physicsDevice) {
delete this.physicsDevice;
}
if(this.soundDevice) {
if(this.soundDevice.destroy) {
this.soundDevice.destroy();
}
delete this.soundDevice;
}
if(this.graphicsDevice) {
this.graphicsDevice.destroy();
delete this.graphicsDevice;
}
if(this.canvas) {
delete this.canvas;
}
if(this.resizeCanvas) {
window.removeEventListener('resize', this.resizeCanvas, false);
}
};
WebGLTurbulenzEngine.prototype.getPluginObject = function () {
if(!this.plugin && this.pluginId) {
this.plugin = document.getElementById(this.pluginId);
}
return this.plugin;
};
WebGLTurbulenzEngine.prototype.unload = function () {
if(!this.unloading) {
this.unloading = true;
if(this.onunload) {
this.onunload();
}
if(this.destroy) {
this.destroy();
}
}
};
WebGLTurbulenzEngine.prototype.isUnloading = function () {
return this.unloading;
};
WebGLTurbulenzEngine.prototype.enableProfiling = function () {
};
WebGLTurbulenzEngine.prototype.startProfiling = function () {
if(console && console.profile && console.profileEnd) {
console.profile("turbulenz");
}
};
WebGLTurbulenzEngine.prototype.stopProfiling = function () {
// Chrome and Safari return an object. IE and Firefox print to the console/profile tab.
var result;
if(console && console.profile && console.profileEnd) {
console.profileEnd();
if(console.profiles) {
result = console.profiles[console.profiles.length - 1];
}
}
return result;
};
WebGLTurbulenzEngine.prototype.callOnError = function (msg) {
var onerror = this.onerror;
if(onerror) {
onerror(msg);
}
};
WebGLTurbulenzEngine.create = function create(params) {
var tz = new WebGLTurbulenzEngine();
var canvas = params.canvas;
var fillParent = params.fillParent;
// To expose unload (the whole interaction needs a re-design)
window.TurbulenzEngineCanvas = tz;
tz.pluginId = params.pluginId;
tz.plugin = null;
// time property
var getTime = Date.now;
var performance = window.performance;
if(performance) {
// It seems high resolution "now" requires a proper "this"
if(performance.now) {
getTime = function getTimeFn() {
return performance.now();
};
} else if(performance.webkitNow) {
getTime = function getTimeFn() {
return performance.webkitNow();
};
}
}
// To be used by the GraphicsDevice for accurate fps calculations
tz.getTime = getTime;
var baseTime = getTime();// all in milliseconds (our "time" property is in seconds)
// Safari 6.0 has broken object property defines.
var canUseDefineProperty = true;
var navStr = navigator.userAgent;
var navVersionIdx = navStr.indexOf("Version/6.0");
if(-1 !== navVersionIdx) {
if(-1 !== navStr.substring(navVersionIdx).indexOf("Safari/")) {
canUseDefineProperty = false;
}
}
if(canUseDefineProperty && Object.defineProperty) {
Object.defineProperty(tz, "time", {
get: function () {
return ((getTime() - baseTime) * 0.001);
},
set: function (newValue) {
if(typeof newValue === 'number') {
// baseTime is in milliseconds, newValue is in seconds
baseTime = (getTime() - (newValue * 1000));
} else {
tz.callOnError("Must set 'time' attribute to a number");
}
},
enumerable: false,
configurable: false
});
tz.updateTime = function () {
};
} else {
tz.updateTime = function () {
this.time = ((getTime() - baseTime) * 0.001);
};
}
// fast zero timeouts
if(window.postMessage) {
var zeroTimeoutMessageName = "0-timeout-message";
var timeouts = [];
var timeId = 0;
var setZeroTimeout = function setZeroTimeoutFn(fn) {
timeId += 1;
var timeout = {
id: timeId,
fn: fn
};
timeouts.push(timeout);
window.postMessage(zeroTimeoutMessageName, "*");
return timeout;
};
var clearZeroTimeout = function clearZeroTimeoutFn(timeout) {
var id = timeout;
var numTimeouts = timeouts.length;
for(var n = 0; n < numTimeouts; n += 1) {
if(timeouts[n].id === id) {
timeouts.splice(n, 1);
return;
}
}
};
var handleZeroTimeoutMessages = function handleZeroTimeoutMessagesFn(event) {
if(event.source === window && event.data === zeroTimeoutMessageName) {
event.stopPropagation();
if(timeouts.length && !tz.isUnloading()) {
var timeout = timeouts.shift();
var fn = timeout.fn;
fn();
}
}
};
window.addEventListener("message", handleZeroTimeoutMessages, true);
tz.setTimeout = function (f, t) {
if(t < 1) {
return (setZeroTimeout(f));
} else {
var that = this;
return window.setTimeout(function () {
that.updateTime();
if(!that.isUnloading()) {
f();
}
}, t);
}
};
tz.clearTimeout = function (i) {
if(typeof i === 'object') {
return clearZeroTimeout(i);
} else {
return window.clearTimeout(i);
}
};
} else {
tz.setTimeout = function (f, t) {
var that = this;
return window.setTimeout(function () {
that.updateTime();
if(!that.isUnloading()) {
f();
}
}, t);
};
tz.clearTimeout = function (i) {
return window.clearTimeout(i);
};
}
var requestAnimationFrame = (window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || window.mozRequestAnimationFrame);
if(requestAnimationFrame) {
tz.setInterval = function (f, t) {
var that = this;
if(Math.abs(t - (1000 / 60)) <= 1) {
var interval = {
enabled: true
};
var nextFrameTime = (getTime() + 16.6);
var wrap1 = function wrap1() {
if(interval.enabled) {
var currentTime = getTime();
var diff = (currentTime - nextFrameTime);
if(0 <= diff) {
if(diff > 50) {
nextFrameTime = (currentTime + 16.6);
} else {
nextFrameTime += 16.6;
}
that.updateTime();
if(!that.isUnloading()) {
f();
}
}
requestAnimationFrame(wrap1, that.canvas);
}
};
requestAnimationFrame(wrap1, that.canvas);
return interval;
} else {
var wrap2 = function wrap2() {
that.updateTime();
if(!that.isUnloading()) {
f();
}
};
return window.setInterval(wrap2, t);
}
};
tz.clearInterval = function (i) {
if(typeof i === 'object') {
i.enabled = false;
} else {
window.clearInterval(i);
}
};
}
tz.canvas = canvas;
tz.networkDevice = null;
tz.inputDevice = null;
tz.physicsDevice = null;
tz.soundDevice = null;
tz.graphicsDevice = null;
if(fillParent) {
// Resize canvas to fill parent
tz.resizeCanvas = function () {
canvas.width = canvas.parentNode.clientWidth;
canvas.height = canvas.parentNode.clientHeight;
};
tz.resizeCanvas();
window.addEventListener('resize', tz.resizeCanvas, false);
}
var previousOnBeforeUnload = window.onbeforeunload;
window.onbeforeunload = function () {
tz.unload();
if(previousOnBeforeUnload) {
previousOnBeforeUnload.call(this);
}
};
tz.time = 0;
// System info
var systemInfo = {
architecture: '',
cpuDescription: '',
cpuVendor: '',
numPhysicalCores: 1,
numLogicalCores: 1,
ramInMegabytes: 0,
frequencyInMegaHZ: 0,
osVersionMajor: 0,
osVersionMinor: 0,
osVersionBuild: 0,
osName: navigator.platform,
platformProfile: "desktop",
userLocale: (navigator.language || navigator.userLanguage).replace('-', '_')
};
var looksLikeNetbook = function looksLikeNetbookFn() {
var minScreenDim = Math.min(window.screen.height, window.screen.width);
return minScreenDim < 900;
};
var userAgent = navigator.userAgent;
var osIndex = userAgent.indexOf('Windows');
if(osIndex !== -1) {
systemInfo.osName = 'Windows';
if(navigator.platform === 'Win64') {
systemInfo.architecture = 'x86_64';
} else if(navigator.platform === 'Win32') {
systemInfo.architecture = 'x86';
}
osIndex += 7;
if(userAgent.slice(osIndex, (osIndex + 4)) === ' NT ') {
osIndex += 4;
systemInfo.osVersionMajor = parseInt(userAgent.slice(osIndex, (osIndex + 1)), 10);
systemInfo.osVersionMinor = parseInt(userAgent.slice((osIndex + 2), (osIndex + 4)), 10);
}
if(looksLikeNetbook()) {
systemInfo.platformProfile = "tablet";
debug.log("Setting platformProfile to 'tablet'");
}
} else {
osIndex = userAgent.indexOf('Mac OS X');
if(osIndex !== -1) {
systemInfo.osName = 'Darwin';
if(navigator.platform.indexOf('Intel') !== -1) {
systemInfo.architecture = 'x86';
}
osIndex += 9;
systemInfo.osVersionMajor = parseInt(userAgent.slice(osIndex, (osIndex + 2)), 10);
systemInfo.osVersionMinor = parseInt(userAgent.slice((osIndex + 3), (osIndex + 4)), 10);
systemInfo.osVersionBuild = (parseInt(userAgent.slice((osIndex + 5), (osIndex + 6)), 10) || 0);
} else {
osIndex = userAgent.indexOf('Linux');
if(osIndex !== -1) {
systemInfo.osName = 'Linux';
if(navigator.platform.indexOf('64') !== -1) {
systemInfo.architecture = 'x86_64';
} else if(navigator.platform.indexOf('x86') !== -1) {
systemInfo.architecture = 'x86';
}
if(looksLikeNetbook()) {
systemInfo.platformProfile = "tablet";
debug.log("Setting platformProfile to 'tablet'");
}
} else {
osIndex = userAgent.indexOf('Android');
if(-1 !== osIndex) {
systemInfo.osName = 'Android';
if(navigator.platform.indexOf('arm')) {
systemInfo.architecture = 'arm';
} else if(navigator.platform.indexOf('x86')) {
systemInfo.architecture = 'x86';
}
if(-1 !== userAgent.indexOf('Mobile')) {
systemInfo.platformProfile = "smartphone";
} else {
systemInfo.platformProfile = "tablet";
}
} else {
if(-1 !== userAgent.indexOf("iPhone") || -1 !== userAgent.indexOf("iPod")) {
systemInfo.osName = 'iOS';
systemInfo.architecture = 'arm';
systemInfo.platformProfile = 'smartphone';
} else if(-1 !== userAgent.indexOf("iPad")) {
systemInfo.osName = 'iOS';
systemInfo.architecture = 'arm';
systemInfo.platformProfile = 'tablet';
}
}
}
}
}
tz.systemInfo = systemInfo;
var b64ConversionTable = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split('');
tz.base64Encode = function base64EncodeFn(bytes) {
var output = "";
var numBytes = bytes.length;
var valueToChar = b64ConversionTable;
var n, chr1, chr2, chr3, enc1, enc2, enc3, enc4;
/*jshint bitwise: false*/
n = 0;
while(n < numBytes) {
chr1 = bytes[n];
n += 1;
enc1 = (chr1 >> 2);
if(n < numBytes) {
chr2 = bytes[n];
n += 1;
if(n < numBytes) {
chr3 = bytes[n];
n += 1;
enc2 = (((chr1 & 3) << 4) | (chr2 >> 4));
enc3 = (((chr2 & 15) << 2) | (chr3 >> 6));
enc4 = (chr3 & 63);
} else {
enc2 = (((chr1 & 3) << 4) | (chr2 >> 4));
enc3 = ((chr2 & 15) << 2);
enc4 = 64;
}
} else {
enc2 = ((chr1 & 3) << 4);
enc3 = 64;
enc4 = 64;
}
output += valueToChar[enc1];
output += valueToChar[enc2];
output += valueToChar[enc3];
output += valueToChar[enc4];
}
/*jshint bitwise: true*/
return output;
};
return tz;
};
return WebGLTurbulenzEngine;
})();
window.WebGLTurbulenzEngine = WebGLTurbulenzEngine;
|
import stuff from 'stuff'
import memoize from 'utils/memoize'
export default memoize(item => Object.keys(stuff).includes(item))
|
/*globals Globalize window jQuery wijInputResult document*/
/*
*
* Wijmo Library 2.2.1
* http://wijmo.com/
*
* Copyright(c) GrapeCity, Inc. All rights reserved.
*
* Dual licensed under the Wijmo Commercial or GNU GPL Version 3 licenses.
* licensing@wijmo.com
* http://wijmo.com/license
*
*
* * Wijmo Inputcore widget.
*
*/
(function ($) {
"use strict";
window.wijinputcore = {
options: {
/// <summary>
/// Determines the culture ID name.
/// </summary>
culture: '',
/// <summary>
/// The CSS class applied to the widget when an invalid value is entered.
/// </summary>
invalidClass: 'ui-state-error',
/// <summary>
/// Determines the text that will be displayed for blank status.
/// </summary>
nullText: '',
/// <summary>
/// Show Null Text if the value is empty and the control loses its focus.
/// </summary>
showNullText: false,
/// <summary>
/// If true, then the browser response is disabled
/// when the ENTER key is pressed.
/// </summary>
hideEnter: false,
/// <summary>
/// Determines whether the user can type a value.
/// </summary>
disableUserInput: false,
/// <summary>
/// Determines the alignment of buttons.
/// Possible values are: 'left', 'right'
/// </summary>
buttonAlign: 'right',
/// <summary>
/// Determines whether trigger button is displayed.
/// </summary>
showTrigger: false,
/// <summary>
/// Determines whether spinner button is displayed.
/// </summary>
showSpinner: false,
/// <summary>
/// Array of data items for the drop-down list.
/// </summary>
comboItems: undefined,
/// <summary>
/// Determines the width of the drop-down list.
/// </summary>
comboWidth: undefined,
/// <summary>
/// Determines the height of the drop-down list.
/// </summary>
comboHeight: undefined,
/// <summary>
/// The initializing event handler.
/// A function called before the widget is initialized.
/// Default: null.
/// Type: Function.
/// Code example: $("#element")
/// .wijinputmask({ initializing: function () { } });
/// </summary>
initializing: null,
/// <summary>
/// The initialized event handler.
/// A function called after the widget is initialized.
/// Default: null.
/// Type: Function.
/// Code example:
/// $("#element").wijinputmask({ initialized: function (e) { } });
/// </summary>
///
/// <param name="e" type="Object">jQuery.Event object.</param>
initialized: null,
/// <summary>
/// The triggerMouseDown event handler. A function called
/// when the mouse is pressed down on the trigger button.
/// Default: null.
/// Type: Function.
/// Code example:
/// $("#element").wijinputmask({ triggerMouseDown: function (e) { } });
/// </summary>
///
/// <param name="e" type="Object">jQuery.Event object.</param>
triggerMouseDown: null,
/// <summary>
/// The triggerMouseUp event handler. A function called
/// when the mouse is released on the trigger button.
/// Default: null.
/// Type: Function.
/// Code example:
/// $("#element").wijinputmask({ triggerMouseUp: function (e) { } });
/// </summary>
////// <param name="e" type="Object">jQuery.Event object.</param>
triggerMouseUp: null,
/// <summary>
/// The textChanged event handler. A function called
/// when the text of the input is changed.
/// Default: null.
/// Type: Function.
/// Code example:
/// $("#element").wijinputmask({ textChanged: function (e, arg) { } });
/// </summary>
///
/// <param name="e" type="Object">jQuery.Event object.</param>
/// <param name="args" type="Object">
/// The data with this event.
/// args.text: The new text.
///</param>
textChanged: null,
/// <summary>
/// The invalidInput event handler. A function called
/// when invalid charactor is typed.
/// Default: null.
/// Type: Function.
/// Code example:
/// $("#element").wijinputmask({ invalidInput: function (e, data) { } });
/// </summary>
///
/// <param name="e" type="Object">jQuery.Event object.</param>
/// <param name="data" type="Object">
/// The data that contains the related information.
/// data.char: The newly input character.
/// data.widget: The widget object itself.
/// </param>
invalidInput: null
},
_create: function () {
var self = this,
width = self.element.width(), bw, padding;
if (self.element[0].tagName.toLowerCase() !== 'input') {
throw "Target element is not a INPUT";
}
// enable touch support:
if (window.wijmoApplyWijTouchUtilEvents) {
$ = window.wijmoApplyWijTouchUtilEvents($);
}
if (self.element.is(":hidden") && self.element.wijAddVisibilityObserver) {
self.element.wijAddVisibilityObserver(function () {
self.destroy();
self._create();
if (self.element.wijRemoveVisibilityObserver) {
self.element.wijRemoveVisibilityObserver();
}
}, "wijinput");
}
self.element.data("widgetName", this.widgetName);
$.effects.save(self.element, ['width', 'height']);
self.element.wrap("<div class='wijmo-wijinput ui-widget ui-helper-clearfix" +
" ui-state-default ui-corner-all'><span class='wijmo-wijinput-wrapper'>" +
"</span></div>");
self.element.addClass('wijmo-wijinput-input ui-corner-all')
.attr({ 'role': 'textbox', 'aria-multiline': false });
self.wrapper = self.element.parent();
self.outerDiv = self.wrapper.parent();
self.outerDiv.width(width);
if (self.options.showTrigger) {
self.triggerBtn =
$("<div class='wijmo-wijinput-trigger ui-state-default'>" +
"<span class='ui-icon ui-icon-triangle-1-s'></span></div>")
.addClass(self.options.buttonAlign === 'left' ?
'ui-corner-left' : 'ui-corner-right')
.attr('role', 'button')
.appendTo(self.outerDiv);
self.element.attr({ 'role': 'combobox', 'aria-expanded': false });
}
if (self.options.showSpinner) {
self.spinner =
$("<div class='wijmo-wijinput-spinner wijmo-wijinput-button'></div>");
self.spinUp = $("<div class='ui-state-default wijmo-wijinput-spinup'>" +
"<span class='ui-icon ui-icon-triangle-1-n'></span></div>")
.attr('role', 'button');
self.spinDown =
$("<div class='ui-state-default wijmo-wijinput-spindown'>" +
"<span class='ui-icon ui-icon-triangle-1-s'></span></div>")
.attr('role', 'button');
if (!self.options.showTrigger) {
self.spinUp.addClass(self.options.buttonAlign === 'left' ?
'ui-corner-tl' : 'ui-corner-tr');
self.spinDown.addClass(self.options.buttonAlign === 'left' ?
'ui-corner-bl' : 'ui-corner-br');
}
self.spinner.append(self.spinUp)
.append(self.spinDown)
.appendTo(self.outerDiv);
self.element.attr('role', 'spinner');
}
if (self.options.showTrigger && self.options.showSpinner) {
self.outerDiv.addClass(self.options.buttonAlign === 'left' ?
'ui-input-spinner-trigger-left' : 'ui-input-spinner-trigger-right');
} else {
if (self.options.showTrigger) {
self.outerDiv.addClass(self.options.buttonAlign === 'left' ?
'ui-input-trigger-left' : 'ui-input-trigger-right');
}
if (self.options.showSpinner) {
self.outerDiv.addClass(self.options.buttonAlign === 'left' ?
'ui-input-spinner-left' : 'ui-input-spinner-right');
}
}
bw = self.element.leftBorderWidth() + self.element.rightBorderWidth();
self.element.width(self.outerDiv.width() - bw);
//self.element.setOutWidth(self.outerDiv.width());
self._initialize();
if (self.element.width() >= self.wrapper.width()) {
padding = parseFloat(self.element.css("padding-left")
.replace(/px/, ""), 10) || 0;
padding += (parseFloat(self.element.css("padding-right")
.replace(/px/, ""), 10) || 0);
self.element.width(self.element.width() - padding);
}
},
_createTextProvider: function () {
return undefined;
},
_beginUpdate: function () {
},
_endUpdate: function () {
},
_onTriggerClicked: function () {
},
_initialize: function () {
this.element.data('initializing', true);
this._trigger('initializing');
this.element.data('preText', this.element.val());
this.element.data('elementValue', this.element.val());
this.element.data('errorstate', false);
this.element.data('breakSpinner', true);
this.element.data('prevCursorPos', -1);
this.element.data('simulating', false);
this._createTextProvider();
this._beginUpdate();
var o = this.options, self = this, dis,
isLeftButton = function (e) {
return (!e.which ? e.button : e.which) === 1;
},
spinButtonDown = function (e) {
if (self.options.disabled) {
return;
}
if (!isLeftButton(e)) {
return;
}
self._trySetFocus();
self.element.data('breakSpinner', false);
self._addState('active', $(this));
self._doSpin($(e.currentTarget).hasClass('wijmo-wijinput-spinup'), true);
},
spinButtonUp = function (e) {
if (self.options.disabled) {
return;
}
if (!isLeftButton(e)) {
return;
}
self._stopSpin();
self._removeState('active', $(this));
};
if (this.triggerBtn && !o.disabledState) {
this.triggerBtn.bind({
'mouseover': function () {
if (self.options.disabled) {
return;
}
self._addState('hover', $(this));
},
'mouseout': function () {
if (self.options.disabled) {
return;
}
self._removeState('hover', $(this));
},
'mousedown': function (e) {
if (self.options.disabled) {
return;
}
if (!isLeftButton(e)) {
return;
}
self._addState('active', $(this));
self._trigger('triggerMouseDown');
},
'click': function (e) {
if (self.options.disabled) {
return;
}
self._stopEvent(e);
self._stopSpin();
self._removeState('active', $(this));
self._trigger('triggerMouseUp');
self._onTriggerClicked();
self._trySetFocus();
}
});
}
if (this.spinUp && !o.disabledState) {
this.spinUp.bind({
'mouseover': function () {
if (self.options.disabled) {
return;
}
self._addState('hover', $(this));
},
'mouseout': function () {
if (self.options.disabled) {
return;
}
self._removeState('hover', $(this));
self._removeState('active', $(this));
self._stopSpin();
},
'mousedown': spinButtonDown,
'mouseup': spinButtonUp
});
}
if (this.spinDown && !o.disabledState) {
this.spinDown.bind({
'mouseover': function () {
if (self.options.disabled) {
return;
}
self._addState('hover', $(this));
},
'mouseout': function () {
if (self.options.disabled) {
return;
}
self._removeState('hover', $(this));
self._removeState('active', $(this));
self._stopSpin();
},
'mousedown': spinButtonDown,
'mouseup': spinButtonUp
});
}
this.element.bind({
'focus.wijinput': $.proxy(this._onFocus, this),
'blur.wijinput': $.proxy(this._onBlur, this),
'mouseup.wijinput': $.proxy(this._onMouseUp, this),
'keypress.wijinput': $.proxy(this._onKeyPress, this),
'keydown.wijinput': $.proxy(this._onKeyDown, this),
'keyup.wijinput': $.proxy(this._onKeyUp, this),
'change.wijinput': $.proxy(this._onChange, this),
'paste.wijinput': $.proxy(this._onPaste, this),
'drop.wijinput': $.proxy(this._onDrop, this)
});
this.element.bind('propertychange.wijinput input.wijinput',
$.proxy(this._onInput, this));
this.element.data('initializing', false);
this._resetData();
this._endUpdate();
this._updateText();
if (this.options.disabledState) {
dis = o.disabled;
this.disable();
o.disabled = dis;
}
if (this.options.disabled) {
this.disable();
}
this.element.data('initialized', true);
this._trigger('initialized');
},
_init: function () {
},
_setOption: function (key, value) {
$.Widget.prototype._setOption.apply(this, arguments);
switch (key) {
case 'buttonAlign':
case 'showTrigger':
case 'showSpinner':
this._destroy();
this._create();
break;
case 'showNullText':
this._updateText();
break;
case 'disabled':
this.element.attr('disabled', value);
this.element[value ? 'addClass' :
'removeClass'](this.namespace + "-state-disabled");
if (this.triggerBtn !== undefined) {
this.triggerBtn[value ? 'addClass' :
'removeClass'](this.namespace + "-state-disabled");
}
if (this.spinup !== undefined) {
this.spinup[value ? 'addClass' :
'removeClass'](this.namespace + "-state-disabled");
}
if (this.spindown !== undefined) {
this.spindown[value ? 'addClass' :
'removeClass'](this.namespace + "-state-disabled");
}
break;
}
},
destroy: function () {
$.Widget.prototype.destroy.apply(this, arguments);
this._destroy();
},
_destroy: function () {
this.wrapper = undefined;
this.outerDiv = undefined;
this.element.unbind('.wijinput');
this.element.removeData('errorstate')
.removeData('breakSpinner')
.removeData('prevCursorPos')
.removeData('simulating')
.removeData('isPassword')
.removeClass('wijmo-wijinput-input')
.removeAttr('role')
.removeAttr('aria-valuemin')
.removeAttr('aria-valuemax')
.removeAttr('aria-valuenow')
.removeAttr('aria-expanded');
this.element.parent().replaceWith(this.element);
this.element.parent().replaceWith(this.element);
$.effects.restore(this.element, ['width', 'height']);
},
widget: function () {
/// <summary>Gets element this widget is associated.</summary>
return this.outerDiv;
},
_getCulture: function (name) {
return Globalize.findClosestCulture(name || this.options.culture);
},
_addState: function (state, el) {
if (el.is(':not(.ui-state-disabled)')) {
el.addClass('ui-state-' + state);
}
},
_removeState: function (state, el) {
el.removeClass('ui-state-' + state);
},
_isInitialized: function () {
return !this.element.data('initializing');
},
_setData: function (val) {
this.setText(val);
},
_resetData: function () {
},
_validateData: function () {
},
getText: function () {
/// <summary>Gets the text displayed in the input box.</summary>
if (!this._isInitialized()) {
return this.element.val();
}
return this._textProvider.toString(true, false, false);
},
setText: function (value) {
/// <summary>Sets the text displayed in the input box.</summary>
if (!this._isInitialized()) {
this.element.val(value);
} else {
this._textProvider.set(value);
this._updateText();
}
},
getPostValue: function () {
/// <summary>Gets the text value when the container
/// form is posted back to server.</summary>
if (!this._isInitialized()) {
return this.element.val();
}
return this._textProvider.toString(true, false, true);
},
selectText: function (start, end) {
/// <summary>Selects a range of text.</summary>
/// <param name="start" type="Number">Start of the range.</param>
/// <param name="end" type="Number">End of the range.</param>
if (this.element.is(':disabled')) {
return;
}
this.element.wijtextselection(start, end);
},
focus: function () {
/// <summary>Set the focus to this input.</summary>
if (this.element.is(':disabled')) {
return;
}
this.element.get(0).focus();
},
isFocused: function () {
/// <summary>Determines whether the input has input focus.</summary>
return this.outerDiv.hasClass("ui-state-focus");
},
_raiseTextChanged: function () {
var txt = this.element.val(), preText = this.element.data('preText');
if (!!this.element.data('initialized') && preText !== txt) {
this._trigger('textChanged', null, { text: txt });
this.element.data('changed', true);
}
this.element.data('preText', txt);
},
_raiseDataChanged: function () {
},
_allowEdit: function () {
return !(this.element.attr('readOnly') && this.element.is(':disabled'));
},
_updateText: function (keepSelection) {
if (!this._isInitialized()) {
return;
}
// default is false
keepSelection = !!keepSelection;
var range = this.element.wijtextselection(),
o = this.options;
if (this.isDeleteAll && o.showNullText) {
this.isDeleteAll = false;
o.date = null;
this.element.val(o.nullText);
}
else {
this.element.val(this._textProvider.toString());
this.options.text = this._textProvider.toString(true, false, false);
}
if (this.element.is(':disabled')) {
return;
}
if (keepSelection) {
this.selectText(range.start, range.end);
}
this.element.data('prevCursorPos', range.start);
this._raiseTextChanged();
this._raiseDataChanged();
},
_trySetFocus: function () {
if (!this.isFocused()) {
try {
if (!this.options.disableUserInput) {
this.element.focus();
}
}
catch (e) {
}
}
},
_deleteSelText: function (backSpace) {
if (!this._allowEdit()) {
return;
}
var selRange = this.element.wijtextselection(), rh;
backSpace = !!backSpace;
if (backSpace) {
if (selRange.end === selRange.start) {
if (selRange.end >= 1) {
selRange.end = (selRange.end - 1);
selRange.start = (selRange.start - 1);
} else {
return;
}
} else {
selRange.end = (selRange.end - 1);
}
} else {
selRange.end = (selRange.end - 1);
}
if (selRange.end < selRange.start) {
selRange.end = (selRange.start);
}
rh = new wijInputResult();
this._textProvider.removeAt(selRange.start, selRange.end, rh);
this._updateText();
this.selectText(rh.testPosition, rh.testPosition);
},
_fireIvalidInputEvent: function (chr) {
var self = this, cls;
if (self._trigger('invalidInput', null,
{ widget: self, char: chr }) === true) {
return;
}
if (!self.element.data('errorstate')) {
cls = self.options.invalidClass || 'ui-state-error';
self.element.data('errorstate', true);
window.setTimeout(function () {
self.outerDiv.removeClass(cls);
self.element.data('errorstate', false);
}, 100);
self.outerDiv.addClass(cls);
}
},
_onInput: function (e) {
if (!this._isSimulating() || !this.element.data('ime')) {
return;
}
this._simulate();
},
_keyDownPreview: function (e) {
return false; // true means handled.
},
_beforeSimulate: function (ime) {
if (!this.element.data('lastSelection')) {
this.element.data('lastSelection', this.element.wijtextselection());
this.element.data('lastValue', this.element.val());
}
this.element.data('ime', ime);
this.element.data('simulating', true);
},
_isSimulating: function () {
return this.element.data('simulating');
},
_simulate: function (text) {
var self = this,
str = null, range, start, end;
if (typeof text === "string") {
str = text;
} else {
range = this.element.wijtextselection();
start = this.element.data('lastSelection').start;
end = range.end;
if (end >= start) {
str = this.element.val().substring(start, end);
}
}
if (str) {
window.setTimeout(function () {
if (!self.element.data('lastValue')) {
return;
}
self.element.val(self.element.data('lastValue'));
var lastSel = self.element.data('lastSelection'), e, i;
self.element.wijtextselection(lastSel);
self.element.data('batchKeyPress', true);
self.element.data('simulating', false);
e = jQuery.Event('keypress');
e.ctrlKey = e.altKey = false;
for (i = 0; i < str.length; i++) {
e.which = e.charCode = e.keyCode = str.charCodeAt(i);
self._onKeyPress(e);
}
self.element.data('batchKeyPress', false);
self._endSimulate();
}, 1);
}
},
_endSimulate: function () {
this.element.removeData('ime');
this.element.removeData('lastSelection');
this.element.removeData('lastValue');
},
_onKeyDown: function (e) {
this.element.data('prevCursorPos', -1);
if (!this._isInitialized() ||
(this._textProvider && !!this._textProvider.noMask)) {
return;
}
var k = this._getKeyCode(e);
if (k === 229) { // Double Bytes
this._beforeSimulate(true);
return;
}
this._endSimulate();
if (this.options.disableUserInput) {
this._stopEvent(e);
return;
}
if (this._keyDownPreview(e)) {
this._stopEvent(e);
return;
}
switch (k) {
case $.ui.keyCode.UP:
this._doSpin(true, false);
this._stopEvent(e);
return;
case $.ui.keyCode.DOWN:
this._doSpin(false, false);
this._stopEvent(e);
return;
}
if (e.ctrlKey) {
switch (k) {
case $.ui.keyCode.INSERT:
case 67: // 'c'
return;
default:
break;
}
}
if ((e.ctrlKey || e.altKey)) {
return;
}
switch (k) {
case 112: // F1-F6
case 113:
case 114:
case 115:
case 116:
case 117:
case $.ui.keyCode.TAB:
case $.ui.keyCode.CAPSLOCK:
case $.ui.keyCode.END:
case $.ui.keyCode.HOME:
case $.ui.keyCode.CTRL:
case $.ui.keyCode.SHIFT:
return;
case $.ui.keyCode.BACKSPACE:
this._deleteSelText(true);
this._stopEvent(e);
return;
case $.ui.keyCode.DELETE:
this._deleteSelText(false);
this._stopEvent(e);
return;
case $.ui.keyCode.ENTER:
if (!this.options.hideEnter) {
return;
}
break;
case $.ui.keyCode.ESCAPE:
this._stopEvent(e);
window.setTimeout($.proxy(this._resetData, this), 1);
return;
case $.ui.keyCode.PAGE_UP:
case $.ui.keyCode.PAGE_DOWN:
case $.ui.keyCode.ALT:
this._stopEvent(e);
return;
}
},
_onKeyUp: function (e) {
if (this._isSimulating() ||
(this._textProvider && !!this._textProvider.noMask)) {
return;
}
var k = this._getKeyCode(e);
if (!this._isInitialized()) {
return;
}
if (k === $.ui.keyCode.ENTER) {
return;
}
if (k === $.ui.keyCode.ESCAPE) {
return;
}
if (this.options.disableUserInput) {
this._raiseTextChanged();
this._raiseDataChanged();
return;
}
this._stopEvent(e);
},
_getKeyCode: function (e) {
var userAgent = window.navigator.userAgent;
if ((userAgent.indexOf('iPod') !== -1 ||
userAgent.indexOf('iPhone') !== -1) && e.which === 127) {
return 8;
}
return e.keyCode || e.which;
},
_keyPressPreview: function (e) {
return false;
},
_onKeyPress: function (e) {
if (this._isSimulating() ||
(this._textProvider && !!this._textProvider.noMask)) {
return;
}
this.element.data('prevCursorPos', -1);
if (this.options.disableUserInput) {
return;
}
if (!this._allowEdit()) {
return;
}
if (e.ctrlKey && e.keyCode === 119) { //Ctrl + F8
this._onPaste(e);
return;
}
if (e.which === 0) {
return;
}
var key = e.keyCode || e.which, selRange, ch, rh, opResult;
if (key === $.ui.keyCode.BACKSPACE) {
this._stopEvent(e);
return;
}
if (e.ctrlKey || e.altKey) {
if (key !== $.ui.keyCode.SPACE) {
return;
}
}
if (this._keyPressPreview(e)) {
return;
}
if (key === $.ui.keyCode.ENTER && !this.options.hideEnter) {
return true;
}
selRange = this.element.wijtextselection();
ch = String.fromCharCode(key);
if (selRange.start < selRange.end) {
this._textProvider
.removeAt(selRange.start, selRange.end - 1, new wijInputResult(), true);
}
rh = new wijInputResult();
opResult = this._textProvider.insertAt(ch, selRange.start, rh);
if (opResult) {
this._updateText();
this.selectText(rh.testPosition + 1, rh.testPosition + 1);
}
else {
this._fireIvalidInputEvent(ch);
}
if (!this.element.data('batchKeyPress')) {
this._stopEvent(e);
}
},
_isNullText: function (val) {
val = val || this.element.val();
return this.options.showNullText && val === this.options.nullText;
},
_doFocus: function () {
var selRange = this.element.wijtextselection(),
sta = selRange.start, s;
this._updateText();
s = this.element.val();
if (s.length === sta) {
sta = 0;
}
if (!$.browser.safari) {
this.selectText(sta, sta);
}
},
_afterFocused: function () {
if (this._isNullText()) {
this._doFocus();
}
},
_onFocus: function (e) {
if (this.options.disableUserInput) {
return;
}
this._addState('focus', this.outerDiv);
if (!this.element.data('breakSpinner')) {
return;
}
if (!this._isInitialized()) {
return;
}
if (!this._allowEdit()) {
return;
}
if (!this.element.data('focusNotCalledFirstTime')) {
this.element.data('focusNotCalledFirstTime', new Date().getTime());
}
this._afterFocused();
},
_onBlur: function (e) {
if (this.options.disableUserInput) {
return;
}
if (this._isComboListVisible()) {
return;
}
var focused = this.isFocused(), curPos, self = this;
this._removeState('focus', this.outerDiv);
if (!this.element.data('breakSpinner')) {
this.element.get(0).focus();
curPos = this.element.data('prevCursorPos');
if (curPos !== undefined && curPos !== -1) {
this.selectText(curPos, curPos);
}
return;
}
if (!this._isInitialized()) {
return;
}
if (!focused) {
return;
}
this.element.data('value', this.element.val());
window.setTimeout(function () {
self._onChange();
self._updateText();
self._validateData();
if (!self._popupVisible() && !!self.element.data('changed')) {
self._trigger('change');
}
self.element.data('changed', false);
}, 100);
},
_popupVisible: function () {
return this._isComboListVisible();
},
_onMouseUp: function (e) {
if (!this._isInitialized()) {
return;
}
if (this.element.is(':disabled')) {
return;
}
var selRange = this.element.wijtextselection();
this.element.data('prevCursorPos', selRange.start);
},
_onChange: function (e) {
if (!this.element) {
return;
}
var val = this.element.val(),
txt = this.getText();
if (txt !== val) {
this.setText(val);
}
},
_onPaste: function (e) {
if (this._textProvider && !!this._textProvider.noMask) {
return;
}
this._beforeSimulate();
var self = this;
window.setTimeout(function () {
self._simulate();
}, 1);
},
_onDrop: function (e) {
this._beforeSimulate();
if (e.originalEvent && e.originalEvent.dataTransfer) {
var text = e.originalEvent.dataTransfer.getData('Text');
if (text) {
this._simulate(text);
}
}
},
_stopEvent: function (e) {
e.stopPropagation();
e.preventDefault();
},
_calcSpinInterval: function () {
this._repeatingCount++;
if (this._repeatingCount > 10) {
return 50;
}
else if (this._repeatingCount > 4) {
return 100;
}
else if (this._repeatingCount > 2) {
return 200;
}
return 400;
},
_doSpin: function () {
},
_stopSpin: function _stopSpin() {
this.element.data('breakSpinner', true);
this._repeatingCount = 0;
},
_hasComboItems: function () {
return (!!this.options.comboItems && this.options.comboItems.length);
},
_isComboListVisible: function () {
if (!this._comboDiv) {
return false;
}
return this._comboDiv.wijpopup('isVisible');
},
_popupComboList: function () {
if (!this._hasComboItems()) {
return;
}
if (!this._allowEdit()) {
return;
}
if (this._isComboListVisible()) {
this._comboDiv.wijpopup('hide');
return;
}
var self = this, content;
if (this._comboDiv === undefined) {
this._comboDiv = $("<div></div>")
.appendTo(document.body)
.width(this.element.width())
.height(this.options.comboHeight || 180)
.css('position', 'absolute');
content = this._normalize(this.options.comboItems);
this._comboDiv.wijlist({
autoSize: true,
maxItemsCount: 5,
selected: function (event, ui) {
self._setData(ui.item.value);
self._comboDiv.wijpopup('hide');
self._trySetFocus();
}
});
this._comboDiv.wijlist('setItems', content);
this._comboDiv.wijlist('renderList');
this._comboDiv.wijlist("refreshSuperPanel");
}
this._comboDiv.wijpopup({
autoHide: true
});
this.outerDiv.attr('aria-expanded', true);
this._comboDiv.wijpopup('show', {
of: this.outerDiv,
offset: '0 4',
hidden: function () {
self.outerDiv.attr('aria-expanded', false);
}
});
},
_normalize: function (items) {
// assume all items have the right format when the first item is complete
if (items.length && items[0].label && items[0].value) {
return items;
}
return $.map(items, function (item) {
if (typeof item === "string") {
return {
label: item,
value: item
};
}
return $.extend({
label: item.label || item.value,
value: item.value || item.label
}, item);
});
}
};
window.wijInputResult = function () {
this.alphanumericCharacterExpected = -2;
this.asciiCharacterExpected = -1;
this.digitExpected = -3;
this.invalidInput = -51;
this.letterExpected = -4;
this.nonEditPosition = -54;
this.positionOutOfRange = -55;
this.promptCharNotAllowed = -52;
this.signedDigitExpected = -5;
this.unavailableEditPosition = -53;
this.testPosition = -1;
};
window.wijInputResult.prototype = {
characterEscaped: 1,
noEffect: 2,
sideEffect: 3,
success: 4,
unknown: 0,
hint: 0,
clone: function () {
var rh = new wijInputResult();
rh.hint = this.hint;
rh.testPosition = this.testPosition;
return rh;
}
};
} (jQuery));
|
$(function () {
const $toggle = $(".js-humberger-menu");
const $globalNav = $(".js-global-nav");
$toggle.on("click", function () {
if($globalNav.css('display') === 'block') {
$globalNav.slideUp('1000');
}else {
$globalNav.slideDown('1000');
}
});
});
|
// Calculator:
const beansInput = document.querySelector("#beans");
const ratioInput = document.querySelector("#ratio");
const waterInput = document.querySelector("#water");
const coffeeInput = document.querySelector("#coffee");
const beansSlider = document.querySelector("#beans-slider");
const ratioSlider = document.querySelector("#ratio-slider");
const waterSlider = document.querySelector("#water-slider");
const coffeeSlider = document.querySelector("#coffee-slider");
const calculateBeans = (water, ratio) => ratio === 0 ? 0 : water / ratio;
const calculateRatio = (water, beans) => beans === 0 ? 0 : water / beans;
const calculateWater = (beans, ratio) => beans * ratio;
const calculateWaterFromCoffee = (coffee) => coffee / 0.9;
const calculateCoffee = (water) => water * 0.9;
const isValid = input => input.valueAsNumber > 0;
const markAsValid = input => {
input.classList.remove("is-invalid");
input.classList.add("is-valid");
}
const markAsInvalid = input => {
input.classList.remove("is-valid");
input.classList.add("is-invalid");
};
const markAsValidOrInvalid = input => isValid(input) ? markAsValid(input) : markAsInvalid(input);
const markAsComputed = input => {
input.classList.remove("is-valid", "is-invalid");
};
let lastChanges = [ratioInput, beansInput];
let beans = 15;
let ratio = 16;
let water = calculateWater(beans, ratio);
let coffee = calculateCoffee(water);
const onInputChange = ({target}) => {
markAsValidOrInvalid(target);
if (lastChanges[0] !== target) {
lastChanges = [target, lastChanges[0]];
}
if (lastChanges.every(isValid)) {
if (!lastChanges.includes(beansInput)) {
water = waterInput.valueAsNumber;
ratio = ratioInput.valueAsNumber;
beans = calculateBeans(water, ratio);
markAsComputed(beansInput);
} else if (!lastChanges.includes(ratioInput)) {
water = waterInput.valueAsNumber;
beans = beansInput.valueAsNumber;
ratio = calculateRatio(water, beans);
markAsComputed(ratioInput);
} else {
beans = beansInput.valueAsNumber;
ratio = ratioInput.valueAsNumber;
water = calculateWater(beans, ratio);
markAsComputed(waterInput);
}
coffee = calculateCoffee(water);
markAsComputed(coffeeInput);
writeInputValues();
}
};
const onCoffeeInputChange = () => {
markAsValidOrInvalid(coffeeInput);
if (lastChanges[0] !== waterInput) {
lastChanges = [waterInput, lastChanges[0]];
}
if (isValid(coffeeInput)) {
coffee = coffeeInput.valueAsNumber;
water = calculateWaterFromCoffee(coffee);
markAsComputed(waterInput);
}
if (lastChanges.every(isValid)) {
if (!lastChanges.includes(beansInput)) {
ratio = ratioInput.valueAsNumber;
beans = calculateBeans(water, ratio);
markAsComputed(beansInput);
} else {
beans = beansInput.valueAsNumber;
ratio = calculateRatio(water, coffee);
markAsComputed(ratioInput);
}
writeInputValues();
}
};
const formatNumber = nr => Math.round(nr % 1 * 10) % 10 === 0 ? nr.toFixed(0) : Math.round(nr * 10 % 1 * 10) % 10 === 0 ? nr.toFixed(1) : nr.toFixed(2);
const writeInputValues = () => {
beansInput.value = formatNumber(beans);
ratioInput.value = formatNumber(ratio);
waterInput.value = formatNumber(water);
coffeeInput.value = formatNumber(coffee);
beansSlider.value = beans;
ratioSlider.value = ratio;
waterSlider.value = water;
coffeeSlider.value = coffee;
};
beansInput.addEventListener("input", onInputChange);
ratioInput.addEventListener("input", onInputChange);
waterInput.addEventListener("input", onInputChange);
coffeeInput.addEventListener("input", onCoffeeInputChange);
const onSliderChange = ({target}) => {
if (target === beansSlider) {
beansInput.value = beansSlider.valueAsNumber;
onInputChange({target: beansInput});
} else if (target === ratioSlider) {
ratioInput.value = ratioSlider.valueAsNumber;
onInputChange({target: ratioInput});
} else if (target === waterSlider) {
waterInput.value = waterSlider.valueAsNumber;
onInputChange({target: waterInput});
} else if (target === coffeeSlider) {
coffeeInput.value = coffeeSlider.valueAsNumber;
onCoffeeInputChange();
}
};
beansSlider.addEventListener("input", onSliderChange);
ratioSlider.addEventListener("input", onSliderChange);
waterSlider.addEventListener("input", onSliderChange);
coffeeSlider.addEventListener("input", onSliderChange);
writeInputValues();
// Timer:
const timerInput = document.querySelector("#timer");
const countdownInput = document.querySelector("#countdown");
const startButton = document.querySelector("#start");
const stopButton = document.querySelector("#stop");
const resetButton = document.querySelector("#reset");
const progressElement = document.querySelector("#progress");
let timer, countdown, runningInterval;
const decrementCountdownValue = () => {
countdown--;
writeCountdownValue();
if (countdown === 0) stopTimer();
};
const writeCountdownValue = () => {
countdownInput.value = `${Math.floor(countdown / 60)}:${(countdown % 60).toString().padStart(2, "0")}`;
let percentage = (1 - countdown / timer) * 100;
progressElement.style.width = `${percentage}%`;
progressElement.setAttribute("aria-valuenow", percentage);
};
const startTimer = () => {
if (countdown > 0) runningInterval = setInterval(decrementCountdownValue, 1000);
};
const stopTimer = () => {
clearInterval(runningInterval);
};
const resetTimer = () => {
countdown = timer;
writeCountdownValue();
};
const onTimerInputChange = () => {
markAsValidOrInvalid(timerInput);
if (isValid(timerInput)) {
timer = Math.round(timerInput.valueAsNumber * 60);
stopTimer();
resetTimer();
}
};
const onStartClick = () => {
stopTimer();
startTimer();
};
const onStopClick = () => {
stopTimer();
};
const onResetClick = () => {
stopTimer();
resetTimer();
};
timerInput.addEventListener("input", onTimerInputChange);
startButton.addEventListener("click", onStartClick);
stopButton.addEventListener("click", onStopClick);
resetButton.addEventListener("click", onResetClick);
onTimerInputChange();
// Daytime infobox
const beforeSunriseElement = document.querySelector("#before-sunrise");
const forenoonElement = document.querySelector("#forenoon");
const middayElement = document.querySelector("#midday");
const eveningElement = document.querySelector("#evening");
const afterSunsetElement = document.querySelector("#after-sunset");
new Promise((resolve, reject) => navigator.geolocation.getCurrentPosition(resolve, reject))
.then(({coords: {latitude, longitude}}) => fetch(`https://api.sunrise-sunset.org/json?formatted=0&lat=${latitude}&lng=${longitude}&date=${new Date().toDateString()}`))
.then(res => res.json())
.then(({status, results}) => {
if (status !== "OK") throw status;
return results;
})
.then(({civil_twilight_begin, civil_twilight_end}) => {
let now = new Date();
let dawn = new Date(civil_twilight_begin);
let dusk = new Date(civil_twilight_end);
let elementToBeShown;
if (now < dawn) elementToBeShown = beforeSunriseElement; // before sunrise
else if (now.getHours() < 10) elementToBeShown = forenoonElement; // forenoon (after sunrise)
else if (now > dusk) elementToBeShown = afterSunsetElement; // after sunset
else if (now.getHours() >= 16) elementToBeShown = eveningElement; // evening (before sunset)
else elementToBeShown = middayElement; // midday, afternoon
elementToBeShown.removeAttribute("hidden");
})
.catch(error => console.log("Daytime infobox fetch failed", error));
|
module.exports = function (app) {
require('dotenv').config()
const accountSid = process.env.TWILIO_ACCOUNT_SID
const authToken = process.env.TWILIO_AUTH_TOKEN
const client = require('twilio')(accountSid, authToken)
client.messages.create({
body: 'This is a test text message!!',
from: '+12186667109',
to: ''
}).then(message => console.log(message))
.catch((err) => console.log(err))
}
|
mongo_const={
url:'mongodb://localhost:27017',
db:'email_auth',
collections:"users"
}
module.exports={
mongo_const
}
|
//----------------------------------------------------------------------------------------
// Jay Lin
// API Practice
// My Favorite Songs
const express = require('express');
const app = express();
const PORT = 8080; // HTTP alt, above the restricted range
//----------------------------------------------------------------------------------------
// Set up the app to listen for requests
const uri = 'songs';
const defaultSongs = [
{
"name": "STAY (with Justin Bieber)",
"artist(s)": ["The Kid LAROI", "Justin Bieber"],
"duration": "2:21",
},
{
"name": "INDUSTRY BABY",
"artist(s)": ["Lil Nas X", "Jack Harlow"],
"duration": "3:32",
},
];
app.use(express.json()) // use middleware to convert and handle JSON
app.listen(
PORT,
() => console.log(`Server is alive on http://localhost:${PORT}/${uri}`)
);
//----------------------------------------------------------------------------------------
// HANDLE REQUESTS
// ex: curl http://localhost:8080/tshirt => {"tshirt":"SHIRT","size":"large"}
app.get(`/${uri}`, (request, response) => {
response.status(200).send(defaultSongs);
});
// Handle many new submitted tshirts with dynamic ID
app.post(`/${uri}/:id`, (request, response) => {
const { id } = request.params;
const { name } = request.body;
if (!name) {
response.status(418).send({
message: "ERROR: Sorry, you must include a name for your SONG!"
})
}
response.send({
tshirt: `You UPLOADED 1 SONG: ${name}, with ID: ${id}!`,
})
});
|
const express = require("express");
const Games = require("../models/Games");
const router = express.Router();
router.get("/", async (req, res) => {
const { q, limit, page, fields, orderBy, sortBy } = req.query;
const DEFAULT_LIMIT = 10;
const DEFAULT_PAGE = 1;
const DEFAULT_ORDER_BY = "title";
const criteria = {
limit: Number(limit) || DEFAULT_LIMIT,
page: Number(page) || DEFAULT_PAGE,
fields: fields || null,
orderBy: orderBy || DEFAULT_ORDER_BY,
sortBy: sortBy !== undefined ? Number(sortBy) : 1,
q: q || null,
};
try {
const result = await Games.find(criteria);
const count = await Games.count(criteria);
return res.json({
message: "Games listed",
data: result,
total: count,
});
} catch (error) {
return res.status(500).send(error);
}
});
router.post("/", async (req, res) => {
const { body } = req;
try {
const data = await Games.store(body);
return res.json({
message: "Game Stored",
data: body,
});
} catch (error) {
return res.status(403).send(error);
}
});
router.put("/:id", async (req, res) => {
const { body, params } = req;
const { id } = params;
try {
const game = await Games.update(id, body);
if (game) {
return res.json({
message: "Game Updated",
data: game,
});
} else {
return res.status(404).json({
message: "No data found to update",
});
}
} catch (error) {
console.log(error);
return res.status(403).send(error);
}
});
router.delete("/:id", async (req, res) => {
const { params } = req;
const { id } = params;
try {
const game = await Games.destroy(id);
if (game) {
return res.json({
message: "Game Deleted",
data: game,
});
} else {
return res.status(404).json({
message: "No data found to delete",
});
}
} catch (error) {
console.log(error);
return res.status(403).send(error);
}
});
module.exports = router;
|
import faker from 'faker';
const getRandomIntInclusive = (min, max) => {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1) + min);
};
const generateData = (count = 1000) => {
let data = [];
for (let i = 0; i < count; i++) {
data.push({
name: faker.name.findName(),
email: faker.internet.email(),
randomHeight: getRandomIntInclusive(50, 150)
});
}
return data;
};
export default generateData;
|
Mondo.addTranslation('de-CH', { foo: 'foo'});
|
import React from 'react';
import Link from 'next/link';
import Layout from '../components/wrapper';
import { Grid, Header, Form, Message } from 'semantic-ui-react';
import web3 from '../../ethereum/web3';
import factory from '../../ethereum/factory';
class NewContest extends React.Component {
state = {
url: 'https://i.telegraph.co.uk/multimedia/archive/03150/thatcher-bbc_3150455b.jpg',
minAmount: '100000000000000',
maxVoters: 10,
complete: false,
sending: false
}
onSubmit = async (event) => {
event.preventDefault()
this.setState({sending: true});
const accounts = await web3.eth.getAccounts();
await factory.methods.createHotOrNot(this.state.minAmount, this.state.maxVoters, this.state.url)
.send({from: accounts[0]});
this.setState({complete:true, sending: false});
}
render() {
return (
<Layout title='Create a new contest'>
<div style={{display: ! this.state.complete ? 'none' : 'inline'}}>
<Message positive>
<Message.Header>Contest created</Message.Header>
<p>
Return <Link href='/'><a>Home</a></Link>
</p>
</Message>
</div>
<div style={{display: ! this.state.complete ? 'inline' : 'none'}}>
<Grid>
<Grid.Row columns={1}>
<Grid.Column>
<Header as='h1' size='huge'>Create a new Crypto Hot or Not Contest</Header>
</Grid.Column>
</Grid.Row>
<Grid.Row columns={1}>
<Grid.Column>
<Form onSubmit={this.onSubmit} >
<Form.Group>
<Form.Field>
<label>Minimum vote amount (in wei)</label>
<input
type='number'
value={this.state.minAmount}
onChange={event => this.setState({ value: event.target.value })} />
</Form.Field>
<Form.Field>
<label>Number of voters to close</label>
<input type='number'
value={this.state.maxVoters}
onChange={event => this.setState({ value: event.target.value })} />
</Form.Field>
</Form.Group>
<Form.Field>
<label />
<input value={this.state.url}
onChange={event => this.setState({ url: event.target.value })}
type='url' />
</Form.Field>
<Form.Button content={this.state.sending ? 'Wait' : 'Submit'} />
</Form>
</Grid.Column>
</Grid.Row>
</Grid>
</div>
</Layout>
);
}
}
export default NewContest;
|
var should = require('should');
var request = require('request');
var async = require('async');
var utils = require('./utils');
var Couch = require('../lib/couch');
var _ = require('underscore');
var testPort = 12500;
var dbName = 'ws_mocks';
var dbConfig = {pathname: dbName};
var serverConfig = {db: dbName, port: testPort};
var Graft = require('graftjs/server');
function cleanup(done) {
this.dbDel(function(err) {
done();
});
}
// Install and destroy database.
// -----------------------------
describe('install', function() {
var db = new Couch(dbConfig);
before(function(done) {
Graft.directory(__dirname);
require('graftjs/io/rest');
require('../server');
db.dbDel(function(err) {
Graft.load(__dirname);
Graft.start(serverConfig);
Graft.Data.Couch.on('ready', done);
});
});
after(cleanup.bind(db));
it('check that database exists', function(done) {
db.get('_design/backbone', function(err, doc) {
if (err) throw err;
should.ok(doc._rev);
should.ok(doc.language);
should.ok(doc.views);
should.ok(doc.rewrites);
done();
});
});
it('should delete the database', function(done) {
db.dbDel(done);
});
it('check that database does not exist anymore', function(done) {
db.get('_design/backbone', function(err, doc) {
should.deepEqual(err.error, 'not_found');
done();
});
});
});
describe('Creating model', function(){
var db = new Couch(dbConfig);
before(cleanup.bind(db));
after(cleanup.bind(db));
describe('Install DB', function() {
it('should install the database', function(done) {
utils.install(dbConfig, done);
});
});
describe('POST /api/Mock', function() {
var doc = {
"id": 'one',
"someVal": "Ronald McDonald",
"favColor": "yello"
};
before(utils.requestUrl(testPort, '/api/Mock', 'POST', doc));
it ('should have a location', function() {
this.resp.should.have.header('Location');
});
it ('should return status 303', function() {
this.resp.should.have.status(303);
});
it('response should be json', function() {
this.resp.should.be.json;
});
it ('should have a body', function() {
should.exist(this.body);
});
it ('should have defaulted the fields correctly', function() {
this.body.should.have.property('name', 'name');
});
it ('should have added a field', function() {
this.body.should.have.property('favColor', 'yello');
});
});
describe('GET /api/Mock/one', function() {
before(utils.requestUrl(testPort, '/api/Mock/one'));
it ('should return status 200', function() {
this.resp.should.have.status(200);
});
it('response should be json', function() {
this.resp.should.be.json;
});
it ('should have a body', function() {
should.exist(this.body);
});
it('should have the correct id', function() {
this.body.should.have.property('id', 'one');
});
it('should have the correct someVal', function() {
this.body.should.have.property('someVal', 'Ronald McDonald');
});
it ('should respect the default values', function() {
this.body.should.have.property('name', 'name');
});
});
// This next section is dependent on the server having gives
// us a new location with the previous request.
describe("Follow Location Header", function() {
var testUrl = 'http://localhost:'+ testPort;
var beforeFn = function(done) {
var self = this;
var opts = {
json: {
name: "Hamburgler, The",
favColor: "Bun"
},
method: 'POST'
};
async.waterfall([
function(next) {
request(testUrl + '/api/Mock', opts, function(err, resp, body) {
next(null, resp.body.id, resp.headers.location);
});
},
function (id, locat, next) {
self.newId = id;
self.newLocation = locat;
request(testUrl + locat, {json: true}, function(err, resp, body) {
self.resp = resp;
self.body = body;
next(err);
});
}], done);
};
before(beforeFn);
it ('should return status 200', function() {
this.resp.should.have.status(200);
});
it('response should be json', function() {
this.resp.should.be.json;
});
it ('should have a body', function() {
should.exist(this.body);
});
it('should have the correct id', function() {
this.body.should.have.property('id', this.newId);
});
});
});
describe('Reading model', function() {
var db = new Couch(dbConfig);
before(cleanup.bind(db));
after(cleanup.bind(db));
describe('Install DB', function() {
it('should install the database', function(done) {
utils.install(dbConfig, done);
});
});
describe('POST /api/Mock', function() {
var doc = {
"id": 'one',
"someVal": "Ronald McDonald",
"favColor": "yello"
};
before(utils.requestUrl(testPort, '/api/Mock', 'POST', doc));
// This is for the new location the server told us to go.
it ('should have a location', function() {
this.resp.should.have.header('Location');
});
it ('should return status 303', function() {
this.resp.should.have.status(303);
});
it('response should be json', function() {
this.resp.should.be.json;
});
it ('should have a body', function() {
should.exist(this.body);
});
});
describe('GET /api/Mock/one', function() {
before(utils.requestUrl(testPort, '/api/Mock/one'));
it ('should return status 200', function() {
this.resp.should.have.status(200);
});
it('response should be json', function() {
this.resp.should.be.json;
});
it ('should have a body', function() {
should.exist(this.body);
});
it('should have the correct id', function() {
this.body.should.have.property('id', 'one');
});
it('should have the correct someVal', function() {
this.body.should.have.property('someVal', 'Ronald McDonald');
});
it ('should respect the default values', function() {
this.body.should.have.property('name', 'name');
});
});
});
describe('Updating model', function() {
var db = new Couch(dbConfig);
before(cleanup.bind(db));
after(cleanup.bind(db));
describe('Install DB', function() {
it('should install the database', function(done) {
utils.install(dbConfig, done);
});
});
describe('POST /api/Mock', function() {
var doc = {
"id": 'one',
"someVal": "Ronald McDonald",
"favColor": "yello"
};
before(utils.requestUrl(testPort, '/api/Mock', 'POST', doc));
// This is for the new location the server told us to go.
it ('should have a location', function() {
this.resp.should.have.header('Location');
});
it ('should return status 303', function() {
this.resp.should.have.status(303);
});
it('response should be json', function() {
this.resp.should.be.json;
});
it ('should have a body', function() {
should.exist(this.body);
});
});
describe('GET /api/Mock/one', function() {
before(utils.requestUrl(testPort, '/api/Mock/one'));
it ('should return status 200', function() {
this.resp.should.have.status(200);
});
it('response should be json', function() {
this.resp.should.be.json;
});
it ('should have a body', function() {
should.exist(this.body);
});
it('should have the correct id', function() {
this.body.should.have.property('id', 'one');
});
it('should have the correct someVal', function() {
this.body.should.have.property('someVal', 'Ronald McDonald');
});
it ('should respect the default values', function() {
this.body.should.have.property('name', 'name');
});
});
describe('PUT /api/Mock/one', function() {
var data = {
id: "one",
someVal: "Emily Mortimer",
favColor: "magenta"
};
before(utils.requestUrl(testPort, '/api/Mock/one', 'PUT', data));
it ('should return status 201', function() {
this.resp.should.have.status(201);
});
it('response should be json', function() {
this.resp.should.be.json;
});
it ('should have a body', function() {
should.exist(this.body);
});
it ('should return the changed object', function() {
this.body.should.have.property('someVal', 'Emily Mortimer');
});
it ('should have added a field', function() {
this.body.should.have.property('favColor', 'magenta');
});
});
describe('GET /api/Mock/one', function() {
before(utils.requestUrl(testPort, '/api/Mock/one'));
it ('should return status 200', function() {
this.resp.should.have.status(200);
});
it('response should be json', function() {
this.resp.should.be.json;
});
it ('should have a body', function() {
should.exist(this.body);
});
it ('should have added a field', function() {
this.body.should.have.property('favColor', 'magenta');
});
it ('should return the changed object', function() {
this.body.should.have.property('someVal', 'Emily Mortimer');
});
});
describe('GET /api/Mock', function() {
before(utils.requestUrl(testPort, '/api/Mock'));
it ('should return status 200', function() {
this.resp.should.have.status(200);
});
it('response should be json', function() {
this.resp.should.be.json;
});
it ('should have a body', function() {
should.exist(this.body);
});
it ('should have added a field', function() {
this.body[0].should.have.property('favColor', 'magenta');
});
it ('should return the changed object in listing', function() {
this.body[0].should.have.property('someVal', 'Emily Mortimer');
});
});
});
describe('Deleting model', function() {
var db = new Couch(dbConfig);
before(cleanup.bind(db));
after(cleanup.bind(db));
describe('Install DB', function() {
it('should install the database', function(done) {
utils.install(dbConfig, done);
});
});
describe('POST /api/Mock', function() {
var doc = {
"id": 'one',
"someVal": "Ronald McDonald", // was "Emily Baker"
"favColor": "yello" // new field
};
before(utils.requestUrl(testPort, '/api/Mock', 'POST', doc));
it ('should have a location', function() {
this.resp.should.have.header('Location');
});
it ('should return status 303', function() {
this.resp.should.have.status(303);
});
it('response should be json', function() {
this.resp.should.be.json;
});
it ('should have a body', function() {
should.exist(this.body);
});
});
describe('DELETE /api/Mock/one', function() {
before(utils.requestUrl(testPort, '/api/Mock/one', 'DELETE'));
it ('should return status 204', function() {
this.resp.should.have.status(204);
});
describe('GET /api/Mock/one', function() {
before(utils.requestUrl(testPort, '/api/Mock/one'));
it ('should return status 404', function() {
this.resp.should.have.status(404);
});
});
describe('GET /api/Mock', function() {
before(utils.requestUrl(testPort, '/api/Mock'));
it ('should return status 200', function() {
this.resp.should.have.status(200);
});
it('response should be json', function() {
this.resp.should.be.json;
});
it ('should have a body', function() {
should.exist(this.body);
});
it ('should not have a record with id one', function() {
var record = false;
_.each(this.body, function(val) {
if(val.id == 'one') {
record = true;
}
});
record.should.equal(false);
});
});
});
});
|
function convertStringToNumber (string, x = 10) {
let chars = string.split('');
let number = 0;
let i = 0;
while (i < chars.length && chars[i] !== '.') {
number = number * x;
if (/[a-f]/.test(chars[i])) {
number += chars[i].codePointAt(0) - 'a'.codePointAt() + 10;
} else if (/[A-F]/.test(chars[i])) {
number += chars[i].codePointAt(0) - 'A'.codePointAt() + 10;
} else {
number += chars[i].codePointAt(0) - '0'.codePointAt();
}
i++;
}
if (chars[i] == '.') {
i++;
}
let fraction = 1;
while (i < chars.length && chars[i] != 'e') {
fraction /= x;
number += (chars[i].codePointAt(0) - '0'.codePointAt()) * fraction;
i++;
}
if (chars[i] == 'e') {
i++;
}
let exp = 0;
while (i < chars.length) {
exp *= chars[i];
exp += (chars[i].codePointAt(0) - '0'.codePointAt());
i++;
}
return number * (10 ** exp);
}
function convertNumberToString(number, x = 10) {
let integer = Math.floor(number);
let fraction = number - integer;
let string = '';
while (integer) {
string = integer % x + string;
integer = Math.floor(integer / x);
}
if (fraction) {
string += '.';
while (fraction) {
string += Math.floor(fraction * x);
fraction = fraction * x - Math.floor(fraction * x);
}
}
return string;
}
let res = convertStringToNumber('0.3', 10);
console.log(res);
res = convertNumberToString(0.1, 2);
console.log(res);
|
define([
'jquery',
'underscore',
'backbone'
], function($, _, Backbone){
window.Band = Backbone.Model.extend({
changePopulation: function(people){
this.set('population', this.get('population') + people);
this.trigger('change:population');
return this;
}
});
})
|
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import NavBar from './common/NavBar';
import InteractionForm from './Interactions';
import '../../node_modules/bootstrap/dist/css/bootstrap.min.css';
import '../css/main.css';
class Hello extends Component {
render() {
return (<div className='container-fluid'>
<NavBar/>
<InteractionForm/>
</div>);
}
}
ReactDOM.render(<Hello />, document.getElementById('container'));
|
import React from "react";
import { useSpring, animated } from "react-spring";
import styled from "styled-components";
import { Responsive } from "../styles/vars";
const trans1 = (x, y) => `translate3d(${x / 10}px,${y / 10}px,0)`;
const trans2 = (x, y) => `translate3d(${x / 9}px,${y / 9}px,0)`;
const trans3 = (x, y) => `translate3d(${x / 7.5}px,${y / 7.5}px,0)`;
const trans4 = (x, y) => `translate3d(${x / 7}px,${y / 7}px,0)`;
const trans5 = (x, y) => `translate3d(${x / 6.1}px,${y / 6.5}px,0)`;
const transc1 = (x, y) => `translate3d(${x / 50}px,${y / 50}px,0)`;
const transc2 = (x, y) => `translate3d(${x / 50}px,${y / 50}px,0)`;
const transc3 = (x, y) => `translate3d(${x / 45}px,${y / 45}px,0)`;
const transc4 = (x, y) => `translate3d(${x / 44}px,${y / 44}px,0)`;
const transc5 = (x, y) => `translate3d(${x / 43}px,${y / 43}px,0)`;
const transc6 = (x, y) => `translate3d(${x / 40}px,${y / 40}px,0)`;
const Svg = animated.img;
const ContainerParrallax1 = styled.div`
position: absolute;
right: 10%;
width: 400px;
height: 400px;
z-index: -1;
${Responsive.miniDesktop} {
width: 300px;
height: 300px;
}
${Responsive.tablet} {
width: 250px;
height: 250px;
}
${Responsive.miniTablet} {
width: 200px;
height: 200px;
right: auto;
left: 5%;
}
${Responsive.mobile} {
// display: none;
width: 300px;
height: 300px;
left: 50%;
transform: translate(-50%, 0);
top: 3%;
z-index: -1;
}
${Responsive.landscape} {
width: 200px;
height: 200px;
}
.card {
position: absolute;
will-change: transform;
}
.card1 {
width: 100%;
height: 100%;
bottom: 0%;
top: 0%;
right: 0%;
left: 0%;
${Responsive.mobile} {
display: none;
}
}
.card2 {
width: 105%;
height: 105%;
bottom: 8%;
left: -2%;
${Responsive.mobile} {
display: none;
}
}
.card3 {
width: 65%;
height: 65%;
bottom: 8%;
left: -4.5%;
}
.card4 {
width: 65%;
height: 65%;
bottom: 8%;
right: -1%;
}
.card5 {
width: 25%;
height: 25%;
bottom: 20%;
right: 40%;
}
`;
const ContainerParrallax2 = styled.div`
position: absolute;
width: 100vw;
height: 100vh;
display: flex;
top: 0;
left: 0;
right: 0;
z-index: -2;
${Responsive.tablet} {
display: none;
}
.c {
position: absolute;
will-change: transform;
max-width: 40vw;
}
.c1 {
width: 40vw;
bottom: -50px;
left: -160px;
}
.c2 {
width: 40vw;
top: 0;
right: -160px;
}
.c3 {
width: 13vw;
top: 0;
left: -50px;
}
.c4 {
width: 10vw;
bottom: 0;
left: 50%;
}
.c5 {
width: 20vw;
bottom: -200px;
right: 10%;
}
.c6 {
width: 5vw;
top: 5%;
left: 50%;
}
`;
const Parrallax = ({ parrallax: props, setParrallax: set }) => {
return (
<>
<ContainerParrallax1 className="Parrallax1">
<Svg
src="img/fondo.svg"
className="card card1"
style={{ transform: props.xy.interpolate(trans1) }}
/>
<Svg
src="img/torre.svg"
className="card card2"
style={{ transform: props.xy.interpolate(trans2) }}
/>
<Svg
src="img/ingeniero1.svg"
className="card card3"
style={{ transform: props.xy.interpolate(trans3) }}
/>
<Svg
src="img/ingeniero2.svg"
className="card card4"
style={{ transform: props.xy.interpolate(trans4) }}
/>
<Svg
src="img/planos.svg"
className="card card5"
style={{ transform: props.xy.interpolate(trans5) }}
/>
</ContainerParrallax1>
<ContainerParrallax2 className="Parrallax2">
<Svg
src="img/c1.svg"
className="c c1"
style={{ transform: props.xy.interpolate(transc1) }}
/>
<Svg
src="img/c2.svg"
className="c c2"
style={{ transform: props.xy.interpolate(transc2) }}
/>
<Svg
src="img/c3.svg"
className="c c3"
style={{ transform: props.xy.interpolate(transc3) }}
/>
<Svg
src="img/c4.svg"
className="c c4"
style={{ transform: props.xy.interpolate(transc4) }}
/>
<Svg
src="img/c5.svg"
className="c c5"
style={{ transform: props.xy.interpolate(transc5) }}
/>
<Svg
src="img/c6.svg"
className="c c6"
style={{ transform: props.xy.interpolate(transc6) }}
/>
</ContainerParrallax2>
</>
);
};
export default Parrallax;
|
import Axios from "axios";
import { LOADING, LOADED, ERROR, UNASKED, aF } from ".";
const DIRECT_OBJECT = `DROPS`;
const LOADING_DROPS = `LOADING_` + DIRECT_OBJECT;
const LOADED_DROPS = `LOADED_` + DIRECT_OBJECT;
const ERROR_DROPS = `ERROR_` + DIRECT_OBJECT;
const ADD_DROP = `ADD_DROP`;
const DELETE_DROP = `DELETE_DROP`;
export const getDrops = () => async dispatch => {
try {
dispatch(aF(LOADING_DROPS));
const allDrops = await Axios.get(`/api/drops`);
dispatch(aF(LOADED_DROPS, allDrops.data));
return allDrops.data;
} catch (e) {
dispatch(aF(ERROR_DROPS, e));
}
};
const initialState = { status: UNASKED, collection: [] };
const allDrops = (state = initialState, action) => {
switch (action.type) {
case LOADING_DROPS:
return { ...state, status: LOADING };
case LOADED_DROPS:
return { ...state, status: LOADED, collection: action.payload };
case ADD_DROP:
return {
...state,
status: LOADING,
collection: [...state.collection, action.payload],
};
case DELETE_DROP:
return {
...state,
status: LOADING,
collection: action.payload,
};
case ERROR_DROPS:
return { ...state, status: ERROR };
default:
return state;
}
};
export default allDrops;
|
import React, {Component} from 'react';
import ConnectTransitionWrapper from 'client/lib/ConnectTransitionWrapper';
@ConnectTransitionWrapper()
export default class DummyComponent extends Component {
render() {
return (
<div>
<p>Dummy</p>
</div>
);
}
}
|
var PLUGIN_INFO =
<KeySnailPlugin>
<name>Navigate Relations</name>
<description>Easily move via next/prev tags/links</description>
<version>0.1</version>
<updateURL>http://github.com/kidd/keysnail-navigate-relations/raw/master/navigate-relations.ks.js</updateURL>
<author mail="raimonster@gmail.com" homepage="https://puntoblogspot.blogspot.com/">Raimon Grau</author>
<license>The MIT License</license>
<minVersion>1.0</minVersion>
<include>main</include>
<provides>
<ext>navi-next</ext>
<ext>navi-prev</ext>
<ext>navi-up</ext>
</provides>
<detail><![CDATA[
=== Usage ===
Use \]\] to go to logical 'next' page, and \[\[ to the 'previous' one.
'^' moves upper in the url structure
]]></detail>
</KeySnailPlugin>;
function matching_text(aTags, searchText){
var found;
for (var i = 0; i < aTags.length; i++) {
if (aTags[i].textContent.trim().toLowerCase() == searchText.toLowerCase()) {
found = aTags[i];
return found;
}
}
}
function navi_dir(words){
var aTags = window.content.document.getElementsByTagName("a");
var found;
for (var i in words){
found = matching_text(aTags, words[i]);
if (found) { found.click(); return found}
}
}
function rel_dir(dir){
function all(tag){
return window.content.document.getElementsByTagName(tag)
}
function rel(elems, dir){
for (var i in elems) {
if((new RegExp("^"+dir, 'i')).test(elems[i].rel)) {
window.content.document.location = elems[i].href;
return true;
}
}
}
return rel(all('link'), dir) || rel(all('a'), dir)
}
function navi_prev(){
rel_dir('prev') || navi_dir(['prev', 'prev:', 'previous', '<']);
}
function navi_next(){
rel_dir('next') || navi_dir(['next', 'next:' '>']);
}
function navi_up(){
var url = window.content.document.location.href.toString();
rel_dir('up') || (window.content.document.location = url.replace(/[^/]*\/?$/,''))
}
var navi_next_doc = 'Navigates to next page';
var navi_prev_doc = 'Navigates to previous page';
var navi_up_doc = 'Navigates to upper in the url structure';
ext.add("navi-next", navi_next , M({en: navi_next_doc}));
ext.add("navi-prev", navi_prev , M({en: navi_prev_doc}));
ext.add("navi-up", navi_up , M({en: navi_up_doc}));
key.setViewKey(["]", "]"], function (ev) {
navi_next();
}, navi_next_doc, true);
key.setViewKey(["[", "["], function (ev) {
navi_prev();
}, navi_prev_doc, true);
key.setViewKey(["^"], function (ev) {
navi_up();
}, navi_up_doc, true);
|
import React from 'react';
export default function Product(props){
return(
<div>
<div>{props.element.name}</div>
<div>{props.element.price}</div>
<div>{props.element.image}</div>
</div>
)
}
|
import React from "react";
import Card from "react-bootstrap/Card";
import "../../style.css";
import "bootstrap/dist/css/bootstrap.min.css";
function AboutCard() {
return (
<Card className="quote-card-view">
<Card.Body>
<blockquote className="blockquote mb-0">
<p style={{ textAlign: "justify" }}>
Hi Everyone, I am <span className="purple">Syed Rafi Naqvi </span>
from <span className="purple"> Hyderabad, India.</span>
<br />I am a junior Full Stack Developer, Exploring to be a Senior
🐶. BTW I like 🐱.
<br />
<br />
Apart from coding, some other activities that I love to do!
</p>
<ul>
<li className="about-activity">
<i className="far fa-hand-point-right"></i> Playing Pc Games
</li>
<li className="about-activity">
<i className="far fa-hand-point-right"></i> Writting Tech Blogs
</li>
<li className="about-activity">
<i className="far fa-hand-point-right"></i> Vloging Tech Reviews
</li>
</ul>
<p style={{ marginBlockEnd: 0, color: "rgb(155 126 172)" }}>
"Having a contrasting mind is meager but making difference in
other's life is humongous. Let's try to make a difference."{" "}
</p>
<footer className="blockquote-footer">Syed Rafi</footer>
</blockquote>
</Card.Body>
</Card>
);
}
export default AboutCard;
|
import io from 'socket.io-client';
import { NEW_MESSAGE, ADD_MESSAGE, SIGN_IN } from '../actions/types';
export const socketMiddleware = (baseUrl) => {
return storeAPI => {
let socket = io(baseUrl);
// Setup default listener
let listener = setupSocketListener('default', socket, storeAPI);
// Check actions and emit from socket if needed
return next => action => {
if (action.type === NEW_MESSAGE) {
socket.emit('simple-chat-new-message', action.payload);
return;
}
else if (action.type === SIGN_IN) {
socket.emit('simple-chat-userId', action.payload.userId);
listener.off();
listener = setupSocketListener(action.payload.userId, socket, storeAPI);
}
return next(action);
}
}
}
// Listens on socket with our userId
// Listens to socket server
// Action types of (Message, Channel)
function setupSocketListener(userId, socket, storeAPI) {
return socket.on(userId, (action) => {
// Check for action type
if (action.type === "message") {
storeAPI.dispatch({
type: ADD_MESSAGE,
payload: action.payload
});
}
});
}
|
const NODE_ENV = process.env.NODE_ENV;
const PORT = process.env.PORT || 3000;
const DB_ADDRESS = process.env.DB_ADDRESS;
module.exports = {
NODE_ENV,
PORT,
DB_ADDRESS,
};
|
'use strict';
/**
* @name OnhanhDashboard
* @description ...
*/
productModule
.config(['$stateProvider',
function($stateProvider) {
var getSections = ['Sections', function(Sections) {
return Sections.all();
}];
var getProductId = ['$stateParams', function($stateParams) {
return $stateParams.id;
}];
var getVariantId = ['$stateParams', function($stateParams) {
return $stateParams.variantId;
}];
// Use $stateProvider to configure your states.
$stateProvider
.state("product", {
title: "List Product",
url: "/product",
controller: 'productController',
templateUrl: '/web/product/list.html',
}
)
.state("product.new", {
title: "Add Product",
url: "/new",
views: {
"@": {
resolve: {
sections: getSections,
product: ['Products', function(Products) {
return new Products();
}],
},
controller: 'productDetailController',
templateUrl: '/web/product/detail.html',
}
}
}
)
.state("product.detail", {
title: "Detail",
url: "/:id",
views: {
"@": {
resolve: {
sections: getSections,
productId: getProductId,
product: ['Products', 'productId', function(Products, productId) {
return Products.get({id: productId});
}],
},
controller: 'productDetailController',
templateUrl: '/web/product/detail.html',
}
}
}
);
}
]);
|
import _ from 'lodash'
import Graph from '../Graph.js'
import Node from '../Node.js'
describe('Graph', () => {
beforeEach(() => {
jest.useFakeTimers()
})
const genBasicGraph = () => {
const graph = new Graph()
const nodeSpecFactories = {
node1: () => {
const nodeSpec = {
id: 'node1',
portSpecs: {
outputs: {
'out1': {},
}
},
}
return nodeSpec
},
node2: () => {
const nodeSpec = {
id: 'node2',
portSpecs: {
inputs: {
'in1': {},
}
}
}
return nodeSpec
}
}
const nodeSpecs = _.mapValues(nodeSpecFactories, (factory, key) => {
const nodeSpec = factory()
nodeSpec.specFactoryFn = factory
return nodeSpec
})
graph.addNodeFromSpec({nodeSpec: nodeSpecs.node1})
graph.addNodeFromSpec({nodeSpec: nodeSpecs.node2})
const wireSpecFactories = {
'wire1': () => {
const wireSpec = {
id: 'wire1',
src: 'node1:out1',
dest: 'node2:in1',
srcCode: 'wire1.srcCode',
}
return wireSpec
}
}
const wireSpecs = _.mapValues(wireSpecFactories, (factory, key) => {
const wireSpec = factory()
wireSpec.specFactoryFn = factory
return wireSpec
})
graph.addWireFromSpec({wireSpec: wireSpecs.wire1})
return graph
}
describe('onChange listener', () => {
it('ticks for onChange event', () => {
const g = new Graph()
expect(g.tickCount).toEqual(0)
g.changed.dispatch()
jest.runAllTimers()
expect(g.tickCount).toEqual(1)
})
})
describe('addNodeFromSpec', () => {
it('sets node state', () => {
const nodeId = 'node1'
const graph = new Graph()
const someState = new Map()
someState.set('foo', 'bar')
graph.nodeStates.set(nodeId, someState)
const node = graph.addNodeFromSpec({nodeSpec: {id: nodeId}})
expect(node.state.get('foo')).toBe('bar')
})
it('dispatches changed signal by default', () => {
const g = new Graph()
let changeCounter = 0
g.changed.add(() => changeCounter++)
g.addNode(new Node())
expect(changeCounter).toEqual(1)
})
it('does not dispatch signal if specified', () => {
const g = new Graph()
let changeCounter = 0
g.changed.add(() => changeCounter++)
g.addNode(new Node(), {noSignals: true})
expect(changeCounter).toEqual(0)
})
it('adds listener for node.changed', () => {
const g = new Graph()
let changeCounter = 0
const node = new Node()
g.addNode(node)
g.changed.add(() => changeCounter++)
node.changed.dispatch()
expect(changeCounter).toEqual(1)
})
})
describe('drainPortPackets', () => {
const wireFactory = ({drainBehavior}) => {
const packets = []
return {
behaviors: { drain: drainBehavior },
packets,
pushPacket: packets.push.bind(packets),
}
}
let graph
beforeEach(() => {
graph = new Graph()
})
it('pushes to wires that come after debouncedDrain wires', () => {
const debounceWire = wireFactory({drainBehavior: 'debouncedDrain'})
const copyWire = wireFactory({drainBehavior: 'copy'})
const port = { packets: [1] }
graph.drainPortPackets({port, wires: [debounceWire, copyWire]})
expect(debounceWire.packets).toEqual([1])
expect(copyWire.packets).toEqual([1])
expect(port.packets).toEqual([])
})
it('does not push to wires after a drain wire', () => {
const drainWire = wireFactory({drainBehavior: 'drain'})
const copyWire = wireFactory({drainBehavior: 'copy'})
const port = { packets: [1] }
graph.drainPortPackets({port, wires: [drainWire, copyWire]})
expect(drainWire.packets).toEqual([1])
expect(copyWire.packets).toEqual([])
expect(port.packets).toEqual([])
})
it('does not drain if there were no draining wires', () => {
const copyWire = wireFactory({drainBehavior: 'copy'})
const port = { packets: [1] }
graph.drainPortPackets({port, wires: [copyWire]})
expect(copyWire.packets).toEqual([1])
expect(port.packets).toEqual([1])
})
})
describe('getSerializedSpec', () => {
it('derives expected ctorOpts', () => {
const graph = new Graph({id: 'someId', label: 'someLabel'})
const serializeGraphSpec = graph.getSerializedSpec()
const expectedCtorOpts = {id: graph.id, label: graph.label}
expect(serializeGraphSpec.ctorOpts).toEqual(expectedCtorOpts)
})
it('derives expected serializedNodeSpecs', () => {
const graph = new Graph()
graph.addNodeFromSpec({nodeSpec: { id: 'node1' }})
graph.addNodeFromSpec({nodeSpec: { id: 'node2' }})
graph.nodes['node1'].getSerializedSpec = () => 'mockSpec:node1'
graph.nodes['node2'].getSerializedSpec = () => 'mockSpec:node2'
const serializedGraphSpec = graph.getSerializedSpec()
const expectedSerializedNodeSpecs = {
'node1': 'mockSpec:node1',
'node2': 'mockSpec:node2',
}
expect(serializedGraphSpec.serializedNodeSpecs)
.toEqual(expectedSerializedNodeSpecs)
})
it('derives expected serializedWireSpecs', () => {
const graph = new Graph()
graph.addNodeFromSpec({nodeSpec: {
id: 'node1',
portSpecs: {
outputs: {
'out1': {},
}
},
}})
graph.addNodeFromSpec({nodeSpec: {
id: 'node2',
portSpecs: {
inputs: {
'in1': {},
}
},
}})
graph.addWireFromSpec({wireSpec: {
id: 'wire1',
src: 'node1:out1',
dest: 'node2:in1',
srcCode: 'wire1.srcCode',
}})
graph.wires['wire1'].getSerializedSpec = () => 'mockSpec:wire1'
const serializedGraphSpec = graph.getSerializedSpec()
const expectedSerializedWireSpecs = { 'wire1': 'mockSpec:wire1' }
expect(serializedGraphSpec.serializedWireSpecs)
.toEqual(expectedSerializedWireSpecs)
})
})
describe('getSerializedState', () => {
it('copies values for all normal keys', () => {
const graph = genBasicGraph()
graph.state.set('pie', 'cherry')
graph.state.set('animal', 'stoat')
const serializedState = graph.getSerializedState()
expect(serializedState['pie']).toEqual('cherry')
expect(serializedState['animal']).toEqual('stoat')
})
it('handles nested nodeStates', () => {
const graph = genBasicGraph()
graph.serializeNodeStates = () => 'mockSerializedNodeStates'
const serializedState = graph.getSerializedState()
expect(serializedState[graph.SYMBOLS.NODE_STATES]).toEqual(
'mockSerializedNodeStates')
})
it('handles nested wireStates', () => {
const graph = genBasicGraph()
graph.serializeWireStates = () => 'mockSerializedWireStates'
const serializedState = graph.getSerializedState()
expect(serializedState[graph.SYMBOLS.WIRE_STATES]).toEqual(
'mockSerializedWireStates')
})
})
describe('serializeNodeStates', () => {
it('serializes nodeStates', () => {
const graph = genBasicGraph()
const expectedSerializedNodeStates = {}
for (let node of _.values(graph.getNodes())) {
const mockSerializedNodeState = 'mock:' + node.id
node.getSerializedState = () => mockSerializedNodeState
expectedSerializedNodeStates[node.id] = mockSerializedNodeState
}
const actualSerializedNodeStates = graph.serializeNodeStates()
expect(actualSerializedNodeStates).toEqual(expectedSerializedNodeStates)
})
})
describe('serializeWireStates', () => {
it('serializes wireStates', () => {
const graph = genBasicGraph()
const expectedSerializedWireStates = {}
for (let wire of _.values(graph.getWires())) {
const mockSerializedWireState = 'mock:' + wire.id
wire.getSerializedState = () => mockSerializedWireState
expectedSerializedWireStates[wire.id] = mockSerializedWireState
}
const actualSerializedWireStates = graph.serializeWireStates()
expect(actualSerializedWireStates).toEqual(expectedSerializedWireStates)
})
})
describe('Graph.fromSerializedSpec', () => {
it('creates expected graph', async () => {
const orig = genBasicGraph()
const serializedSpec = orig.getSerializedSpec()
const hydrated = await Graph.fromSerializedSpec(serializedSpec)
expect(hydrated.id).toEqual(orig.id)
})
})
describe('getSerialization', () => {
it('returns expected serialization', () => {
const graph = genBasicGraph()
const mocks = {}
for (let fnName of ['getSerializedSpec', 'getSerializedState']) {
const mockFn = () => 'mockReturn:' + fnName
mocks[fnName] = mockFn
graph[fnName] = mockFn
}
const expectedSerialization = {
serializedSpec: mocks.getSerializedSpec(),
serializedState: mocks.getSerializedState(),
}
const actualSerialization = graph.getSerialization()
expect(actualSerialization).toEqual(expectedSerialization)
})
})
describe('Graph.fromSerialization', () => {
it('can create graph from serialization', async () => {
const orig = genBasicGraph()
const serialization = orig.getSerialization()
const hydrated = await Graph.fromSerialization({serialization})
expect(hydrated.id).toEqual(orig.id)
})
})
})
|
const express = require('express');
const app = express();
const posts = require('./routes/posts');
const login = require('./routes/login');
const btc = require('./routes/btc');
const calculator = require('./routes/calculator');
const recipes = require('./routes/recipe');
const comments = require('./routes/comments');
const users = require('./routes/users')
const middlewares = require('./middlewares');
app.use(express.json());
app.use(middlewares.log);
app.use('/posts', posts);
app.use('/login', login);
app.use('/btc/price', btc);
app.use('/', calculator)
app.use('/recipe', recipes);
app.use('/comments',comments);
app.use('/users',users)
app.use(middlewares.error)
app.listen(3000, () => {
console.log('Porta 3000')
})
|
// Dependencies
var express = require("express");
var app = express();
require("./routes/apiRoutes")(app);
// require("./routes/htmlRoutes")(app);
// Listen on port 3000
app.listen(3000, function() {
console.log("App running on port 3000!");
});
|
// buz.js
var Buz = function () {
this.arr = []
this.arr.push(0)
};
Buz.prototype.log = function () {
this.arr.push(this.arr.length)
console.log(this.arr);
return this.arr
};
Buz.prototype.chain1 = function (str) {
this.arr.push(str)
return this
};
module.exports = Buz;
|
const { Robot } = require('./Robot');
describe('Robot class', () => {
const botTest = new Robot();
const position = {x:3,y:4,f:'NORTH'};
jest.spyOn(botTest, 'setPosition');
jest.spyOn(botTest,'faceOnChange');
jest.spyOn(botTest,'move');
it('should setPostion method take position as argument and set it to robot', () => {
botTest.setPosition(position);
expect(botTest.setPosition).toHaveBeenCalledTimes(1);
expect(botTest.position).toEqual(position);
});
it('should move method update robot x or y correctly', () => {
botTest.move();
botTest.move();
botTest.move();
expect(botTest.move).toHaveBeenCalledTimes(3);
expect(botTest.position.y).toEqual(5);
});
it('should faceOnChange method update Robot face correctly',()=>{
botTest.faceOnChange('LEFT');
expect(botTest.faceOnChange).toHaveBeenCalledTimes(1);
expect(botTest.position.f).toEqual('WEST');
});
});
|
import React, {
useCallback,
useEffect,
useState,
useRef,
useMemo,
} from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { LoadingOutlined } from '@ant-design/icons';
import { loadGroupsRequestAction } from '../../reducers/group';
import GroupList from './GroupList';
import styled from '@emotion/styled';
const HomeContainer = styled.section`
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
`;
const RecommendText = styled.section`
padding: 3rem 0 2rem 0;
margin: 0 auto;
text-align: center;
`;
const NoRecommandation = styled.section`
padding: 3rem 0;
margin: 0 auto;
text-align: center;
`;
const Home = () => {
const dispatch = useDispatch();
const { groups, groupsLoading } = useSelector((state) => state.group);
const { me } = useSelector((state) => state.user);
const containerRef = useRef(null);
const filteredGroups = useMemo(() => {
if (
!me.id ||
!groups ||
!groups.length ||
!me?.PreferCategories ||
!me?.PreferLocations
)
return groups;
return groups.filter((group) => {
// me.PreferLocations 의 address , me.PreferCategories 배열의 DetailCategory의 id
if (group?.ActiveCategories?.length) {
const result = group.ActiveCategories.some(({ detailCategoryId }) =>
me.PreferCategories.some(
({ DetailCategory }) => DetailCategory.id === detailCategoryId
)
);
if (result) return true;
}
if (group.location && me.PreferLocations.length) {
const result = me.PreferLocations.some(
({ address }) =>
address.split(' ').slice(0, 2).join(' ') ===
group.location.split(' ').slice(0, 2).join(' ')
);
if (result) return true;
}
return false;
});
}, [me, groups]);
useEffect(() => {
dispatch(loadGroupsRequestAction());
}, []);
return (
<HomeContainer ref={containerRef}>
{me.id && (
<RecommendText>
선호 지역 및 카테고리를 기반으로
<br />
<b>{me.name}</b>님에게 추천하는 모임을 확인해보세요! 😎
</RecommendText>
)}
{groupsLoading && (
<LoadingOutlined style={{ fontSize: '3rem', margin: 'auto' }} />
)}
{filteredGroups.length ? (
<GroupList groups={filteredGroups} />
) : (
<NoRecommandation>
선호 지역 및 카테고리를 기반으로
<br />
<b>{me.name}</b>님에게 추천할 수 있는 모임이 없습니다.😅
<br />
다른 지역 또는 카테고리를 선택해보세요.
</NoRecommandation>
)}
</HomeContainer>
);
};
export default Home;
|
import AsyncStorage from "@react-native-async-storage/async-storage";
import * as React from "react";
import {
Text,
View,
StyleSheet,
TextInput,
Button,
ActivityIndicator,
TouchableOpacity,
} from "react-native";
import firebase from "../Firebase";
function OTPScreen(props) {
const { verificationId, phoneNumber } = props.route.params;
const [verificationCode, setVerificationCode] = React.useState("");
const [confirmError, setConfirmError] = React.useState();
const [confirmInProgress, setConfirmInProgress] = React.useState(false);
const db = firebase.firestore();
return (
<View style={styles.container}>
<View style={{ justifyContent: "center", alignItems: "center" }}>
<Text style={{ fontSize: 18, fontWeight: "bold" }}>
Verify {phoneNumber}
</Text>
</View>
<View
style={{
marginTop: 120,
alignItems: "center",
}}
>
<TextInput
style={{
borderBottomWidth: 1,
padding: 8,
fontSize: 18,
fontWeight: "bold",
width: "50%",
textAlign: "center",
}}
value={verificationCode}
keyboardType="number-pad"
placeholder=""
onChangeText={(verificationCode) => {
if (verificationCode.length <= 6) {
setVerificationCode(verificationCode);
}
}}
/>
<Text style={{ color: "#928B8B", margin: 5 }}>Enter 6-digit code</Text>
{confirmError && (
<Text
style={{
marginTop: 15,
fontWeight: "bold",
color: "red",
alignSelf: "center",
fontSize: 18,
}}
>{`Wrong OTP`}</Text>
)}
</View>
<TouchableOpacity
style={{
backgroundColor: "black",
padding: 15,
justifyContent: "center",
alignItems: "center",
width: "40%",
alignSelf: "center",
borderRadius: 10,
marginTop: 90,
}}
onPress={async () => {
try {
setConfirmError(undefined);
setConfirmInProgress(true);
const credential = firebase.auth.PhoneAuthProvider.credential(
verificationId,
verificationCode
);
const authResult = await firebase
.auth()
.signInWithCredential(credential);
setConfirmInProgress(false);
setVerificationCode("");
if (authResult.additionalUserInfo.isNewUser) {
db.collection("users")
.doc(`${authResult.user.uid}`)
.set({
uid: `${authResult.user.uid}`,
name: "Instyl_user",
number: `${authResult.user.phoneNumber}`,
picture:
"https://cdn.landesa.org/wp-content/uploads/default-user-image.png",
});
}
AsyncStorage.setItem("isLoggedIn", "1");
AsyncStorage.setItem("UID", authResult.user.uid);
props.navigation.navigate("root");
} catch (err) {
setConfirmError(err);
setConfirmInProgress(false);
}
}}
>
<Text style={{ color: "white", fontSize: 16 }}>Confirm OTP</Text>
</TouchableOpacity>
{confirmInProgress && <ActivityIndicator style={styles.loader} />}
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
padding: 10,
backgroundColor: "white",
},
content: {
marginTop: 50,
},
title: {
marginBottom: 2,
fontSize: 29,
fontWeight: "bold",
},
subtitle: {
marginBottom: 10,
opacity: 0.35,
fontWeight: "bold",
},
text: {
marginTop: 30,
marginBottom: 4,
},
textInput: {
marginBottom: 8,
fontSize: 17,
fontWeight: "bold",
},
error: {
marginTop: 10,
fontWeight: "bold",
color: "red",
},
success: {
marginTop: 10,
fontWeight: "bold",
color: "blue",
},
loader: {
marginTop: 10,
},
overlay: {
...StyleSheet.absoluteFillObject,
backgroundColor: "#FFFFFFC0",
justifyContent: "center",
alignItems: "center",
},
overlayText: {
fontWeight: "bold",
},
});
export default OTPScreen;
|
X.define("modules.accountSettings.accountSafety",["model.userModel"],function (userModel) {
var view = X.view.newOne({
el: $(".xbn-content"),
url: X.config.accountSettings.tpl.accountSafety
});
//初始化控制器
var ctrl = X.controller.newOne({
view: view
});
ctrl.rendering = function () {
var callback = function (result) {
var baseInfo = result.data[0];
return view.render(baseInfo,function () {
if (baseInfo.email == "") {
ctrl.view.find(".js-email").show();
} else {
ctrl.view.find(".js-email-base").show();
}
$('.js-mobile').html('(' + baseInfo.mobile.slice(0, 3) + '****' + baseInfo.mobile.slice(7, 11) + ')');
});
};
userModel.getUserInfo(callback);
};
ctrl.bindEmailButton = function () {
var layerTemp = $('.js-bindEmailLayer');
var content = layerTemp.html();
var layerIndex = layer.open({
id: 'bindEmailLayer',
title: '邮箱验证',
content: content,
btn: [],
closeBtn: 1,
fixed: true,
resize: false,
move: false,
success: function () {
$('#bindEmailLayer').find('.js-bindEmailForm').validate({
rules: {
email: {
required:true,
email: true,
emailTrue: true, //不允许输入点开头的邮箱
rangelength: [5, 50],
isEmail:true
}
},
messages: {
email: {
required:"请输入邮箱",
email: "邮箱格式不正确,请输入正确的邮箱",
emailTrue: "邮箱格式不正确,请输入正确的邮箱", //不允许输入点开头的邮箱
rangelength: "请输入5位以上50位以下邮箱",
isEmail:"该邮箱已注册"
}
},
onkeyup: false,
onfocusout: function (element) {
var callback = function (result) {
}
userModel.getUserInfo(callback);
var elem = $(element);
elem.valid();
},
success: function (value, element) {
},
errorPlacement: function (error, element) {
error.appendTo(element.parent().find(".js-error"));
},
submitHandler: function (form) {
//that.trigger("submit");
}
});
$('#bindEmailLayer').find(".js-bindEmail").click(function () {
var callback = function (result) {
}
userModel.getUserInfo(callback);
if ($('#bindEmailLayer').find('.js-bindEmailForm').valid()) {
var that = this;
this.setAttribute('disabled', true);
var temp = {};
var data = $('#bindEmailLayer').find('.emailAddress').val();
temp.emailAddress = data;
var callback = function(){
layer.close(layerIndex);
that.setAttribute('disabled', false);
layer.open({
id: 'bindEmailLayer',
title: '提示',
content: '<span style="width: 200px;text-align: center;display: inline-block">发送成功</span>',
closeBtn: 1,
fixed: true,
resize: false,
move: false,
});
};
userModel.bindEmail(temp, callback);
}
});
}
}
);
};
ctrl.resetPasswordButton = function () {
var layerTemp = $('.js-resetPasswordLayer');
var content = layerTemp.html();
var layerIndex = layer.open({
id: 'resetPasswordLayer',
title: '修改密码',
content: content,
btn: [],
closeBtn: 1,
fixed: true,
resize: false,
move: false,
area: ['420px', '370px'],
success: function () {
$('#resetPasswordLayer').find('.js-resetPasswordForm').validate({
rules: {
oldPassword: {
required: true,
rangelength: [6, 16],
strongPsw:true,
isOldpassword:true
},
password: {
required: true,
rangelength: [6, 16],
strongPsw:true
},
cosPassword: {
required: true,
rangelength: [6, 16],
equalTo: "#resetPasswordLayer #password"
}
},
messages: {
oldPassword: {
required: "请输入6位以上的密码",
rangelength: "请输入6位以上16位以下密码",
strongPsw:"请输入6-16个字符且至少两种字符组合",
isOldpassword:"您输入的原密码不正确,请重新输入"
},
password: {
required: "请输入6位以上的密码",
rangelength: "请输入6位以上16位以下密码",
strongPsw:"请输入6-16个字符且至少两种字符组合"
},
cosPassword: {
required: "请重新输入密码",
rangelength: "请输入6位以上16位以下密码",
equalTo: "两次输入不一致"
}
},
onkeyup: false,
onfocusout: function (element) {
var callback = function (result) {
}
userModel.getUserInfo(callback);
var elem = $(element);
elem.valid();
},
success: function (value, element) {
},
errorPlacement: function (error, element) {
error.appendTo(element.parent().find(".js-error"));
},
submitHandler: function (form) {
//that.trigger("submit");
}
});
$('#resetPasswordLayer').find(".js-passSubmit").click(function () {
var callback = function (result) {
}
userModel.getUserInfo(callback);
if ($('#resetPasswordLayer').find('.js-resetPasswordForm').valid()) {
var that = this;
this.setAttribute('disabled', true);
var temp = {};
var data = $('#resetPasswordLayer').find('.password').val();
temp.password = data;
var callback = function(){
layer.close(layerIndex);
that.setAttribute('disabled', false);
layer.open({
id: 'bindEmailLayer',
title: '提示',
content: '<span style="width: 200px;text-align: center;display: inline-block">修改成功</span>',
closeBtn: 0,
fixed: true,
resize: false,
move: false,
});
};
userModel.password(temp, callback);
}
});
}
}
);
};
ctrl.addEvent('click','.js-bindEmailButton','bindEmailButton');
ctrl.addEvent('click','.js-resetPasswordButton','resetPasswordButton');
ctrl.load = function () {
ctrl.rendering();
};
return ctrl;
});
|
var getSelectionText=function() {
var text = "";
if (window.getSelection) {
text = window.getSelection().toString();
} else if (document.selection && document.selection.type != "Control") {
text = document.selection.createRange().text;
}
return text;
}
var help_me=function(){
console.log('foodies help_me started');
console.log('foodies getSelectionText defined');
var iframe=document.getElementById("foodie_to_foodie_iframe")
if(iframe==undefined){
iframe= document.createElement ("iframe");
iframe.setAttribute("id", "foodie_to_foodie_iframe");
iframe.setAttribute("style", "width:20%;position: fixed;top: 0px;left: 80%;height:100%;overflow: auto; z-index: 2147483646;background-color:whitesmoke;");
console.log('foodies selected '+getSelectionText());
document.body.insertBefore (iframe, document.body.firstChild);
}
iframe.src = 'https://foodieforfoodie.herokuapp.com/search/'+getSelectionText();
console.log('foodies iframe added');
console.log('foodies help_me ended');
}
let addButton=function(text){
var div = document.createElement ("div");
div.innerHTML = '<button onclick="help_me()">'+text+'</button>';
div.setAttribute("style", "position: fixed;top: 0px;right: 0;overflow: auto; z-index: 2147483647;background-color:whitesmoke;");
div.setAttribute("id", "foodie_to_foodie_div");
document.body.insertBefore (div, document.body.firstChild);
console.log('foodies div added');
}
let is_button=false;
foodie_config.data.forEach(function(element){
if(element.type=="include"){
if(window.location.href.includes(element.pattern)){
addButton(element.text);
is_button=true;
console.log('foodies foodie_script button is there');
}
}
})
if(!is_button){
function doSomethingWithSelectedText(e) {
if(window.getSelection().toString()!=''){
addButton('Check It !!!');
console.log('foodies foodie_script button is there');
}
}
window.document.onmouseup = doSomethingWithSelectedText;
window.document.onkeyup = doSomethingWithSelectedText;
}
console.log('foodies foodie_script loaded');
|
import logo from './logo.svg';
import './App.css';
import AdminNavbar from "./components/navbar";
import VerticalBar from './components/graphs'
import { Container, Row, Col , Card} from "react-bootstrap";
import "./assets/css/demo.css";
import Dropdown from './components/select_dropdown'
import Spinner from './components/spinner'
import VerticalDashboard from './components/vertical_dashboard'
import { BrowserRouter, Switch, Route } from "react-router-dom";
function App() {
return (
// <div className="App">
// <Spinner />
// <AdminNavbar />
// <Dropdown />
// </div>
<BrowserRouter>
<Spinner />
<div className="App">
<Switch>
<Route exact path="/ReactAdmin">
<AdminNavbar />
<Dropdown />
</Route>
<Route path="/vertical_dashboard">
<VerticalDashboard />
</Route>
</Switch>
</div>
</BrowserRouter>
);
}
export default App;
|
import Vue from 'vue'
import Router from 'vue-router'
import vHeader from '../components/v-header'
import vCart from '../components/v-cart'
import vCatalog from '../components/v-catalog'
import vTable from '../components/v-table'
import vSofa from '../components/v-sofa'
Vue.use(Router);
let router = new Router({
routes: [
{
path: '/',
name: 'header',
component: vHeader
},
{
path: '/cart',
name: 'cart',
component: vCart,
props: true
},
{
path: '/catalog',
name: 'catalog',
component: vCatalog,
},
{
path: '/catalog/table',
name: 'table',
component: vTable,
},
{
path: '/catalog/sofa',
name: 'sofa',
component: vSofa,
}
]
})
export default router;
|
import { makeID } from './functions'
class MasterFormat {
generateCSI() {
//(?<=[0-9]) (?=[A-Z])
// \n
const masterformat = new MasterFormat();
const division_0 = masterformat.division_0()
const division_1 = masterformat.division_1()
const division_2 = masterformat.division_2()
const division_3 = masterformat.division_3()
const division_4 = masterformat.division_4()
const division_5 = masterformat.division_5()
const division_6 = masterformat.division_6()
const division_7 = masterformat.division_7()
const division_8 = masterformat.division_8()
const division_9 = masterformat.division_9()
const division_10 = masterformat.division_10()
const division_11 = masterformat.division_11()
const division_12 = masterformat.division_12()
const division_13 = masterformat.division_13()
const division_14 = masterformat.division_14()
const division_21 = masterformat.division_21()
const division_22 = masterformat.division_22();
const division_23 = masterformat.division_23();
const division_25 = masterformat.division_25();
const division_26 = masterformat.division_26();
const division_27 = masterformat.division_27()
const division_28 = masterformat.division_28();
const division_31 = masterformat.division_31()
const division_32 = masterformat.division_32()
const division_33 = masterformat.division_33()
const division_34 = masterformat.division_34()
const division_35 = masterformat.division_35()
const division_40 = masterformat.division_40()
const division_41 = masterformat.division_41()
const division_42 = masterformat.division_42()
const division_43 = masterformat.division_43()
const division_44 = masterformat.division_44()
const division_45 = masterformat.division_45()
const division_48 = masterformat.division_48()
const csis = [division_0, division_1, division_2, division_3, division_4, division_5, division_6, division_7, division_8, division_9, division_10, division_11, division_12, division_13, division_14, division_21, division_22, division_23, division_25, division_26, division_27, division_28, division_31, division_32, division_33, division_34, division_35, division_40, division_41, division_42, division_43, division_44, division_45, division_48]
let csiids = [];
if (csis.hasOwnProperty("length")) {
// eslint-disable-next-line
csis.map((csi, i) => {
// eslint-disable-next-line
csi.codes.map((code, j) => {
let csiid = masterformat.makeCSIID.call(this, csiids)
csiids.push({ csiid, code: code.code, title: code.title })
csis[i].codes[j].csiid = csiid;
})
})
}
let csi_2 = [];
csiids.map((csicode, k) => {
csi_2.push(csicode)
})
return csi_2;
}
makeCSIID(csiids) {
let csiid = false;
if (csiids.length > 0) {
while (csiid === false) {
csiid = makeID(16);
// eslint-disable-next-line
csiids.map(ids => {
if (ids.csiid === csiid) {
csiid = false;
}
})
}
} else {
csiid = makeID(16);
}
return (csiid)
}
division_48() {
return ({
division: 48,
divisionTitle: 'Electrical Power Generation',
codes: [{ code: '48 00 00', title: 'ELECTRICAL POWER GENERATION' },
{ code: '48 01 00', title: 'Operation and Maintenance for Electrical Power Generation' },
{ code: '48 01 10', title: 'Operation and Maintenance of Electrical Power Generation Equipment' },
{ code: '48 01 70', title: 'Operation and Maintenance of Electrical Power Generation Testing' },
{ code: '48 05 00', title: 'Common Work Results for Electrical Power Generation' },
{ code: '48 06 00', title: 'Schedules for Electrical Power Generation' },
{ code: '48 06 10', title: 'Schedules for Electrical Power Generation Equipment' },
{ code: '48 06 70', title: 'Schedules for Electrical Power Generation Testing' },
{ code: '48 08 00', title: 'Commissioning of Electrical Power Generation' },
{ code: '48 09 00', title: 'Instrumentation and Control for Electrical Power Generation' },
{ code: '48 10 00', title: 'ELECTRICAL POWER GENERATION EQUIPMENT' },
{ code: '48 11 00', title: 'Fossil Fuel Plant Electrical Power Generation Equipment' },
{ code: '48 11 13', title: 'Fossil Fuel Electrical Power Plant Boilers' },
{ code: '48 11 16', title: 'Fossil Fuel Electrical Power Plant Condensers' },
{ code: '48 11 19', title: 'Fossil Fuel Electrical Power Plant Steam Turbines' },
{ code: '48 11 23', title: 'Fossil Fuel Electrical Power Plant Gas Turbines' },
{ code: '48 11 26', title: 'Fossil Fuel Electrical Power Plant Generators' },
{ code: '48 12 00', title: 'Nuclear Fuel Plant Electrical Power Generation Equipment' },
{ code: '48 12 13', title: 'Nuclear Fuel Reactors' },
{ code: '48 12 13.13', title: 'Nuclear Fuel Fission Reactors' },
{ code: '48 12 13.16', title: 'Nuclear Fuel Fusion Reactors' },
{ code: '48 12 23', title: 'Nuclear Fuel Electrical Power Plant Steam Generators' },
{ code: '48 12 26', title: 'Nuclear Fuel Electrical Power Plant Condensers' },
{ code: '48 12 29', title: 'Nuclear Fuel Electrical Power Plant Turbines' },
{ code: '48 12 33', title: 'Nuclear Fuel Electrical Power Generators' },
{ code: '48 13 00', title: 'Hydroelectric Plant Electrical Power Generation Equipment' },
{ code: '48 13 13', title: 'Hydroelectric Power Plant Water Turbines' },
{ code: '48 13 16', title: 'Hydroelectric Power Plant Electrical Power Generators' },
{ code: '48 14 00', title: 'Solar Energy Electrical Power Generation Equipment' },
{ code: '48 14 13', title: 'Solar Energy Collectors' },
{ code: '48 14 13.13', title: 'Amorphous Solar Energy Collectors' },
{ code: '48 14 13.16', title: 'Plate Cell Solar Energy Collectors' },
{ code: '48 14 13.19', title: 'Vacuum Tube Solar Energy Collectors' },
{ code: '48 15 00', title: 'Wind Energy Electrical Power Generation Equipment' },
{ code: '48 15 13', title: 'Windmills' },
{ code: '48 15 16', title: 'Wind Energy Electrical Power Generators' },
{ code: '48 16 00', title: 'Geothermal Energy Electrical Power Generation Equipment' },
{ code: '48 16 13', title: 'Geothermal Energy Heat Pumps' },
{ code: '48 16 16', title: 'Geothermal Energy Condensers' },
{ code: '48 16 19', title: 'Geothermal Energy Steam Turbines' },
{ code: '48 16 23', title: 'Geothermal Energy Electrical Power Generators' },
{ code: '48 17 00', title: 'Electrochemical Energy Electrical Power Generation Equipment' },
{ code: '48 17 13', title: 'Electrical Power Generation Batteries' },
{ code: '48 18 00', title: 'Fuel Cell Electrical Power Generation Equipment' },
{ code: '48 18 13', title: 'Electrical Power Generation Fuel Cells' },
{ code: '48 18 16', title: 'Hydrogen Control Equipment' },
{ code: '48 19 00', title: 'Electrical Power Control Equipment' },
{ code: '48 19 13', title: 'Electrical Power Generation Battery Charging Equipment' },
{ code: '48 19 16', title: 'Electrical Power Generation Inverters' },
{ code: '48 19 19', title: 'Electrical Power Generation Solar Tracking Equipment' },
{ code: '48 19 23', title: 'Electrical Power Generation Transformers' },
{ code: '48 19 26', title: 'Electrical Power Generation Voltage Regulators' },
{ code: '48 20 00', title: 'Unassigned' },
{ code: '48 30 00', title: 'Unassigned' },
{ code: '48 40 00', title: 'Unassigned' },
{ code: '48 50 00', title: 'Unassigned' },
{ code: '48 60 00', title: 'Unassigned' },
{ code: '48 70 00', title: 'ELECTRICAL POWER GENERATION TESTING' },
{ code: '48 71 00', title: 'Electrical Power Generation Test Equipment' },
{ code: '48 71 13', title: 'Electrical Power Generation Corona Test Equipment' },
{ code: '48 71 16', title: 'Electrical Power Generation Current Test Equipment' },
{ code: '48 71 19', title: 'Electrical Power Generation Power Test Equipment' },
{ code: '48 71 23', title: 'Electrical Power Generation Resistance Test Equipment' },
{ code: '48 71 26', title: 'Elec trical Power Generation Voltage Test Equipment' },
{ code: '48 80 00', title: 'Unassigned' },
{ code: '48 90 00', title: 'Unassigned' }]
})
}
division_45() {
return ({
division: 45,
divisionTitle: 'Industry-Specific Manufacturing Equipment',
codes: [{ code: '45 00 00', title: 'INDUSTRY-SPECIFIC MANUFACTURING EQUIPMENT' },
{ code: '45 08 00', title: 'Commissioning of Industry-Specific Manufacturing Equipment' },
{ code: '45 11 00', title: 'Oil and Gas Extraction Equipment' },
{ code: '45 11 01', title: 'Operation and Maintenance of Oil and Gas Extraction Equipment' },
{ code: '45 11 06', title: 'Schedules for Oil and Gas Extraction Equipment' },
{ code: '45 12 99', title: 'User Defined Oil and Gas Extraction Equipment' },
{ code: '45 13 00', title: 'Mining Machinery and Equipment' },
{ code: '45 13 01', title: 'Operation and Maintenance of Mining Machinery and Equipment' },
{ code: '45 13 06', title: 'Schedules for Mining Machinery and Equipment' },
{ code: '45 14 99', title: 'User Defined Mining Machinery and Equipment' },
{ code: '45 15 00', title: 'Food Manufacturing Equipment' },
{ code: '45 15 01', title: 'Operation and Maintenance of Food Manufacturing Equipment' },
{ code: '45 15 06', title: 'Schedules for Food Manufacturing Equipment' },
{ code: '45 16 99', title: 'User Defined Food Manufacturing Equipment' },
{ code: '45 17 00', title: 'Beverage and Tobacco Manufacturing Equipment' },
{ code: '45 17 01', title: 'Operation and Maintenance of Beverage and Tobacco Manufacturing Equipment' },
{ code: '45 17 06', title: 'Schedules for Beverage and Tobacco Manufacturing Equipment' },
{ code: '45 18 99', title: 'User Defined Beverage and Tobacco Manufacturing Equipment' },
{ code: '45 19 00', title: 'Textiles and Apparel Manufacturing Equipment' },
{ code: '45 19 01', title: 'Operation and Maintenance of Textiles and Apparel Manufacturing Equipment' },
{ code: '45 19 06', title: 'Schedules for Textiles and Apparel Manufacturing Equipment' },
{ code: '45 20 99', title: 'User Defined Textiles and Apparel Manufacturing Equipment' },
{ code: '45 21 00', title: 'Leather and Allied Product Manufacturing Equipment' },
{ code: '45 21 01', title: 'Operation and Maintenance of Leather and Allied Product Manufacturing Equipment' },
{ code: '45 21 06', title: 'Schedules for Leather and Allied Product Manufacturing Equipment' },
{ code: '45 22 99', title: 'User Defined Leather and Allied Product Manufacturing Equipment' },
{ code: '45 23 00', title: 'Wood Product Manufacturing Equipment' },
{ code: '45 23 01', title: 'Operation and Maintenance of Wood Product Manufacturing Equipment' },
{ code: '45 23 06', title: 'Schedules for Wood Product Manufacturing Equipment' },
{ code: '45 24 99', title: 'User Defined Wood Product Manufacturing Equipment' },
{ code: '45 25 00', title: 'Paper Manufacturing Equipment' },
{ code: '45 25 01', title: 'Operation and Maintenance of Paper Manufacturing Equipment' },
{ code: '45 25 06', title: 'Schedules for Paper Manufacturing Equipment' },
{ code: '45 26 99', title: 'User Defined Paper Manufacturing Equipment' },
{ code: '45 27 00', title: 'Printing and Related Manufacturing Equipment' },
{ code: '45 27 01', title: 'Operation and Maintenance of Printing and Related Manufacturing Equipment' },
{ code: '45 27 06', title: 'Schedules for Printing and Related Manufacturing Equipment' },
{ code: '45 28 99', title: 'User Defined Printing and Related Manufacturing Equipment' },
{ code: '45 29 00', title: 'Petroleum and Coal Products Manufacturing Equipment' },
{ code: '45 29 01', title: 'Operation and Maintenance of Petroleum and Coal Products Manufacturing Equipment' },
{ code: '45 29 06', title: 'Schedules for Petroleum and Coal Products Manufacturing Equipment' },
{ code: '45 30 99', title: 'User Defined Petroleum and Coal Products Manufacturing Equipment' },
{ code: '45 31 00', title: 'Chemical Manufacturing Equipment' },
{ code: '45 31 01', title: 'Operation and Maintenance of Chemical Manufac turing Equipment' },
{ code: '45 31 06', title: 'Schedules for Chemical Manufacturing Equipment' },
{ code: '45 32 99', title: 'User Defined Chemical Manufacturing Equipment' },
{ code: '45 33 00', title: 'Plastics and Rubber Manufacturing Equipment' },
{ code: '45 33 01', title: 'Operation and Maintenance of Plastics and Rubber Manufacturing Equipment' },
{ code: '45 33 06', title: 'Schedules for Plastics and Rubber Manufacturing Equipment' },
{ code: '45 34 99', title: 'User Defined Plastics and Rubber Manufacturing Equipment' },
{ code: '45 35 00', title: 'Nonmetallic Mineral Product Manufacturing Equipment' },
{ code: '45 35 01', title: 'Operation and Maintenance of Nonmetallic Mineral Product Manufacturing Equipment' },
{ code: '45 35 06', title: 'Schedules for Nonmetallic Mineral Product Manufacturing Equipment' },
{ code: '45 36 99', title: 'User Defined Nonmetallic Mineral Product Manufacturing Equipment' },
{ code: '45 37 00', title: 'Primary Metal Manufacturing Equipment' },
{ code: '45 37 01', title: 'Operation and Maintenance of Primary Metal Manufacturing Equipment' },
{ code: '45 37 06', title: 'Schedules for Primary Metal Manufacturing Equipment' },
{ code: '45 38 99', title: 'User Defined Primary Metal Manufacturing Equipment' },
{ code: '45 39 00', title: 'Fabricated Metal Product Manufacturing Equipment' },
{ code: '45 39 01', title: 'Operation and Maintenance of Fabricated Metal Product Manufacturing Equipment' },
{ code: '45 39 06', title: 'Schedules for Fabricated Metal Product Manufacturing Equipment' },
{ code: '45 40 99', title: 'User Defined Fabricated Metal Product Manufacturing Equipment' },
{ code: '45 41 00', title: 'Machinery Manufacturing Equipment' },
{ code: '45 41 01', title: 'Operation and Maintenance of Machinery Manufacturing Equipment' },
{ code: '45 41 06', title: 'Schedules for Machinery Manufacturing Equipment' },
{ code: '45 42 99', title: 'User Defined Machinery Manufacturing Equipment' },
{ code: '45 43 00', title: 'Computer and Electronic Product Manufacturing Equipment' },
{ code: '45 43 01', title: 'Operation and Maintenance of Computer and Electronic Product Manufacturing Equipment' },
{ code: '45 43 06', title: 'Schedules for Computer and Electronic Product Manufacturing Equipment' },
{ code: '45 44 99', title: 'User Defined Computer and Electronic Product Manufacturing Equipment' },
{ code: '45 45 00', title: 'Electrical Equipment, Appliance, and Component Manufacturing Equipment' },
{ code: '45 45 01', title: 'Operation and Maintenance of Electrical Equipment, Appliance, and Component Manufacturing Equipment' },
{ code: '45 45 06', title: 'Schedules for Electrical Equipment, Appliance, and Component Manufacturing Equipment' },
{ code: '45 46 99', title: 'User Defined Electrical Equipment, Appliance, and Component Manufacturing Equipment' },
{ code: '45 47 00', title: 'Transportation Manufacturing Equipment' },
{ code: '45 47 01', title: 'Operation and Maintenance of Transportation Manufacturing Equipment' },
{ code: '45 47 06', title: 'Schedules for Transportation Manufacturing Equipment' },
{ code: '45 48 99', title: 'User Defined Transportation Manufacturing Equipment' },
{ code: '45 49 00', title: 'Furniture and Related Product Manufacturing Equipment' },
{ code: '45 49 01', title: 'Operation and Maintenance of Furniture and Related Product Manufacturing Equipment' },
{ code: '45 49 06', title: 'Schedules for Furniture and Related Product Manufacturing Equipment' },
{ code: '45 50 99', title: 'User Defined Furniture and Related Product Manufacturing Equipment' },
{ code: '45 51 00', title: 'Other Manufacturing Equipment' },
{ code: '45 51 01', title: 'Operation and Maintenance of Other Manufacturing Equipment' },
{ code: '45 51 06', title: 'Schedules for Other Manufacturing Equipment' },
{ code: '45 52 99', title: 'User Defined Other Manufacturing Equipment' },
{ code: '45 60 00', title: 'Unassigned' },
{ code: '45 70 00', title: 'Unassigned' },
{ code: '45 80 00', title: 'Unassigned' },
{ code: '45 90 00', title: 'Unassigned' }]
})
}
division_44() {
return ({
division: 44,
divisionTitle: 'Pollution Control Equipment',
codes: [{ code: '44 00 00', title: 'POLLUTION CONTROL EQUIPMENT' },
{ code: '44 01 00', title: 'Operation and Maintenance of Pollution Control Equipment' },
{ code: '44 01 10', title: 'Operation and Maintenance of Air Pollution Control' },
{ code: '44 01 20', title: 'Operation and Maintenance of Noise Pollution Control' },
{ code: '44 01 40', title: 'Operation and Maintenance of Water Treatment Equipment' },
{ code: '44 01 50', title: 'Operation and Maintenance of Solid Waste Control' },
{ code: '44 06 00', title: 'Schedules for Pollution Control Equipment' },
{ code: '44 06 10', title: 'Schedules for Air Pollution Control' },
{ code: '44 06 20', title: 'Schedules for Noise Pollution Control' },
{ code: '44 06 40', title: 'Schedules for Water Treatment Equipment' },
{ code: '44 06 50', title: 'Schedules for Solid Waste Control' },
{ code: '44 08 00', title: 'Commissioning of Pollution Control Equipment' },
{ code: '44 08 10', title: 'Commissioning of Air Pollution Control' },
{ code: '44 08 20', title: 'Commissioning of Noise Pollution Control' },
{ code: '44 08 40', title: 'Commissioning Water Treatment Equipment' },
{ code: '44 08 50', title: 'Commissioning Solid Waste Control' },
{ code: '44 10 00', title: 'AIR POLLUTION CONTROL' },
{ code: '44 11 00', title: 'Air Pollution Control Equipment' },
{ code: '44 11 13', title: 'Cyclonic Separators' },
{ code: '44 11 16', title: 'Industrial Dust Collectors' },
{ code: '44 11 19', title: 'Air Pollution Filters' },
{ code: '44 11 23', title: 'Fugitive Dust Control' },
{ code: '44 11 26', title: 'Air Pollution Control Precipitators' },
{ code: '44 11 29', title: 'Air Pollution Scrubbers' },
{ code: '44 11 29.13', title: 'Dry-Air Pollution Scrubbers' },
{ code: '44 11 29.16', title: 'Wet-Air Pollution Scrubbers' },
{ code: '44 11 33', title: 'Thermal Oxidizers' },
{ code: '44 11 36', title: 'Vacuum Extraction Systems' },
{ code: '44 20 00', title: 'NOISE POLLUTION CONTROL' },
{ code: '44 21 00', title: 'Noise Pollution Control Equipment' },
{ code: '44 21 13', title: 'Noise Abatement Barriers' },
{ code: '44 21 13.13', title: 'Fixed Noise Abatement Barriers' },
{ code: '44 21 13.16', title: 'Flexible Noise Abatement Barriers' },
{ code: '44 21 13.19', title: 'Portable Noise Abatement Barriers' },
{ code: '44 21 23', title: 'Noise Pollution Silencers' },
{ code: '44 21 26', title: 'Frequency Cancellers' },
{ code: '44 40 00', title: 'WATER TREATMENT EQUIPMENT' },
{ code: '44 41 00', title: 'Packaged Water Treatment' },
{ code: '44 41 13', title: 'Packaged Water Treatment Plants' },
{ code: '44 41 13.13', title: 'Chemical Packaged Water Treatment Plants' },
{ code: '44 41 13.16', title: 'Biological Packaged Water Treatment Plants' },
{ code: '44 41 13.19', title: 'Thermal Packaged Water Treatment Plants' },
{ code: '44 42 00', title: 'General Water Treatment Equipment' },
{ code: '44 42 13', title: 'Aeration Water Treatment Equipment' },
{ code: '44 42 16', title: 'American Petroleum Institute Separators' },
{ code: '44 42 19', title: 'Water Treatment Blowers' },
{ code: '44 42 23', title: 'Water Treatment Clarifiers' },
{ code: '44 42 26', title: 'Water Treatment Comminutors' },
{ code: '44 42 29', title: 'Water Treatment Compressors' },
{ code: '44 42 33', title: 'Water Treatment Digesters' },
{ code: '44 42 36', title: 'Water Treatment Dissolved Air Flotation Equipment' },
{ code: '44 42 39', title: 'Water Treatment Grit Collectors' },
{ code: '44 42 43', title: 'Water T reatment Induced Air Flotation Equipment' },
{ code: '44 42 46', title: 'Water Treatment Mixers' },
{ code: '44 42 49', title: 'Water Treatment Oil/Grease Interceptors' },
{ code: '44 42 53', title: 'Water Treatment Oil/Water Separators' },
{ code: '44 42 56', title: 'Water Treatment Pumps' },
{ code: '44 42 59', title: 'Water Treatment Reactors' },
{ code: '44 42 63', title: 'Water Treatment Sediment Removal Equipment' },
{ code: '44 42 66', title: 'Water Treatment Skimmers' },
{ code: '44 42 69', title: 'Water Treatment Spray Equipment' },
{ code: '44 42 73', title: 'Water Treatment Tanks/Tank Liners' },
{ code: '44 43 00', title: 'Water Filtration Equipment' },
{ code: '44 43 13', title: 'Water Filters' },
{ code: '44 43 13.13', title: 'Bag Water Filters' },
{ code: '44 43 13.16', title: 'Cartridge Water Filters' },
{ code: '44 43 13.19', title: 'Fabric Water Filters' },
{ code: '44 43 13.23', title: 'Multimedia Water Filters' },
{ code: '44 43 13.26', title: 'Packaged Water Filters' },
{ code: '44 43 23', title: 'Water Filter Presses' },
{ code: '44 43 26', title: 'Rotary-Drum Water Filtration Equipment' },
{ code: '44 43 29', title: 'Water Filtration Sand' },
{ code: '44 43 33', title: 'Water Filtration Screens' },
{ code: '44 43 36', title: 'Vacuum Water Filtration Equipment' },
{ code: '44 44 00', title: 'Water Treatment Chemical Systems Equipment' },
{ code: '44 44 13', title: 'Water Treatment Chemical Feed Equipment' },
{ code: '44 44 16', title: 'Water Chlorinators' },
{ code: '44 44 19', title: 'Water Coagulators' },
{ code: '44 44 23', title: 'Water Dechlorinators' },
{ code: '44 44 26', title: 'Dissolved-Solids Water Treatment Equipment' },
{ code: '44 44 29', title: 'Water Emulsifiers' },
{ code: '44 44 33', title: 'Water Emulsion Crackers' },
{ code: '44 44 36', title: 'Water Flocculators' },
{ code: '44 44 39', title: 'Water Fluoridation Equipment' },
{ code: '44 44 43', title: 'Water Heavy Metals Treatment Equipment' },
{ code: '44 44 46', title: 'Water Hydrothermal Equipment' },
{ code: '44 44 49', title: 'Water Oils Treatment Equipment' },
{ code: '44 44 53', title: 'Water Oxidation/Reduction Equipment' },
{ code: '44 44 56', title: 'Water Ozone Equipment' },
{ code: '44 44 59', title: 'Water pH Adjustment Equipment' },
{ code: '44 44 63', title: 'Water Polymers Equipment' },
{ code: '44 44 66', title: 'Water Precipitators' },
{ code: '44 44 69', title: 'Water Pretreatment Equipment' },
{ code: '44 44 73', title: 'Water Ultraviolet Radiation Equipment' },
{ code: '44 45 00', title: 'Water Treatment Biological Systems Equipment' },
{ code: '44 45 13', title: 'Water Biofilters' },
{ code: '44 45 16', title: 'Water Bubble M embrane Diffusers' },
{ code: '44 46 00', title: 'Sludge Treatment and Handling Equipment for Water Treatment Systems' },
{ code: '44 46 13', title: 'Sludge Conveyors' },
{ code: '44 46 16', title: 'Sludge Dewatering Equipment' },
{ code: '44 46 19', title: 'Sludge Digesters' },
{ code: '44 46 23', title: 'Sludge Incinerators' },
{ code: '44 46 26', title: 'Sludge Thickeners' },
{ code: '44 50 00', title: 'SOLID WASTE CONTROL' },
{ code: '44 51 00', title: 'Solid Waste Control Equipment' },
{ code: '44 51 13', title: 'Solid Waste Compactors' },
{ code: '44 51 16', title: 'Solid Waste Baling Equipment' },
{ code: '44 51 19', title: 'Solid Waste Fluffing Equipment' },
{ code: '44 51 23', title: 'Solid Waste Liquid Extraction Equipment' },
{ code: '44 51 26', title: 'Solid Waste Containers' },
{ code: '44 51 29', title: 'Solid Waste Transfer Trailers' },
{ code: '44 51 33', title: 'Solid Waste Transfer Stations' },
{ code: '44 60 00', title: 'Unassigned' },
{ code: '44 70 00', title: 'Unassigned' },
{ code: '44 80 00', title: 'Unassigned' },
{ code: '44 90 00', title: 'Unassigned' }]
})
}
division_43() {
return ({
division: 43,
divisionTitle: 'Process Gas and Liquid Handling, Purification, and Storage Equipment',
codes: [{ code: '43 00 00', title: 'PROCESS GAS AND LIQUID HANDLING, PURIFICATION, AND STORAGE EQUIPMENT' },
{ code: '43 01 00', title: 'Operation and Maintenance of Process Gas and Liquid Handling, Purification, and Storage Equipment' },
{ code: '43 01 10', title: 'Operation and Maintenance of Gas Handling Equipment' },
{ code: '43 01 20', title: 'Operation and Maintenance of Liquid Handling Equipment' },
{ code: '43 01 30', title: 'Operation and Maintenance of Gas and Liquid Hi-Purification Equipment' },
{ code: '43 01 40', title: 'Operation and Maintenance of Gas and Liquid Storage' },
{ code: '43 06 00', title: 'Schedules for Process Gas and Liquid Handling, Purification, and Storage Equipment' },
{ code: '43 06 10', title: 'Schedules for Gas Handling Equipment' },
{ code: '43 06 20', title: 'Schedules for Liquid Handling Equipment' },
{ code: '43 06 30', title: 'Schedules for Gas and Liquid Hi-Purification Equipment' },
{ code: '43 06 40', title: 'Schedules for Gas and Liquid Storage' },
{ code: '43 08 00', title: 'Commissioning of Process Gas and Liquid Handling, Purification, and Storage Equipment' },
{ code: '43 08 10', title: 'Commissioning of Gas Handling Equipment' },
{ code: '43 08 20', title: 'Commissioning of Liquid Handling Equipment' },
{ code: '43 08 30', title: 'Commissioning of Gas and Liquid Purification Equipment' },
{ code: '43 08 40', title: 'Commissioning of Gas and Liquid Storage' },
{ code: '43 10 00', title: 'GAS HANDLING EQUIPMENT' },
{ code: '43 11 00', title: 'Gas Fans, Blowers and Pumps' },
{ code: '43 11 13', title: 'Gas Handling Fans' },
{ code: '43 11 13.13', title: 'Axial Gas Handling Fans' },
{ code: '43 11 13.16', title: 'Centrifugal Gas Handling Fans' },
{ code: '43 11 23', title: 'Gas Handling Blowers' },
{ code: '43 11 26', title: 'Gas Handling Jet Pumps' },
{ code: '43 11 29', title: 'Gas Handling Vacuum Pumps' },
{ code: '43 12 00', title: 'Gas Compressors' },
{ code: '43 12 13', title: 'Centrifugal Gas Compressors' },
{ code: '43 12 16', title: 'Piston Gas Compressors' },
{ code: '43 12 19', title: 'Positive Displacement Gas Compressors' },
{ code: '43 12 23', title: 'Rotary-Screw Gas Compressors' },
{ code: '43 12 26', title: 'Vane Gas Compressors' },
{ code: '43 13 00', title: 'Gas Process Equipment' },
{ code: '43 13 13', title: 'Process Gas Blenders' },
{ code: '43 13 16', title: 'Process Gas Meters' },
{ code: '43 13 19', title: 'Process Gas Mixers' },
{ code: '43 13 23', title: 'Process Gas Pressure Regulators' },
{ code: '43 20 00', title: 'LIQUID HANDLING EQUIPMENT' },
{ code: '43 21 00', title: 'Liquid Pumps' },
{ code: '43 21 13', title: 'Centrifugal Liquid Pumps' },
{ code: '43 21 16', title: 'Diaphragm Liquid Pumps' },
{ code: '43 21 19', title: 'Dispensing Liquid Pumps' },
{ code: '43 21 23', title: 'Drum Liquid Pumps' },
{ code: '43 21 26', title: 'Gear Liquid Pumps' },
{ code: '43 21 29', title: 'Metering Liquid Pumps' },
{ code: '43 21 33', title: 'Piston/Plunger Liquid Pumps' },
{ code: '43 21 36', title: 'Positive Displacement Liquid Pumps' },
{ code: '43 21 39', title: 'Submersible Liquid Pumps' },
{ code: '43 21 43', title: 'Sump Liquid Pumps' },
{ code: '43 21 46', title: 'Vane Liquid Pumps' },
{ code: '43 22 00', title: 'Liquid Process Equipment' },
{ code: '43 22 13', title: 'Liquid Aeration Devices' },
{ code: '43 22 16', title: 'Liquid Agitators' },
{ code: '43 22 19', title: 'Liquid Blenders' },
{ code: '43 22 23', title: 'Liquid Centrifuges' },
{ code: '43 22 26', title: 'Liquid Deaerators' },
{ code: '43 22 29', title: 'Drum Handling Liquid Process Equipment' },
{ code: '43 22 33', title: 'Liquid Emulsifiers' },
{ code: '43 22 36', title: 'Liquid Evaporators' },
{ code: '43 22 39', title: 'Liquid Feeders' },
{ code: '43 22 43', title: 'Liquid Filters' },
{ code: '43 22 43.13', title: 'Cyclonic Liquid Filters' },
{ code: '43 22 43.16', title: 'Media Liquid Filters' },
{ code: '43 22 43.19', title: 'Press Liquid Filters' },
{ code: '43 22 53', title: 'Liquid Process M eters' },
{ code: '43 22 56', title: 'Liquid Process Mixers' },
{ code: '43 22 59', title: 'Liquid Process Pressure Regulators' },
{ code: '43 22 63', title: 'Liquid Separation Towers' },
{ code: '43 22 66', title: 'Liquid Weigh Systems' },
{ code: '43 30 00', title: 'GAS AND LIQUID PURIFICATION EQUIPMENT' },
{ code: '43 31 00', title: 'Gas and Liquid Purification Filtration Equipment' },
{ code: '43 31 13', title: 'Gas and Liquid Purification Filters' },
{ code: '43 31 13.13', title: 'Activated Carbon-Gas and Liquid Purification Filters' },
{ code: '43 31 13.16', title: 'Gas and Liquid Purification Filter Presses' },
{ code: '43 31 13.19', title: 'High-Purity Cartridge Gas and Liquid Purification Filters' },
{ code: '43 31 13.23', title: 'Membrane Diaphragm Gas and Liquid Purification Filters' },
{ code: '43 31 13.26', title: 'Multimedia Gas and Liquid Purification Filters' },
{ code: '43 31 13.29', title: 'Pretreatment Cartridge Gas and Liquid Purification Filters' },
{ code: '43 31 13.33', title: 'Ultrafilter Units' },
{ code: '43 32 00', title: 'Gas and Liquid Purification Process Equipment' },
{ code: '43 32 13', title: 'Gas and Liquid Purification Process Beds' },
{ code: '43 32 13.13', title: 'Anion-Gas and Liquid Purification Process Beds' },
{ code: '43 32 13.16', title: 'Cation-Gas and Liquid Purification Process Beds' },
{ code: '43 32 23', title: 'Gas and Liquid Purification Process Clarifier Systems' },
{ code: '43 32 26', title: 'Gas and Liquid Purification Decarbonators' },
{ code: '43 32 29', title: 'Electronic De-Ionization Purification Units' },
{ code: '43 32 33', title: 'External Regeneration Systems' },
{ code: '43 32 36', title: 'Mixed-Bed Ion-Exchange Vessels' },
{ code: '43 32 39', title: 'Gas and Liquid Purification Mixed Beds' },
{ code: '43 32 39.13', title: 'Externally Regenerable Gas and Liquid Purification Mixed Beds' },
{ code: '43 32 39.16', title: 'In-Situ Regenerable Gas and Liquid Purification Mixed Beds' },
{ code: '43 32 53', title: 'Packed-Bed Ion-Exchange Vessels' },
{ code: '43 32 56', title: 'Reverse-Osmosis Purification Units' },
{ code: '43 32 59', title: 'Gas and Liquid Purification Scrubbers' },
{ code: '43 32 63', title: 'Ultraviolet Sterilizers' },
{ code: '43 32 66', title: 'Vacuum Degasifiers' },
{ code: '43 32 69', title: 'Chemical Feed Systems' },
{ code: '43 32 73', title: 'Ozonation Equipment' },
{ code: '43 32 76', title: 'Chlorination Equipment' },
{ code: '43 40 00', title: 'GAS AND LIQUID STORAGE' },
{ code: '43 41 00', title: 'Gas and Liquid Storage Equipment' },
{ code: '43 41 13', title: 'Gas and Liquid Pressure Vessels' },
{ code: '43 41 13.13', title: 'Ferrous Gas and Liquid Pressure Vessels' },
{ code: '43 41 13.16', title: 'Nonferrous Gas and Liquid Pressure Vessels' },
{ code: '43 41 13.19', title: 'Fiberglass Gas and Liquid Pressure Vessels' },
{ code: '43 41 16', title: 'Atmospheric Tanks and Vessels' },
{ code: '43 41 16.13', title: 'Horizontal Atmospheric Tanks and Vessels' },
{ code: '43 41 16.16', title: 'Vertical Atmospheric Tanks and Vessels' },
{ code: '43 50 00', title: 'Unassigned' },
{ code: '43 60 00', title: 'Unassigned' },
{ code: '43 70 00', title: 'Unassigned' },
{ code: '43 80 00', title: 'Unassigned' },
{ code: '43 90 00', title: 'Unassigned' }]
})
}
division_42() {
return ({
division: 42,
divisionTitle: 'Process Heating, Cooling, and Drying Equipment',
codes: [{ code: '42 00 00', title: 'PROCESS HEATING,COOLING, AND DRYING EQUIPMENT' },
{ code: '42 01 00', title: 'Operation and Maintenance of Process Heating, Cooling, and Drying Equipment' },
{ code: '42 01 10', title: 'Operation and Maintenance of Process Heating Equipment' },
{ code: '42 01 20', title: 'Operation and Maintenance of Process Cooling Equipment' },
{ code: '42 01 30', title: 'Operation and Maintenance of Process Drying Equipment' },
{ code: '42 06 00', title: 'Schedules for Process Heating, Cooling, and Drying Equipment' },
{ code: '42 06 10', title: 'Schedules for Process Heating Equipment' },
{ code: '42 06 20', title: 'Schedules for Process Cooling Equipment' },
{ code: '42 06 30', title: 'Schedules for Process Drying Equipment' },
{ code: '42 08 00', title: 'Commissioning of Process Heating, Cooling, and Drying Equipment' },
{ code: '42 08 10', title: 'Commissioning of Heating Equipment' },
{ code: '42 08 20', title: 'Commissioning of Cooling Equipment' },
{ code: '42 08 30', title: 'Commissioning of Drying Equipment' },
{ code: '42 10 00', title: 'PROCESS HEATING EQUIPMENT' },
{ code: '42 11 00', title: 'Process Boilers' },
{ code: '42 11 13', title: 'Low-Pressure Process Boilers' },
{ code: '42 11 16', title: 'Intermediate-Pressure Process Boilers' },
{ code: '42 11 19', title: 'High-Pressure Process Boilers' },
{ code: '42 11 23', title: 'Specialty Process Boilers' },
{ code: '42 12 00', title: 'Process Heaters' },
{ code: '42 12 13', title: 'Electric Process Heaters' },
{ code: '42 12 16', title: 'Fuel-Fired Process Heaters' },
{ code: '42 12 19', title: 'Thermoelectric Process Heaters' },
{ code: '42 12 23', title: 'Solar Process Heaters' },
{ code: '42 12 26', title: 'Specialty Process Heaters' },
{ code: '42 13 00', title: 'Industrial Heat Exchangers and Recuperators' },
{ code: '42 13 13', title: 'Industrial Gas-to-Gas Heat Exchangers' },
{ code: '42 13 16', title: 'Industrial Liquid-to-Gas/Gas-to-Liquid Heat Exchangers' },
{ code: '42 13 19', title: 'Industrial Liquid-to-Liquid Heat Exchangers' },
{ code: '42 13 23', title: 'Industrial Gas Radiation Heat Exchangers' },
{ code: '42 13 26', title: 'Industrial Solar Radiation Heat Exchangers' },
{ code: '42 14 00', title: 'Industrial Furnaces' },
{ code: '42 14 13', title: 'Annealing Furnaces' },
{ code: '42 14 16', title: 'Atmosphere Generators' },
{ code: '42 14 19', title: 'Industrial Baking Furnaces' },
{ code: '42 14 23', title: 'Industrial Brazing Furnaces' },
{ code: '42 14 26', title: 'Industrial Calcining Furnaces' },
{ code: '42 14 29', title: 'Industrial Heat-Treating Furnaces' },
{ code: '42 14 33', title: 'Industrial Melting Furnaces' },
{ code: '42 14 33.13', title: 'Ceramics and Glass Melting Furnaces' },
{ code: '42 14 33.16', title: 'Ferrous Melting Furnaces' },
{ code: '42 14 33.19', title: 'Non-Ferrous Melting Furnaces' },
{ code: '42 14 36', title: 'Primary Refining Furnaces' },
{ code: '42 14 43', title: 'Reactor Furnaces' },
{ code: '42 14 46', title: 'Industrial Reheat Furnaces' },
{ code: '42 14 53', title: 'Industrial Sintering Furnaces' },
{ code: '42 14 56', title: 'Industrial Vacuum Furnaces' },
{ code: '42 15 00', title: 'Industrial Ovens' },
{ code: '42 15 13', title: 'Industrial Drying Ovens' },
{ code: '42 15 16', title: 'Industrial Curing Ovens' },
{ code: '42 15 19', title: 'Industrial Specialty Ovens' },
{ code: '42 20 00', title: 'PROCESS COOLING EQUIPMENT' },
{ code: '42 21 00', title: 'Process Cooling Towers' },
{ code: '42 21 13', title: 'Open-Circuit Process Cooling Towers' },
{ code: '42 21 16', title: 'Closed-Circuit Process Cooling Towers' },
{ code: '42 22 00', title: 'Process Chillers and Coolers' },
{ code: '42 22 13', title: 'Centrifugal Process Chillers and Coolers' },
{ code: '42 22 16', title: 'Reciprocating Process Chillers and Coolers' },
{ code: '42 22 19', title: 'Refrigerant Process Chillers and Coolers' },
{ code: '42 22 23', title: 'Rotary Process Chillers and Coolers' },
{ code: '42 22 26', title: 'Thermoelectric Process Chillers and Coolers' },
{ code: '42 23 00', title: 'Process Condensers and Evaporators' },
{ code: '42 23 13', title: 'Process Condensers' },
{ code: '42 23 16', title: 'Process Cooling Evaporators' },
{ code: '42 23 19', title: 'Process Humidifiers' },
{ code: '42 30 00', title: 'PROCESS DRYING EQUIPMENT' },
{ code: '42 31 00', title: 'Gas Dryers and Dehumidifiers' },
{ code: '42 31 13', title: 'Drying Evaporators' },
{ code: '42 31 16', title: 'Desiccant Equipment' },
{ code: '42 31 19', title: 'Regenerative Dryers' },
{ code: '42 31 23', title: 'Refrigerant Dryers' },
{ code: '42 32 00', title: 'Material Dryers' },
{ code: '42 32 13', title: 'Centrifugal Material Dryers' },
{ code: '42 32 16', title: 'Conveyor Material Dryers' },
{ code: '42 32 19', title: 'Flash Material Dryers' },
{ code: '42 32 23', title: 'Fluid-Bed Material Dryers' },
{ code: '42 32 26', title: 'Material Roasters' },
{ code: '42 32 29', title: 'Rotary-Kiln Material Dryers' },
{ code: '42 32 33', title: 'Spray Material Dryers' },
{ code: '42 32 36', title: 'Tower Material Dryers' },
{ code: '42 32 39', title: 'Vacuum Material Dryers' },
{ code: '42 32 43', title: 'Specialty Material Dryers' },
{ code: '42 40 00', title: 'Unassigned' },
{ code: '42 50 00', title: 'Unassigned' },
{ code: '42 60 00', title: 'Unassigned' },
{ code: '42 70 00', title: 'Unassigned' },
{ code: '42 80 00', title: 'Unassigned' },
{ code: '42 90 00', title: 'Unassigned' }]
})
}
division_41() {
return ({
division: 41,
divisionTitle: 'Material Processing and Handling Equipment',
codes: [{ code: '41 00 00', title: 'MATERIAL PROCESSING AND HANDLING EQUIPMENT' },
{ code: '41 01 00', title: 'Operation and Maintenance of Material Processing and Handling Equipment' },
{ code: '41 01 10', title: 'Operation and Maintenance of Bulk Material Processing Equipment' },
{ code: '41 01 20', title: 'Operation and Maintenance of Piece Material Handling Equipment' },
{ code: '41 01 30', title: 'Operation and Maintenance of Manufacturing Equipment' },
{ code: '41 01 40', title: 'Operation and Maintenance of Container Processing and Packaging' },
{ code: '41 01 50', title: 'Operation and Maintenance of Material Storage' },
{ code: '41 01 60', title: 'Operation and Maintenance of Mobile Plant Equipment' },
{ code: '41 06 00', title: 'Schedules for Material Processing and Handling Equipment' },
{ code: '41 06 10', title: 'Schedules for Bulk Material Processing Equipment' },
{ code: '41 06 20', title: 'Schedules for Piece Material Handling Equipment' },
{ code: '41 06 30', title: 'Schedules for Manufacturing Equipment' },
{ code: '41 06 40', title: 'Schedules for Container Processing and Packaging' },
{ code: '41 06 50', title: 'Schedules for Material Storage' },
{ code: '41 06 60', title: 'Schedules for Mobile Plant Equipment' },
{ code: '41 08 00', title: 'Commissioning of Material Processing and Handling Equipment' },
{ code: '41 08 10', title: 'Commissioning of Bulk Material Processing Equipment' },
{ code: '41 08 20', title: 'Commissioning of Piece Material Handling Equipment' },
{ code: '41 08 30', title: 'Commissioning of Manufacturing Equipment' },
{ code: '41 08 40', title: 'Commissioning of Container Processing and Packaging' },
{ code: '41 08 50', title: 'Commissioning of Material Storage' },
{ code: '41 08 60', title: 'Commissioning of Mobile Plant Equipment' },
{ code: '41 10 00', title: 'BULK MATERIAL PROCESSING EQUIPMENT' },
{ code: '41 11 00', title: 'Bulk Material Sizing Equipment' },
{ code: '41 11 13', title: 'Bulk Material Agglomerators' },
{ code: '41 11 16', title: 'Bulk Material Air Mill Classifiers' },
{ code: '41 11 19', title: 'Bulk Material Centrifuges' },
{ code: '41 11 23', title: 'Bulk Material Crushers' },
{ code: '41 11 26', title: 'Bulk Material Cyclones' },
{ code: '41 11 29', title: 'Bulk Material Fluid Bed Separators' },
{ code: '41 11 33', title: 'Bulk Material Grinders' },
{ code: '41 11 36', title: 'Bulk Material Homogenizers' },
{ code: '41 11 39', title: 'Bulk Material Lump Breakers' },
{ code: '41 11 43', title: 'Bulk Material Mills' },
{ code: '41 11 46', title: 'Bulk Material Pulverizers' },
{ code: '41 11 49', title: 'Bulk Material Screens' },
{ code: '41 11 53', title: 'Bulk Material Shredders' },
{ code: '41 11 56', title: 'Bulk Material Sieves' },
{ code: '41 12 00', title: 'Bulk Material Conveying Equipment' },
{ code: '41 12 13', title: 'Bulk Material Conveyors' },
{ code: '41 12 13.13', title: 'Airslide Bulk Material Conveyors' },
{ code: '41 12 13.16', title: 'Auger Bulk Material Conveyors' },
{ code: '41 12 13.19', title: 'Belt Bulk Material Conveyors' },
{ code: '41 12 13.23', title: 'Container Bulk Material Conveyors' },
{ code: '41 12 13.26', title: 'Drag Chain Bulk Material Conveyors' },
{ code: '41 12 13.29', title: 'Hopper Bulk Material Conveyors' },
{ code: '41 12 13.33', title: 'Reciprocating Bulk Material Conveyors' },
{ code: '41 12 13.36', title: 'Screw Bulk Material Conveyors' },
{ code: '41 12 13.39', title: 'Stacking and Reclaim Bulk Material Conveyors' },
{ code: '41 12 13.43', title: 'Trough Bulk Material Conveyors' },
{ code: '41 12 13.46', title: 'Tube Bulk Material Conveyors' },
{ code: '41 12 13.49', title: 'Vibratory Bulk Material Conveyors' },
{ code: '41 12 13.53', title: 'Weigh Belt Bulk Material Conveyors' },
{ code: '41 12 16', title: 'Bucket Elevators' },
{ code: '41 12 19', title: 'Pneumatic Conveyors' },
{ code: '41 12 19.13', title: 'Dense Phase Pneumatic Conveyors' },
{ code: '41 12 19.16', title: 'Dilute Phase Pneumatic Conveyors' },
{ code: '41 13 00', title: 'Bulk Material Feeders' },
{ code: '41 13 13', title: 'Bin Activators/Live Bin Bottoms' },
{ code: '41 13 23', title: 'Feeders' },
{ code: '41 13 23.13', title: 'Airlock Bulk Material Feeders' },
{ code: '41 13 23.16', title: 'Apron Bulk Material Feeders' },
{ code: '41 13 23.19', title: 'Rotary-Valve Bulk Material Feeders' },
{ code: '41 13 23.23', title: 'Screw Bulk Material Feeders' },
{ code: '41 13 23.26', title: 'Vibratory Bulk Material Feeders' },
{ code: '41 13 23.29', title: 'Volumetric Bulk Material Feeders' },
{ code: '41 13 23.33', title: 'Weigh Bulk Material Feeders' },
{ code: '41 14 00', title: 'Batching Equipment' },
{ code: '41 14 13', title: 'Bag-Handling Batching Equipment' },
{ code: '41 14 16', title: 'Batch Cars/Transports' },
{ code: '41 14 19', title: 'Batch Hoppers' },
{ code: '41 14 23', title: 'Bulk Bag-Handling Batching Equipment' },
{ code: '41 14 26', title: 'Blenders' },
{ code: '41 14 29', title: 'Drum-Handling Batching Equipment' },
{ code: '41 14 33', title: 'Mixers' },
{ code: '41 14 36', title: 'Weigh Scales' },
{ code: '41 20 00', title: 'PIECE MATERIAL HANDLING EQUIPMENT' },
{ code: '41 21 00', title: 'Conveyors' },
{ code: '41 21 13', title: 'Automatic Guided Vehicle Systems' },
{ code: '41 21 23', title: 'Piece Material Conveyors' },
{ code: '41 21 23.13', title: 'Belt Piece Material Conveyors' },
{ code: '41 21 23.16', title: 'Container Piece Material Conveyors' },
{ code: '41 21 23.19', title: 'Drag-Chain Piece Material Conveyors' },
{ code: '41 21 23.23', title: 'Hopper Piece Material Conveyors' },
{ code: '41 21 23.26', title: 'Monorail Piece Material Conveyors' },
{ code: '41 21 23.29', title: 'Power and Free Piece Material Conveyors' },
{ code: '41 21 23.33', title: 'Reciprocating Piece Material Conveyors' },
{ code: '41 21 23.36', title: 'Roller Piece Material Conveyors' },
{ code: '41 21 23.39', title: 'Vibratory Piece Material Conveyors' },
{ code: '41 21 23.43', title: 'Walking-Beam Piece Material Conveyors' },
{ code: '41 21 23.46', title: 'Weigh-Belt Piece Material Conveyors' },
{ code: '41 21 23.53', title: 'Postal Conveyors' },
{ code: '41 21 26', title: 'Piece Material Diverter Gates' },
{ code: '41 21 29', title: 'Piece Material Gravity Slides' },
{ code: '41 21 33', title: 'Piece Material Transfer Cars' },
{ code: '41 21 36', title: 'Piece M aterial Turntables' },
{ code: '41 21 39', title: 'Piece Material Feeders' },
{ code: '41 21 39.13', title: 'Piece Material Vibratory Feeders' },
{ code: '41 22 00', title: 'Cranes and Hoists' },
{ code: '41 22 13', title: 'Cranes' },
{ code: '41 22 13.13', title: 'Bridge Cranes' },
{ code: '41 22 13.16', title: 'Gantry Cranes' },
{ code: '41 22 13.19', title: 'Jib Cranes' },
{ code: '41 22 13.23', title: 'Mobile Cranes' },
{ code: '41 22 13.26', title: 'Tower Cranes' },
{ code: '41 22 13.29', title: 'Specialty Cranes' },
{ code: '41 22 23', title: 'Hoists' },
{ code: '41 22 23.13', title: 'Fixed Hoists' },
{ code: '41 22 23.16', title: 'Portable Hoists' },
{ code: '41 22 23.19', title: 'Monorail Hoists' },
{ code: '41 22 23.23', title: 'Specialty Hoists' },
{ code: '41 22 33', title: 'Derricks' },
{ code: '41 23 00', title: 'Lifting Devices' },
{ code: '41 23 13', title: 'Clamps' },
{ code: '41 23 16', title: 'Grabs' },
{ code: '41 23 19', title: 'Hooks' },
{ code: '41 23 23', title: 'Lifts' },
{ code: '41 23 26', title: 'Slings' },
{ code: '41 23 29', title: 'Spreader Bars/Beams' },
{ code: '41 23 33', title: 'Tongs' },
{ code: '41 24 00', title: 'Specialty Material Handling Equipment' },
{ code: '41 24 13', title: 'Aeration Devices' },
{ code: '41 24 16', title: 'Bin Vibrators' },
{ code: '41 24 19', title: 'Dehydrators' },
{ code: '41 24 23', title: 'Hydrators' },
{ code: '41 24 26', title: 'Hydraulic Power Systems' },
{ code: '41 24 29', title: 'Lubrication Systems' },
{ code: '41 24 33', title: 'Magnetic Separators' },
{ code: '41 24 36', title: 'Metal Detectors' },
{ code: '41 24 39', title: 'Railcar Movers' },
{ code: '41 24 43', title: 'Turnheads/Distributors' },
{ code: '41 24 46', title: 'Sorting Machines' },
{ code: '41 24 46.13', title: 'Postal Sorting Machines' },
{ code: '41 30 00', title: 'MANUFACTURING EQUIPMENT' },
{ code: '41 31 00', title: 'Manufacturing Lines and Equipment' },
{ code: '41 31 13', title: 'Manufacturing Lines' },
{ code: '41 31 13.13', title: 'Assembly Lines' },
{ code: '41 31 13.16', title: 'Casting Lines' },
{ code: '41 31 13.19', title: 'Coating Lines' },
{ code: '41 31 13.23', title: 'Converting Lines' },
{ code: '41 31 13.26', title: 'Disassembly Lines' },
{ code: '41 31 13.29', title: 'Extrusion Lines' },
{ code: '41 31 13.33', title: 'Machining Lines' },
{ code: '41 31 13.36', title: 'Molding Lines' },
{ code: '41 31 13.39', title: 'Finishing/Painting Lines' },
{ code: '41 31 13.43', title: 'Painting Lines' },
{ code: '41 31 13.46', title: 'Pickling Lines' },
{ code: '41 31 13.49', title: 'Plating Lines' },
{ code: '41 31 13.53', title: 'Polishing Lines' },
{ code: '41 31 13.56', title: 'Press Lines' },
{ code: '41 31 13.59', title: 'Rolling/Calendaring Lines' },
{ code: '41 31 13.63', title: 'Web Processing Lines' },
{ code: '41 31 16', title: 'Pick and Place Systems' },
{ code: '41 31 19', title: 'Manufacturing-Line Robots' },
{ code: '41 31 23', title: 'Specialty Assembly Machines' },
{ code: '41 32 00', title: 'Forming Equipment' },
{ code: '41 32 13', title: 'Bending Equipment' },
{ code: '41 32 16', title: 'Blow-Molding Equipment' },
{ code: '41 32 19', title: 'Brake-Forming Equipment' },
{ code: '41 32 23', title: 'Cold-Forming Equipment' },
{ code: '41 32 26', title: 'Die-Casting Equipment' },
{ code: '41 32 29', title: 'Drawing Equipment' },
{ code: '41 32 33', title: 'Electroforming Equipment' },
{ code: '41 32 36', title: 'Forging Equipment' },
{ code: '41 32 39', title: 'Extruding Equipment' },
{ code: '41 32 43', title: 'Metal-Spinning Equipment' },
{ code: '41 32 46', title: 'Piercing Equipment' },
{ code: '41 32 49', title: 'Powder Metal-Forming Equipment' },
{ code: '41 32 53', title: 'Pressing Equipm ent' },
{ code: '41 32 56', title: 'Roll-Forming Equipment' },
{ code: '41 32 59', title: 'Shearing Equipment' },
{ code: '41 32 63', title: 'Spinning Equipment' },
{ code: '41 32 66', title: 'Stretching/Leveling Equipment' },
{ code: '41 32 69', title: 'Swaging Equipment' },
{ code: '41 33 00', title: 'Machining Equipment' },
{ code: '41 33 13', title: 'Automatic Screw Machining Equipment' },
{ code: '41 33 16', title: 'Boring Equipment' },
{ code: '41 33 19', title: 'Broaching Equipment' },
{ code: '41 33 23', title: 'Drilling Equipment' },
{ code: '41 33 26', title: 'Electro-Discharge Machining Equipment' },
{ code: '41 33 29', title: 'Grinding Equipment' },
{ code: '41 33 33', title: 'Hobbing Equipment' },
{ code: '41 33 36', title: 'Lapping Equipment' },
{ code: '41 33 39', title: 'Lathe Equipment' },
{ code: '41 33 43', title: 'Leveling Equipment' },
{ code: '41 33 46', title: 'Machining Center Equipment' },
{ code: '41 33 53', title: 'Milling Equipment' },
{ code: '41 33 53.13', title: 'Horizontal Milling Equipment' },
{ code: '41 33 53.16', title: 'Vertical Milling Equipment' },
{ code: '41 33 60', title: 'Multi-Axis Machine Equipment' },
{ code: '41 33 63', title: 'Planing Equipment' },
{ code: '41 33 66', title: 'Reaming Equipment' },
{ code: '41 33 69', title: 'Routing Equipment' },
{ code: '41 33 73', title: 'Sawing Equipment' },
{ code: '41 33 76', title: 'Shaping Equipment' },
{ code: '41 33 79', title: 'Threading Equipment' },
{ code: '41 34 00', title: 'Finishing Equipment' },
{ code: '41 34 13', title: 'Anodizing Equipment' },
{ code: '41 34 16', title: 'Barrel Tumbling Equipment' },
{ code: '41 34 23', title: 'Coating Equipment' },
{ code: '41 34 23.13', title: 'Diffusion Coating Equipment' },
{ code: '41 34 23.16', title: 'Dipping Coating Equipment' },
{ code: '41 34 23.19', title: 'Film Coating Equipment' },
{ code: '41 34 23.23', title: 'Phosphatizing Coating Equipment' },
{ code: '41 34 23.26', title: 'Plasma Coating Equipment' },
{ code: '41 34 23.29', title: 'Hardface Welding Coating Equipment' },
{ code: '41 34 23.33', title: 'Spray Painting Booth' },
{ code: '41 34 26', title: 'Deburring Equipment' },
{ code: '41 34 36', title: 'Electroplating Equipment' },
{ code: '41 34 46', title: 'Grinding Equipment' },
{ code: '41 34 49', title: 'Honing Equipment' },
{ code: '41 34 53', title: 'Lapping Equipment' },
{ code: '41 34 56', title: 'Shot Peening Equipment' },
{ code: '41 34 59', title: 'Superfinishing/Polishing Equipment' },
{ code: '41 35 00', title: 'Dies and Molds' },
{ code: '41 35 13', title: 'Dies' },
{ code: '41 35 13.13', title: 'Drawing Dies' },
{ code: '41 35 13.16', title: 'Extrusion Dies' },
{ code: '41 35 13.19', title: 'Press Dies' },
{ code: '41 35 13.23', title: 'Rotary Dies' },
{ code: '41 35 13.26', title: 'Rule Dies' },
{ code: '41 35 33', title: 'Molds' },
{ code: '41 36 00', title: 'Assembly and Testing Equipment' },
{ code: '41 36 13', title: 'Applicators' },
{ code: '41 36 13.13', title: 'Adhesive Applicators' },
{ code: '41 36 13.16', title: 'Lubricant Applicators' },
{ code: '41 36 13.19', title: 'Sealer Applicators' },
{ code: '41 36 16', title: 'Fixtures and Jigs' },
{ code: '41 36 19', title: 'Joining Equipment' },
{ code: '41 36 19.13', title: 'Adhesive Joining Equipment' },
{ code: '41 36 19.16', title: 'Arc-Welding Equipment' },
{ code: '41 36 19.19', title: 'Brazing Equipment' },
{ code: '41 36 19.23', title: 'Resistance- Welding Equipment' },
{ code: '41 36 19.26', title: 'Riveting Equipment' },
{ code: '41 36 19.29', title: 'Sintering Equipment' },
{ code: '41 36 19.33', title: 'Soldering Equipment' },
{ code: '41 36 23', title: 'Cutting Equipment' },
{ code: '41 36 23.13', title: 'Cutting Torches' },
{ code: '41 36 23.16', title: 'High-Pressure Water Cutting Equipment' },
{ code: '41 36 23.19', title: 'Laser Cutting Equipment' },
{ code: '41 36 23.23', title: 'Plasma Cutting Equipment' },
{ code: '41 36 26', title: 'Process Tools' },
{ code: '41 36 26.13', title: 'Air Process Tools' },
{ code: '41 36 26.16', title: 'Electric Process Tools' },
{ code: '41 36 26.19', title: 'Hydraulic Process Tools' },
{ code: '41 36 26.23', title: 'Manual Process Tools' },
{ code: '41 36 29', title: 'Manufacturing Measurement and Testing Equipment' },
{ code: '41 36 29.13', title: 'Gages, Rules, and Blocks' },
{ code: '41 36 29.16', title: 'Penetrant Measurement and Testing Equipment' },
{ code: '41 36 29.19', title: 'Laser Measurement and Testing Equipment' },
{ code: '41 36 29.23', title: 'Magnaflux Measurement and Testing Equipment' },
{ code: '41 36 29.26', title: 'Optical Comparators' },
{ code: '41 36 29.29', title: 'Profilometers' },
{ code: '41 36 29.33', title: 'Radiograph Measurement and Testing Equipment' },
{ code: '41 36 29.36', title: 'Surface Tables' },
{ code: '41 36 29.39', title: 'Ultrasonic Measurement and Testing Equipment' },
{ code: '41 36 29.43', title: 'Test Weigh Scales' },
{ code: '41 40 00', title: 'CONTAINER PROCESSING AND PACKAGING' },
{ code: '41 41 00', title: 'Container Filling and Sealing' },
{ code: '41 41 13', title: 'Bulk Container Fillers/Packers' },
{ code: '41 41 16', title: 'Container Cappers' },
{ code: '41 41 19', title: 'Container Fillers' },
{ code: '41 41 19.13', title: 'Bag Fillers' },
{ code: '41 41 19.16', title: 'Box Fillers' },
{ code: '41 41 19.19', title: 'Bottle Fillers' },
{ code: '41 41 23', title: 'Container Sealers' },
{ code: '41 42 00', title: 'Container Packing Equipment' },
{ code: '41 42 13', title: 'Box Packing Equipment' },
{ code: '41 42 13.13', title: 'Box Makers' },
{ code: '41 42 13.16', title: 'Box Packers' },
{ code: '41 42 16', title: 'Bulk Material Loaders' },
{ code: '41 42 16.13', title: 'Container Bulk Material Loaders' },
{ code: '41 42 16.23', title: 'Truck Bulk Material Loaders' },
{ code: '41 42 16.26', title: 'Railcar Bulk Material Loaders' },
{ code: '41 42 16.29', title: 'Ship Bulk Material Loaders' },
{ code: '41 42 16.33', title: 'Barge Bulk Material Loaders' },
{ code: '41 42 19', title: 'Carton Packers' },
{ code: '41 42 23', title: 'Carton Sealers' },
{ code: '41 42 26', title: 'Carton Shrink Wrappers' },
{ code: '41 42 29', title: 'Carton Stackers' },
{ code: '41 43 00', title: 'Shipping Packaging' },
{ code: '41 43 13', title: 'Banding/Strapping Equipment' },
{ code: '41 43 16', title: 'Barcode Equipment' },
{ code: '41 43 16.13', title: 'Barcode Readers' },
{ code: '41 43 16.16', title: 'Barcode Printers' },
{ code: '41 43 19', title: 'Labeling Equipment' },
{ code: '41 43 23', title: 'Pallet Stacking/Wrapping Equipment' },
{ code: '41 50 00', title: 'MATERIAL STORAGE' },
{ code: '41 51 00', title: 'Automatic Material Storage' },
{ code: '41 51 13', title: 'Automatic Storage/Automatic Retrieval Systems' },
{ code: '41 52 00', title: 'Bulk Material Storage' },
{ code: '41 52 13', title: 'Bins and Hoppers' },
{ code: '41 52 13.13', title: 'Fixed Bins and Hoppers' },
{ code: '41 52 13.23', title: 'Portable Bins and Hoppers' },
{ code: '41 52 13.33', title: 'Bulk Material Containers' },
{ code: '41 52 13.43', title: 'Returnable Bins and Hoppers' },
{ code: '41 52 13.53', title: 'Throwaway Bins and Hoppers' },
{ code: '41 52 16', title: 'Silos' },
{ code: '41 52 16.13', title: 'Concrete Silos' },
{ code: '41 52 16.16', title: 'Concrete Masonry Unit Silos' },
{ code: '41 52 16.19', title: 'Steel Silos' },
{ code: '41 52 19', title: 'Material Storage Tanks' },
{ code: '41 52 19.13', title: 'Horizontal Material Storage Tanks' },
{ code: '41 52 19.23', title: 'Vertical Material Storage Tanks' },
{ code: '41 52 19.33', title: 'Portable Material Storage Tanks' },
{ code: '41 53 00', title: 'Storage Equipment and Systems' },
{ code: '41 53 13', title: 'Storage Cabinets' },
{ code: '41 53 16', title: 'Container Storage Systems' },
{ code: '41 53 19', title: 'Flat Files' },
{ code: '41 53 23', title: 'Storage Racks' },
{ code: '41 53 26', title: 'Mezzanine Storage Systems' },
{ code: '41 60 00', title: 'MOBILE PLANT EQUIPMENT' },
{ code: '41 61 00', title: 'Mobile Earth Moving Equipment' },
{ code: '41 61 13', title: 'Backhoes' },
{ code: '41 61 16', title: 'Bulldozers' },
{ code: '41 61 19', title: 'Compactors' },
{ code: '41 61 23', title: 'Excavators' },
{ code: '41 61 26', title: 'Graders' },
{ code: '41 61 29', title: 'Payloaders' },
{ code: '41 61 33', title: 'Trenchers' },
{ code: '41 62 00', title: 'Trucks' },
{ code: '41 62 13', title: 'Cement Mixer Trucks' },
{ code: '41 62 16', title: 'Dump Trucks' },
{ code: '41 62 19', title: 'Flatbed Trucks' },
{ code: '41 62 23', title: 'Forklift Trucks' },
{ code: '41 62 26', title: 'Pickup Trucks' },
{ code: '41 62 29', title: 'Tank Trucks' },
{ code: '41 63 00', title: 'General Vehicles' },
{ code: '41 63 13', title: 'Bicycles' },
{ code: '41 63 16', title: 'Carts' },
{ code: '41 63 19', title: 'Maintenance Vehicles' },
{ code: '41 63 23', title: 'Utility Vehicles' },
{ code: '41 63 26', title: 'Vans' },
{ code: '41 63 29', title: 'Wagons' },
{ code: '41 64 00', title: 'Rail Vehicles' },
{ code: '41 64 13', title: 'Locomotives' },
{ code: '41 64 13.13', title: 'Diesel Locomotives' },
{ code: '41 64 13.23', title: 'Electric Locomotives' },
{ code: '41 64 16', title: 'Mobile Railcar Movers' },
{ code: '41 65 00', title: 'Mobile Support Equipment' },
{ code: '41 65 13', title: 'Mobile Air Compressors' },
{ code: '41 65 16', title: 'Mobile Generators' },
{ code: '41 65 19', title: 'Mobile Welders' },
{ code: '41 66 00', title: 'Miscellaneous Mobile Equipment' },
{ code: '41 66 13', title: 'Mobile Boring and Drilling Rigs' },
{ code: '41 66 16', title: 'Mobile Lifts and Cherrypickers' },
{ code: '41 66 19', title: 'Mobile Paving Equipment' },
{ code: '41 66 23', title: 'Mobile Sweepers/Vacuums' },
{ code: '41 67 00', title: 'Plant Maintenance Equipment' },
{ code: '41 67 13', title: 'Plant Lube Oil System' },
{ code: '41 67 16', title: 'Plant Fall Protection Equipment' },
{ code: '41 67 19', title: 'Plant Safety Equipment' },
{ code: '41 67 23', title: 'Plant Maintenance Tools' },
{ code: '41 67 26', title: 'Plant Maintenance Washing Equipment' },
{ code: '41 70 00', title: 'Unassigned' },
{ code: '41 80 00', title: 'Unassigned' },
{ code: '41 90 00', title: 'Unassigned' }]
})
}
division_40() {
return (
{
division: 40,
divisionTitle: 'Process Integration',
codes: [{ code: '40 00 00', title: 'PROCESS INTEGRATION' },
{ code: '40 01 00', title: 'Operation and Maintenance of Process Integration' },
{ code: '40 01 10', title: 'Operation and Maintenance of Gas and Vapor Process Piping' },
{ code: '40 01 20', title: 'Operation and Maintenance of Liquids Process Piping' },
{ code: '40 01 30', title: 'Operation and Maintenance of Solid and Mixed Materials Piping and Chutes' },
{ code: '40 01 40', title: 'Operation and Maintenance of Process Piping and Equipment Protection' },
{ code: '40 05 00', title: 'Common Work Results for Process Integration' },
{ code: '40 05 13', title: 'Common Work Results for Process Piping' },
{ code: '40 05 13.13', title: 'Steel Process Piping' },
{ code: '40 05 13.16', title: 'Lined or Internally-Coated Steel Process Piping' },
{ code: '40 05 13.19', title: 'Stainless-Steel Process Piping' },
{ code: '40 05 13.23', title: 'Aluminum Alloys Process Piping' },
{ code: '40 05 13.33', title: 'Brass, Bronze, Copper, and Copper Alloys Process Piping' },
{ code: '40 05 13.43', title: 'Nickel and Nickel Alloys Process Piping' },
{ code: '40 05 13.53', title: 'Ductile, Malleable, and Cast Iron Alloys Process Piping' },
{ code: '40 05 13.63', title: 'Titanium and Titanium Alloys Process Piping' },
{ code: '40 05 13.73', title: 'Plastic Process Piping' },
{ code: '40 05 13.76', title: 'Fiberglass-Reinforced Plastic and Resins Process Piping' },
{ code: '40 05 13.93', title: 'Other Metals Process Piping' },
{ code: '40 05 23', title: 'Common Work Results for Process Valves' },
{ code: '40 05 23.13', title: 'Carbon Steel Process Valves' },
{ code: '40 05 23.16', title: 'Low and Intermediate Alloy Steel Process Valves' },
{ code: '40 05 23.19', title: 'Stainless-Steel Process Valves' },
{ code: '40 05 23.33', title: 'Brass and Iron Process Valves' },
{ code: '40 05 23.43', title: 'Nickel and Nickel Alloys Steel Process Valves' },
{ code: '40 05 23.73', title: 'Plastic and Plastic Lined Process Valves' },
{ code: '40 05 23.93', title: 'Other Metals Process Valves' },
{ code: '40 06 00', title: 'Schedules for Process Integration' },
{ code: '40 06 10', title: 'Schedules for Gas and Vapor Process Piping' },
{ code: '40 06 20', title: 'Schedules for Liquids Process Piping' },
{ code: '40 06 30', title: 'Schedules for Solid and Mixed Materials Piping and Chutes' },
{ code: '40 06 40', title: 'Schedules for Process Piping and Equipment Protection' },
{ code: '40 10 00', title: 'GAS AND VAPOR PROCESS PIPING' },
{ code: '40 11 00', title: 'Steam Process Piping' },
{ code: '40 11 13', title: 'Low-Pressure Steam Process Piping' },
{ code: '40 11 16', title: 'Intermediate-Pressure Steam Process Piping' },
{ code: '40 11 19', title: 'High-Pressure Steam Process Piping' },
{ code: '40 11 23', title: 'Condensate Process Piping' },
{ code: '40 12 00', title: 'Compressed Air Process Piping' },
{ code: '40 12 13', title: 'Breathing Compressed Air Process Piping' },
{ code: '40 12 16', title: 'Non-Breathing Compressed Air Process Piping' },
{ code: '40 13 00', title: 'Inert Gases Process Piping' },
{ code: '40 13 13', title: 'Argon Process Piping' },
{ code: '40 13 16', title: 'Carbon-Dioxide Process Piping' },
{ code: '40 13 19', title: 'Helium Process Piping' },
{ code: '40 13 23', title: 'Krypton Process Piping' },
{ code: '40 13 26', title: 'Neon Process Piping' },
{ code: '40 13 29', title: 'Nitrogen Process Piping' },
{ code: '40 13 33', title: 'Xenon Process Piping' },
{ code: '40 13 93', title: 'Mixed Inert Gases Process Piping' },
{ code: '40 14 00', title: 'Fuel Gases Process Piping' },
{ code: '40 14 13', title: 'Blast Furnace Piping' },
{ code: '40 14 16', title: 'Blue (Water) Fuel Gas Piping' },
{ code: '40 14 19', title: 'Butane Piping' },
{ code: '40 14 23', title: 'Carbon-Monoxide Piping' },
{ code: '40 14 26', title: 'Chlorine Fuel Gas Piping' },
{ code: '40 14 29', title: 'Coke Oven Gas Piping' },
{ code: '40 14 33', title: 'Ethane-Gas Piping' },
{ code: '40 14 36', title: 'Hydrogen Fuel Gas Piping' },
{ code: '40 14 39', title: 'Liquid Natural-Gas Process Piping' },
{ code: '40 14 43', title: 'Methylacetylene-Propadiene Fuel Gas Piping' },
{ code: '40 14 49', title: 'Natural-Gas Process Piping' },
{ code: '40 14 49.13', title: 'Synthetic Natural-Gas Piping' },
{ code: '40 14 49.23', title: 'Propane-Air Mixes Fuel Gas Piping' },
{ code: '40 14 53', title: 'Octane Fuel Gas Piping' },
{ code: '40 14 59', title: 'Propane Fuel Gas Process Piping' },
{ code: '40 14 63', title: 'Sewage Fuel Gas Piping' },
{ code: '40 14 93', title: 'Mixed Fuel Gases Piping' },
{ code: '40 15 00', title: 'Combustion System Gas Piping' },
{ code: '40 15 13', title: 'Combustion Air Piping' },
{ code: '40 15 16', title: 'Oxygen Combustion System Gas Piping' },
{ code: '40 15 19', title: 'Flue-Gas Combustion System Piping' },
{ code: '40 15 23', title: 'Exothermic -Gas Combustion System Piping' },
{ code: '40 15 26', title: 'Endothermic -Gas Combustion System Piping' },
{ code: '40 15 29', title: 'Disassociated-Ammonia-Gas Combustion System Piping' },
{ code: '40 16 00', title: 'Specialty and High-Purity Gases Piping' },
{ code: '40 16 13', title: 'Ammonia Gas Piping' },
{ code: '40 16 16', title: 'Boron Gas Piping' },
{ code: '40 16 26', title: 'Diborane Gas Piping' },
{ code: '40 16 29', title: 'Fluorine Gas Piping' },
{ code: '40 16 33', title: 'Hydrogen Sulfide Gas Piping' },
{ code: '40 16 36', title: 'Nitrous-Oxide Gas Process Piping' },
{ code: '40 16 39', title: 'Ozone Gas Piping' },
{ code: '40 16 43', title: 'Phosphine Gas Piping' },
{ code: '40 16 46', title: 'Silane Gas Piping' },
{ code: '40 16 49', title: 'Sulfur-Dioxide Gas Piping' },
{ code: '40 16 53', title: 'Specialty Gas Mixtures Piping' },
{ code: '40 16 56', title: 'High-Purity Gas Piping Components' },
{ code: '40 17 00', title: 'Welding and Cutting Gases Piping' },
{ code: '40 17 13', title: 'Acetylene Welding and Cutting Piping' },
{ code: '40 17 16', title: 'Acetylene-Hydrogen Mix Welding and Cutting Piping' },
{ code: '40 17 19', title: 'Methylacetylene-Propadiene Welding and Cutting Piping' },
{ code: '40 17 23', title: 'Oxygen Welding and Cutting Piping' },
{ code: '40 17 26', title: 'Inert Gas Welding and Cutting Piping' },
{ code: '40 18 00', title: 'Vacuum Systems Process Piping' },
{ code: '40 18 13', title: 'Low-Vacuum Systems Process Piping' },
{ code: '40 18 16', title: 'High-Vacuum Systems Process Piping' },
{ code: '40 20 00', title: 'LIQUIDS PROCESS PIPING' },
{ code: '40 21 00', title: 'Liquid Fuel Process Piping' },
{ code: '40 21 13', title: 'Bio Fuels Process Piping' },
{ code: '40 21 16', title: 'Gasoline Process Piping' },
{ code: '40 21 19', title: 'Diesel Process Piping' },
{ code: '40 21 23', title: 'Fuel-Oils Process Piping' },
{ code: '40 21 23.13', title: 'No. 2 Fuel-Oil Process Piping' },
{ code: '40 21 23.16', title: 'No. 4 Fuel-Oil Process Piping' },
{ code: '40 21 23.19', title: 'No. 5 Fuel-Oil Process Piping' },
{ code: '40 21 23.23', title: 'No. 6 Fuel-Oil Process Piping' },
{ code: '40 21 23.26', title: 'Kerosene Process Piping' },
{ code: '40 21 23.29', title: 'Tar Process Piping' },
{ code: '40 22 00', title: 'Petroleum Products Piping' },
{ code: '40 22 13', title: 'Heavy-Fractions Petroleum Products Piping' },
{ code: '40 22 16', title: 'Light-Fractions Petroleum Products Piping' },
{ code: '40 23 00', title: 'Water Process Piping' },
{ code: '40 23 13', title: 'De-Ionized Water Process Piping' },
{ code: '40 23 16', title: 'Distilled-Water Process Piping' },
{ code: '40 23 19', title: 'Process Plant Water Piping' },
{ code: '40 23 23', title: 'Potable Water Process Piping' },
{ code: '40 23 29', title: 'Recirculated Water Process Piping' },
{ code: '40 23 33', title: 'Reverse-Osmosis Water Process Piping' },
{ code: '40 23 36', title: 'Sanitary Water Process Piping' },
{ code: '40 24 00', title: 'Specialty Liquid Chemicals Piping' },
{ code: '40 24 13', title: 'Alcohol Piping' },
{ code: '40 24 16', title: 'Gel Piping' },
{ code: '40 24 19', title: 'Slurries Process Piping' },
{ code: '40 24 23', title: 'Thixotropic Liquid Piping' },
{ code: '40 25 00', title: 'Liquid Acids and Bases Piping' },
{ code: '40 25 13', title: 'Liquid Acids Piping' },
{ code: '40 25 16', title: 'Liquid Bases Piping' },
{ code: '40 26 00', title: 'Liquid Polymer Piping' },
{ code: '40 30 00', title: 'SOLID AND MIXED MATERIALS PIPING AND CHUTES' },
{ code: '40 32 00', title: 'Bulk Materials Piping and Chutes' },
{ code: '40 32 13', title: 'Abrasive Materials Piping and Chutes' },
{ code: '40 32 16', title: 'Nonabrasive Materials Piping and Chutes' },
{ code: '40 33 00', title: 'Bulk Materials Valves' },
{ code: '40 33 13', title: 'Airlock Bulk Materials Valves' },
{ code: '40 33 16', title: 'Blind Bulk Materials Valves' },
{ code: '40 33 19', title: 'Butterfly Bulk Materials Valves' },
{ code: '40 33 23', title: 'Cone Bulk Materials Valves' },
{ code: '40 33 26', title: 'Diverter Bulk Materials Valves' },
{ code: '40 33 29', title: 'Double or Single Dump Bulk Materials Valves' },
{ code: '40 33 33', title: 'Knife and Slide Gate Bulk Materials Valves' },
{ code: '40 33 36', title: 'Pinch Bulk Materials Valves' },
{ code: '40 33 39', title: 'Swing Bulk Materials Valves' },
{ code: '40 33 43', title: 'Specialty Bulk Materials Valves' },
{ code: '40 34 00', title: 'Pneumatic Conveying Lines' },
{ code: '40 34 13', title: 'Dense Phase Pneumatic Conveying Lines' },
{ code: '40 34 16', title: 'Dilute Phase Pneumatic Conveying Lines' },
{ code: '40 40 00', title: 'PROCESS PIPING AND EQUIPMENT PROTECTION' },
{ code: '40 41 00', title: 'Process Piping and Equipment Heat Tracing' },
{ code: '40 41 13', title: 'Process Piping Heat Tracing' },
{ code: '40 41 13.13', title: 'Process Piping Electrical Resistance Heat Tracing' },
{ code: '40 41 13.16', title: 'Process Piping Electrical Conductance Heat Tracing' },
{ code: '40 41 13.19', title: 'Process Piping Gas Heat Tracing' },
{ code: '40 41 13.23', title: 'Process Piping Steam Heat Tracing' },
{ code: '40 41 13.26', title: 'Process Piping Thermal Fluids Heat Tracing' },
{ code: '40 41 23', title: 'Process Equipment Heat Tracing' },
{ code: '40 41 23.13', title: 'Process Equipment Electrical Resistance Heat Tracing' },
{ code: '40 41 23.16', title: 'Process Equipment Electrical Conductance Heat Tracing' },
{ code: '40 41 23.19', title: 'Process Equipment Gas Heat Tracing' },
{ code: '40 41 23.23', title: 'Process Equipment Steam Heat Tracing' },
{ code: '40 41 23.26', title: 'Process Equipment Thermal Fluids Heat Tracing' },
{ code: '40 42 00', title: 'Process Piping and Equipment Insulation' },
{ code: '40 42 13', title: 'Process Piping Insulation' },
{ code: '40 42 13.13', title: 'Cryogenic Temperature Process Piping Insulation' },
{ code: '40 42 13.16', title: 'Low Temperature Process Piping Insulation' },
{ code: '40 42 13.19', title: 'Intermediate Temperature Process Piping Insulation' },
{ code: '40 42 13.23', title: 'High Temperature Process Piping Insulation' },
{ code: '40 42 13.26', title: 'Process Piping Insulation for Specialty Applications' },
{ code: '40 42 23', title: 'Process Equipment Insulation' },
{ code: '40 42 23.13', title: 'Cryogenic Temperature Process Equipment Insulation' },
{ code: '40 42 23.16', title: 'Low Temperature Process Equipment Insulation' },
{ code: '40 42 23.19', title: 'Intermediate Temperature Process Equipment Insulation' },
{ code: '40 42 23.23', title: 'High Temperature Process Equipment Insulation' },
{ code: '40 42 23.26', title: 'Process Equipment Insulation for Specialty Applications' },
{ code: '40 46 00', title: 'Process Corrosion Protection' },
{ code: '40 46 16', title: 'Coatings and Wrappings for Process Corrosion Protection' },
{ code: '40 46 42', title: 'Cathodic Process Corrosion Protection' },
{ code: '40 47 00', title: 'Refractories' },
{ code: '40 47 13', title: 'Silica Refractories' },
{ code: '40 47 16', title: 'Alumina Refractories' },
{ code: '40 47 19', title: 'Carbon and Graphite Refractories' },
{ code: '40 47 23', title: 'Castable Refractories' },
{ code: '40 47 26', title: 'Rammed Refractories' },
{ code: '40 47 29', title: 'Refractory Concrete' },
{ code: '40 50 00', title: 'Unassigned' },
{ code: '40 60 00', title: 'Unassigned' },
{ code: '40 70 00', title: 'Unassigned' },
{ code: '40 80 00', title: 'COMMISSIONING OF PROCESS SYSTEMS' },
{ code: '40 90 00', title: 'INSTRUMENTATION AND CONTROL FOR PROCESS SYSTEMS' },
{ code: '40 91 00', title: 'Primary Process Measurement Devices' },
{ code: '40 91 13', title: 'Chemical Properties Process Measurement Devices' },
{ code: '40 91 13.13', title: 'Ammonia Process Measurement Devices' },
{ code: '40 91 13.16', title: 'Chlorine Process Measurement Devices' },
{ code: '40 91 13.19', title: 'Fluoride Process Measurement Devices' },
{ code: '40 91 13.23', title: 'Gas Analysis Process Measurement Devices' },
{ code: '40 91 13.26', title: 'Gas Chromatograph Process Measurement Devices' },
{ code: '40 91 13.29', title: 'pH Level Process Measurement Devices' },
{ code: '40 91 16', title: 'Electromagnetic Process Measurement Devices' },
{ code: '40 91 16.13', title: 'Amperes Process Measurement Devices' },
{ code: '40 91 16.16', title: 'Capacitance Process Measurement Devices' },
{ code: '40 91 16.19', title: 'Conductivity Process Measurement Devices' },
{ code: '40 91 16.23', title: 'Inductance Process Measurement Devices' },
{ code: '40 91 16.26', title: 'Lumens Process Measurement Devices' },
{ code: '40 91 16.29', title: 'Magnetic Field Process Measurement Devices' },
{ code: '40 91 16.33', title: 'Electrical Power Process Measurement Devices' },
{ code: '40 91 16.36', title: 'Radiation Process Measurement Devices' },
{ code: '40 91 16.39', title: 'Electrical Resistance Process Measurement Devices' },
{ code: '40 91 16.43', title: 'Ultraviolet Sensors' },
{ code: '40 91 16.46', title: 'Voltage Process Measurement Devices' },
{ code: '40 91 19', title: 'Physical Properties Process Measurement Devices' },
{ code: '40 91 19.13', title: 'Density Process Measurement Devices' },
{ code: '40 91 19.16', title: 'Humidity Process Measurement Devices' },
{ code: '40 91 19.19', title: 'Mass Process Measurement Devices' },
{ code: '40 91 19.23', title: 'Particle Counters Process Measurement Devices' },
{ code: '40 91 19.26', title: 'Gas Pressure Process Measurement Devices' },
{ code: '40 91 19.29', title: 'Liquid Pressure Process Measurement Devices' },
{ code: '40 91 19.33', title: 'Stress/Strain Process Measurement Devices' },
{ code: '40 91 19.36', title: 'Temperature Process Measurement Devices' },
{ code: '40 91 19.39', title: 'Vapor Pressure Process Measurement Devices' },
{ code: '40 91 19.43', title: 'Weight Process Measurement Devices' },
{ code: '40 91 23', title: 'Miscellaneous Properties Measurement Devices' },
{ code: '40 91 23.13', title: 'Acceleration Process Measurement Devices' },
{ code: '40 91 23.16', title: 'Angle Process Measurement Devices' },
{ code: '40 91 23.19', title: 'Color Process Measurement Devices' },
{ code: '40 91 23.23', title: 'Count Process Measurement Devices' },
{ code: '40 91 23.26', title: 'Distance Process Measurement Devices' },
{ code: '40 91 23.29', title: 'Energy Process Measurement Devices' },
{ code: '40 91 23.33', title: 'Flow Process Measurement Devices' },
{ code: '40 91 23.36', title: 'Level Process Measurement Devices' },
{ code: '40 91 23.39', title: 'Physical Resistance Process Measurement Devices' },
{ code: '40 91 23.43', title: 'RPM Process Measurement Devices' },
{ code: '40 91 23.46', title: 'Time Process Measurement Devices' },
{ code: '40 91 23.49', title: 'Turbidity Process Measurement Devices' },
{ code: '40 91 23.53', title: 'Velocity Process Measurement Devices' },
{ code: '40 92 00', title: 'Primary Control Devices' },
{ code: '40 92 13', title: 'Primary Control Valves' },
{ code: '40 92 13.13', title: 'Electrically-Operated Primary Control Valves' },
{ code: '40 92 13.16', title: 'Hydraulically-Operated Primary Control Valves' },
{ code: '40 92 13.19', title: 'Pneumatically-Operated Primary Control Valves' },
{ code: '40 92 13.23', title: 'Pressure-Relief Primary Control Valves' },
{ code: '40 92 13.26', title: 'Solenoid Primary Control Valves' },
{ code: '40 92 13.29', title: 'Specialty Primary Control Valves' },
{ code: '40 92 29', title: 'Current-To-Pressure Converters' },
{ code: '40 92 33', title: 'Self-Contained Flow Controllers' },
{ code: '40 92 36', title: 'Linear Actuators and Positioners' },
{ code: '40 92 39', title: 'Self-Contained Pressure Regulators' },
{ code: '40 92 43', title: 'Rotary Actuators' },
{ code: '40 92 46', title: 'Saturable Core Reactors' },
{ code: '40 92 49', title: 'Variable Frequency Drives' },
{ code: '40 92 53', title: 'Voltage-To-Pressure Converters' },
{ code: '40 93 00', title: 'Analog Controllers/Recorders' },
{ code: '40 93 13', title: 'Analog Controllers' },
{ code: '40 93 13.13', title: 'Electronic Analog Controllers' },
{ code: '40 93 13.16', title: 'Electro-Hydraulic Analog Controllers' },
{ code: '40 93 13.19', title: 'Electro-Pneumatic Analog Controllers' },
{ code: '40 93 13.23', title: 'Hydraulic Analog Controllers' },
{ code: '40 93 13.26', title: 'Pneumatic Analog Controllers' },
{ code: '40 93 23', title: 'Chart Recorders' },
{ code: '40 94 00', title: 'Digital Process Controllers' },
{ code: '40 94 13', title: 'Digital Process Control Computers' },
{ code: '40 94 13.13', title: 'Host Digital Process Control Computers' },
{ code: '40 94 13.16', title: 'Personal Digital Process Control Computers' },
{ code: '40 94 13.19', title: 'Personal Digital Assistant Digital Process Control Computers' },
{ code: '40 94 23', title: 'Distributed Process Control Systems' },
{ code: '40 94 33', title: 'Human – Machine Interfaces' },
{ code: '40 94 43', title: 'Programmable Logic Process Controllers' },
{ code: '40 95 00', title: 'Process Control Hardware' },
{ code: '40 95 13', title: 'Process Control Panels and Hardware' },
{ code: '40 95 13.13', title: 'Local Process Control Panels and Hardware' },
{ code: '40 95 13.23', title: 'Main Process Control Panels and Hardware' },
{ code: '40 95 20', title: 'Process Control Display Devices' },
{ code: '40 95 23', title: 'Process Control Input/Output Modules' },
{ code: '40 95 26', title: 'Process Control Instrument Air Piping and Devices' },
{ code: '40 95 33', title: 'Process Control Networks' },
{ code: '40 95 33.13', title: 'Cabled Process Control Networks' },
{ code: '40 95 33.23', title: 'Fiber Optic Process Control Networks' },
{ code: '40 95 33.33', title: 'Wireless Process Control Networks' },
{ code: '40 95 43', title: 'Process Control Hardware Interfaces' },
{ code: '40 95 46', title: 'Process Control Mounting Racks and Supports' },
{ code: '40 95 49', title: 'Process Control Routers' },
{ code: '40 95 53', title: 'Process Control Switches' },
{ code: '40 95 56', title: 'Process Control Transformers' },
{ code: '40 95 63', title: 'Process Control Wireless Equipment' },
{ code: '40 95 63.13', title: 'Process Control Wireless Transmitters' },
{ code: '40 95 63.16', title: 'Process Control Wireless Receivers' },
{ code: '40 95 63.19', title: 'Process Control Wireless Repeaters' },
{ code: '40 95 73', title: 'Process Control Wiring' },
{ code: '40 95 73.23', title: 'Process Control Cable' },
{ code: '40 95 73.33', title: 'Process Control Conduit, Raceway and Supports' },
{ code: '40 95 73.43', title: 'Process Control Junction Boxes' },
{ code: '40 96 00', title: 'Process Control Software' },
{ code: '40 96 10', title: 'Process Control Software Architecture' },
{ code: '40 96 15', title: 'Process Control Software Input/Output Lists' },
{ code: '40 96 20', title: 'Process Control Software Instrument Lists' },
{ code: '40 96 25', title: 'Process Control Software Logic Diagrams' },
{ code: '40 96 30', title: 'Process Control Software Loop Diagrams' },
{ code: '40 96 35', title: 'Process Control Software Programming' },
{ code: '40 96 40', title: 'Process Control Software Reports' },
{ code: '40 97 00', title: 'Process Control Auxiliary Devices' },
{ code: '40 97 10', title: 'Process Control Annunciators' },
{ code: '40 97 15', title: 'Process Control Gages' },
{ code: '40 97 20', title: 'Process Control Rotameters' },
{ code: '40 97 25', title: 'Process Control Potentiometers' },
{ code: '40 97 30', title: 'Process Control Test Equipment' }]
}
)
}
division_35() {
return ({
division: 35,
divisionTitle: 'Waterway and Marine Construction',
codes: [{ code: '35 00 00', title: 'WATERWAY AND MARINE CONSTRUCTION' },
{ code: '35 01 00', title: 'Operation and Maintenance of Waterway and Marine Construction' },
{ code: '35 01 30', title: 'Operation and Maintenance of Coastal Construction' },
{ code: '35 01 40', title: 'Operation and Maintenance of Waterway Construction' },
{ code: '35 01 40.92', title: 'Preservation of Water Courses' },
{ code: '35 01 50', title: 'Operation and Maintenance ofMarine Construction' },
{ code: '35 01 50.71', title: 'Channel Excavation, Cleaning and Deepening' },
{ code: '35 01 70', title: 'Operation and Maintenance of Dams' },
{ code: '35 05 00', title: 'Common Work Results for Waterway and Marine Construction' },
{ code: '35 05 30', title: 'Common Work Results for Coastal Construction' },
{ code: '35 05 40', title: 'Common Work Results for Waterway Construction' },
{ code: '35 05 50', title: 'Common Work Results for Marine Construction' },
{ code: '35 05 70', title: 'Common Work Results for Dams' },
{ code: '35 06 00', title: 'Schedules for Waterway and Marine Construction' },
{ code: '35 06 30', title: 'Schedules for Coastal Construction' },
{ code: '35 06 40', title: 'Schedules for Waterway Construction' },
{ code: '35 06 50', title: 'Schedules for Marine Construction' },
{ code: '35 06 70', title: 'Schedules for Dams' },
{ code: '35 08 00', title: 'Commissioning of Waterway and Marine Construction' },
{ code: '35 08 30', title: 'Commissioning of Coastal Construction' },
{ code: '35 08 40', title: 'Commissioning of Waterway Construction' },
{ code: '35 08 50', title: 'Commissioning of Marine Construction' },
{ code: '35 08 70', title: 'Commissioning ofDams' },
{ code: '35 10 00', title: 'WATERWAY AND MARINE SIGNALING AND CONTROL EQUIPMENT' },
{ code: '35 11 00', title: 'Signaling and Control Equipment for Waterways' },
{ code: '35 11 13', title: 'Signaling Equipment for Waterways' },
{ code: '35 11 53', title: 'Control Equipment for Waterways' },
{ code: '35 12 00', title: 'Marine Signaling and Control Equipment' },
{ code: '35 12 13', title: 'Marine Signaling Equipment' },
{ code: '35 12 13.13', title: 'Lighthouse Equipment' },
{ code: '35 12 33', title: 'Marine Navigation Equipment' },
{ code: '35 12 53', title: 'Marine Control Equipment' },
{ code: '35 13 00', title: 'Signaling and Control Equipment for Dams' },
{ code: '35 13 13', title: 'Signaling Equipment for Dams' },
{ code: '35 13 53', title: 'Control Equipment for Dams' },
{ code: '35 20 00', title: 'WATERWAY AND MARINE CONSTRUCTION AND EQUIPMENT' },
{ code: '35 20 13', title: 'Hydraulic Fabrications' },
{ code: '35 20 13.13', title: 'Hydraulic Bifurcation Panels' },
{ code: '35 20 13.16', title: 'Hydraulic Bulkheads' },
{ code: '35 20 13.19', title: 'Hydraulic Manifolds' },
{ code: '35 20 13.23', title: 'Hydraulic Penstocks' },
{ code: '35 20 13.26', title: 'Hydraulic Trashracks' },
{ code: '35 20 16', title: 'Hydraulic Gates' },
{ code: '35 20 16.13', title: 'Hydraulic Spillway Crest Gates' },
{ code: '35 20 16.19', title: 'Hydraulic Head Gates' },
{ code: '35 20 16.26', title: 'Hydraulic Sluice Gates' },
{ code: '35 20 16.33', title: 'Hydraulic Miter Gates' },
{ code: '35 20 16.39', title: 'Hydraulic Sector Gates' },
{ code: '35 20 16.46', title: 'Hydraulic Tainter Gates and Anchorages' },
{ code: '35 20 16.53', title: 'Hydraulic Vertical Lift Gates' },
{ code: '35 20 16.59', title: 'Hydraulic Closure Gates' },
{ code: '35 20 19', title: 'Hydraulic Valves' },
{ code: '35 20 19.13', title: 'Hydraulic Butterfly Valves' },
{ code: '35 20 19.23', title: 'Hydraulic Regulating Valves' },
{ code: '35 20 23', title: 'Dredging' },
{ code: '35 20 23.13', title: 'Mechanical Dredging' },
{ code: '35 20 23.23', title: 'Hydraulic Dredging' },
{ code: '35 20 23.33', title: 'Integrated Dredging and Dewatering' },
{ code: '35 30 00', title: 'COASTAL CONSTRUCTION' },
{ code: '35 31 00', title: 'Shoreline Protection' },
{ code: '35 31 16', title: 'Seawalls' },
{ code: '35 31 16.13', title: 'Concrete Seawalls' },
{ code: '35 31 16.16', title: 'Segmental Seawalls' },
{ code: '35 31 16.19', title: 'Steel Sheet Piling Seawalls' },
{ code: '35 31 16.23', title: 'Timber Seawalls' },
{ code: '35 31 16.40', title: 'Stone Seawalls' },
{ code: '35 31 19', title: 'Revetments' },
{ code: '35 31 19.13', title: 'Sacked Cement-Sand Revetments' },
{ code: '35 31 19.16', title: 'Concrete Unit Masonry Revetments' },
{ code: '35 31 19.36', title: 'Gabion Revetments' },
{ code: '35 31 19.40', title: 'Stone Revetments' },
{ code: '35 31 23', title: 'Breakwaters' },
{ code: '35 31 23.13', title: 'Rubble Mound Breakwaters' },
{ code: '35 31 23.16', title: 'Precast Breakwater Modules' },
{ code: '35 31 26', title: 'Jetties' },
{ code: '35 31 26.13', title: 'Concrete Jetties' },
{ code: '35 31 26.16', title: 'Concrete Unit Masonry Jetties' },
{ code: '35 31 26.36', title: 'Gabion Jetties' },
{ code: '35 31 26.40', title: 'Stone Jetties' },
{ code: '35 31 29', title: 'Groins' },
{ code: '35 31 29.13', title: 'Concrete Groins' },
{ code: '35 31 29.16', title: 'Concrete Unit Masonry Groins' },
{ code: '35 31 29.26', title: 'Steel Groins' },
{ code: '35 31 29.36', title: 'Gabion Groins' },
{ code: '35 31 29.40', title: 'Stone Groins' },
{ code: '35 32 00', title: 'Artificial Reefs' },
{ code: '35 32 13', title: 'Scrap Material Artificial Reefs' },
{ code: '35 32 13.13', title: 'Scrap Concrete Artificial Reefs' },
{ code: '35 32 13.19', title: 'Scrap Steel Artificial Reefs' },
{ code: '35 32 13.33', title: 'Sunken Ship Artificial Reefs' },
{ code: '35 32 16', title: 'Constructed Artificial Reefs' },
{ code: '35 32 16.13', title: 'Constructed Concrete Artificial Reefs' },
{ code: '35 32 16.19', title: 'Constructed Steel Artificial Reefs' },
{ code: '35 40 00', title: 'WATERWAY CONSTRUCTION AND EQUIPMENT' },
{ code: '35 41 00', title: 'Levees' },
{ code: '35 41 13', title: 'Landside Levee Berms' },
{ code: '35 41 13.13', title: 'Stability Landside Levee Berms' },
{ code: '35 41 13.16', title: 'Seepage Landside Levee Berms' },
{ code: '35 41 16', title: 'Levee Cutoff Trenches' },
{ code: '35 41 19', title: 'Levee Relief Wells' },
{ code: '35 42 00', title: 'Waterway Bank Protection' },
{ code: '35 42 13', title: 'Piling Bank Protection' },
{ code: '35 42 13.19', title: 'Steel Sheet Piling Bank Protection' },
{ code: '35 42 13.23', title: 'Timber Piling Bank Protection' },
{ code: '35 42 13.26', title: 'Plastic Piling Bank Protection' },
{ code: '35 42 29', title: 'Grout-Bag Bank Protection' },
{ code: '35 42 34', title: 'Soil Reinforcem ent Bank Protection' },
{ code: '35 42 35', title: 'Slope Protection Bank Protection' },
{ code: '35 42 36', title: 'Gabion Bank Protection' },
{ code: '35 42 37', title: 'Riprap Bank Protection' },
{ code: '35 42 53', title: 'Wall Bank Protection' },
{ code: '35 42 53.16', title: 'Concrete Unit Masonry Wall Bank Protection' },
{ code: '35 42 53.19', title: 'Segmental Wall Bank Protection' },
{ code: '35 42 53.40', title: 'Stone Wall Bank Protection' },
{ code: '35 43 00', title: 'Waterway Scour Protection' },
{ code: '35 43 29', title: 'Grout-Bag Scour Protection' },
{ code: '35 43 34', title: 'Soil Reinforcement Scour Protection' },
{ code: '35 43 35', title: 'Slope Protection Scour Protection' },
{ code: '35 43 36', title: 'Gabion Scour Protection' },
{ code: '35 43 37', title: 'Riprap Scour Protection' },
{ code: '35 43 53', title: 'Wall Scour Protection' },
{ code: '35 43 53.13', title: 'Concrete Unit Masonry Wall Scour Protection' },
{ code: '35 43 53.16', title: 'Segmental Wall Scour Protection' },
{ code: '35 43 53.40', title: 'Stone Wall Scour Protection' },
{ code: '35 49 00', title: 'Waterway Structures' },
{ code: '35 49 13', title: 'Floodwalls' },
{ code: '35 49 13.13', title: 'Concrete Floodwalls' },
{ code: '35 49 13.16', title: 'Masonry Floodwalls' },
{ code: '35 49 23', title: 'Waterway Locks' },
{ code: '35 49 23.13', title: 'Concrete Waterway Locks' },
{ code: '35 49 23.23', title: 'Piling Waterway Locks' },
{ code: '35 50 00', title: 'MARINE CONSTRUCTION AND EQUIPMENT' },
{ code: '35 51 00', title: 'Floating Construction' },
{ code: '35 51 13', title: 'Floating Piers' },
{ code: '35 51 13.23', title: 'Floating Wood Piers' },
{ code: '35 51 13.26', title: 'Floating Plastic Piers' },
{ code: '35 51 23', title: 'Pontoons' },
{ code: '35 52 00', title: 'Offshore Platform Construction' },
{ code: '35 52 13', title: 'Fixed Offshore Platform Construction' },
{ code: '35 52 23', title: 'Semi-Submersible Offshore Platform Construction' },
{ code: '35 52 33', title: 'Floating Offshore Platform Construction' },
{ code: '35 53 00', title: 'Underwater Construction' },
{ code: '35 53 23', title: 'Underwater Harbor Deepening' },
{ code: '35 53 33', title: 'Underwater Pipeline Construction' },
{ code: '35 53 43', title: 'Underwater Foundation Construction' },
{ code: '35 53 53', title: 'Underwater Structures Construction' },
{ code: '35 53 63', title: 'Underwater Waterproofing' },
{ code: '35 59 00', title: 'Marine Specialties' },
{ code: '35 59 13', title: 'Marine Fenders' },
{ code: '35 59 13.13', title: 'Prestressed Concrete Marine Fender Piling' },
{ code: '35 59 13.16', title: 'Resilient Foam-Filled Marine Fenders' },
{ code: '35 59 13.19', title: 'Rubber Marine Fenders' },
{ code: '35 59 23', title: 'Buoys' },
{ code: '35 59 23.13', title: 'Mooring Buoys' },
{ code: '35 59 23.16', title: 'Anchor Pendant Buoys' },
{ code: '35 59 23.19', title: 'Navigation Buoys' },
{ code: '35 59 29', title: 'Mooring Devices' },
{ code: '35 59 29.13', title: 'Quick-Release Mooring Hooks' },
{ code: '35 59 29.16', title: 'Laser Docking Systems' },
{ code: '35 59 29.19', title: 'Capstans' },
{ code: '35 59 33', title: 'Marine Bollards and Cleats' },
{ code: '35 59 33.13', title: 'Cast-Steel Marine Bollards and Cleats' },
{ code: '35 59 33.16', title: 'Cast-Iron Marine Bollards and Cleats' },
{ code: '35 59 33.19', title: 'Stainless-Steel Marine Bollards and Cleats' },
{ code: '35 59 33.23', title: 'Plastic Marine Bollards and Cleats' },
{ code: '35 59 93', title: 'Marine Chain and Accessories' },
{ code: '35 59 93.13', title: 'Marine Chain' },
{ code: '35 59 93.16', title: 'Marine Shackles' },
{ code: '35 59 93.19', title: 'Marine Chain Tensioners' },
{ code: '35 60 00', title: 'Unassigned' },
{ code: '35 70 00', title: 'DAM CONSTRUCTION AND EQUIPMENT' },
{ code: '35 71 00', title: 'Gravity Dams' },
{ code: '35 71 13', title: 'Concrete Gravity Dams' },
{ code: '35 71 16', title: 'Masonry Gravity Dams' },
{ code: '35 71 19', title: 'Rockfill Gravity Dams' },
{ code: '35 72 00', title: 'Arch Dams' },
{ code: '35 72 13', title: 'Concrete Arch Dams' },
{ code: '35 73 00', title: 'Embankment Dams' },
{ code: '35 73 13', title: 'Earth Embankment Dam' },
{ code: '35 73 16', title: 'Rock Embankment Dams' },
{ code: '35 74 00', title: 'Buttress Dams' },
{ code: '35 74 13', title: 'Concrete Buttress Dams' },
{ code: '35 79 00', title: 'Auxiliary Dam Structures' },
{ code: '35 79 13', title: 'Fish Ladders' },
{ code: '35 79 13.13', title: 'Concrete Fish Ladders' },
{ code: '35 80 00', title: 'Unassigned' },
{ code: '35 90 00', title: 'Unassigned' }]
})
}
division_34() {
return (
{
division: 34,
divisionTitle: 'Transportation',
codes: [{ code: '34 00 00', title: 'TRANSPORTATION' },
{ code: '34 01 00', title: 'Operation and Maintenance of Transportation' },
{ code: '34 01 13', title: 'Operation and Maintenance of Roadways' },
{ code: '34 01 23', title: 'Operation and Maintenance of Railways' },
{ code: '34 01 23.13', title: 'Track Removal and Salvage' },
{ code: '34 01 23.81', title: 'Track Crosstie Replacement' },
{ code: '34 01 33', title: 'Operation and Maintenance of Airfields' },
{ code: '34 01 43', title: 'Operation and Maintenance of Bridges' },
{ code: '34 05 00', title: 'Common Work Results for Transportation' },
{ code: '34 05 13', title: 'Common Work Results for Roadways' },
{ code: '34 05 23', title: 'Common Work Results for Railways' },
{ code: '34 05 33', title: 'Common Work Results for Airports' },
{ code: '34 05 43', title: 'Common Work Results for Bridges' },
{ code: '34 06 00', title: 'Schedules for Transportation' },
{ code: '34 06 13', title: 'Schedules for Roadways' },
{ code: '34 06 23', title: 'Schedules for Railways' },
{ code: '34 06 33', title: 'Schedules for Airfields' },
{ code: '34 06 43', title: 'Schedules for Bridges' },
{ code: '34 08 00', title: 'Commissioning of Transportation' },
{ code: '34 08 13', title: 'Commissioning of Roadways' },
{ code: '34 08 23', title: 'Commissioning of Railways' },
{ code: '34 08 33', title: 'Commissioning of Airfields' },
{ code: '34 08 43', title: 'Commissioning of Bridges' },
{ code: '34 10 00', title: 'GUIDEWAYS/RAILWAYS' },
{ code: '34 11 00', title: 'Rail Tracks' },
{ code: '34 11 13', title: 'Track Rails' },
{ code: '34 11 13.13', title: 'Light Rail Track' },
{ code: '34 11 13.23', title: 'Heavy Rail Track' },
{ code: '34 11 16', title: 'Welded Track Rails' },
{ code: '34 11 16.13', title: 'In-Track Butt- Welded Track Rail' },
{ code: '34 11 16.16', title: 'Pressure- Welded Track Rail' },
{ code: '34 11 16.19', title: 'Thermite- Welded Track Rail' },
{ code: '34 11 19', title: 'Track Rail Joints' },
{ code: '34 11 23', title: 'Special Trackwork' },
{ code: '34 11 23.13', title: 'Ballasted Special Track Rail' },
{ code: '34 11 23.16', title: 'Direct-Fixation Track' },
{ code: '34 11 23.23', title: 'Running Rail' },
{ code: '34 11 23.26', title: 'Precurved Running Rail' },
{ code: '34 11 26', title: 'Ballasted Track Rail' },
{ code: '34 11 26.13', title: 'Track Rail Ballast' },
{ code: '34 11 26.16', title: 'Track Rail Subballast' },
{ code: '34 11 29', title: 'Embedded Track Rail' },
{ code: '34 11 33', title: 'Track Cross Ties' },
{ code: '34 11 33.13', title: 'Concrete Track Cross Ties' },
{ code: '34 11 33.16', title: 'Timber Track Cross Ties' },
{ code: '34 11 33.19', title: 'Resilient Track Cross Ties' },
{ code: '34 11 36', title: 'Track Rail Fasteners' },
{ code: '34 11 36.13', title: 'Direct-Fixation Fasteners' },
{ code: '34 11 39', title: 'Track Collector Pans' },
{ code: '34 11 39.13', title: 'Fiberglass Track Collector Pans' },
{ code: '34 11 93', title: 'Track Appurtenances and Accessories' },
{ code: '34 12 00', title: 'Monorails' },
{ code: '34 12 13', title: 'Elevated Monorails' },
{ code: '34 12 16', title: 'On-Grade Monorails' },
{ code: '34 12 19', title: 'Below-Grade Monorails' },
{ code: '34 12 23', title: 'Maglev Monorail' },
{ code: '34 12 63', title: 'Monorail Track' },
{ code: '34 13 00', title: 'Funiculars' },
{ code: '34 13 13', title: 'Inclined Railway' },
{ code: '34 14 00', title: 'Cable Transportation' },
{ code: '34 14 13', title: 'Aerial Tramways' },
{ code: '34 14 19', title: 'Gondolas' },
{ code: '34 14 26', title: 'Funitels' },
{ code: '34 14 33', title: 'Chairlifts' },
{ code: '34 14 39', title: 'Surface Lifts' },
{ code: '34 14 46', title: 'Ropeway Tows' },
{ code: '34 14 53', title: 'Cable Car Systems' },
{ code: '34 20 00', title: 'TRACTION POWER' },
{ code: '34 21 00', title: 'Traction Power Distribution' },
{ code: '34 21 13', title: 'High Power Static Frequency Converters' },
{ code: '34 21 16', title: 'Traction Power Substations' },
{ code: '34 21 16.13', title: 'AC Traction Power Substations' },
{ code: '34 21 16.16', title: 'DC Traction Power Substations' },
{ code: '34 21 19', title: 'Traction Power Switchgear' },
{ code: '34 21 19.13', title: 'AC Traction Power Switchgear' },
{ code: '34 21 19.16', title: 'DC Traction Power Switchgear' },
{ code: '34 21 19.23', title: 'Frequency Changer' },
{ code: '34 21 23', title: 'Traction Power Transformer-Rectifier Units' },
{ code: '34 23 00', title: 'Overhead Traction Power' },
{ code: '34 23 13', title: 'Traction Power Poles' },
{ code: '34 23 16', title: 'Overhead Cable Suspension' },
{ code: '34 23 23', title: 'Overhead Traction Power Cables' },
{ code: '34 24 00', title: 'Third Rail Traction Power' },
{ code: '34 24 13', title: 'Bottom-Contact Third Rail' },
{ code: '34 24 16', title: 'Side-Contact Third Rail' },
{ code: '34 24 19', title: 'Top-Contact Third Rail' },
{ code: '34 30 00', title: 'Unassigned' },
{ code: '34 40 00', title: 'TRANSPORTATION SIGNALING AND CONTROL EQUIPMENT' },
{ code: '34 41 00', title: 'Roadway Signaling and Control Equipment' },
{ code: '34 41 13', title: 'Traffic Signals' },
{ code: '34 41 16', title: 'Traffic Control Equipment' },
{ code: '34 41 23', title: 'Roadway Monitoring Equipment' },
{ code: '34 42 00', title: 'Railway Signaling and Control Equipment' },
{ code: '34 42 13', title: 'Railway Signals' },
{ code: '34 42 13.13', title: 'General Railway Signal Requirements' },
{ code: '34 42 13.16', title: 'Signal Solid State Coded Track Circuits' },
{ code: '34 42 16', title: 'Train Control Wires and Cables' },
{ code: '34 42 19', title: 'Vital Interlocking Logic Controllers' },
{ code: '34 42 23', title: 'Railway Control Equipment' },
{ code: '34 42 23.13', title: 'Mainline Train Control Room Equipment' },
{ code: '34 42 23.16', title: 'Yard Train Control Room Equipment' },
{ code: '34 42 23.19', title: 'Integrated Control Equipment' },
{ code: '34 42 23.23', title: 'Interlocking Railway Control Equipment' },
{ code: '34 42 26', title: 'Rail Network Equipment' },
{ code: '34 42 29', title: 'Station Agent Equipment' },
{ code: '34 42 33', title: 'Yard Management Equipment' },
{ code: '34 42 36', title: 'Supervisory Control and Data Acquisition' },
{ code: '34 43 00', title: 'Airfield Signaling and Control Equipment' },
{ code: '34 43 13', title: 'Airfield Signals' },
{ code: '34 43 13.13', title: 'Airfield Runway Identification Lights' },
{ code: '34 43 13.16', title: 'Airfield Runway and Taxiway Inset Lighting' },
{ code: '34 43 16', title: 'Airfield Landing Equipment' },
{ code: '34 43 16.13', title: 'Microwave Airfield Landing Equipment' },
{ code: '34 43 16.16', title: 'Instrument Airfield Landing Equipment' },
{ code: '34 43 16.19', title: 'Airfield Visual-Approach Slope Indicator Equipment' },
{ code: '34 43 16.23', title: 'Airfield Short-Approach Lighting Equipment' },
{ code: '34 43 16.26', title: 'Airfield Omni-Directional-Approach Lighting Equipment' },
{ code: '34 43 16.29', title: 'Airfield Low-Intensity -Approach Lighting Equipment' },
{ code: '34 43 16.33', title: 'Airfield High-Intensity -Approach Lighting Equipment' },
{ code: '34 43 16.36', title: 'Airfield Precision-Approach Path Indicator Equipment' },
{ code: '34 43 19', title: 'Airfield Traffic Control Tower Equipment' },
{ code: '34 43 23', title: 'Weather Observation Equipment' },
{ code: '34 43 23.13', title: 'Automatic Weather Observation Equipment' },
{ code: '34 43 23.16', title: 'Airfield Wind Cones' },
{ code: '34 43 26', title: 'Airfield Control Equipment' },
{ code: '34 43 26.13', title: 'Airfield Lighting Control Equipment' },
{ code: '34 43 26.16', title: 'Airfield Lighting PLC Control Equipment' },
{ code: '34 43 26.19', title: 'Airfield Lighting Regulator Assembly' },
{ code: '34 48 00', title: 'Bridge Signaling and Control Equipment' },
{ code: '34 48 13', title: 'Operating Bridge Signals' },
{ code: '34 48 16', title: 'Operating Bridge Control Equipment' },
{ code: '34 50 00', title: 'TRANSPORTATION FARE COLLECTION EQUIPMENT' },
{ code: '34 52 00', title: 'Vehicle Fare Collection' },
{ code: '34 52 16', title: 'Vehicle Ticketing Equipment' },
{ code: '34 52 16.13', title: 'Vehicle Ticket Vending Machines' },
{ code: '34 52 26', title: 'Vehicle Fare Collection Equipment' },
{ code: '34 52 26.13', title: 'Vehicle Coin Fare Collection Equipment' },
{ code: '34 52 26.16', title: 'Vehicle Electronic Fare Collection Equipment' },
{ code: '34 52 33', title: 'Vehicle Fare Gates' },
{ code: '34 54 00', title: 'Passenger Fare Collection' },
{ code: '34 54 16', title: 'Passenger Ticketing Equipment' },
{ code: '34 54 16.13', title: 'Passenger Ticket Vending Machines' },
{ code: '34 54 16.16', title: 'Passenger Addfare Machines' },
{ code: '34 54 16.23', title: 'Passenger Intermodal Transfer Machines' },
{ code: '34 54 26', title: 'Passenger Fare Collection Equipment' },
{ code: '34 54 26.13', title: 'Passenger Coin Fare Collection Equipment' },
{ code: '34 54 26.16', title: 'Passenger Electronic Fare Collection Equipment' },
{ code: '34 54 33', title: 'Passenger Fare Gates' },
{ code: '34 60 00', title: 'Unassigned' },
{ code: '34 70 00', title: 'TRANSPORTATION CONSTRUCTION AND EQUIPMENT' },
{ code: '34 71 00', title: 'Roadway Construction' },
{ code: '34 71 13', title: 'Vehicle Barriers' },
{ code: '34 71 13.13', title: 'Vehicle Median Barriers' },
{ code: '34 71 13.16', title: 'Vehicle Crash Barriers' },
{ code: '34 71 13.19', title: 'Vehicle Traffic Barriers' },
{ code: '34 71 13.26', title: 'Vehicle Guide Rails' },
{ code: '34 71 13.29', title: 'Vehicle Barrier Fenders' },
{ code: '34 71 16', title: 'Impact Attenuating Devices' },
{ code: '34 71 19', title: 'Vehicle Delineators' },
{ code: '34 71 19.13', title: 'Fixed Vehicle Delineators' },
{ code: '34 71 19.16', title: 'Flexible Vehicle Delineators' },
{ code: '34 72 00', title: 'Railway Construction' },
{ code: '34 72 13', title: 'Railway Line' },
{ code: '34 72 16', title: 'Railway Siding' },
{ code: '34 73 00', title: 'Airfield Construction' },
{ code: '34 73 13', title: 'Aircraft Tiedowns' },
{ code: '34 73 16', title: 'Airfield Grounding' },
{ code: '34 73 16.13', title: 'Aircraft Static Grounding' },
{ code: '34 73 19', title: 'Jet Blast Barriers' },
{ code: '34 73 23', title: 'Manufactured Airfield Control Towers' },
{ code: '34 73 26', title: 'Manufactured Helipads' },
{ code: '34 75 00', title: 'Roadway Equipment' },
{ code: '34 75 13', title: 'Operable Roadway Equipment' },
{ code: '34 75 13.13', title: 'Active Vehicle Barriers' },
{ code: '34 76 00', title: 'Railway Equipment' },
{ code: '34 76 13', title: 'Roadway Crossing Control Equipment' },
{ code: '34 77 00', title: 'Transportation Equipment' },
{ code: '34 77 13', title: 'Passenger Loading Bridges' },
{ code: '34 77 13.13', title: 'Fixed Aircraft Passenger Loading Bridges' },
{ code: '34 77 13.16', title: 'Movable Aircraft Passenger Loading Bridges' },
{ code: '34 77 13.23', title: 'Ship Passenger Loading Bridges' },
{ code: '34 77 16', title: 'Baggage Handling Equipment' },
{ code: '34 77 16.13', title: 'Baggage Scanning Equipment' },
{ code: '34 77 16.16', title: 'Baggage Scales' },
{ code: '34 77 16.19', title: 'Baggage Conveying Equipment' },
{ code: '34 80 00', title: 'BRIDGES' },
{ code: '34 81 00', title: 'Bridge Machinery' },
{ code: '34 81 13', title: 'Single-Swing Bridge Machinery' },
{ code: '34 81 16', title: 'Double-Swing Bridge Machinery' },
{ code: '34 81 19', title: 'Cantilever Bridge Machinery' },
{ code: '34 81 23', title: 'Lift Bridge Machinery' },
{ code: '34 81 26', title: 'Sliding Bridge Machinery' },
{ code: '34 82 00', title: 'Bridge Specialties' },
{ code: '34 82 13', title: 'Bridge Vibration Dampers' },
{ code: '34 82 13.13', title: 'Visco Elastic Bridge Vibration Dampers' },
{ code: '34 82 13.16', title: 'Tuned-Mass Bridge Vibration Dampers' },
{ code: '34 82 19', title: 'Bridge Pier Protection' },
{ code: '34 82 19.13', title: 'Bridge Pier Ice Shields' },
{ code: '34 90 00', title: 'Unassigned' }]
}
)
}
division_33() {
return ({
division: 33,
divisionTitle: 'Utilities',
codes: [{ code: '33 00 00', title: 'UTILITIES' },
{ code: '33 01 00', title: 'Operation and Maintenance of Utilities' },
{ code: '33 01 10', title: 'Operation and Maintenance of Water Utilities' },
{ code: '33 01 20', title: 'Operation and Maintenance of Wells' },
{ code: '33 01 30', title: 'Operation and Maintenance of Sewer Utilities' },
{ code: '33 01 30.13', title: 'Sewer and Manhole Testing' },
{ code: '33 01 30.16', title: 'TV Inspection of Sewer Pipelines' },
{ code: '33 01 30.51', title: 'Maintenance of Sewer Utilities' },
{ code: '33 01 30.52', title: 'Pond and Reservoir Maintenance' },
{ code: '33 01 30.61', title: 'Sewer and Pipe Joint Sealing' },
{ code: '33 01 30.62', title: 'Manhole Grout Sealing' },
{ code: '33 01 30.71', title: 'Rehabilitation of Sewer Utilities' },
{ code: '33 01 30.72', title: 'Relining Sewers' },
{ code: '33 01 50', title: 'Operation and Maintenance of Fuel Distribution Lines' },
{ code: '33 01 50.51', title: 'Cleaning Fuel-Storage Tanks' },
{ code: '33 01 50.71', title: 'Lining of Steel Fuel-Storage Tanks' },
{ code: '33 01 60', title: 'Operation and Maintenance of Hydronic and Steam Energy Utilities' },
{ code: '33 01 70', title: 'Operation and Maintenance of Electrical Utilities' },
{ code: '33 01 80', title: 'Operation and Maintenance of Communications Utilities' },
{ code: '33 05 00', title: 'Common Work Results for Utilities' },
{ code: '33 05 13', title: 'Manholes and Structures' },
{ code: '33 05 13.13', title: 'Manhole Grade Adjustment' },
{ code: '33 05 16', title: 'Utility Structures' },
{ code: '33 05 16.13', title: 'Precast Concrete Utility Structures' },
{ code: '33 05 16.53', title: 'Rebuilding Utility Structures' },
{ code: '33 05 19', title: 'Pressure Piping Tied Joint Restraint System' },
{ code: '33 05 23', title: 'Trenchless Utility Installation' },
{ code: '33 05 23.13', title: 'Utility Horizontal Directional Drilling' },
{ code: '33 05 23.16', title: 'Utility Pipe Jacking' },
{ code: '33 05 23.19', title: 'Microtunneling' },
{ code: '33 05 23.23', title: 'Utility Pipe Ramming' },
{ code: '33 05 23.26', title: 'Utility Impact Moling' },
{ code: '33 05 23.29', title: 'Cable Trenching and Plowing' },
{ code: '33 05 26', title: 'Utility Line Signs, Markers, and Flags' },
{ code: '33 06 00', title: 'Schedules for Utilities' },
{ code: '33 06 10', title: 'Schedules for Water Utilities' },
{ code: '33 06 20', title: 'Schedules for Wells' },
{ code: '33 06 30', title: 'Schedules for Sanitary Sewerage Utilities' },
{ code: '33 06 40', title: 'Schedules for Storm Drainage Utilities' },
{ code: '33 06 40.13', title: 'Storm Drainage Schedule' },
{ code: '33 06 50', title: 'Schedules for Fuel Distribution Utilities' },
{ code: '33 06 60', title: 'Schedules for Hydronic and Steam Energy Utilities' },
{ code: '33 06 70', title: 'Schedules for Electrical Utilities' },
{ code: '33 06 80', title: 'Schedules for Communications Utilities' },
{ code: '33 08 00', title: 'Commissioning of Utilities' },
{ code: '33 08 10', title: 'Commissioning of Water Utilities' },
{ code: '33 08 20', title: 'Commissioning of Wells' },
{ code: '33 08 30', title: 'Commissioning of Sanitary Sewerage Utilities' },
{ code: '33 08 40', title: 'Commissioning of Storm Drainage Utilities' },
{ code: '33 08 50', title: 'Commissioning of Fuel Distribution Utilities' },
{ code: '33 08 60', title: 'Commissioning of Hydronic and Steam Energy Utilities' },
{ code: '33 08 70', title: 'Commissioning of Electrical Utilities' },
{ code: '33 08 80', title: 'Commissioning of Communications Utilities' },
{ code: '33 09 00', title: 'Instrumentation and Control for Utilities' },
{ code: '33 09 10', title: 'Instrumentation and Control for Water Utilities' },
{ code: '33 09 20', title: 'Instrumentation and Control for Wells' },
{ code: '33 09 30', title: 'Instrumentation and Control for Sanitary Sewerage Utilities' },
{ code: '33 09 40', title: 'Instrumentation and Control for Storm Drainage Utilities' },
{ code: '33 09 50', title: 'Instrumentation and Control for Fuel Distribution Utilities' },
{ code: '33 09 60', title: 'Instrumentation and Control for Hydronic and Steam Energy Utilities' },
{ code: '33 09 70', title: 'Instrumentation and Control for Electrical Utilities' },
{ code: '33 09 80', title: 'Instrumentation and Control for Communications Utilities' },
{ code: '33 10 00', title: 'WATER UTILITIES' },
{ code: '33 11 00', title: 'Water Utility Distribution Piping' },
{ code: '33 11 13', title: 'Public Water Utility Distribution Piping' },
{ code: '33 11 16', title: 'Site Water Utility Distribution Piping' },
{ code: '33 11 19', title: 'Fire Suppression Utility Water Distribution Piping' },
{ code: '33 12 00', title: 'Water Utility Distribution Equipment' },
{ code: '33 12 13', title: 'Water Service Connections' },
{ code: '33 12 13.13', title: 'Water Supply Backflow Preventer Assemblies' },
{ code: '33 12 16', title: 'Water Utility Distribution Valves' },
{ code: '33 12 19', title: 'Water Utility Distribution Fire Hydrants' },
{ code: '33 12 23', title: 'Water Utility Pumping Stations' },
{ code: '33 12 33', title: 'Water Utility Metering' },
{ code: '33 13 00', title: 'Disinfecting of Water Utility Distribution' },
{ code: '33 16 00', title: 'Water Utility Storage Tanks' },
{ code: '33 16 13', title: 'Aboveground Water Utility Storage Tanks' },
{ code: '33 16 13.13', title: 'Steel Aboveground Water Utility Storage Tanks' },
{ code: '33 16 13.16', title: 'Prestressed Concrete Aboveground Water Utility Storage Tanks' },
{ code: '33 16 16', title: 'Underground Water Utility Storage Tanks' },
{ code: '33 16 19', title: 'Elevated Water Utility Storage Tanks' },
{ code: '33 20 00', title: 'WELLS' },
{ code: '33 21 00', title: 'Water Supply Wells' },
{ code: '33 21 13', title: 'Public Water Supply Wells' },
{ code: '33 21 16', title: 'Irrigation Water Wells' },
{ code: '33 22 00', title: 'Test Wells' },
{ code: '33 23 00', title: 'Extraction Wells' },
{ code: '33 24 00', title: 'Monitoring Wells' },
{ code: '33 24 13', title: 'Groundwater Monitoring Wells' },
{ code: '33 25 00', title: 'Recharge Wells' },
{ code: '33 26 00', title: 'Relief Wells' },
{ code: '33 29 00', title: 'Well Abandonment' },
{ code: '33 30 00', title: 'SANITARY SEWERAGE UTILITIES' },
{ code: '33 31 00', title: 'Sanitary Utility Sewerage Piping' },
{ code: '33 31 13', title: 'Public Sanitary Utility Sewerage Piping' },
{ code: '33 31 16', title: 'Industrial Waste Utility Sewerage Piping' },
{ code: '33 32 00', title: 'Wastewater Utility Pumping Stations' },
{ code: '33 32 13', title: 'Packaged Utility Lift Stations' },
{ code: '33 32 13.13', title: 'Packaged Sewage Lift Stations, Wet Well Type' },
{ code: '33 32 16', title: 'Packaged Utility Wastewater Pumping Stations' },
{ code: '33 32 16.13', title: 'Packaged Sewage Grinder Pumping Units' },
{ code: '33 32 19', title: 'Public Utility Wastewater Pumping Stations' },
{ code: '33 33 00', title: 'Low Pressure Utility Sewerage' },
{ code: '33 33 13', title: 'Sanitary Utility Sewerage' },
{ code: '33 33 16', title: 'Combined Utility Sewerage' },
{ code: '33 34 00', title: 'Sanitary Utility Sewerage Force Mains' },
{ code: '33 34 13', title: 'Sanitary Utility Sewerage Inverted Siphons' },
{ code: '33 36 00', title: 'Utility Septic Tanks' },
{ code: '33 36 13', title: 'Utility Septic Tank and Effluent Wet Wells' },
{ code: '33 36 16', title: 'Utility Septic Tank Effluent Pumps' },
{ code: '33 36 33', title: 'Utility Drainage Field' },
{ code: '33 39 00', title: 'Sanitary Utility Sewerage Structures' },
{ code: '33 39 13', title: 'Sanitary Utility Sewerage Manholes, Frames, and Covers' },
{ code: '33 39 23', title: 'Sanitary Utility Sewerage Cleanouts' },
{ code: '33 40 00', title: 'STORM DRAINAGE UTILITIES' },
{ code: '33 41 00', title: 'Storm Utility Drainage Piping' },
{ code: '33 41 13', title: 'Public Storm Utility Drainage Piping' },
{ code: '33 42 00', title: 'Culverts' },
{ code: '33 42 13', title: 'Pipe Culverts' },
{ code: '33 42 13.13', title: 'Public Pipe Culverts' },
{ code: '33 42 16', title: 'Concrete Culverts' },
{ code: '33 42 16.13', title: 'Precast Concrete Culverts' },
{ code: '33 42 16.16', title: 'Cast- in-Place Concrete Culverts' },
{ code: '33 44 00', title: 'Storm Utility Water Drains' },
{ code: '33 44 13', title: 'Utility Area Drains' },
{ code: '33 44 13.13', title: 'Catchbasins' },
{ code: '33 44 16', title: 'Utility Trench Drains' },
{ code: '33 44 19', title: 'Utility Storm Water Treatment' },
{ code: '33 44 19.13', title: 'In-Line Utility Storm Water Filters' },
{ code: '33 44 19.16', title: 'Catch Basin Insert Utility Storm Water Filters' },
{ code: '33 44 19.19', title: 'Utility Oil and Gas Separators' },
{ code: '33 45 00', title: 'Storm Utility Drainage Pumps' },
{ code: '33 46 00', title: 'Subdrainage' },
{ code: '33 46 13', title: 'Foundation Drainage' },
{ code: '33 46 13.13', title: 'Foundation Drainage Piping' },
{ code: '33 46 13.16', title: 'Geocomposite Foundation Drainage' },
{ code: '33 46 16', title: 'Subdrainage Piping' },
{ code: '33 46 16.13', title: 'Subdrainage Piping' },
{ code: '33 46 16.16', title: 'Geocomposite Subdrainage' },
{ code: '33 46 16.19', title: 'Pipe Underdrains' },
{ code: '33 46 19', title: 'Underslab Drainage' },
{ code: '33 46 19.13', title: 'Underslab Drainage Piping' },
{ code: '33 46 19.16', title: 'Geocomposite Underslab Drainage' },
{ code: '33 46 23', title: 'Drainage Layers' },
{ code: '33 46 23.16', title: 'Gravel Drainage Layers' },
{ code: '33 46 23.19', title: 'Geosynthetic Drainage Layers' },
{ code: '33 46 26', title: 'Geotextile Subsurface Drainage Filtration' },
{ code: '33 46 33', title: 'Retaining Wall Drainage' },
{ code: '33 47 00', title: 'Ponds and Reservoirs' },
{ code: '33 47 13', title: 'Pond and Reservoir Liners' },
{ code: '33 47 13.13', title: 'Pond Liners' },
{ code: '33 47 13.53', title: 'Reservoir Liners' },
{ code: '33 47 16', title: 'Pond and Reservoir Covers' },
{ code: '33 47 16.13', title: 'Pond Covers' },
{ code: '33 47 16.53', title: 'Reservoir Covers' },
{ code: '33 47 19', title: 'Water Ponds and Reservoirs' },
{ code: '33 47 19.13', title: 'Water Distribution Ponds' },
{ code: '33 47 19.16', title: 'Water Retainage Reservoirs' },
{ code: '33 47 19.23', title: 'Cooling Water Ponds' },
{ code: '33 47 19.33', title: 'Fire-Protection Water Ponds' },
{ code: '33 47 23', title: 'Sanitary Sewerage Lagoons' },
{ code: '33 47 26', title: 'Storm Drainage Ponds and Reservoirs' },
{ code: '33 47 26.13', title: 'Stabilization Ponds' },
{ code: '33 47 26.16', title: 'Retention Basins' },
{ code: '33 47 26.19', title: 'Leaching Pits' },
{ code: '33 49 00', title: 'Storm Drainage Structures' },
{ code: '33 49 13', title: 'Storm Drainage Manholes, Frames, and Covers' },
{ code: '33 49 23', title: 'Storm Drainage Water Retention Structures' },
{ code: '33 50 00', title: 'FUEL DISTRIBUTION UTILITIES' },
{ code: '33 51 00', title: 'Natural-Gas Distribution' },
{ code: '33 51 13', title: 'Natural-Gas Piping' },
{ code: '33 51 33', title: 'Natural-Gas Metering' },
{ code: '33 52 00', title: 'Liquid Fuel Distribution' },
{ code: '33 52 13', title: 'Fuel-Oil Distribution' },
{ code: '33 52 13.13', title: 'Fuel-Oil Piping' },
{ code: '33 52 13.23', title: 'Fuel-Oil Pumps' },
{ code: '33 52 16', title: 'Gasoline Distribution' },
{ code: '33 52 16.13', title: 'Gasoline Piping' },
{ code: '33 52 16.23', title: 'Gasoline Pumps' },
{ code: '33 52 19', title: 'Diesel Fuel Distribution' },
{ code: '33 52 19.13', title: 'Diesel Fuel Piping' },
{ code: '33 52 19.23', title: 'Diesel Fuel Pumps' },
{ code: '33 52 43', title: 'Aviation Fuel Distribution' },
{ code: '33 52 43.13', title: 'Aviation Fuel Piping' },
{ code: '33 52 43.16', title: 'Aviation Fuel Connections' },
{ code: '33 52 43.19', title: 'Aviation Fuel Grounding' },
{ code: '33 52 43.23', title: 'Aviation Fuel Pumps' },
{ code: '33 56 00', title: 'Fuel-Storage Tanks' },
{ code: '33 56 13', title: 'Aboveground Fuel-Storage Tanks' },
{ code: '33 56 16', title: 'Underground Fuel-Storage Tanks' },
{ code: '33 56 43', title: 'Aviation Fuel-Storage Tanks' },
{ code: '33 56 43.13', title: 'Aboveground Aviation Fuel-Storage Tanks' },
{ code: '33 56 43.16', title: 'Underground Aviation Fuel-Storage Tanks' },
{ code: '33 56 53', title: 'Compressed Gases Storage Tanks' },
{ code: '33 60 00', title: 'HYDRONIC AND STEAM ENERGY UTILITIES' },
{ code: '33 61 00', title: 'Hydronic Energy Distribution' },
{ code: '33 61 13', title: 'Underground Hydronic Energy Distribution' },
{ code: '33 61 23', title: 'Aboveground Hydronic Energy Distribution' },
{ code: '33 61 33', title: 'Hydronic Energy Distribution Metering' },
{ code: '33 63 00', title: 'Steam Energy Distribution' },
{ code: '33 63 13', title: 'Underground Steam and Condensate Distribution Piping' },
{ code: '33 63 23', title: 'Aboveground Steam and Condensate Distribution Piping' },
{ code: '33 63 33', title: 'Steam Energy Distribution Metering' },
{ code: '33 70 00', title: 'ELECTRICAL UTILITIES' },
{ code: '33 71 00', title: 'Electrical Utility Transmission and Distribution' },
{ code: '33 71 13', title: 'Electrical Utility Towers' },
{ code: '33 71 13.13', title: 'Precast Concrete Electrical Utility Towers' },
{ code: '33 71 13.23', title: 'Steel Electrical Utility Towers' },
{ code: '33 71 13.33', title: 'Wood Electrical Utility Towers' },
{ code: '33 71 16', title: 'Electrical Utility Poles' },
{ code: '33 71 16.13', title: 'Precast Concrete Electrical Utility Poles' },
{ code: '33 71 16.23', title: 'Steel Electrical Utility Poles' },
{ code: '33 71 16.33', title: 'Wood Electrical Utility Poles' },
{ code: '33 71 19', title: 'Electrical Underground Ducts and Manholes' },
{ code: '33 71 19.13', title: 'Electrical Manholes and Handholes' },
{ code: '33 71 23', title: 'Insulators and Fittings' },
{ code: '33 71 23.13', title: 'Suspension Insulators' },
{ code: '33 71 23.16', title: 'Post Insulators' },
{ code: '33 71 23.23', title: 'Potheads' },
{ code: '33 71 26', title: 'Transmission and Distribution Equipment' },
{ code: '33 71 26.13', title: 'Capacitor Banks' },
{ code: '33 71 26.16', title: 'Coupling Capacitors' },
{ code: '33 71 26.23', title: 'Current Transformers' },
{ code: '33 71 26.26', title: 'Potential Transformers' },
{ code: '33 71 36', title: 'Extra-High-Voltage Wiring' },
{ code: '33 71 36.13', title: 'Overhead Extra-High-Voltage Wiring' },
{ code: '33 71 39', title: 'High-Voltage Wiring' },
{ code: '33 71 39.13', title: 'Overhead High-Voltage Wiring' },
{ code: '33 71 39.23', title: 'Underground High-Voltage Wiring' },
{ code: '33 71 39.33', title: 'Underwater High-Voltage Wiring' },
{ code: '33 71 49', title: 'Medium-Voltage Wiring' },
{ code: '33 71 49.13', title: 'Overhead Medium-Voltage Wiring' },
{ code: '33 71 49.23', title: 'Underground Medium-Voltage Wiring' },
{ code: '33 71 49.33', title: 'Underwater Medium-Voltage Wiring' },
{ code: '33 71 53', title: 'Direct-Current Transmission' },
{ code: '33 71 73', title: 'Electrical Utility Services' },
{ code: '33 71 73.33', title: 'Electric Meters' },
{ code: '33 71 83', title: 'Transmission and Distribution Specialties' },
{ code: '33 72 00', title: 'Utility Substations' },
{ code: '33 72 13', title: 'Deadend Structures' },
{ code: '33 72 23', title: 'Structural Bus Supports' },
{ code: '33 72 23.13', title: 'Bus Support Insulators' },
{ code: '33 72 26', title: 'Substation Bus Assemblies' },
{ code: '33 72 26.13', title: 'Aluminum Substation Bus Assemblies' },
{ code: '33 72 26.16', title: 'Copper Substation Bus Assemblies' },
{ code: '33 72 33', title: 'Control House Equipment' },
{ code: '33 72 33.13', title: 'Relays' },
{ code: '33 72 33.16', title: 'Substation Control Panels' },
{ code: '33 72 33.23', title: 'Power-Line Carriers' },
{ code: '33 72 33.26', title: 'Substation Metering' },
{ code: '33 72 33.33', title: 'Raceway and Boxes for Utility Substations' },
{ code: '33 72 33.36', title: 'Cable Trays for Utility Substations' },
{ code: '33 72 33.43', title: 'Substation Backup Batteries' },
{ code: '33 72 33.46', title: 'Substation Converter Stations' },
{ code: '33 72 43', title: 'Substation Control Wiring' },
{ code: '33 73 00', title: 'Utility Transformers' },
{ code: '33 73 13', title: 'Liquid-Filled Utility Transformers' },
{ code: '33 73 23', title: 'Dry-Type Utility Transformers' },
{ code: '33 75 00', title: 'High-Voltage Switchgear and Protection Devices' },
{ code: '33 75 13', title: 'Air High-Voltage Circuit Breaker' },
{ code: '33 75 16', title: 'Oil High-Voltage Circuit Breaker' },
{ code: '33 75 19', title: 'Gas High-Voltage Circuit Breaker' },
{ code: '33 75 23', title: 'Vacuum High-Voltage Circuit Breaker' },
{ code: '33 75 36', title: 'High-Voltage Utility Fuses' },
{ code: '33 75 39', title: 'High-Voltage Surge Arresters' },
{ code: '33 75 43', title: 'Shunt Reactors' },
{ code: '33 77 00', title: 'Medium-Voltage Utility Switchgear and Protection Devices' },
{ code: '33 77 13', title: 'Air Medium-Voltage Circuit Breaker' },
{ code: '33 77 16', title: 'Oil Medium -Voltage Circuit Breaker' },
{ code: '33 77 19', title: 'Gas Medium -Voltage Circuit Breaker' },
{ code: '33 77 23', title: 'Vacuum Medium -Voltage Circuit Breaker' },
{ code: '33 77 26', title: 'Medium-Voltage Utility Fusible Interrupter Switchgear' },
{ code: '33 77 33', title: 'Medium-Voltage Utility Cutouts' },
{ code: '33 77 36', title: 'Medium-Voltage Utility Fuses' },
{ code: '33 77 39', title: 'Medium-Voltage Utility Surge Arresters' },
{ code: '33 77 53', title: 'Medium-Voltage Utility Reclosers' },
{ code: '33 79 00', title: 'Site Grounding' },
{ code: '33 79 13', title: 'Site Improvements Grounding' },
{ code: '33 79 13.13', title: 'Electric Fence Grounding' },
{ code: '33 79 16', title: 'Tower Grounding' },
{ code: '33 79 16.13', title: 'Communications Tower Grounding' },
{ code: '33 79 16.16', title: 'Antenna Tower Grounding' },
{ code: '33 79 19', title: 'Utilities Grounding' },
{ code: '33 79 19.13', title: 'Electrical Utilities Grounding' },
{ code: '33 79 19.16', title: 'Communications Utilities Grounding' },
{ code: '33 79 23', title: 'Utility Substation Grounding' },
{ code: '33 79 83', title: 'Site Grounding Conductors' },
{ code: '33 79 83.13', title: 'Grounding Wire, Bar, and Rod' },
{ code: '33 79 83.16', title: 'Chemical Rod' },
{ code: '33 79 83.23', title: 'Conductive Concrete' },
{ code: '33 79 83.33', title: 'Earth Grounding Enhancement' },
{ code: '33 79 83.43', title: 'Deep Earth Grounding' },
{ code: '33 79 93', title: 'Site Lightning Protection' },
{ code: '33 79 93.13', title: 'Lightning Strike Counters' },
{ code: '33 79 93.16', title: 'Lightning Strike Warning Devices' },
{ code: '33 80 00', title: 'COMMUNICATIONS UTILITIES' },
{ code: '33 81 00', title: 'Communications Structures' },
{ code: '33 81 13', title: 'Communications Transmission Towers' },
{ code: '33 81 16', title: 'Antenna Towers' },
{ code: '33 81 19', title: 'Communications Utility Poles' },
{ code: '33 81 23', title: 'Aerial Cable Installation Hardware' },
{ code: '33 81 26', title: 'Communications Underground Ducts, Manholes, and Handholes' },
{ code: '33 81 29', title: 'Communications Vaults, Pedestals and Enclosures' },
{ code: '33 81 33', title: 'Communications Blowers, Fans, and Ventilation' },
{ code: '33 82 00', title: 'Communications Distribution' },
{ code: '33 82 13', title: 'Copper Communications Distribution Cabling' },
{ code: '33 82 13.13', title: 'Copper Splicing and Terminations' },
{ code: '33 82 23', title: 'Optical Fiber Communications Distribution Cabling' },
{ code: '33 82 23.13', title: 'Optical Fiber Splicing and Terminations' },
{ code: '33 82 33', title: 'Coaxial Communications Distribution Cabling' },
{ code: '33 82 33.13', title: 'Coaxial Splicing and Terminations' },
{ code: '33 82 43', title: 'Grounding and Bonding for Communications Distribution' },
{ code: '33 82 46', title: 'Cable Pressurization Equipment' },
{ code: '33 82 53', title: 'Cleaning, Lubrication and Restoration Chemicals' },
{ code: '33 83 00', title: 'Wireless Communications Distribution' },
{ code: '33 83 13', title: 'Laser Transmitters and Receivers' },
{ code: '33 83 16', title: 'Microwave Transmitters and Receivers' },
{ code: '33 83 19', title: 'Infrared Transmitters and Receivers' },
{ code: '33 83 23', title: 'UHF/VHF Transmitters and Antennas' },
{ code: '33 90 00', title: 'Unassigned' }]
})
}
division_32() {
return ({
division: 32,
divisionTitle: 'Exterior Improvements',
codes: [{ code: '32 00 00', title: 'EXTERIOR IMPROVEMENTS' },
{ code: '32 01 00', title: 'Operation and Maintenance of Exterior Improvements' },
{ code: '32 01 11', title: 'Paving Cleaning' },
{ code: '32 01 11.51', title: 'Rubber and Paint Removal from Paving' },
{ code: '32 01 11.52', title: 'Rubber Removal from Paving' },
{ code: '32 01 11.53', title: 'Paint Removal from Paving' },
{ code: '32 01 13', title: 'Flexible Paving Surface Treatment' },
{ code: '32 01 13.61', title: 'Slurry Seal (Latex Modified)' },
{ code: '32 01 13.62', title: 'Asphalt Surface Treatment' },
{ code: '32 01 16', title: 'Flexible Paving Rehabilitation' },
{ code: '32 01 16.71', title: 'Cold Milling Asphalt Paving' },
{ code: '32 01 16.72', title: 'Asphalt Paving Reuse' },
{ code: '32 01 16.73', title: 'In Place Cold Reused Asphalt Paving' },
{ code: '32 01 16.74', title: 'In Place Hot Reused Asphalt Paving' },
{ code: '32 01 16.75', title: 'Heater Scarifying of Asphalt Paving' },
{ code: '32 01 17', title: 'Flexible Paving Repair' },
{ code: '32 01 17.61', title: 'Sealing Cracks in Asphalt Paving' },
{ code: '32 01 17.62', title: 'Stress-Absorbing Membrane Interlayer' },
{ code: '32 01 19', title: 'Rigid Paving Surface Treatment' },
{ code: '32 01 19.61', title: 'Sealing of Joints in Rigid Paving' },
{ code: '32 01 19.62', title: 'Patching of Rigid Paving' },
{ code: '32 01 23', title: 'Base Course Reconditioning' },
{ code: '32 01 26', title: 'Rigid Paving Rehabilitation' },
{ code: '32 01 26.71', title: 'Grooving of Concrete Paving' },
{ code: '32 01 26.72', title: 'Grinding of Concrete Paving' },
{ code: '32 01 26.73', title: 'Milling of Concrete Paving' },
{ code: '32 01 26.74', title: 'Concrete Overlays' },
{ code: '32 01 26.75', title: 'Concrete Paving Reuse' },
{ code: '32 01 29', title: 'Rigid Paving Repair' },
{ code: '32 01 29.61', title: 'Partial Depth Patching of Rigid Paving' },
{ code: '32 01 29.62', title: 'Concrete Paving Raising' },
{ code: '32 01 29.63', title: 'Subsealing and Stabilization' },
{ code: '32 01 30', title: 'Operation and Maintenance of Site Improvements' },
{ code: '32 01 80', title: 'Operation and Maintenance of Irrigation' },
{ code: '32 01 90', title: 'Operation and Maintenance of Planting' },
{ code: '32 01 90.13', title: 'Fertilizing' },
{ code: '32 01 90.16', title: 'Amending Soils' },
{ code: '32 01 90.19', title: 'Mowing' },
{ code: '32 01 90.23', title: 'Pruning' },
{ code: '32 01 90.26', title: 'Watering' },
{ code: '32 01 90.29', title: 'Topsoil Preservation' },
{ code: '32 01 90.33', title: 'Tree and Shrub Preservation' },
{ code: '32 05 00', title: 'Common Work Results for Exterior Improvements' },
{ code: '32 05 13', title: 'Soils for Exterior Improvements' },
{ code: '32 05 16', title: 'Aggregates for Exterior Improvements' },
{ code: '32 05 19', title: 'Geosynthetics for Exterior Improvements' },
{ code: '32 05 19.13', title: 'Geotextiles for Exterior Improvements' },
{ code: '32 05 19.16', title: 'Geomembranes for Exterior Improvements' },
{ code: '32 05 19.19', title: 'Geogrids for Exterior Improvements' },
{ code: '32 05 23', title: 'Cement and Concrete for Exterior Improvements' },
{ code: '32 05 33', title: 'Common Work Results for Planting' },
{ code: '32 06 00', title: 'Schedules for Exterior Improvements' },
{ code: '32 06 10', title: 'Schedules for Bases, Ballasts, and Paving' },
{ code: '32 06 10.13', title: 'Pedestrian Walkway Schedule' },
{ code: '32 06 30', title: 'Schedules for Site Improvements' },
{ code: '32 06 30.13', title: 'Retaining Wall Schedule' },
{ code: '32 06 80', title: 'Schedules for Irrigation' },
{ code: '32 06 80.13', title: 'Irrigation Piping Schedule' },
{ code: '32 06 90', title: 'Schedules for Planting' },
{ code: '32 06 90.13', title: 'Planting Schedule' },
{ code: '32 08 00', title: 'Commissioning of Exterior Improvements' },
{ code: '32 10 00', title: 'BASES, BALLASTS, AND PAVING' },
{ code: '32 11 00', title: 'Base Courses' },
{ code: '32 11 13', title: 'Subgrade Modifications' },
{ code: '32 11 13.13', title: 'Lime-Treated Subgrades' },
{ code: '32 11 13.16', title: 'Bituminous-Treated Subgrades' },
{ code: '32 11 16', title: 'Subbase Courses' },
{ code: '32 11 16.13', title: 'Sand-Clay Subbase Courses' },
{ code: '32 11 16.16', title: 'Aggregate Subbase Courses' },
{ code: '32 11 23', title: 'Aggregate Base Courses' },
{ code: '32 11 23.13', title: 'Sand-Clay Base Courses' },
{ code: '32 11 23.23', title: 'Base Course Drainage Layers' },
{ code: '32 11 26', title: 'Asphaltic Base Courses' },
{ code: '32 11 26.13', title: 'Plant Mix Asphaltic Base Courses' },
{ code: '32 11 26.16', title: 'Road Mix Asphaltic Base Courses' },
{ code: '32 11 26.19', title: 'Bituminous-Stabilized Base Courses' },
{ code: '32 11 29', title: 'Lime Treated Base Courses' },
{ code: '32 11 29.13', title: 'Lime-Fly Ash-Treated Base Courses' },
{ code: '32 11 33', title: 'Cement-Treated Base Courses' },
{ code: '32 11 33.13', title: 'Portland Cement-Stabilized Base Courses' },
{ code: '32 11 36', title: 'Concrete Base Courses' },
{ code: '32 11 36.13', title: 'Lean Concrete Base Courses' },
{ code: '32 11 36.16', title: 'Plain Cement Concrete Base Courses' },
{ code: '32 11 36.19', title: 'Hydraulic Cement Concrete Base Courses' },
{ code: '32 12 00', title: 'Flexible Paving' },
{ code: '32 12 13', title: 'Preparatory Coats' },
{ code: '32 12 13.13', title: 'Tack Coats' },
{ code: '32 12 13.16', title: 'Asphaltic Tack Coats' },
{ code: '32 12 13.19', title: 'Prime Coats' },
{ code: '32 12 13.23', title: 'Asphaltic Prime Coats' },
{ code: '32 12 16', title: 'Asphalt Paving' },
{ code: '32 12 16.13', title: 'Plant-Mix Asphalt Paving' },
{ code: '32 12 16.16', title: 'Road-Mix Asphalt Paving' },
{ code: '32 12 16.19', title: 'Cold-Mix Asphalt Paving' },
{ code: '32 12 16.23', title: 'Reinforced Asphalt Paving' },
{ code: '32 12 16.26', title: 'Fiber-Modified Asphalt Paving' },
{ code: '32 12 16.29', title: 'Polymer-Modified Asphalt Paving' },
{ code: '32 12 16.33', title: 'Granulated Rubber-Modified Asphalt Paving' },
{ code: '32 12 16.36', title: 'Athletic Asphalt Paving' },
{ code: '32 12 19', title: 'Asphalt Paving Wearing Courses' },
{ code: '32 12 19.13', title: 'Road-Mix Asphalt Paving Wearing Courses' },
{ code: '32 12 19.16', title: 'Resin-Modified Asphalt Paving Wearing Courses' },
{ code: '32 12 19.19', title: 'Porous Friction Asphalt Paving Wearing Courses' },
{ code: '32 12 33', title: 'Flexible Paving Surface Treatments' },
{ code: '32 12 36', title: 'Seal Coats' },
{ code: '32 12 36.13', title: 'Asphaltic Seal and Fog Coats' },
{ code: '32 12 36.16', title: 'Coal Tar Seal Coats' },
{ code: '32 12 36.19', title: 'Coal Tar Seal Coats with Unvulcanized Rubber' },
{ code: '32 12 36.23', title: 'Fuel-Resistant Sealers' },
{ code: '32 12 43', title: 'Porous Flexible Paving' },
{ code: '32 12 73', title: 'Asphalt Paving Joint Sealants' },
{ code: '32 13 00', title: 'Rigid Paving' },
{ code: '32 13 13', title: 'Concrete Paving' },
{ code: '32 13 13.13', title: 'Exposed Aggregate Concrete Paving' },
{ code: '32 13 13.16', title: 'Power-Compacted Concrete Paving' },
{ code: '32 13 13.19', title: 'Prestressed Concrete Paving' },
{ code: '32 13 13.23', title: 'Concrete Paving Surface Treatment' },
{ code: '32 13 16', title: 'Decorative Concrete Paving' },
{ code: '32 13 16.13', title: 'Patterned Concrete Paving' },
{ code: '32 13 16.16', title: 'Roller-Compacted Concrete Paving' },
{ code: '32 13 16.19', title: 'Imprinted Concrete Paving' },
{ code: '32 13 16.23', title: 'Stamped Concrete Paving' },
{ code: '32 13 73', title: 'Concrete Paving Joint Sealants' },
{ code: '32 13 73.13', title: 'Fuel-Resistant Concrete Paving Joint Sealants' },
{ code: '32 13 73.16', title: 'Field-Molded Concrete Paving Joint Sealants' },
{ code: '32 13 73.19', title: 'Compression Concrete Paving Joint Sealants' },
{ code: '32 14 00', title: 'Unit Paving' },
{ code: '32 14 13', title: 'Precast Concrete Unit Paving' },
{ code: '32 14 13.13', title: 'Interlocking Precast Concrete Unit Paving' },
{ code: '32 14 13.16', title: 'Precast Concrete Unit Paving Slabs' },
{ code: '32 14 13.19', title: 'Porous Precast Concrete Unit Paving' },
{ code: '32 14 16', title: 'Brick Unit Paving' },
{ code: '32 14 23', title: 'Asphalt Unit Paving' },
{ code: '32 14 26', title: 'Wood Paving' },
{ code: '32 14 29', title: 'Recycled-Rubber Paving' },
{ code: '32 14 40', title: 'Stone Paving' },
{ code: '32 14 43', title: 'Porous Unit Paving' },
{ code: '32 15 00', title: 'Aggregate Surfacing' },
{ code: '32 15 13', title: 'Cinder Surfacing' },
{ code: '32 15 40', title: 'Crushed Stone Surfacing' },
{ code: '32 16 00', title: 'Curbs and Gutters' },
{ code: '32 16 13', title: 'Concrete Curbs and Gutters' },
{ code: '32 16 13.13', title: 'Cast-In-Place Concrete Curbs and Gutters' },
{ code: '32 16 13.16', title: 'Cast-In-Place Concrete Curbs' },
{ code: '32 16 13.19', title: 'Cast-In-Place Concrete Gutters' },
{ code: '32 16 13.23', title: 'Precast Concrete Curbs and Gutters' },
{ code: '32 16 13.26', title: 'Precast Concrete Curbs' },
{ code: '32 16 13.29', title: 'Precast Concrete Gutters' },
{ code: '32 16 19', title: 'Asphalt Curbs' },
{ code: '32 16 40', title: 'Stone Curbs' },
{ code: '32 16 40.13', title: 'Manufactured Stone Curbs' },
{ code: '32 17 00', title: 'Paving Specialties' },
{ code: '32 17 13', title: 'Parking Bumpers' },
{ code: '32 17 13.13', title: 'Metal Parking Bumpers' },
{ code: '32 17 13.16', title: 'Plastic Parking Bumpers' },
{ code: '32 17 13.19', title: 'Precast Concrete Parking Bumpers' },
{ code: '32 17 13.23', title: 'Rubber Parking Bumpers' },
{ code: '32 17 13.26', title: 'Wood Parking Bumpers' },
{ code: '32 17 23', title: 'Pavement Markings' },
{ code: '32 17 23.13', title: 'Painted Pavement Markings' },
{ code: '32 17 23.23', title: 'Raised Pavement Markings' },
{ code: '32 17 23.33', title: 'Plastic Pavement Markings' },
{ code: '32 17 26', title: 'Tactile Warning Surfacing' },
{ code: '32 18 00', title: 'Athletic and Recreational Surfacing' },
{ code: '32 18 13', title: 'Synthetic Grass Surfacing' },
{ code: '32 18 16', title: 'Synthetic Resilient Surfacing' },
{ code: '32 18 16.13', title: 'Playground Protective Surfacing' },
{ code: '32 18 23', title: 'Athletic Surfacing' },
{ code: '32 18 23.13', title: 'Baseball Field Surfacing' },
{ code: '32 18 23.16', title: 'Natural Baseball Field Surfacing' },
{ code: '32 18 23.19', title: 'Synthetic Baseball Field Surfacing' },
{ code: '32 18 23.23', title: 'Field Sport Surfacing' },
{ code: '32 18 23.26', title: 'Natural Field Sport Surfacing' },
{ code: '32 18 23.29', title: 'Synthetic Field Sport Surfacing' },
{ code: '32 18 23.33', title: 'Running Track Surfacing' },
{ code: '32 18 23.36', title: 'Natural Running Track Surfacing' },
{ code: '32 18 23.39', title: 'Synthetic Running Track Surfacing' },
{ code: '32 18 23.43', title: 'Recreational Court Surfacing' },
{ code: '32 18 23.53', title: 'Tennis Court Surfacing' },
{ code: '32 18 23.56', title: 'Natural Tennis Court Surfacing' },
{ code: '32 18 23.59', title: 'Synthetic Tennis Court Surfacing' },
{ code: '32 20 00', title: 'Unassigned' },
{ code: '32 30 00', title: 'SITE IMPROVEMENTS' },
{ code: '32 31 00', title: 'Fences and Gates' },
{ code: '32 31 13', title: 'Chain Link Fences and Gates' },
{ code: '32 31 13.23', title: 'Recreational Court Fences and Gates' },
{ code: '32 31 13.26', title: 'Tennis Court Fences and Gates' },
{ code: '32 31 13.29', title: 'Tennis Court Wind Breaker' },
{ code: '32 31 13.33', title: 'Chain Link Backstops' },
{ code: '32 31 13.53', title: 'High-Security Chain Link Fences and Gates' },
{ code: '32 31 16', title: 'Welded Wire Fences and Gates' },
{ code: '32 31 19', title: 'Decorative Metal Fences and Gates' },
{ code: '32 31 23', title: 'Plastic Fences and Gates' },
{ code: '32 31 26', title: 'Wire Fences and Gates' },
{ code: '32 31 29', title: 'Wood Fences and Gates' },
{ code: '32 32 00', title: 'Retaining Walls' },
{ code: '32 32 13', title: 'Cast-in-Place Concrete Retaining Walls' },
{ code: '32 32 16', title: 'Precast Concrete Retaining Walls' },
{ code: '32 32 19', title: 'Unit Masonry Retaining Walls' },
{ code: '32 32 23', title: 'Segmental Retaining Walls' },
{ code: '32 32 23.13', title: 'Segmental Concrete Unit Masonry Retaining Walls' },
{ code: '32 32 23.16', title: 'Manufactured Modular Walls' },
{ code: '32 32 26', title: 'Metal Crib Retaining Walls' },
{ code: '32 32 29', title: 'Timber Retaining Walls' },
{ code: '32 32 34', title: 'Reinforced Soil Retaining Walls' },
{ code: '32 32 36', title: 'Gabion Retaining Walls' },
{ code: '32 32 43', title: 'Soldier-Beam Retaining Walls' },
{ code: '32 34 00', title: 'Fabricated Bridges' },
{ code: '32 35 00', title: 'Screening Devices' },
{ code: '32 35 13', title: 'Screens and Louvers' },
{ code: '32 35 16', title: 'Sound Barriers' },
{ code: '32 40 00', title: 'Unassigned' },
{ code: '32 50 00', title: 'Unassigned' },
{ code: '32 60 00', title: 'Unassigned' },
{ code: '32 70 00', title: 'WETLANDS' },
{ code: '32 71 00', title: 'Constructed Wetlands' },
{ code: '32 72 00', title: 'Wetlands Restoration' },
{ code: '32 80 00', title: 'IRRIGATION' },
{ code: '32 82 00', title: 'Irrigation Pumps' },
{ code: '32 84 00', title: 'Planting Irrigation' },
{ code: '32 84 13', title: 'Drip Irrigation' },
{ code: '32 84 23', title: 'Underground Sprinklers' },
{ code: '32 86 00', title: 'Agricultural Irrigation' },
{ code: '32 90 00', title: 'PLANTING' },
{ code: '32 91 00', title: 'Planting Preparation' },
{ code: '32 91 13', title: 'Soil Preparation' },
{ code: '32 91 13.13', title: 'Hydro-Punching' },
{ code: '32 91 13.16', title: 'Mulching' },
{ code: '32 91 13.19', title: 'Planting Soil Mixing' },
{ code: '32 91 13.23', title: 'Structural Soil Mixing' },
{ code: '32 91 13.26', title: 'Planting Beds' },
{ code: '32 91 16', title: 'Planting Soil Stabilization' },
{ code: '32 91 16.13', title: 'Blanket Planting Soil Stabilization' },
{ code: '32 91 16.16', title: 'Mat Planting Soil Stabilization' },
{ code: '32 91 16.19', title: 'Netting Planting Soil Stabilization' },
{ code: '32 91 19', title: 'Landscape Grading' },
{ code: '32 91 19.13', title: 'Topsoil Placement and Grading' },
{ code: '32 92 00', title: 'Turf and Grasses' },
{ code: '32 92 13', title: 'Hydro-Mulching' },
{ code: '32 92 16', title: 'Plugging' },
{ code: '32 92 19', title: 'Seeding' },
{ code: '32 92 19.13', title: 'Mechanical Seeding' },
{ code: '32 92 19.16', title: 'Hydraulic Seeding' },
{ code: '32 92 23', title: 'Sodding' },
{ code: '32 92 26', title: 'Sprigging' },
{ code: '32 92 26.13', title: 'Stolonizing' },
{ code: '32 93 00', title: 'Plants' },
{ code: '32 93 13', title: 'Ground Covers' },
{ code: '32 93 23', title: 'Plants and Bulbs' },
{ code: '32 93 33', title: 'Shrubs' },
{ code: '32 93 43', title: 'Trees' },
{ code: '32 94 00', title: 'Planting Accessories' },
{ code: '32 94 13', title: 'Landscape Edging' },
{ code: '32 94 16', title: 'Landscape Timbers' },
{ code: '32 94 33', title: 'Planters' },
{ code: '32 94 43', title: 'Tree Grates' },
{ code: '32 94 46', title: 'Tree Grids' },
{ code: '32 96 00', title: 'Transplanting' },
{ code: '32 96 13', title: 'Ground Cover Transplanting' },
{ code: '32 96 23', title: 'Plant and Bulb Transplanting' },
{ code: '32 96 33', title: 'Shrub Transplanting' },
{ code: '32 96 43', title: 'Tree Transplanting' }]
})
}
division_31() {
return (
{
division: 31,
divisionTitle: 'Earthwork',
codes: [{ code: '31 00 00', title: 'EARTHWORK' },
{ code: '31 01 00', title: 'Maintenance of Earthwork' },
{ code: '31 01 10', title: 'Maintenance of Clearing' },
{ code: '31 01 20', title: 'Maintenance of Earth Moving' },
{ code: '31 01 40', title: 'Maintenance of Shoring and Underpinning' },
{ code: '31 01 50', title: 'Maintenance of Excavation Support and Protection' },
{ code: '31 01 60', title: 'Maintenance of Special Foundations and Load Bearing Elements' },
{ code: '31 01 62', title: 'Maintenance of Driven Piles' },
{ code: '31 01 62.61', title: 'Driven Pile Repairs' },
{ code: '31 01 63', title: 'Maintenance of Bored and Augered Piles' },
{ code: '31 01 63.61', title: 'Bored and Augered Pile Repairs' },
{ code: '31 01 70', title: 'Maintenance ofTunneling and Mining' },
{ code: '31 01 70.61', title: 'Tunnel Leak Repairs' },
{ code: '31 05 00', title: 'Common Work Results for Earthwork' },
{ code: '31 05 13', title: 'Soils for Earthwork' },
{ code: '31 05 16', title: 'Aggregates for Earthwork' },
{ code: '31 05 19', title: 'Geosynthetics for Earthwork' },
{ code: '31 05 19.13', title: 'Geotextiles for Earthwork' },
{ code: '31 05 19.16', title: 'Geomembranes for Earthwork' },
{ code: '31 05 19.19', title: 'Geogrids for Earthwork' },
{ code: '31 05 23', title: 'Cement and Concrete for Earthwork' },
{ code: '31 06 00', title: 'Schedules for Earthwork' },
{ code: '31 06 10', title: 'Schedules for Clearing' },
{ code: '31 06 20', title: 'Schedules for Earth Moving' },
{ code: '31 06 20.13', title: 'Trench Dimension Schedule' },
{ code: '31 06 20.16', title: 'Backfill Material Schedule' },
{ code: '31 06 40', title: 'Schedules for Shoring and Underpinning' },
{ code: '31 06 50', title: 'Schedules for Excavation Support and Protection' },
{ code: '31 06 60', title: 'Schedules for Special Foundations and Load Bearing Elements' },
{ code: '31 06 60.13', title: 'Driven Pile Schedule' },
{ code: '31 06 60.16', title: 'Caisson Schedule' },
{ code: '31 06 70', title: 'Schedules for Tunneling and Mining' },
{ code: '31 08 00', title: 'Commissioning of Earthwork' },
{ code: '31 09 00', title: 'Geotechnical Instrumentation and Monitoring of Earthwork' },
{ code: '31 09 13', title: 'Geotechnical Instrumentation and Monitoring' },
{ code: '31 09 13.13', title: 'Groundwater Monitoring During Construction' },
{ code: '31 09 16', title: 'Special Foundation and Load Bearing Elements Instrumentation and Monitoring' },
{ code: '31 09 16.13', title: 'Foundation Performance Instrumentation' },
{ code: '31 09 16.23', title: 'Driven Pile Load Tests' },
{ code: '31 09 16.26', title: 'Bored and Augered Pile Load Tests' },
{ code: '31 10 00', title: 'SITE CLEARING' },
{ code: '31 11 00', title: 'Clearing and Grubbing' },
{ code: '31 12 00', title: 'Selective Clearing' },
{ code: '31 13 00', title: 'Selective Tree and Shrub Removal and Trimming' },
{ code: '31 13 13', title: 'Selective Tree and Shrub Removal' },
{ code: '31 13 16', title: 'Selective Tree and Shrub Trimming' },
{ code: '31 14 00', title: 'Earth Stripping and Stockpiling' },
{ code: '31 14 13', title: 'Soil Stripping and Stockpiling' },
{ code: '31 14 13.13', title: 'Soil Stripping' },
{ code: '31 14 13.16', title: 'Soil Stockpiling' },
{ code: '31 14 13.23', title: 'Topsoil Stripping and Stockpiling' },
{ code: '31 14 16', title: 'Sod Stripping and Stockpiling' },
{ code: '31 14 16.13', title: 'Sod Stripping' },
{ code: '31 14 16.16', title: 'Sod Stockpiling' },
{ code: '31 20 00', title: 'EARTH MOVING' },
{ code: '31 21 00', title: 'Off-Gassing Mitigation' },
{ code: '31 21 13', title: 'Radon Mitigation' },
{ code: '31 21 13.13', title: 'Radon Venting' },
{ code: '31 21 16', title: 'Methane Mitigation' },
{ code: '31 21 16.13', title: 'Methane Venting' },
{ code: '31 22 00', title: 'Grading' },
{ code: '31 22 13', title: 'Rough Grading' },
{ code: '31 22 16', title: 'Fine Grading' },
{ code: '31 22 16.13', title: 'Roadway Subgrade Reshaping' },
{ code: '31 22 19', title: 'Finish Grading' },
{ code: '31 22 19.13', title: 'Spreading and Grading Topsoil' },
{ code: '31 23 00', title: 'Excavation and Fill' },
{ code: '31 23 13', title: 'Subgrade Preparation' },
{ code: '31 23 16', title: 'Excavation' },
{ code: '31 23 16.13', title: 'Trenching' },
{ code: '31 23 16.16', title: 'Structural Excavation for Minor Structures' },
{ code: '31 23 16.26', title: 'Rock Removal' },
{ code: '31 23 19', title: 'Dewatering' },
{ code: '31 23 23', title: 'Fill' },
{ code: '31 23 23.13', title: 'Backfill' },
{ code: '31 23 23.23', title: 'Compaction' },
{ code: '31 23 23.33', title: 'Flowable Fill' },
{ code: '31 23 23.43', title: 'Geofoam' },
{ code: '31 23 33', title: 'Trenching and Backfilling' },
{ code: '31 24 00', title: 'Embankments' },
{ code: '31 24 13', title: 'Roadway Embankments' },
{ code: '31 24 16', title: 'Railway Embankments' },
{ code: '31 25 00', title: 'Erosion and Sedimentation Controls' },
{ code: '31 25 13', title: 'Erosion Controls' },
{ code: '31 25 23', title: 'Rock Barriers' },
{ code: '31 25 53', title: 'Sedimentation Controls' },
{ code: '31 25 63', title: 'Rock Basins' },
{ code: '31 30 00', title: 'EARTHWORK METHODS' },
{ code: '31 31 00', title: 'Soil Treatment' },
{ code: '31 31 13', title: 'Rodent Control' },
{ code: '31 31 13.16', title: 'Rodent Control Bait Systems' },
{ code: '31 31 13.19', title: 'Rodent Control Traps' },
{ code: '31 31 13.23', title: 'Rodent Control Electronic Syste ms' },
{ code: '31 31 13.26', title: 'Rodent Control Repellants' },
{ code: '31 31 16', title: 'Termite Control' },
{ code: '31 31 16.13', title: 'Chemical Termite Control' },
{ code: '31 31 16.16', title: 'Termite Control Bait Systems' },
{ code: '31 31 16.19', title: 'Termite Control Barriers' },
{ code: '31 31 19', title: 'Vegetation Control' },
{ code: '31 31 19.13', title: 'Chemical Vegetation Control' },
{ code: '31 32 00', title: 'Soil Stabilization' },
{ code: '31 32 13', title: 'Soil Mixing Stabilization' },
{ code: '31 32 13.13', title: 'Asphalt Soil Stabilization' },
{ code: '31 32 13.16', title: 'Cement Soil Stabilization' },
{ code: '31 32 13.19', title: 'Lime Soil Stabilization' },
{ code: '31 32 13.23', title: 'Fly-Ash Soil Stabilization' },
{ code: '31 32 13.26', title: 'Lime-Fly-Ash Soil Stabilization' },
{ code: '31 32 16', title: 'Chemical Treatment Soil Stabilization' },
{ code: '31 32 16.13', title: 'Polymer Emulsion Soil Stabilization' },
{ code: '31 32 19', title: 'Geosynthetic Soil Stabilization and Layer Separation' },
{ code: '31 32 19.13', title: 'Geogrid Soil Stabilization' },
{ code: '31 32 19.16', title: 'Geotextile Soil Stabilization' },
{ code: '31 32 19.19', title: 'Geogrid Layer Separation' },
{ code: '31 32 19.23', title: 'Geotextile Layer Separation' },
{ code: '31 32 23', title: 'Pressure Grouting Soil Stabilization' },
{ code: '31 32 23.13', title: 'Cementitious Pressure Grouting Soil Stabilization' },
{ code: '31 32 23.16', title: 'Chemical Pressure Grouting Soil Stabilization' },
{ code: '31 32 33', title: 'Shotcrete Soil Slope Stabilization' },
{ code: '31 32 36', title: 'Soil Nailing' },
{ code: '31 32 36.13', title: 'Driven Soil Nailing' },
{ code: '31 32 36.16', title: 'Grouted Soil Nailing' },
{ code: '31 32 36.19', title: 'Corrosion-Protected Soil Nailing' },
{ code: '31 32 36.23', title: 'Jet-Grouted Soil Nailing' },
{ code: '31 32 36.26', title: 'Launched Soil Nailing' },
{ code: '31 33 00', title: 'Rock Stabilization' },
{ code: '31 33 13', title: 'Rock Bolting and Grouting' },
{ code: '31 33 23', title: 'Rock Slope Netting' },
{ code: '31 33 26', title: 'Rock Slope Wire Mesh' },
{ code: '31 33 33', title: 'Shotcrete Rock Slope Stabilization' },
{ code: '31 33 43', title: 'Vegetated Rock Slope Stabilization' },
{ code: '31 34 00', title: 'Soil Reinforcement' },
{ code: '31 34 19', title: 'Geosynthetic Soil Reinforcement' },
{ code: '31 34 19.13', title: 'Geogrid Soil Reinforcement' },
{ code: '31 34 19.16', title: 'Geotextile Soil Reinforcement' },
{ code: '31 34 23', title: 'Fiber Soil Reinforcement' },
{ code: '31 34 23.13', title: 'Geosynthetic Fiber Soil Reinforcement' },
{ code: '31 35 00', title: 'Slope Protection' },
{ code: '31 35 19', title: 'Geosynthetic Slope Protection' },
{ code: '31 35 19.13', title: 'Geogrid Slope Protection' },
{ code: '31 35 19.16', title: 'Geotextile Slope Protection' },
{ code: '31 35 19.19', title: 'Slope Protection with Mulch Control Netting' },
{ code: '31 35 23', title: 'Slope Protection with Slope Paving' },
{ code: '31 35 23.13', title: 'Cast-In-Place Concrete Slope Paving' },
{ code: '31 35 23.16', title: 'Precast Concrete Slope Paving' },
{ code: '31 35 23.19', title: 'Concrete Unit Masonry Slope Paving' },
{ code: '31 35 26', title: 'Containment Barriers' },
{ code: '31 35 26.13', title: 'Clay Containment Barriers' },
{ code: '31 35 26.16', title: 'Geomembrane Containment Barriers' },
{ code: '31 35 26.23', title: 'Bentonite Slurry Trench' },
{ code: '31 36 00', title: 'Gabions' },
{ code: '31 36 13', title: 'Gabion Boxes' },
{ code: '31 36 19', title: 'Gabion Mattresses' },
{ code: '31 36 19.13', title: 'Vegetated Gabion Mattresses' },
{ code: '31 37 00', title: 'Riprap' },
{ code: '31 37 13', title: 'Machined Riprap' },
{ code: '31 37 16', title: 'Non-Machined Riprap' },
{ code: '31 37 16.13', title: 'Rubble-Stone Riprap' },
{ code: '31 37 16.16', title: 'Concrete Unit Masonry Riprap' },
{ code: '31 37 16.19', title: 'Sacked Sand-Cement Riprap' },
{ code: '31 40 00', title: 'SHORING AND UNDERPINNING' },
{ code: '31 41 00', title: 'Shoring' },
{ code: '31 41 13', title: 'Timber Shoring' },
{ code: '31 41 16', title: 'Sheet Piling' },
{ code: '31 41 16.13', title: 'Steel Sheet Piling' },
{ code: '31 41 16.16', title: 'Plastic Sheet Piling' },
{ code: '31 41 19', title: 'Metal Hydraulic Shoring' },
{ code: '31 41 19.13', title: 'Aluminum Hydraulic Shoring' },
{ code: '31 41 23', title: 'Pneumatic Shoring' },
{ code: '31 41 33', title: 'Trench Shielding' },
{ code: '31 43 00', title: 'Concrete Raising' },
{ code: '31 43 13', title: 'Pressure Grouting' },
{ code: '31 43 13.13', title: 'Concrete Pressure Grouting' },
{ code: '31 43 13.16', title: 'Polyurethane Pressure Grouting' },
{ code: '31 43 16', title: 'Compaction Grouting' },
{ code: '31 43 19', title: 'Mechanical Jacking' },
{ code: '31 45 00', title: 'Vibroflotation and Densification' },
{ code: '31 45 13', title: 'Vibroflotation' },
{ code: '31 45 16', title: 'Densification' },
{ code: '31 46 00', title: 'Needle Beams' },
{ code: '31 46 13', title: 'Cantilever Needle Beams' },
{ code: '31 48 00', title: 'Underpinning' },
{ code: '31 48 13', title: 'Underpinning Piers' },
{ code: '31 48 19', title: 'Bracket Piers' },
{ code: '31 48 23', title: 'Jacked Piers' },
{ code: '31 48 33', title: 'Micropile Underpinning' },
{ code: '31 50 00', title: 'EXCAVATION SUPPORT AND PROTECTION' },
{ code: '31 51 00', title: 'Anchor Tiebacks' },
{ code: '31 51 13', title: 'Excavation Soil Anchors' },
{ code: '31 51 16', title: 'Excavation Rock Anchors' },
{ code: '31 52 00', title: 'Cofferdams' },
{ code: '31 52 13', title: 'Sheet Piling Cofferdams' },
{ code: '31 52 16', title: 'Timber Cofferdams' },
{ code: '31 52 19', title: 'Precast Concrete Cofferdams' },
{ code: '31 53 00', title: 'Cribbing and Walers' },
{ code: '31 53 13', title: 'Timber Cribwork' },
{ code: '31 54 00', title: 'Ground Freezing' },
{ code: '31 56 00', title: 'Slurry Walls' },
{ code: '31 56 13', title: 'Bentonite Slurry Walls' },
{ code: '31 56 13.13', title: 'Soil-Bentonite Slurry Walls' },
{ code: '31 56 13.16', title: 'Cement-Bentonite Slurry Walls' },
{ code: '31 56 13.19', title: 'Slag-Cement-Bentonite Slurry Walls' },
{ code: '31 56 13.23', title: 'Soil-Cement-Bentonite Slurry Walls' },
{ code: '31 56 13.26', title: 'Pozzolan-Bentonite Slurry Walls' },
{ code: '31 56 13.29', title: 'Organically-Modified Bentonite Slurry Walls' },
{ code: '31 56 16', title: 'Attipulgite Slurry Walls' },
{ code: '31 56 16.13', title: 'Soil-Attipulgite Slurry Walls' },
{ code: '31 56 19', title: 'Slurry-Geomembrane Composite Slurry Walls' },
{ code: '31 56 23', title: 'Lean Concrete Slurry Walls' },
{ code: '31 56 26', title: 'Bio-Polymer Trench Drain' },
{ code: '31 60 00', title: 'SPECIAL FOUNDATIONS AND LOAD-BEARING ELEMENTS' },
{ code: '31 62 00', title: 'Driven Piles' },
{ code: '31 62 13', title: 'Concrete Piles' },
{ code: '31 62 13.13', title: 'Cast- in-Place Concrete Piles' },
{ code: '31 62 13.16', title: 'Concrete Displacement Piles' },
{ code: '31 62 13.19', title: 'Precast Concrete Piles' },
{ code: '31 62 13.23', title: 'Prestressed Concrete Piles' },
{ code: '31 62 13.26', title: 'Pressure-Injected Footings' },
{ code: '31 62 16', title: 'Steel Piles' },
{ code: '31 62 16.13', title: 'Sheet Steel Piles' },
{ code: '31 62 16.16', title: 'Steel H Piles' },
{ code: '31 62 16.19', title: 'Unfilled Tubular Steel Piles' },
{ code: '31 62 19', title: 'Timber Piles' },
{ code: '31 62 23', title: 'Composite Piles' },
{ code: '31 62 23.13', title: 'Concrete-Filled Steel Piles' },
{ code: '31 62 23.16', title: 'Wood and Cast-In-Place Concrete Piles' },
{ code: '31 63 00', title: 'Bored Piles' },
{ code: '31 63 13', title: 'Bored and Augered Test Piles' },
{ code: '31 63 16', title: 'Auger Cast Grout Piles' },
{ code: '31 63 19', title: 'Bored and Socketed Piles' },
{ code: '31 63 19.13', title: 'Rock Sockets for Piles' },
{ code: '31 63 23', title: 'Bored Concrete Piles' },
{ code: '31 63 23.13', title: 'Bored and Belled Concrete Piles' },
{ code: '31 63 23.16', title: 'Bored Friction Concrete Piles' },
{ code: '31 63 26', title: 'Drilled Caissons' },
{ code: '31 63 26.13', title: 'Fixed End Caisson Piles' },
{ code: '31 63 26.16', title: 'Concrete Caissons for Marine Construction' },
{ code: '31 63 29', title: 'Drilled Concrete Piers and Shafts' },
{ code: '31 63 29.13', title: 'Uncased Drilled Concrete Piers' },
{ code: '31 63 29.16', title: 'Cased Drilled Concrete Piers' },
{ code: '31 63 33', title: 'Drilled Micropiles' },
{ code: '31 64 00', title: 'Caissons' },
{ code: '31 64 13', title: 'Box Caissons' },
{ code: '31 64 16', title: 'Excavated Caissons' },
{ code: '31 64 19', title: 'Floating Caissons' },
{ code: '31 64 23', title: 'Open Caissons' },
{ code: '31 64 26', title: 'Pneumatic Caissons' },
{ code: '31 64 29', title: 'Sheeted Caissons' },
{ code: '31 66 00', title: 'Special Foundations' },
{ code: '31 66 13', title: 'Special Piles' },
{ code: '31 66 16', title: 'Special Foundation Walls' },
{ code: '31 66 16.13', title: 'Anchored Foundation Walls' },
{ code: '31 66 16.23', title: 'Concrete Cribbing Foundation Walls' },
{ code: '31 66 16.26', title: 'Metal Cribbing Foundation Walls' },
{ code: '31 66 16.33', title: 'Manufactured Modular Foundation Walls' },
{ code: '31 66 16.43', title: 'Mechanically Stabilized Earth Foundation Walls' },
{ code: '31 66 16.46', title: 'Slurry Diaphragm Foundation Walls' },
{ code: '31 66 16.53', title: 'Soldier-Beam Foundation Walls' },
{ code: '31 66 16.56', title: 'Permanently-Anchored Soldier-Beam Foundation Walls' },
{ code: '31 66 19', title: 'Refrigerated Foundations' },
{ code: '31 68 00', title: 'Foundation Anchors' },
{ code: '31 68 13', title: 'Rock Foundation Anchors' },
{ code: '31 70 00', title: 'TUNNELING AND MINING' },
{ code: '31 71 00', title: 'Tunnel Excavation' },
{ code: '31 71 13', title: 'Shield Driving Tunnel Excavation' },
{ code: '31 71 16', title: 'Tunnel Excavation by Drilling and Blasting' },
{ code: '31 71 19', title: 'Tunnel Excavation by Tunnel Boring Machine' },
{ code: '31 72 00', title: 'Tunnel Support Systems' },
{ code: '31 72 13', title: 'Rock Reinforcement and Initial Support' },
{ code: '31 72 16', title: 'Steel Ribs and Lagging' },
{ code: '31 73 00', title: 'Tunnel Grouting' },
{ code: '31 73 13', title: 'Cement Tunnel Grouting' },
{ code: '31 73 16', title: 'Chemical Tunnel Grouting' },
{ code: '31 74 00', title: 'Tunnel Construction' },
{ code: '31 74 13', title: 'Cast-in-Place Concrete Tunnel Lining' },
{ code: '31 74 16', title: 'Precast Concrete Tunnel Lining' },
{ code: '31 74 19', title: 'Shotcrete Tunnel Lining' },
{ code: '31 75 00', title: 'Shaft Construction' },
{ code: '31 75 13', title: 'Cast-in-Place Concrete Shaft Lining' },
{ code: '31 75 16', title: 'Precast Concrete Shaft Lining' },
{ code: '31 77 00', title: 'Submersible Tube Tunnels' },
{ code: '31 77 13', title: 'Trench Excavation for Submerged Tunnels' },
{ code: '31 77 16', title: 'Tube Construction (Outfitting Tunnel Tubes)' },
{ code: '31 77 19', title: 'Floating and Laying Submerged Tunnels' },
{ code: '31 80 00', title: 'Unassigned' },
{ code: '31 90 00', title: 'Unassigned' }]
}
)
}
division_28() {
return ({
division: 28,
divisionTitle: 'Electronic Safety and Security',
codes: [{ code: '28 00 00', title: 'ELECTRONIC SAFETY AND SECURITY' },
{ code: '28 01 00', title: 'Operation and Maintenance of Electronic Safety and Security' },
{ code: '28 01 10', title: 'Operation and Maintenance of Electronic Access Control and Intrusion Detection' },
{ code: '28 01 10.51', title: 'Maintenance and Administration of Electronic Access Control and Intrusion Detection' },
{ code: '28 01 10.71', title: 'Revisions and Upgrades of Electronic Access Control and Intrusion Detection' },
{ code: '28 01 20', title: 'Operation and Maintenance of Electronic Surveillance' },
{ code: '28 01 30', title: 'Operation and Maintenance of Electronic Detection and Alarm' },
{ code: '28 01 30.51', title: 'Maintenance and Administration of Electronic Detection and Alarm' },
{ code: '28 01 30.71', title: 'Revisions and Upgrades of Electronic Detection and Alarm' },
{ code: '28 01 40', title: 'Operation and Maintenance of Electronic Monitoring and Control' },
{ code: '28 01 40.51', title: 'Maintenance and Administration of Electronic Monitoring and Control' },
{ code: '28 01 40.71', title: 'Revisions and Upgrades of Electronic Monitoring and Control' },
{ code: '28 05 00', title: 'Common Work Results for Electronic Safety and Security' },
{ code: '28 05 13', title: 'Conductors and Cables for Electronic Safety and Security' },
{ code: '28 05 13.13', title: 'CCTV Communications Conductors and Cables' },
{ code: '28 05 13.16', title: 'Access Control Communications Conductors and Cables' },
{ code: '28 05 13.19', title: 'Intrusion Detection Communications Conductors and Cables' },
{ code: '28 05 13.23', title: 'Fire Alarm Communications Conductors and Cables' },
{ code: '28 05 26', title: 'Grounding and Bonding for Electronic Safety and Security' },
{ code: '28 05 28', title: 'Pathways for Electronic Safety and Security' },
{ code: '28 05 28.29', title: 'Hangers and Supports for Electronic Safety and Security' },
{ code: '28 05 28.33', title: 'Conduits and Backboxes for Electronic Safety and Security' },
{ code: '28 05 28.36', title: 'Cable Trays for Electronic Safety and Security' },
{ code: '28 05 28.39', title: 'Surface Raceways for Electronic Safety and Security' },
{ code: '28 05 48', title: 'Vibration and Seismic Controls for Electronic Safety and Security' },
{ code: '28 05 53', title: 'Identification for Electronic Safety and Security' },
{ code: '28 06 00', title: 'Schedules for Electronic Safety and Security' },
{ code: '28 06 10', title: 'Schedules for Electronic Access Control and Intrusion Detection' },
{ code: '28 06 20', title: 'Schedules for Electronic Surveillance' },
{ code: '28 06 30', title: 'Schedules for Electronic Detection and Alarm' },
{ code: '28 06 40', title: 'Schedules for Electronic Monitoring and Control' },
{ code: '28 08 00', title: 'Commissioning of Electronic Safety and Security' },
{ code: '28 10 00', title: 'ELECTRONIC ACCESS CONTROL AND INTRUSION DETECTION' },
{ code: '28 13 00', title: 'Access Control' },
{ code: '28 13 13', title: 'Access Control Global Applications' },
{ code: '28 13 16', title: 'Access Control Systems and Database Management' },
{ code: '28 13 19', title: 'Access Control Systems Infrastructure' },
{ code: '28 13 26', title: 'Access Control Remote Devices' },
{ code: '28 13 33', title: 'Access Control Interfaces' },
{ code: '28 13 33.16', title: 'Access Control Interfaces to Access Control Hardware' },
{ code: '28 13 33.26', title: 'Access Control Interfaces to Intrusion Detection' },
{ code: '28 13 33.33', title: 'Access Control Interfaces to Video Surveillance' },
{ code: '28 13 33.36', title: 'Access Control Interfaces to Fire Alarm' },
{ code: '28 13 43', title: 'Access Control Identification Management Systems' },
{ code: '28 13 53', title: 'Security Access Detection' },
{ code: '28 13 53.13', title: 'Security Access Metal Detectors' },
{ code: '28 13 53.16', title: 'Security Access X-Ray Equipment' },
{ code: '28 13 53.29', title: 'Security Access Sniffing Equipment' },
{ code: '28 13 53.23', title: 'Security Access Explosive Detection Equipment' },
{ code: '28 16 00', title: 'Intrusion Detection' },
{ code: '28 16 13', title: 'Intrusion Detection Control, GUI, and Logic Systems' },
{ code: '28 16 16', title: 'Intrusion Detection Systems Infrastructure' },
{ code: '28 16 19', title: 'Intrusion Detection Remote Devices and Sensors' },
{ code: '28 16 33', title: 'Intrusion Detection Interfaces' },
{ code: '28 16 33.13', title: 'Intrusion Detection Interfaces to Remote Monitoring' },
{ code: '28 16 33.16', title: 'Intrusion Detection Interfaces to Access Control Hardware' },
{ code: '28 16 33.23', title: 'Intrusion Detection Interfaces to Access Control System' },
{ code: '28 16 33.33', title: 'Intrusion Detection Interfaces to Video Surveillance' },
{ code: '28 16 33.36', title: 'Intrusion Detection Interfaces to Fire Alarm' },
{ code: '28 16 43', title: 'Perimeter Security Systems' },
{ code: '28 16 46', title: 'Intrusion Detection Vehicle Control Systems' },
{ code: '28 20 00', title: 'ELECTRONIC SURVEILLANCE' },
{ code: '28 23 00', title: 'Video Surveillance' },
{ code: '28 23 13', title: 'Video Surveillance Control and Management Systems' },
{ code: '28 23 16', title: 'Video Surveillance Monitoring and Supervisory Interfaces' },
{ code: '28 23 19', title: 'Digital Video Recorders and Analog Recording Devices' },
{ code: '28 23 23', title: 'Video Surveillance Systems Infrastructure' },
{ code: '28 23 26', title: 'Video Surveillance Remote Positioning Equipment' },
{ code: '28 23 29', title: 'Video Surveillance Remote Devices and Sensors' },
{ code: '28 26 00', title: 'Electronic Personal Protection Systems' },
{ code: '28 26 13', title: 'Electronic Personal Safety Detection Systems' },
{ code: '28 26 16', title: 'Electronic Personal Safety Alarm Annunciation and Control Systems' },
{ code: '28 26 19', title: 'Electronic Personal Safety Interfaces to Remote Monitoring' },
{ code: '28 26 23', title: 'Electronic Personal Safety Emergency Aid Devices' },
{ code: '28 30 00', title: 'ELECTRONIC DETECTION AND ALARM' },
{ code: '28 31 00', title: 'Fire Detection and Alarm' },
{ code: '28 31 13', title: 'Fire Detection and Alarm Control, GUI, and Logic Systems' },
{ code: '28 31 23', title: 'Fire Detection and Alarm Annunciation Panels and Fire Stations' },
{ code: '28 31 33', title: 'Fire Detection and Alarm Interfaces' },
{ code: '28 31 33.13', title: 'Fire Detection and AlarmInterfaces to Remote Monitoring' },
{ code: '28 31 33.16', title: 'Fire Detection and Alarm Interfaces to Access Control Hardware' },
{ code: '28 31 33.23', title: 'Fire Detection and Alarm Interfaces to Access Control System' },
{ code: '28 31 33.26', title: 'Fire Detection and Alarm Interfaces to Intrusion Detection' },
{ code: '28 31 33.33', title: 'Fire Detection and Alarm Interfaces to Video Surveillance' },
{ code: '28 31 33.43', title: 'Fire Detection and Alarm Interfaces to Elevator Control' },
{ code: '28 31 43', title: 'Fire Detection Sensors' },
{ code: '28 31 46', title: 'Smoke Detection Sensors' },
{ code: '28 31 49', title: 'Carbon-Monoxide Detection Sensors' },
{ code: '28 31 53', title: 'Fire Alarm Initiating Devices' },
{ code: '28 31 53.13', title: 'Fire Alarm Pull Stations' },
{ code: '28 31 53.23', title: 'Fire Alarm Level Detectors Switches' },
{ code: '28 31 53.33', title: 'Fire Alarm Flow Switches' },
{ code: '28 31 53.43', title: 'Fire Alarm Pressure Sensors' },
{ code: '28 31 63', title: 'Fire Alarm Integrated Audio Visual Evacuation Systems' },
{ code: '28 31 63.13', title: 'Fire Alarm Horns and Strobes' },
{ code: '28 32 00', title: 'Radiation Detection and Alarm' },
{ code: '28 32 13', title: 'Radiation Detection and Alarm Control, GUI, and Logic Systems' },
{ code: '28 32 23', title: 'Radiation Detection and Alarm Integrated Audio Evacuation Systems' },
{ code: '28 32 33', title: 'Radiation and Alarm Detection Sensors' },
{ code: '28 32 43', title: 'Radiation and Alarm Dosimeters' },
{ code: '28 33 00', title: 'Fuel-Gas Detection and Alarm' },
{ code: '28 33 13', title: 'Fuel-Gas Detection and Alarm Control, GUI, and Logic Systems' },
{ code: '28 33 23', title: 'Fuel-Gas Detection and Alarm Integrated Audio Evacuation Systems' },
{ code: '28 33 33', title: 'Fuel-Gas Detection Sensors' },
{ code: '28 34 00', title: 'Fuel-Oil Detection and Alarm' },
{ code: '28 34 13', title: 'Fuel-Oil Detection and Alarm Control, GUI, and Logic Systems' },
{ code: '28 34 23', title: 'Fuel-Oil Detection and Alarm Integrated Audio Evacuation Systems' },
{ code: '28 34 33', title: 'Fuel-Oil Detection Sensors' },
{ code: '28 35 00', title: 'Refrigerant Detection and Alarm' },
{ code: '28 35 13', title: 'Refrigerant Detection and Alarm Control, GUI, and Logic Systems' },
{ code: '28 35 23', title: 'Refrigerant Detection and Alarm Integrated Audio Evacuation Systems' },
{ code: '28 35 33', title: 'Refrigerant Detection Sensors' },
{ code: '28 40 00', title: 'ELECTRONIC MONITORING AND CONTROL' },
{ code: '28 46 00', title: 'Electronic Detention Monitoring and Control Systems' },
{ code: '28 46 13', title: 'Hard-Wired Detention Monitoring and Control Systems' },
{ code: '28 46 16', title: 'Relay-Logic Detention Monitoring and Control Systems' },
{ code: '28 46 19', title: 'PLC Electronic Detention Monitoring and Control Systems' },
{ code: '28 46 23', title: 'Computer-Based Detention Monitoring and Control Systems' },
{ code: '28 46 26', title: 'Discreet-Logic Detention Monitoring and Control Systems' },
{ code: '28 46 29', title: 'Discreet-Distributed Intelligence Detention Monitoring and Control Systems' },
{ code: '28 50 00', title: 'Unassigned' },
{ code: '28 60 00', title: 'Unassigned' },
{ code: '28 70 00', title: 'Unassigned' },
{ code: '28 80 00', title: 'Unassigned' },
{ code: '28 90 00', title: 'Unassigned' }]
})
}
division_27() {
return ({
division: 27,
divisionTitle: 'Communications',
codes: [{ code: '27 00 00', title: 'COMMUNICATIONS' },
{ code: '27 01 00', title: 'Operation and Maintenance of Communications Systems' },
{ code: '27 01 10', title: 'Operation and Maintenance of Structured Cabling and Enclosures' },
{ code: '27 01 20', title: 'Operation and Maintenance of Data Communications' },
{ code: '27 01 30', title: 'Operation and Maintenance of Voice Communications' },
{ code: '27 01 40', title: 'Operation and Maintenance of Audio-Video Communications' },
{ code: '27 01 50', title: 'Operation and Maintenance of Distributed Communications and Monitoring' },
{ code: '27 05 00', title: 'Common Work Results for Communications' },
{ code: '27 05 13', title: 'Communications Services' },
{ code: '27 05 13.13', title: 'Dialtone Services' },
{ code: '27 05 13.23', title: 'T1 Services' },
{ code: '27 05 13.33', title: 'DSL Services' },
{ code: '27 05 13.43', title: 'Cable Services' },
{ code: '27 05 13.53', title: 'Satellite Services' },
{ code: '27 05 26', title: 'Grounding and Bonding for Communications Systems' },
{ code: '27 05 28', title: 'Pathways for Communications Systems' },
{ code: '27 05 28.29', title: 'Hangers and Supports for Communications Systems' },
{ code: '27 05 28.33', title: 'Conduits and Backboxes for Communications Systems' },
{ code: '27 05 28.36', title: 'Cable Trays for Communications Systems' },
{ code: '27 05 28.39', title: 'Surface Raceways for Communications Systems' },
{ code: '27 05 43', title: 'Underground Ducts and Raceways for Communications Systems' },
{ code: '27 05 46', title: 'Utility Poles for Communications Systems' },
{ code: '27 05 48', title: 'Vibration and Seismic Controls for Communications Systems' },
{ code: '27 05 53', title: 'Identification for Communications Systems' },
{ code: '27 06 00', title: 'Schedules for Communications' },
{ code: '27 06 10', title: 'Schedules for Structured Cabling and Enclosures' },
{ code: '27 06 20', title: 'Schedules for Data Communications' },
{ code: '27 06 30', title: 'Schedules for Voice Communications' },
{ code: '27 06 40', title: 'Schedules for Audio-Video Communications' },
{ code: '27 06 50', title: 'Schedules for Distributed Communications and Monitoring' },
{ code: '27 08 00', title: 'Commissioning of Communications' },
{ code: '27 10 00', title: 'STRUCTURED CABLING' },
{ code: '27 11 00', title: 'Communications Equipment Room Fittings' },
{ code: '27 11 13', title: 'Communications Entrance Protection' },
{ code: '27 11 16', title: 'Communications Cabinets, Racks, Frames and Enclosures' },
{ code: '27 11 19', title: 'Communications Termination Blocks and Patch Panels' },
{ code: '27 11 23', title: 'Communications Cable Management and Ladder Rack' },
{ code: '27 11 26', title: 'Communications Rack Mounted Power Protection and Power Strips' },
{ code: '27 13 00', title: 'Communications Backbone Cabling' },
{ code: '27 13 13', title: 'Communications Copper Backbone Cabling' },
{ code: '27 13 13.13', title: 'Communications Copper Cable Splicing and Terminations' },
{ code: '27 13 23', title: 'Communications Optical Fiber Backbone Cabling' },
{ code: '27 13 23.13', title: 'Communications Optical Fiber Splicing and Terminations' },
{ code: '27 13 33', title: 'Communications Coaxial Backbone Cabling' },
{ code: '27 13 33.13', title: 'Communications Coaxial Splicing and Terminations' },
{ code: '27 13 43', title: 'Communications Services Cabling' },
{ code: '27 13 43.13', title: 'Dialtone Services Cabling' },
{ code: '27 13 43.23', title: 'T1 Services Cabling' },
{ code: '27 13 43.33', title: 'DSL Services Cabling' },
{ code: '27 13 43.43', title: 'Cable Services Cabling' },
{ code: '27 13 43.53', title: 'Satellite Services Cabling' },
{ code: '27 15 00', title: 'Communications Horizontal Cabling' },
{ code: '27 15 00.16', title: 'Voice Communications Horizontal Cabling' },
{ code: '27 15 00.19', title: 'Data Communications Horizontal Cabling' },
{ code: '27 15 00.23', title: 'Audio-Video Communications Horizontal Cabling' },
{ code: '27 15 00.39', title: 'Patient Monitoring and Telemetry Communications Horizontal Cabling' },
{ code: '27 15 00.43', title: 'Nurse Call and Intercom Communications Horizontal Cabling' },
{ code: '27 15 00.46', title: 'Paging Communications Horizontal Cabling' },
{ code: '27 15 00.49', title: 'Intermediate Frequency/Radio Frequency Communications Horizontal Cabling' },
{ code: '27 15 00.53', title: 'Antennas Communications Horizontal Cabling' },
{ code: '27 15 13', title: 'Communications Copper Horizontal Cabling' },
{ code: '27 15 23', title: 'Communications Optical Fiber Horizontal Cabling' },
{ code: '27 15 33', title: 'Communications Coaxial Horizontal Cabling' },
{ code: '27 15 43', title: 'Communications Faceplates and Connectors' },
{ code: '27 16 00', title: 'Communications Connecting Cords, Devices and Adapters' },
{ code: '27 16 13', title: 'Communications Custom Cable Assemblies' },
{ code: '27 16 16', title: 'Communications Media Converters, Adapters, and Transceivers' },
{ code: '27 16 19', title: 'Communications Patch Cords, Station Cords, and Cross Connect Wire' },
{ code: '27 20 00', title: 'DATA COMMUNICATIONS' },
{ code: '27 21 00', title: 'Data Communications Network Equipment' },
{ code: '27 21 13', title: 'Data Communications Firewalls' },
{ code: '27 21 16', title: 'Data Communications Routers, CSU/DSU, Multiplexers, Codec’s, and Modems' },
{ code: '27 21 26', title: 'Data Communications Network Management' },
{ code: '27 21 29', title: 'Data Communications Switches and Hubs' },
{ code: '27 21 33', title: 'Data Communications Wireless Access Points' },
{ code: '27 22 00', title: 'Data Communications Hardware' },
{ code: '27 22 13', title: 'Data Communications Mainframes' },
{ code: '27 22 16', title: 'Data Communications Storage and Backup' },
{ code: '27 22 19', title: 'Data Communications Servers' },
{ code: '27 22 23', title: 'Data Communications Desktops' },
{ code: '27 22 26', title: 'Data Communications Laptops' },
{ code: '27 22 29', title: 'Data Communications Handhelds' },
{ code: '27 24 00', title: 'Data Communications Peripheral Data Equipment' },
{ code: '27 24 13', title: 'Printers' },
{ code: '27 24 16', title: 'Scanners' },
{ code: '27 24 19', title: 'External Drives' },
{ code: '27 24 23', title: 'Audio-Video Devices' },
{ code: '27 24 26', title: 'Virtual Reality Equipment' },
{ code: '27 24 29', title: 'Disaster Recovery Equipment' },
{ code: '27 25 00', title: 'Data Communications Software' },
{ code: '27 25 13', title: 'Virus Protection Software' },
{ code: '27 25 16', title: 'Application Suites' },
{ code: '27 25 19', title: 'Email Software' },
{ code: '27 25 23', title: 'Graphics/Multimedia Software' },
{ code: '27 25 26', title: 'Customer Relationship Management Software' },
{ code: '27 25 29', title: 'Operating System Software' },
{ code: '27 25 33', title: 'Database Software' },
{ code: '27 25 37', title: 'Virtual Private Network Software' },
{ code: '27 25 39', title: 'Internet Conferencing Software' },
{ code: '27 26 00', title: 'Data Communications Programming and Integration Services' },
{ code: '27 26 13', title: 'Web Development' },
{ code: '27 26 16', title: 'Database Development' },
{ code: '27 26 19', title: 'Application Development' },
{ code: '27 26 23', title: 'Network Integration Requirements' },
{ code: '27 26 26', title: 'Data Communications Integration Requirements' },
{ code: '27 30 00', title: 'VOICE COMMUNICATIONS' },
{ code: '27 31 00', title: 'Voice Communications Switching and Routing Equipment' },
{ code: '27 31 13', title: 'PBX/ Key Systems' },
{ code: '27 31 23', title: 'Internet Protocol Voice Switches' },
{ code: '27 32 00', title: 'Voice Communications Telephone Sets, Facsimiles and Modems' },
{ code: '27 32 13', title: 'Telephone Sets' },
{ code: '27 32 16', title: 'Wireless Transceivers' },
{ code: '27 32 23', title: 'Elevator Telephones' },
{ code: '27 32 26', title: 'Ring-Down Emergency Telephones' },
{ code: '27 32 29', title: 'Facsimiles and Modems' },
{ code: '27 32 36', title: 'TTY Equipment' },
{ code: '27 33 00', title: 'Voice Communications Messaging' },
{ code: '27 33 16', title: 'Voice Mail and Auto Attendant' },
{ code: '27 33 23', title: 'Interactive Voice Response' },
{ code: '27 33 26', title: 'Facsimile Servers' },
{ code: '27 34 00', title: 'Call Accounting' },
{ code: '27 34 13', title: 'Toll Fraud Equipment and Software' },
{ code: '27 34 16', title: 'Telemanagement Software' },
{ code: '27 35 00', title: 'Call Management' },
{ code: '27 35 13', title: 'Digital Voice Announcers' },
{ code: '27 35 16', title: 'Automatic Call Distributors' },
{ code: '27 35 19', title: 'Call Status and Management Displays' },
{ code: '27 35 23', title: 'Dedicated 911 Systems' },
{ code: '27 40 00', title: 'AUDIO-VIDEO COMMUNICATIONS' },
{ code: '27 41 00', title: 'Audio-Video Systems' },
{ code: '27 41 13', title: 'Architecturally Integrated Audio-Video Equipment' },
{ code: '27 41 16', title: 'Integrated Audio-Video Systems and Equipment' },
{ code: '27 41 16.25', title: 'Integrated Audio-Video Systems and Equipment for Restaurants and Bars' },
{ code: '27 41 16.28', title: 'Integrated Audio-Video Systems and Equipment for Conference Rooms' },
{ code: '27 41 16.29', title: 'Integrated Audio-Video Systems and Equipment for Board Rooms' },
{ code: '27 41 16.51', title: 'Integrated Audio-Video Systems and Equipment for Classrooms' },
{ code: '27 41 16.61', title: 'Integrated Audio-Video Systems and Equipment for Theaters' },
{ code: '27 41 16.62', title: 'Integrated Audio-Video Systems and Equipment for Auditoriums' },
{ code: '27 41 16.63', title: 'Integrated Audio-Video Systems and Equipment for Stadiums and Arenas' },
{ code: '27 41 19', title: 'Portable Audio-Video Equipment' },
{ code: '27 41 23', title: 'Audio-Video Accessories' },
{ code: '27 42 00', title: 'Electronic Digital Systems' },
{ code: '27 42 13', title: 'Point of Sale Systems' },
{ code: '27 42 16', title: 'Transportation Information Display Systems' },
{ code: '27 42 19', title: 'Public Information Systems' },
{ code: '27 50 00', title: 'DISTRIBUTED COMMUNICATIONS AND MONITORING SYSTEMS' },
{ code: '27 51 00', title: 'Distributed Audio-Video Communications Systems' },
{ code: '27 51 13', title: 'Paging Systems' },
{ code: '27 51 13.13', title: 'Overhead Paging Systems' },
{ code: '27 51 16', title: 'Public Address and Mass Notification Systems' },
{ code: '27 51 19', title: 'Sound Masking Systems' },
{ code: '27 51 23', title: 'Intercommunications and Program Systems' },
{ code: '27 51 23.20', title: 'Commercial Intercommunications and Program Systems' },
{ code: '27 51 23.30', title: 'Residential Intercommunications and Program Systems' },
{ code: '27 51 23.50', title: 'Educational Intercommunications and Program Systems' },
{ code: '27 51 23.63', title: 'Detention Intercommunications and Program Systems' },
{ code: '27 51 23.70', title: 'Healthcare Intercommunications and Program Systems' },
{ code: '27 52 00', title: 'Healthcare Communications and Monitoring Systems' },
{ code: '27 52 13', title: 'Patient Monitoring and Telemetry Systems' },
{ code: '27 52 16', title: 'Telemedicine Systems' },
{ code: '27 52 19', title: 'Healthcare Imaging Systems' },
{ code: '27 52 23', title: 'Nurse Call/Code Blue Systems' },
{ code: '27 53 00', title: 'Distributed Systems' },
{ code: '27 53 13', title: 'Clock Systems' },
{ code: '27 53 16', title: 'Infrared and Radio Frequency Tracking Systems' },
{ code: '27 53 19', title: 'Internal Cellular, Paging, and Antenna Systems' },
{ code: '27 60 00', title: 'Unassigned' },
{ code: '27 70 00', title: 'Unassigned' },
{ code: '27 80 00', title: 'Unassigned' },
{ code: '27 90 00', title: 'Unassigned' }]
})
}
division_26() {
return (
{
division: 26,
divisionTitle: 'Electrical',
codes: [{ code: '26 00 00', title: 'ELECTRICAL' },
{ code: '26 01 00', title: 'Operation and Maintenance of Electrical Systems' },
{ code: '26 01 10', title: 'Operation and Maintenance of Medium-Voltage Electrical Distribution' },
{ code: '26 01 20', title: 'Operation and Maintenance of Low-Voltage Electrical Distribution' },
{ code: '26 01 26', title: 'Maintenance Testing of Electrical Systems' },
{ code: '26 01 30', title: 'Operation and Maintenance of Facility Electrical Power Generating and Storing Equipment' },
{ code: '26 01 40', title: 'Operation and Maintenance of Electrical and Cathodic Protection Systems' },
{ code: '26 01 50', title: 'Operation and Maintenance of Lighting' },
{ code: '26 01 50.51', title: 'Luminaire Relamping' },
{ code: '26 01 50.81', title: 'Luminaire Replacement' },
{ code: '26 05 00', title: 'Common Work Results for Electrical' },
{ code: '26 05 13', title: 'Medium-Voltage Cables' },
{ code: '26 05 13.13', title: 'Medium-Voltage Open Conductors' },
{ code: '26 05 13.16', title: 'Medium-Voltage, Single- and Multi-Conductor Cables' },
{ code: '26 05 19', title: 'Low-Voltage Electrical Power Conductors and Cables' },
{ code: '26 05 19.13', title: 'Undercarpet Electrical Power Cables' },
{ code: '26 05 23', title: 'Control-Voltage Electrical Power Cables' },
{ code: '26 05 26', title: 'Grounding and Bonding for Electrical Systems' },
{ code: '26 05 29', title: 'Hangers and Supports for Electrical Systems' },
{ code: '26 05 33', title: 'Raceway and Boxes for Electrical Systems' },
{ code: '26 05 36', title: 'Cable Trays for Electrical Systems' },
{ code: '26 05 39', title: 'Underfloor Raceways for Electrical Systems' },
{ code: '26 05 43', title: 'Underground Ducts and Raceways for Electrical Systems' },
{ code: '26 05 46', title: 'Utility Poles for Electrical Systems' },
{ code: '26 05 48', title: 'Vibration and Seismic Controls for Electrical Systems' },
{ code: '26 05 53', title: 'Identification for Electrical Systems' },
{ code: '26 05 73', title: 'Overcurrent Protective Device Coordination Study' },
{ code: '26 06 00', title: 'Schedules for Electrical' },
{ code: '26 06 10', title: 'Schedules for Medium-Voltage Electrical Distribution' },
{ code: '26 06 20', title: 'Schedules for Low-Voltage Electrical Distribution' },
{ code: '26 06 20.13', title: 'Electrical Switchboard Schedule' },
{ code: '26 06 20.16', title: 'Electrical Panelboard Schedule' },
{ code: '26 06 20.19', title: 'Electrical Motor-Control Center Schedule' },
{ code: '26 06 20.23', title: 'Electrical Circuit Schedule' },
{ code: '26 06 20.26', title: 'Wiring Device Schedule' },
{ code: '26 06 30', title: 'Schedules for Facility Electrical Power Generating and Storing Equipment' },
{ code: '26 06 40', title: 'Schedules for Electrical and Cathodic Protection Systems' },
{ code: '26 06 50', title: 'Schedules for Lighting' },
{ code: '26 06 50.13', title: 'Lighting Panelboard Schedule' },
{ code: '26 06 50.16', title: 'Lighting Fixture Schedule' },
{ code: '26 08 00', title: 'Commissioning of Electrical Systems' },
{ code: '26 09 00', title: 'Instrumentation and Control for Electrical Systems' },
{ code: '26 09 13', title: 'Electrical Power Monitoring and Control' },
{ code: '26 09 23', title: 'Lighting Control Devices' },
{ code: '26 09 26', title: 'Lighting Control Panelboards' },
{ code: '26 09 33', title: 'Central Dimming Controls' },
{ code: '26 09 33.13', title: 'Multichannel Remote-Controlled Dimmers' },
{ code: '26 09 33.16', title: 'Remote-Controlled Dimming Stations' },
{ code: '26 09 36', title: 'Modular Dimming Controls' },
{ code: '26 09 36.13', title: 'Manual Modular Dimming Controls' },
{ code: '26 09 36.16', title: 'Integrated Multipreset Modular Dimming Controls' },
{ code: '26 09 43', title: 'Network Lighting Controls' },
{ code: '26 09 43.13', title: 'Digital-Network Lighting Controls' },
{ code: '26 09 43.16', title: 'Addressable Fixture Lighting Control' },
{ code: '26 09 61', title: 'Theatrical Lighting Controls' },
{ code: '26 10 00', title: 'MEDIUM-VOLTAGE ELECTRICAL DISTRIBUTION' },
{ code: '26 11 00', title: 'Substations' },
{ code: '26 11 13', title: 'Primary Unit Substations' },
{ code: '26 11 16', title: 'Secondary Unit Substations' },
{ code: '26 12 00', title: 'Medium-Voltage Transformers' },
{ code: '26 12 13', title: 'Liquid-Filled, Medium -Voltage Transformers' },
{ code: '26 12 16', title: 'Dry-Type, Medium -Voltage Transformers' },
{ code: '26 12 19', title: 'Pad-Mounted, Liquid-Filled, Medium -Voltage Transformers' },
{ code: '26 13 00', title: 'Medium-Voltage Switchgear' },
{ code: '26 13 13', title: 'Medium-Voltage Circuit Breaker Switchgear' },
{ code: '26 13 16', title: 'Medium-Voltage Fusible Interrupter Switchgear' },
{ code: '26 13 19', title: 'Medium-Voltage Vacuum Interrupter Switchgear' },
{ code: '26 18 00', title: 'Medium-Voltage Circuit Protection Devices' },
{ code: '26 18 13', title: 'Medium-Voltage Cutouts' },
{ code: '26 18 16', title: 'Medium-Voltage Fuses' },
{ code: '26 18 19', title: 'Medium-Voltage Lightning Arresters' },
{ code: '26 18 23', title: 'Medium-Voltage Surge Arresters' },
{ code: '26 18 26', title: 'Medium-Voltage Reclosers' },
{ code: '26 18 29', title: 'Medium-Voltage Enclosed Bus' },
{ code: '26 18 33', title: 'Medium-Voltage Enclosed Fuse Cutouts' },
{ code: '26 18 36', title: 'Medium-Voltage Enclosed Fuses' },
{ code: '26 18 39', title: 'Medium-Voltage Motor Controllers' },
{ code: '26 20 00', title: 'LOW-VOLTAGE ELECTRICAL DISTRIBUTION' },
{ code: '26 21 00', title: 'Low-Voltage Overhead Electrical Power Systems' },
{ code: '26 22 00', title: 'Low-Voltage Transformers' },
{ code: '26 22 13', title: 'Low-Voltage Distribution Transformers' },
{ code: '26 22 16', title: 'Low-Voltage Buck-Boost Transformers' },
{ code: '26 22 19', title: 'Control and Signal Transformers' },
{ code: '26 23 00', title: 'Low-Voltage Switchgear' },
{ code: '26 23 13', title: 'Paralleling Low-Voltage Switchgear' },
{ code: '26 24 00', title: 'Switchboards and Panelboards' },
{ code: '26 24 13', title: 'Switchboards' },
{ code: '26 24 16', title: 'Panelboards' },
{ code: '26 24 19', title: 'Motor-Control Centers' },
{ code: '26 25 00', title: 'Enclosed Bus Assemblies' },
{ code: '26 26 00', title: 'Power Distribution Units' },
{ code: '26 27 00', title: 'Low-Voltage Distribution Equipment' },
{ code: '26 27 13', title: 'Electricity Metering' },
{ code: '26 27 16', title: 'Electrical Cabinets and Enclosures' },
{ code: '26 27 19', title: 'Multi-Outlet Assemblies' },
{ code: '26 27 23', title: 'Indoor Service Poles' },
{ code: '26 27 26', title: 'Wiring Devices' },
{ code: '26 27 73', title: 'Door Chimes' },
{ code: '26 28 00', title: 'Low-Voltage Circuit Protective Devices' },
{ code: '26 28 13', title: 'Fuses' },
{ code: '26 28 16', title: 'Enclosed Switches and Circuit Breakers' },
{ code: '26 29 00', title: 'Low-Voltage Controllers' },
{ code: '26 29 13', title: 'Enclosed Controllers' },
{ code: '26 29 13.13', title: 'Across- the-Line Motor Controllers' },
{ code: '26 29 13.16', title: 'Reduced-Voltage Motor Controllers' },
{ code: '26 29 23', title: 'Variable-Frequency Motor Controllers' },
{ code: '26 30 00', title: 'FACILITY ELECTRICAL POWER GENERATING AND STORING EQUIPMENT' },
{ code: '26 31 00', title: 'Photovoltaic Collectors' },
{ code: '26 32 00', title: 'Packaged Generator Assemblies' },
{ code: '26 32 13', title: 'Engine Generators' },
{ code: '26 32 13.13', title: 'Diesel-Engine-Driven Generator Sets' },
{ code: '26 32 13.16', title: 'Gas-Engine-Driven Generator Sets' },
{ code: '26 32 16', title: 'Steam-Turbine Generators' },
{ code: '26 32 19', title: 'Hydro-Turbine Generators' },
{ code: '26 32 23', title: 'Wind Energy Equipment' },
{ code: '26 32 26', title: 'Frequency Changers' },
{ code: '26 32 29', title: 'Rotary Converters' },
{ code: '26 32 33', title: 'Rotary Uninterruptible Power Units' },
{ code: '26 33 00', title: 'Battery Equipment' },
{ code: '26 33 13', title: 'Batteries' },
{ code: '26 33 16', title: 'Battery Racks' },
{ code: '26 33 19', title: 'Battery Units' },
{ code: '26 33 23', title: 'Central Battery Equipment' },
{ code: '26 33 33', title: 'Static Power Converters' },
{ code: '26 33 43', title: 'Battery Chargers' },
{ code: '26 33 46', title: 'Battery Monitoring' },
{ code: '26 33 53', title: 'Static Uninterruptible Power Supply' },
{ code: '26 35 00', title: 'Power Filters and Conditioners' },
{ code: '26 35 13', title: 'Capacitors' },
{ code: '26 35 16', title: 'Chokes and Inductors' },
{ code: '26 35 23', title: 'Electromagnetic -Interference Filters' },
{ code: '26 35 26', title: 'Harmonic Filters' },
{ code: '26 35 33', title: 'Power Factor Correction Equipment' },
{ code: '26 35 36', title: 'Slip Controllers' },
{ code: '26 35 43', title: 'Static-Frequency Converters' },
{ code: '26 35 46', title: 'Radio-Frequency-Interference Filters' },
{ code: '26 35 53', title: 'Voltage Regulators' },
{ code: '26 36 00', title: 'Transfer Switches' },
{ code: '26 36 13', title: 'Manual Transfer Switches' },
{ code: '26 36 23', title: 'Automatic Transfer Switches' },
{ code: '26 40 00', title: 'ELECTRICAL AND CATHODIC PROTECTION' },
{ code: '26 41 00', title: 'Facility Lightning Protection' },
{ code: '26 41 13', title: 'Lightning Protection for Structures' },
{ code: '26 41 13.13', title: 'Lightning Protection for Buildings' },
{ code: '26 41 16', title: 'Lightning Prevention and Dissipation' },
{ code: '26 41 19', title: 'Early Streamer Emission Lightning Protection' },
{ code: '26 41 23', title: 'Lightning Protection Surge Arresters and Suppressors' },
{ code: '26 42 00', title: 'Cathodic Protection' },
{ code: '26 42 13', title: 'Passive Cathodic Protection for Underground and Submerged Piping' },
{ code: '26 42 16', title: 'Passive Cathodic Protection for Underground Storage Tank' },
{ code: '26 43 00', title: 'Transient Voltage Suppression' },
{ code: '26 43 13', title: 'Transient-Voltage Suppression for Low-Voltage Electrical Power Circuits' },
{ code: '26 50 00', title: 'LIGHTING' },
{ code: '26 51 00', title: 'Interior Lighting' },
{ code: '26 51 13', title: 'Interior Lighting Fixtures, Lamps, And Ballasts' },
{ code: '26 52 00', title: 'Emergency Lighting' },
{ code: '26 53 00', title: 'Exit Signs' },
{ code: '26 54 00', title: 'Classified Location Lighting' },
{ code: '26 55 00', title: 'Special Purpose Lighting' },
{ code: '26 55 23', title: 'Outline Lighting' },
{ code: '26 55 29', title: 'Underwater Lighting' },
{ code: '26 55 33', title: 'Hazard Warning Lighting' },
{ code: '26 55 36', title: 'Obstruction Lighting' },
{ code: '26 55 53', title: 'Security Lighting' },
{ code: '26 55 59', title: 'Display Lighting' },
{ code: '26 55 61', title: 'Theatrical Lighting' },
{ code: '26 55 63', title: 'Detention Lighting' },
{ code: '26 55 70', title: 'Healthcare Lighting' },
{ code: '26 56 00', title: 'Exterior Lighting' },
{ code: '26 56 13', title: 'Lighting Poles and Standards' },
{ code: '26 56 16', title: 'Parking Lighting' },
{ code: '26 56 19', title: 'Roadway Lighting' },
{ code: '26 56 23', title: 'Area Lighting' },
{ code: '26 56 26', title: 'Landscape Lighting' },
{ code: '26 56 29', title: 'Site Lighting' },
{ code: '26 56 33', title: 'Walkway Lighting' },
{ code: '26 56 36', title: 'Flood Lighting' },
{ code: '26 56 68', title: 'Exterior Athletic Lighting' },
{ code: '26 60 00', title: 'Unassigned' },
{ code: '26 70 00', title: 'Unassigned' },
{ code: '26 80 00', title: 'Unassigned' },
{ code: '26 90 00', title: 'Unassigned' }]
}
)
}
division_25() {
return ({
division: 25,
divisionTitle: 'Integrated Automation',
codes: [{ code: '25 00 00', title: 'INTEGRATED AUTOMATION' },
{ code: '25 01 00', title: 'Operation and Maintenance of Integrated Automation' },
{ code: '25 01 10', title: 'Operation and Maintenance of Integrated Automation Network Equipment' },
{ code: '25 01 20', title: 'Operation and Maintenance of Integrated Equipment' },
{ code: '25 01 30', title: 'Operation and Maintenance of Integrated Automation Instrumentation and Terminal Devices' },
{ code: '25 01 90', title: 'Diagnostic Systems for Integrated Automation' },
{ code: '25 05 00', title: 'Common Work Results for Integrated Automation' },
{ code: '25 05 13', title: 'Conductors and Cables for Integrated Automation' },
{ code: '25 05 26', title: 'Grounding and Bonding for Integrated Automation' },
{ code: '25 05 28', title: 'Pathways for Integrated Automation' },
{ code: '25 05 28.29', title: 'Hangers and Supports for Integrated Automation' },
{ code: '25 05 28.33', title: 'Conduits and Backboxes for Integrated Automation' },
{ code: '25 05 28.36', title: 'Cable Trays for Integrated Automation' },
{ code: '25 05 28.39', title: 'Surface Raceways for Integrated Automation' },
{ code: '25 05 48', title: 'Vibration and Seismic Controls for Integrated Automation' },
{ code: '25 05 53', title: 'Identification for Integrated Automation' },
{ code: '25 06 00', title: 'Schedules for Integrated Automation' },
{ code: '25 06 11', title: 'Schedules for Integrated Automation Network' },
{ code: '25 06 12', title: 'Schedules for Integrated Automation Network Gateways' },
{ code: '25 06 13', title: 'Schedules for Integrated Automation Control and Monitoring Network' },
{ code: '25 06 14', title: 'Schedules for Integrated Automation Local Control Units' },
{ code: '25 06 30', title: 'Schedules for Integrated Automation Instrumentation and Terminal Devices' },
{ code: '25 08 00', title: 'Commissioning of Integrated Automation' },
{ code: '25 10 00', title: 'INTEGRATED AUTOMATION NETWORK EQUIPMENT' },
{ code: '25 11 00', title: 'Integrated Automation Network Devices' },
{ code: '25 11 13', title: 'Integrated Automation Network Servers' },
{ code: '25 11 16', title: 'Integrated Automation Network Routers, Bridges, Switches, Hubs, and Modems' },
{ code: '25 11 19', title: 'Integrated Automation Network Operator Workstations' },
{ code: '25 12 00', title: 'Integrated Automation Network Gateways' },
{ code: '25 12 13', title: 'Hardwired Integration Network Gateways' },
{ code: '25 12 16', title: 'Direct-Protocol Integration Network Gateways' },
{ code: '25 12 19', title: 'Neutral-Protocol Integration Network Gateways' },
{ code: '25 12 23', title: 'Client-Server Information/Database Integration Network Gateways' },
{ code: '25 13 00', title: 'Integrated Automation Control and Monitoring Network' },
{ code: '25 13 13', title: 'Integrated Automation Control and Monitoring Network Supervisory Control' },
{ code: '25 13 16', title: 'Integrated Automation Control and Monitoring Network Integration Panels' },
{ code: '25 13 19', title: 'Integrated Automation Control and Monitoring Network Interoperability' },
{ code: '25 14 00', title: 'Integrated Automation Local Control Units' },
{ code: '25 14 13', title: 'Integrated Automation Remote Control Panels' },
{ code: '25 14 16', title: 'Integrated Automation Application-Specific Control Panels' },
{ code: '25 14 19', title: 'Integrated Automation Terminal Control Units' },
{ code: '25 14 23', title: 'Integrated Automation Field Equipment Panels' },
{ code: '25 15 00', title: 'Integrated Automation Software' },
{ code: '25 15 13', title: 'Integrated Automation Software for Network Gateways' },
{ code: '25 15 16', title: 'Integrated Automation Software for Control and Monitoring Networks' },
{ code: '25 15 19', title: 'Integrated Automation Software for Local Control Units' },
{ code: '25 20 00', title: 'Unassigned' },
{ code: '25 30 00', title: 'INTEGRATED AUTOMATION INSTRUMENTATION AND TERMINAL DEVICES' },
{ code: '25 31 00', title: 'Integrated Automation Instrumentation and Terminal Devices for Facility Equipment' },
{ code: '25 32 00', title: 'Integrated Automation Instrumentation and Terminal Devices for Conveying Equipment' },
{ code: '25 33 00', title: 'Integrated Automation Instrumentation and Terminal Devices for Fire-Suppression Systems' },
{ code: '25 34 00', title: 'Integrated Automation Instrumentation and Terminal Devices for Plumbing' },
{ code: '25 35 00', title: 'Integrated Automation Instrumentation and Terminal Devices for HVAC' },
{ code: '25 35 13', title: 'Integrated Automation Actuators and Operators' },
{ code: '25 35 16', title: 'Integrated Automation Sensors and Transmitters' },
{ code: '25 35 19', title: 'Integrated Automation Control Valves' },
{ code: '25 35 23', title: 'Integrated Automation Control Dampers' },
{ code: '25 35 26', title: 'Integrated Automation Compressed Air Supply' },
{ code: '25 36 00', title: 'Integrated Automation Instrumentation and Terminal Devices for Electrical Systems' },
{ code: '25 36 13', title: 'Integrated Automation Power Meters' },
{ code: '25 36 16', title: 'Integrated Automation KW Transducers' },
{ code: '25 36 19', title: 'Integrated Automation Current Sensors' },
{ code: '25 36 23', title: 'Integrated Automation Battery Monitors' },
{ code: '25 36 26', title: 'Integrated Automation Lighting Relays' },
{ code: '25 36 29', title: 'Integrated Automation UPS Monitors' },
{ code: '25 37 00', title: 'Integrated Automation Instrumentation and Terminal Devices for Communications Systems' },
{ code: '25 38 00', title: 'Integrated Automation Instrumentation and Terminal Devices for Electronic Safety and Security Systems' },
{ code: '25 40 00', title: 'Unassigned' },
{ code: '25 50 00', title: 'INTEGRATED AUTOMATION FACILITY CONTROLS' },
{ code: '25 51 00', title: 'Integrated Automation Control of Facility Equipment' },
{ code: '25 52 00', title: 'Integrated Automation Control of Conveying Equipment' },
{ code: '25 53 00', title: 'Integrated Automation Control of Fire-Suppression Systems' },
{ code: '25 54 00', title: 'Integrated Automation Control of Plumbing' },
{ code: '25 55 00', title: 'Integrated Automation Control of HVAC' },
{ code: '25 56 00', title: 'Integrated Automation Control of Electrical Systems' },
{ code: '25 57 00', title: 'Integrated Automation Control of Communications Systems' },
{ code: '25 58 00', title: 'Integrated Automation Control of Electronic Safety and Security Systems' },
{ code: '25 60 00', title: 'Unassigned' },
{ code: '25 70 00', title: 'Unassigned' },
{ code: '25 80 00', title: 'Unassigned' },
{ code: '25 90 00', title: 'INTEGRATED AUTOMATION CONTROL SEQUENCES' },
{ code: '25 91 00', title: 'Integrated Automation Control Sequences for Facility Equipment' },
{ code: '25 92 00', title: 'Integrated Automation Control Sequences for Conveying Equipment' },
{ code: '25 93 00', title: 'Integrated Automation Control Sequences for Fire-Suppression Systems' },
{ code: '25 94 00', title: 'Integrated Automation Control Sequences for Plumbing' },
{ code: '25 95 00', title: 'Integrated Automation Control Sequences for HVAC' },
{ code: '25 96 00', title: 'Integrated Automation Control Sequences for Electrical Systems' },
{ code: '25 97 00', title: 'Integrated Automation Control Sequences for Communications Systems' },
{ code: '25 98 00', title: 'Integrated Automation Control Sequences for Electronic Safety and Security' }]
})
}
division_23() {
return ({
division: 23,
divisionTitle: 'Heating, Ventilating, and Air-Conditioning (HVAC)',
codes: [{ code: '23 00 00', title: 'HEATING, VENTILATING, AND AIR-CONDITIONING (HVAC)' },
{ code: '23 01 00', title: 'Operation and Maintenance of HVAC Systems' },
{ code: '23 01 10', title: 'Operation and Maintenance of Facility Fuel Systems' },
{ code: '23 01 20', title: 'Operation and Maintenance of HVAC Piping and Pumps' },
{ code: '23 01 30', title: 'Operation and Maintenance of HVAC Air Distribution' },
{ code: '23 01 30.51', title: 'HVAC Air Duct Cleaning' },
{ code: '23 01 50', title: 'Operation and Maintenance of Central Heating Equipment' },
{ code: '23 01 60', title: 'Operation and Maintenance of Central Cooling Equipment' },
{ code: '23 01 60.71', title: 'Refrigerant Recovery/Recycling' },
{ code: '23 01 70', title: 'Operation and Maintenance of Central HVAC Equipment' },
{ code: '23 01 80', title: 'Operation and Maintenance of Decentralized HVAC Equipment' },
{ code: '23 01 90', title: 'Diagnostic Systems for HVAC' },
{ code: '23 05 00', title: 'Common Work Results for HVAC' },
{ code: '23 05 13', title: 'Common Motor Requirements for HVAC Equipment' },
{ code: '23 05 16', title: 'Expansion Fittings and Loops for HVAC Piping' },
{ code: '23 05 19', title: 'Meters and Gages for HVAC Piping' },
{ code: '23 05 23', title: 'General-Duty Valves for HVAC Piping' },
{ code: '23 05 29', title: 'Hangers and Supports for HVAC Piping and Equipment' },
{ code: '23 05 33', title: 'Heat Tracing for HVAC Piping' },
{ code: '23 05 48', title: 'Vibration and Seismic Controls for HVAC Piping and Equipment' },
{ code: '23 05 53', title: 'Identification for HVAC Piping and Equipment' },
{ code: '23 05 63', title: 'Anti-Microbial Coatings for HVAC Ducts and Equipment' },
{ code: '23 05 66', title: 'Anti-Microbial Ultraviolet Emitters for HVAC Ducts and Equipment' },
{ code: '23 05 93', title: 'Testing, Adjusting, and Balancing for HVAC' },
{ code: '23 06 00', title: 'Schedules for HVAC' },
{ code: '23 06 10', title: 'Schedules for Facility Fuel Service Systems' },
{ code: '23 06 20', title: 'Schedules for HVAC Piping and Pumps' },
{ code: '23 06 20.13', title: 'Hydronic Pump Schedule' },
{ code: '23 06 30', title: 'Schedules for HVAC Air Distribution' },
{ code: '23 06 30.13', title: 'HVAC Fan Schedule' },
{ code: '23 06 30.16', title: 'Air Terminal Unit Schedule' },
{ code: '23 06 30.19', title: 'Air Outlet and Inlet Schedule' },
{ code: '23 06 30.23', title: 'HVAC Air Cleaning Device Schedule' },
{ code: '23 06 50', title: 'Schedules for Central Heating Equipment' },
{ code: '23 06 50.13', title: 'Heating Boiler Schedule' },
{ code: '23 06 60', title: 'Schedules for Central Cooling Equipment' },
{ code: '23 06 60.13', title: 'Refrigerant Condenser Schedule' },
{ code: '23 06 60.16', title: 'Packaged Water Chiller Schedule' },
{ code: '23 06 70', title: 'Schedules for Central HVAC Equipment' },
{ code: '23 06 70.13', title: 'Indoor, Central-Station Air-Handling Unit Schedule' },
{ code: '23 06 70.16', title: 'Packaged Outdoor HVAC Equipment Schedule' },
{ code: '23 06 80', title: 'Schedules for Decentralized HVAC Equipment' },
{ code: '23 06 80.13', title: 'Decentralized Unitary HVAC Equipment Schedule' },
{ code: '23 06 80.16', title: 'Convection Heating and Cooling Unit Schedule' },
{ code: '23 06 80.19', title: 'Radiant Heating Unit Schedule' },
{ code: '23 07 00', title: 'HVAC Insulation' },
{ code: '23 07 13', title: 'Duct Insulation' },
{ code: '23 07 16', title: 'HVAC Equipment Insulation' },
{ code: '23 07 19', title: 'HVAC Piping Insulation' },
{ code: '23 08 00', title: 'Commissioning of HVAC' },
{ code: '23 09 00', title: 'Instrumentation and Control for HVAC' },
{ code: '23 09 13', title: 'Instrumentation and Control Devices for HVAC' },
{ code: '23 09 13.13', title: 'Actuators and Operators' },
{ code: '23 09 13.23', title: 'Sensors and Transmitters' },
{ code: '23 09 13.33', title: 'Control Valves' },
{ code: '23 09 13.43', title: 'Control Dampers' },
{ code: '23 09 23', title: 'Direct-Digital Control System for HVAC' },
{ code: '23 09 33', title: 'Electric and Electronic Control System for HVAC' },
{ code: '23 09 43', title: 'Pneumatic Control System for HVAC' },
{ code: '23 09 53', title: 'Pneumatic and Electric Control System for HVAC' },
{ code: '23 09 93', title: 'Sequence of Operations for HVAC Controls' },
{ code: '23 10 00', title: 'FACILITY FUEL SYSTEMS' },
{ code: '23 11 00', title: 'Facility Fuel Piping' },
{ code: '23 11 13', title: 'Facility Fuel-Oil Piping' },
{ code: '23 11 16', title: 'Facility Gasoline Piping' },
{ code: '23 11 23', title: 'Facility Natural-Gas Piping' },
{ code: '23 11 26', title: 'Facility Liquefied-Petroleum Gas Piping' },
{ code: '23 12 00', title: 'Facility Fuel Pumps' },
{ code: '23 12 13', title: 'Facility Fuel-Oil Pumps' },
{ code: '23 12 16', title: 'Facility Gasoline Dispensing Pumps' },
{ code: '23 13 00', title: 'Facility Fuel-Storage Tanks' },
{ code: '23 13 13', title: 'Facility Underground Fuel-Oil, Storage Tanks' },
{ code: '23 13 13.13', title: 'Double- Wall Steel, Underground Fuel-Oil, Storage Tanks' },
{ code: '23 13 13.16', title: 'Composite, Steel, Underground Fuel-Oil, Storage Tanks' },
{ code: '23 13 13.19', title: 'Jacketed, Steel, Underground Fuel-Oil, Storage Tanks' },
{ code: '23 13 13.23', title: 'Glass-Fiber-Reinforced-Plastic, Underground Fuel-Oil, Storage Tanks' },
{ code: '23 13 13.33', title: 'Fuel-Oil Storage Tank Pumps' },
{ code: '23 13 23', title: 'Facility Aboveground Fuel-Oil, Storage Tanks' },
{ code: '23 13 23.13', title: 'Vertical, Steel, Aboveground Fuel-Oil, Storage Tanks' },
{ code: '23 13 23.16', title: 'Horizontal, Steel, Aboveground Fuel-Oil, Storage Tanks' },
{ code: '23 13 23.19', title: 'Containment-Dike, Steel, Aboveground Fuel-Oil, Storage Tanks' },
{ code: '23 13 23.23', title: 'Insulated, Steel, Aboveground Fuel-Oil, Storage Tanks' },
{ code: '23 13 23.26', title: 'Concrete-Vaulted, Steel, Aboveground Fuel-Oil, Storage Tanks' },
{ code: '23 20 00', title: 'HVAC PIPING AND PUMPS' },
{ code: '23 21 00', title: 'Hydronic Piping and Pumps' },
{ code: '23 21 13', title: 'Hydronic Piping' },
{ code: '23 21 13.13', title: 'Underground Hydronic Piping' },
{ code: '23 21 13.23', title: 'Aboveground Hydronic Piping' },
{ code: '23 21 13.33', title: 'Ground-Loop Heat-Pump Piping' },
{ code: '23 21 23', title: 'Hydronic Pumps' },
{ code: '23 21 23.13', title: 'In-Line Centrifugal Hydronic Pumps' },
{ code: '23 21 23.16', title: 'Base-Mounted, Centrifugal Hydronic Pumps' },
{ code: '23 21 23.19', title: 'Vertical-Mounted, Double-Suction Centrifugal Hydronic Pumps' },
{ code: '23 21 23.23', title: 'Vertical-Turbine Hydronic Pumps' },
{ code: '23 21 29', title: 'Automatic Condensate Pump Units' },
{ code: '23 22 00', title: 'Steam and Condensate Piping and Pumps' },
{ code: '23 22 13', title: 'Steam and Condensate Heating Piping' },
{ code: '23 22 13.13', title: 'Underground Steam and Condensate Heating Piping' },
{ code: '23 22 13.23', title: 'Aboveground Steam and Condensate Heating Piping' },
{ code: '23 22 23', title: 'Steam Condensate Pumps' },
{ code: '23 22 23.13', title: 'Electric-Driven Steam Condensate Pumps' },
{ code: '23 22 23.23', title: 'Pressure-Powered Steam Condensate Pumps' },
{ code: '23 23 00', title: 'Refrigerant Piping' },
{ code: '23 23 13', title: 'Refrigerant Piping Valves' },
{ code: '23 23 16', title: 'Refrigerant Piping Specialties' },
{ code: '23 23 19', title: 'Refrigerant Safety Relief Valve Discharge Piping' },
{ code: '23 23 23', title: 'Refrigerants' },
{ code: '23 24 00', title: 'Internal-Combustion Engine Piping' },
{ code: '23 24 13', title: 'Internal-Combustion Engine Remote-Radiator Coolant Piping' },
{ code: '23 24 16', title: 'Internal-Combustion Engine Exhaust Piping' },
{ code: '23 25 00', title: 'HVAC Water Treatment' },
{ code: '23 25 13', title: 'Water Treatment for Closed-Loop Hydronic Systems' },
{ code: '23 25 16', title: 'Water Treatment for Open Hydronic Systems' },
{ code: '23 25 19', title: 'Water Treatment for Steam System Feedwater' },
{ code: '23 25 23', title: 'Water Treatment for Humidification Steam System Feedwater' },
{ code: '23 30 00', title: 'HVAC AIR DISTRIBUTION' },
{ code: '23 31 00', title: 'HVAC Ducts and Casings' },
{ code: '23 31 13', title: 'Metal Ducts' },
{ code: '23 31 13.13', title: 'Rectangular Metal Ducts' },
{ code: '23 31 13.16', title: 'Round and Flat-Oval Spiral Ducts' },
{ code: '23 31 13.19', title: 'Metal Duct Fittings' },
{ code: '23 31 16', title: 'Nonmetal Ducts' },
{ code: '23 31 16.13', title: 'Fibrous-Glass Ducts' },
{ code: '23 31 16.16', title: 'Thermoset Fiberglass-Reinforced Plastic Ducts' },
{ code: '23 31 16.19', title: 'PVC Ducts' },
{ code: '23 31 16.26', title: 'Concrete Ducts' },
{ code: '23 31 19', title: 'HVAC Casings' },
{ code: '23 32 00', title: 'Air Plenums and Chases' },
{ code: '23 32 13', title: 'Fabricated, Metal Air Plenums' },
{ code: '23 32 33', title: 'Air-Distribution Ceiling Plenums' },
{ code: '23 32 36', title: 'Air-Distribution Floor Plenums' },
{ code: '23 32 39', title: 'Air-Distribution Wall Plenums' },
{ code: '23 32 43', title: 'Air-Distribution Chases Formed by General Construction' },
{ code: '23 32 48', title: 'Acoustical Air Plenums' },
{ code: '23 33 00', title: 'Air Duct Accessories' },
{ code: '23 33 13', title: 'Dampers' },
{ code: '23 33 13.13', title: 'Volume-Control Dampers' },
{ code: '23 33 13.16', title: 'Fire Dampers' },
{ code: '23 33 13.19', title: 'Smoke-Control Dampers' },
{ code: '23 33 13.23', title: 'Backdraft Dampers' },
{ code: '23 33 19', title: 'Duct Silencers' },
{ code: '23 33 23', title: 'Turning Vanes' },
{ code: '23 33 33', title: 'Duct-Mounting Access Doors' },
{ code: '23 33 43', title: 'Flexible Connectors' },
{ code: '23 33 46', title: 'Flexible Ducts' },
{ code: '23 33 53', title: 'Duct Liners' },
{ code: '23 34 00', title: 'HVAC Fans' },
{ code: '23 34 13', title: 'Axial HVAC Fans' },
{ code: '23 34 16', title: 'Centrifugal HVAC Fans' },
{ code: '23 34 23', title: 'HVAC Power Ventilators' },
{ code: '23 34 33', title: 'Air Curtains' },
{ code: '23 35 00', title: 'Special Exhaust Systems' },
{ code: '23 35 13', title: 'Sawdust Collection Systems' },
{ code: '23 35 16', title: 'Engine Exhaust Systems' },
{ code: '23 35 16.13', title: 'Positive-Pressure Engine Exhaust Systems' },
{ code: '23 35 16.16', title: 'Mechanical Engine Exhaust Systems' },
{ code: '23 36 00', title: 'Air Terminal Units' },
{ code: '23 36 13', title: 'Constant-Air-Volume Units' },
{ code: '23 36 16', title: 'Variable-Air-Volume Units' },
{ code: '23 37 00', title: 'Air Outlets and Inlets' },
{ code: '23 37 13', title: 'Diffusers, Registers, and G rilles' },
{ code: '23 37 16', title: 'Fabric Air Distribution Devices' },
{ code: '23 37 23', title: 'HVAC Gravity Ventilators' },
{ code: '23 37 23.13', title: 'HVAC Gravity Dome Ventilators' },
{ code: '23 37 23.16', title: 'HVAC Gravity Louvered-Penthouse Ventilators' },
{ code: '23 37 23.19', title: 'HVAC Gravity Upblast Ventilators' },
{ code: '23 38 00', title: 'Ventilation Hoods' },
{ code: '23 38 13', title: 'Commercial-Kitchen Hoods' },
{ code: '23 38 13.13', title: 'Listed Commercial-Kitchen Hoods' },
{ code: '23 38 13.16', title: 'Standard Commercial-Kitchen Hoods' },
{ code: '23 38 16', title: 'Fume Hoods' },
{ code: '23 40 00', title: 'HVAC AIR CLEANING DEVICES' },
{ code: '23 41 00', title: 'Particulate Air Filtration' },
{ code: '23 41 13', title: 'Panel Air Filters' },
{ code: '23 41 16', title: 'Renewable-Media Air Filters' },
{ code: '23 41 19', title: 'Washable Air Filters' },
{ code: '23 41 23', title: 'Extended Surface Filters' },
{ code: '23 41 33', title: 'High-Efficiency Particulate Filtration' },
{ code: '23 41 43', title: 'Ultra-Low Penetration Filtration' },
{ code: '23 41 46', title: 'Super Ultra-Low Penetration Filtration' },
{ code: '23 42 00', title: 'Gas-Phase Air Filtration' },
{ code: '23 42 13', title: 'Activated-Carbon Air Filtration' },
{ code: '23 42 16', title: 'Chemically-Impregnated Adsorption Air Filtration' },
{ code: '23 42 19', title: 'Catalytic-Adsorption Air Filtration' },
{ code: '23 43 00', title: 'Electronic Air Cleaners' },
{ code: '23 43 13', title: 'Washable Electronic Air Cleaners' },
{ code: '23 43 16', title: 'Agglomerator Electronic Air Cleaners' },
{ code: '23 43 23', title: 'Self-Contained Electronic Air Cleaners' },
{ code: '23 50 00', title: 'CENTRAL HEATING EQUIPMENT' },
{ code: '23 51 00', title: 'Breechings, Chimneys, and Stacks' },
{ code: '23 51 13', title: 'Draft Control Devices' },
{ code: '23 51 13.13', title: 'Draft-Induction Fans' },
{ code: '23 51 13.16', title: 'Vent Dampers' },
{ code: '23 51 13.19', title: 'Barometric Dampers' },
{ code: '23 51 16', title: 'Fabricated Breechings and Accessories' },
{ code: '23 51 19', title: 'Fabricated Stacks' },
{ code: '23 51 23', title: 'Gas Vents' },
{ code: '23 51 33', title: 'Insulated Sectional Chimneys' },
{ code: '23 51 43', title: 'Flue-Gas Filtration Equipment' },
{ code: '23 51 43.13', title: 'Gaseous Filtration' },
{ code: '23 51 43.16', title: 'Particulate Filtration' },
{ code: '23 52 00', title: 'Heating Boilers' },
{ code: '23 52 13', title: 'Electric Boilers' },
{ code: '23 52 16', title: 'Condensing Boilers' },
{ code: '23 52 16.13', title: 'Stainless-Steel Condensing Boilers' },
{ code: '23 52 16.16', title: 'Aluminum Condensing Boilers' },
{ code: '23 52 19', title: 'Pulse Combustion Boilers' },
{ code: '23 52 23', title: 'Cast-Iron Boilers' },
{ code: '23 52 33', title: 'Water-Tube Boilers' },
{ code: '23 52 33.13', title: 'Finned Water-Tube Boilers' },
{ code: '23 52 33.16', title: 'Steel Water-Tube Boilers' },
{ code: '23 52 33.19', title: 'Copper Water-Tube Boilers' },
{ code: '23 52 39', title: 'Fire-Tube Boilers' },
{ code: '23 52 39.13', title: 'Scotch Marine Boilers' },
{ code: '23 52 39.16', title: 'Steel Fire-Tube Boilers' },
{ code: '23 53 00', title: 'Heating Boiler Feedwater Equipment' },
{ code: '23 53 13', title: 'Boiler Feedwater Pumps' },
{ code: '23 53 16', title: 'Deaerators' },
{ code: '23 54 00', title: 'Furnaces' },
{ code: '23 54 13', title: 'Electric -Resistance Furnaces' },
{ code: '23 54 16', title: 'Fuel-Fired Furnaces' },
{ code: '23 54 16.13', title: 'Gas-Fired Furnaces' },
{ code: '23 54 16.16', title: 'Oil-Fired Furnaces' },
{ code: '23 55 00', title: 'Fuel-Fired Heaters' },
{ code: '23 55 13', title: 'Fuel-Fired Duct Heaters' },
{ code: '23 55 13.13', title: 'Oil-Fired Duct Heaters' },
{ code: '23 55 13.16', title: 'Gas-Fired Duct Heaters' },
{ code: '23 55 23', title: 'Gas-Fired Radiant Heaters' },
{ code: '23 55 33', title: 'Fuel-Fired Unit Heaters' },
{ code: '23 55 33.13', title: 'Oil-Fired Unit Heaters' },
{ code: '23 55 33.16', title: 'Gas-Fired Unit Heaters' },
{ code: '23 56 00', title: 'Solar Energy Heating Equipment' },
{ code: '23 56 13', title: 'Heating Solar Collectors' },
{ code: '23 56 13.13', title: 'Heating Solar Flat-Plate Collectors' },
{ code: '23 56 13.16', title: 'Heating Solar Concentrating Collectors' },
{ code: '23 56 13.19', title: 'Heating Solar Vacuum-Tube Collectors' },
{ code: '23 56 16', title: 'Packaged Solar Heating Equipment' },
{ code: '23 57 00', title: 'Heat Exchangers for HVAC' },
{ code: '23 57 13', title: 'Steam-to-Steam Heat Exchangers' },
{ code: '23 57 16', title: 'Steam-to-Water Heat Exchangers' },
{ code: '23 57 19', title: 'Liquid-to-Liquid Heat Exchangers' },
{ code: '23 57 19.13', title: 'Plate-Type, Liquid- to-Liquid Heat Exchangers' },
{ code: '23 57 19.16', title: 'Shell-Type, Liquid-to-Liquid Heat Exchangers' },
{ code: '23 57 33', title: 'Direct Geoexchange Heat Exchangers' },
{ code: '23 60 00', title: 'CENTRAL COOLING EQUIPMENT' },
{ code: '23 61 00', title: 'Refrigerant Compressors' },
{ code: '23 61 13', title: 'Centrifugal Refrigerant Compressors' },
{ code: '23 61 13.13', title: 'Non-Condensable Gas Purge Equipment' },
{ code: '23 61 16', title: 'Reciprocating Refrigerant Compressors' },
{ code: '23 61 19', title: 'Scroll Refrigerant Compressors' },
{ code: '23 61 23', title: 'Rotary-Screw Refrigerant Compressors' },
{ code: '23 62 00', title: 'Packaged Compressor and Condenser Units' },
{ code: '23 62 13', title: 'Packaged Air-Cooled Refrigerant Compressor and Condenser Units' },
{ code: '23 62 23', title: 'Packaged Water-Cooled Refrigerant Compressor and Condenser Units' },
{ code: '23 63 00', title: 'Refrigerant Condensers' },
{ code: '23 63 13', title: 'Air-Cooled Refrigerant Condensers' },
{ code: '23 63 23', title: 'Water-Cooled Refrigerant Condensers' },
{ code: '23 63 33', title: 'Evaporative Refrigerant Condensers' },
{ code: '23 64 00', title: 'Packaged Water Chillers' },
{ code: '23 64 13', title: 'Absorption Water Chillers' },
{ code: '23 64 13.13', title: 'Direct-Fired Absorption Water Chillers' },
{ code: '23 64 13.16', title: 'Indirect-Fired Absorption Water Chillers' },
{ code: '23 64 16', title: 'Centrifugal Water Chillers' },
{ code: '23 64 19', title: 'Reciprocating Water Chillers' },
{ code: '23 64 23', title: 'Scroll Water Chillers' },
{ code: '23 64 26', title: 'Rotary-Screw Water Chillers' },
{ code: '23 65 00', title: 'Cooling Towers' },
{ code: '23 65 13', title: 'Forced-Draft Cooling Towers' },
{ code: '23 65 13.13', title: 'Open-Circuit, Forced-Draft Cooling Towers' },
{ code: '23 65 13.16', title: 'Closed-Circuit, Forced-Draft Cooling Towers' },
{ code: '23 65 16', title: 'Natural-Draft Cooling Towers' },
{ code: '23 65 23', title: 'Field-Erected Cooling Towers' },
{ code: '23 65 33', title: 'Liquid Coolers' },
{ code: '23 70 00', title: 'CENTRAL HVAC EQUIPMENT' },
{ code: '23 71 00', title: 'Thermal Storage' },
{ code: '23 71 13', title: 'Thermal Heat Storage' },
{ code: '23 71 13.13', title: 'Room Storage Heaters for Thermal Storage' },
{ code: '23 71 13.16', title: 'Heat-Pump Boosters for Thermal Storage' },
{ code: '23 71 13.19', title: 'Central Furnace Heat-Storage Units' },
{ code: '23 71 13.23', title: 'Pressurized- Water Thermal Storage Tanks' },
{ code: '23 71 16', title: 'Chilled-Water Thermal Storage' },
{ code: '23 71 19', title: 'Ice Storage' },
{ code: '23 71 19.13', title: 'Internal Ice-on-Coil Thermal Storage' },
{ code: '23 71 19.16', title: 'External Ice-on-Coil Thermal Storage' },
{ code: '23 71 19.19', title: 'Encapsulated-Ice Thermal Storage' },
{ code: '23 71 19.23', title: 'Ice-Harvesting Thermal Storage' },
{ code: '23 71 19.26', title: 'Ice-Slurry Thermal Storage' },
{ code: '23 72 00', title: 'Air-to-Air Energy Recovery Equipment' },
{ code: '23 72 13', title: 'Heat-Wheel Air-to-Air Energy-Recovery Equipment' },
{ code: '23 72 16', title: 'Heat-Pipe Air-to-Air Energy-Recovery Equipment' },
{ code: '23 72 19', title: 'Fixed-Plate Air-to-Air Energy-Recovery Equipment' },
{ code: '23 72 23', title: 'Packaged Air-to-Air Energy-Recovery Units' },
{ code: '23 73 00', title: 'Indoor Central-Station Air-Handling Units' },
{ code: '23 73 13', title: 'Modular Indoor Central-Station Air-Handling Units' },
{ code: '23 73 23', title: 'Custom Indoor Central-Station Air-Handling Units' },
{ code: '23 73 33', title: 'Indoor Indirect Fuel-Fired Heating and Ventilating Units' },
{ code: '23 73 33.13', title: 'Indoor Indirect Oil-Fired Heating and Ventilating Units' },
{ code: '23 73 33.16', title: 'Indoor Indirect Gas-Fired Heating and Ventilating Units' },
{ code: '23 73 39', title: 'Indoor, Direct Gas-Fired Heating and Ventilating Units' },
{ code: '23 74 00', title: 'Packaged Outdoor HVAC Equipment' },
{ code: '23 74 13', title: 'Packaged, Outdoor, Central-Station Air-Handling Units' },
{ code: '23 74 23', title: 'Packaged, Outdoor, Heating-Only Makeup-Air Units' },
{ code: '23 74 23.13', title: 'Packaged, Direct-Fired, Outdoor, Heating-Only Makeup-Air Units' },
{ code: '23 74 23.16', title: 'Packaged, Indirect-Fired, Outdoor, Heating-Only Makeup-Air Units' },
{ code: '23 74 33', title: 'Packaged, Outdoor, Heating and Cooling Makeup Air-Conditioners' },
{ code: '23 75 00', title: 'Custom-Packaged Outdoor HVAC Equipment' },
{ code: '23 75 13', title: 'Custom-Packaged, Outdoor, Central-Station Air-Handling Units' },
{ code: '23 75 23', title: 'Custom-Packaged, Outdoor, Heating and Ventilating Makeup-Air Units' },
{ code: '23 75 33', title: 'Custom-Packaged, Outdoor, Heating and Cooling Makeup Air-Conditioners' },
{ code: '23 76 00', title: 'Evaporative Air-Cooling Equipment' },
{ code: '23 76 13', title: 'Direct Evaporative Air Coolers' },
{ code: '23 76 16', title: 'Indirect Evaporative Air Coolers' },
{ code: '23 76 19', title: 'Combined Direct and Indirect Evaporative Air Coolers' },
{ code: '23 80 00', title: 'DECENTRALIZED HVAC EQUIPMENT' },
{ code: '23 81 00', title: 'Decentralized Unitary HVAC Equipment' },
{ code: '23 81 13', title: 'Packaged Terminal Air-Conditioners' },
{ code: '23 81 16', title: 'Room Air-Conditioners' },
{ code: '23 81 19', title: 'Self-Contained Air-Conditioners' },
{ code: '23 81 19.13', title: 'Small-Capacity Self-Contained Air-Conditioners' },
{ code: '23 81 19.16', title: 'Large-Capacity Self-Contained Air-Conditioners' },
{ code: '23 81 23', title: 'Computer-Room Air-Conditioners' },
{ code: '23 81 26', title: 'Split-System Air-Conditioners' },
{ code: '23 81 43', title: 'Air-Source Unitary Heat Pumps' },
{ code: '23 81 46', title: 'Water-Source Unitary Heat Pumps' },
{ code: '23 82 00', title: 'Convection Heating and Cooling Units' },
{ code: '23 82 13', title: 'Valance Heating and Cooling Units' },
{ code: '23 82 16', title: 'Air Coils' },
{ code: '23 82 19', title: 'Fan Coil Units' },
{ code: '23 82 23', title: 'Unit Ventilators' },
{ code: '23 82 26', title: 'Induction Units' },
{ code: '23 82 29', title: 'Radiators' },
{ code: '23 82 33', title: 'Convectors' },
{ code: '23 82 36', title: 'Finned-Tube Radiation Heaters' },
{ code: '23 82 39', title: 'Unit Heaters' },
{ code: '23 82 39.13', title: 'Cabinet Unit Heaters' },
{ code: '23 82 39.16', title: 'Propeller Unit Heaters' },
{ code: '23 82 39.19', title: 'Wall and Ceiling Unit Heaters' },
{ code: '23 83 00', title: 'Radiant Heating Units' },
{ code: '23 83 13', title: 'Radiant-Heating Electric Cables' },
{ code: '23 83 13.16', title: 'Radiant-Heating Electric Mats' },
{ code: '23 83 16', title: 'Radiant-Heating Hydronic Piping' },
{ code: '23 83 23', title: 'Radiant-Heating Electric Panels' },
{ code: '23 83 33', title: 'Electric Radiant Heaters' },
{ code: '23 84 00', title: 'Humidity Control Equipment' },
{ code: '23 84 13', title: 'Humidifiers' },
{ code: '23 84 16', title: 'Dehumidifiers' },
{ code: '23 84 19', title: 'Indoor Pool and Ice-Rink Dehumidification Units' },
{ code: '23 90 00', title: 'Unassigned' }]
})
}
division_22() {
return ({
division: 22,
divisionTitle: 'Plumbing',
codes: [{ code: '22 00 00', title: 'PLUMBING' },
{ code: '22 01 00', title: 'Operation and Maintenance of Plumbing' },
{ code: '22 01 10', title: 'Operation and Maintenance of Plumbing Piping and Pumps' },
{ code: '22 01 30', title: 'Operation and Maintenance of Plumbing Equipment' },
{ code: '22 01 40', title: 'Operation and Maintenance of Plumbing Fixtures' },
{ code: '22 01 50', title: 'Operation and Maintenance of Pool and Fountain Plumbing Systems' },
{ code: '22 01 60', title: 'Operation and Maintenance of Laboratory and Healthcare Systems' },
{ code: '22 05 00', title: 'Common Work Results for Plumbing' },
{ code: '22 05 13', title: 'Common Motor Requirements for Plumbing Equipment' },
{ code: '22 05 16', title: 'Expansion Fittings and Loops for Plumbing Piping' },
{ code: '22 05 19', title: 'Meters and Gages for Plumbing Piping' },
{ code: '22 05 23', title: 'General-Duty Valves for Plumbing Piping' },
{ code: '22 05 29', title: 'Hangers and Supports for Plumbing Piping and Equipment' },
{ code: '22 05 33', title: 'Heat Tracing for Plumbing Piping' },
{ code: '22 05 48', title: 'Vibration and Seismic Controls for Plumbing Piping and Equipment' },
{ code: '22 05 53', title: 'Identification for Plumbing Piping and Equipment' },
{ code: '22 05 73', title: 'Facility Drainage Manholes' },
{ code: '22 05 76', title: 'Facility Drainage Piping Cleanouts' },
{ code: '22 06 00', title: 'Schedules for Plumbing' },
{ code: '22 06 10', title: 'Schedules for Plumbing Piping and Pumps' },
{ code: '22 06 10.13', title: 'Plumbing Pump Schedule' },
{ code: '22 06 12', title: 'Schedules for Facility Potable Water Storage' },
{ code: '22 06 15', title: 'Schedules for General Service Compressed-Air Equipment' },
{ code: '22 06 30', title: 'Schedules for Plumbing Equipment' },
{ code: '22 06 30.13', title: 'Domestic Water Heater Schedule' },
{ code: '22 06 40', title: 'Schedules for Plumbing Fixtures' },
{ code: '22 06 40.13', title: 'Plumbing Fixture Schedule' },
{ code: '22 06 50', title: 'Schedules for Pool and Fountain Plumbing Systems' },
{ code: '22 06 60', title: 'Schedules for Laboratory and Healthcare Systems' },
{ code: '22 07 00', title: 'Plumbing Insulation' },
{ code: '22 07 16', title: 'Plumbing Equipment Insulation' },
{ code: '22 07 19', title: 'Plumbing Piping Insulation' },
{ code: '22 08 00', title: 'Commissioning of Plumbing' },
{ code: '22 09 00', title: 'Instrumentation and Control for Plumbing' },
{ code: '22 10 00', title: 'PLUMBING PIPING AND PUMPS' },
{ code: '22 11 00', title: 'Facility Water Distribution' },
{ code: '22 11 13', title: 'Facility Water Distribution Piping' },
{ code: '22 11 16', title: 'Domestic Water Piping' },
{ code: '22 11 19', title: 'Domestic Water Piping Specialties' },
{ code: '22 11 23', title: 'Domestic Water Pumps' },
{ code: '22 11 23.13', title: 'Domestic- Water Packaged Booster Pumps' },
{ code: '22 11 23.23', title: 'Close-Coupled, In-Line, Sealless Centrifugal Domestic-Water Pumps' },
{ code: '22 11 23.26', title: 'Close-Coupled, Horizontally Mounted, In-Line Centrifugal Domestic-Water Pumps' },
{ code: '22 11 23.29', title: 'Close-Coupled, Vertically Mounted, In-Line Centrifugal Domestic-Water Pumps' },
{ code: '22 11 23.33', title: 'Separately Coupled, In-Line Centrifugal Domestic-Water Pumps' },
{ code: '22 11 23.36', title: 'Separately Coupled, Horizontally Mounted, In-Line Centrifugal Domestic-Water Pumps' },
{ code: '22 12 00', title: 'Facility Potable-Water Storage Tanks' },
{ code: '22 12 13', title: 'Facility Roof-Mounted, Potable-Water Storage Tanks' },
{ code: '22 12 16', title: 'Facility Elevated, Potable-Water Storage Tanks' },
{ code: '22 12 19', title: 'Facility Ground-Mounted, Potable-Water Storage Tanks' },
{ code: '22 12 23', title: 'Facility Indoor Potable-Water Storage Tanks' },
{ code: '22 12 23.13', title: 'Facility Steel, Indoor Potable- Water Storage Pressure Tanks' },
{ code: '22 12 23.16', title: 'Facility Steel, Indoor Potable- Water Storage Non-Pressure Tanks' },
{ code: '22 12 23.23', title: 'Facility Plastic, Indoor Potable- Water Storage Pressure Tanks' },
{ code: '22 12 23.26', title: 'Facility Plastic, Indoor Potable- Water Storage Non-Pressure Tanks' },
{ code: '22 13 00', title: 'Facility Sanitary Sewerage' },
{ code: '22 13 13', title: 'Facility Sanitary Sewers' },
{ code: '22 13 16', title: 'Sanitary Waste and Vent Piping' },
{ code: '22 13 19', title: 'Sanitary Waste Piping Specialties' },
{ code: '22 13 19.13', title: 'Sanitary Drains' },
{ code: '22 13 19.23', title: 'Fats, Oils, and Grease Disposal Systems' },
{ code: '22 13 19.26', title: 'Grease Removal Devices' },
{ code: '22 13 19.33', title: 'Backwater Valves' },
{ code: '22 13 19.36', title: 'Air-Admittance Valves' },
{ code: '22 13 23', title: 'Sanitary Waste Interceptors' },
{ code: '22 13 26', title: 'Sanitary Waste Separators' },
{ code: '22 13 29', title: 'Sanitary Sewerage Pumps' },
{ code: '22 13 29.13', title: 'Wet-Pit-Mounted, Vertical Sewerage Pumps' },
{ code: '22 13 29.16', title: 'Submersible Sewerage Pumps' },
{ code: '22 13 29.23', title: 'Sewerage Pump Reverse-Flow Assemblies' },
{ code: '22 13 29.33', title: 'Sewerage Pump Basins and Pits' },
{ code: '22 13 33', title: 'Packaged, Submersible Sewerage Pump Units' },
{ code: '22 13 36', title: 'Packaged, Wastewater Pump Units' },
{ code: '22 13 43', title: 'Facility Packaged Sewage Pumping Stations' },
{ code: '22 13 43.13', title: 'Facility Dry-Well Packaged Sewage Pumping Stations' },
{ code: '22 13 43.16', title: 'Facility Wet- Well Packaged Sewage Pumping Stations' },
{ code: '22 13 53', title: 'Facility Septic Tanks' },
{ code: '22 14 00', title: 'Facility Storm Drainage' },
{ code: '22 14 13', title: 'Facility Storm Drainage Piping' },
{ code: '22 14 16', title: 'Rainwater Leaders' },
{ code: '22 14 19', title: 'Sump Pump Discharge Piping' },
{ code: '22 14 23', title: 'Storm Drainage Piping Specialties' },
{ code: '22 14 26', title: 'Facility Storm Drains' },
{ code: '22 14 26.13', title: 'Roof Drains' },
{ code: '22 14 26.16', title: 'Facility Area Drains' },
{ code: '22 14 26.19', title: 'Facility Trench Drains' },
{ code: '22 14 29', title: 'Sump Pumps' },
{ code: '22 14 29.13', title: 'Wet-Pit-Mounted, Vertical Sump Pumps' },
{ code: '22 14 29.16', title: 'Submersible Sump Pumps' },
{ code: '22 14 29.19', title: 'Sump-Pump Basins and Pits' },
{ code: '22 14 33', title: 'Packaged, Pedestal Drainage Pump Units' },
{ code: '22 14 36', title: 'Packaged, Submersible, Drainage Pump Units' },
{ code: '22 15 00', title: 'General Service Compressed-Air Systems' },
{ code: '22 15 13', title: 'General Service Compressed-Air Piping' },
{ code: '22 15 16', title: 'General Service Compressed-Air Valves' },
{ code: '22 15 19', title: 'General Service Packaged Air Compressors and Receivers' },
{ code: '22 15 19.13', title: 'General Service Packaged Reciprocating Air Compressors' },
{ code: '22 15 19.16', title: 'General Service Packaged Liquid-Ring Air Compressors' },
{ code: '22 15 19.19', title: 'General Service Packaged Rotary-Screw Air Compressors' },
{ code: '22 15 19.23', title: 'General Service Packaged Sliding-Vane Air Compressors' },
{ code: '22 20 00', title: 'Unassigned' },
{ code: '22 30 00', title: 'PLUMBING EQUIPMENT' },
{ code: '22 31 00', title: 'Domestic Water Softeners' },
{ code: '22 31 13', title: 'Residential Domestic Water Softeners' },
{ code: '22 31 16', title: 'Commercial Domestic Water Softeners' },
{ code: '22 32 00', title: 'Domestic Water Filtration Equipment' },
{ code: '22 32 13', title: 'Domestic -Water Bag-Type Filters' },
{ code: '22 32 16', title: 'Domestic -Water Freestanding Cartridge Filters' },
{ code: '22 32 19', title: 'Domestic-Water Off-Floor Cartridge Filters' },
{ code: '22 32 23', title: 'Domestic -Water Carbon Filters' },
{ code: '22 32 26', title: 'Domestic -Water Sand Filters' },
{ code: '22 32 26.13', title: 'Domestic- Water Circulating Sand Filters' },
{ code: '22 32 26.16', title: 'Domestic- Water Multimedia Sand Filters' },
{ code: '22 32 26.19', title: 'Domestic- Water Greensand Filters' },
{ code: '22 33 00', title: 'Electric Domestic Water Heaters' },
{ code: '22 33 13', title: 'Instantaneous Electric Domestic Water Heaters' },
{ code: '22 33 13.13', title: 'Flow-Control, Instantaneous Electric Domestic Water Heaters' },
{ code: '22 33 13.16', title: 'Thermostat-Control, Instantaneous Electric Domestic Water Heaters' },
{ code: '22 33 30', title: 'Residential, Electric Domestic Water Heaters' },
{ code: '22 33 30.13', title: 'Residential, Small-Capacity Electric Domestic Water Heaters' },
{ code: '22 33 30.16', title: 'Residential, Storage Electric Domestic Water Heaters' },
{ code: '22 33 30.23', title: 'Residential, Collector-to-Tank, Solar-Electric Domestic Water Heaters' },
{ code: '22 33 30.26', title: 'Residential, Collector-to-Tank, Heat-Exchanger-Coil, Solar-Electric Domestic Water Heaters' },
{ code: '22 33 33', title: 'Light-Commercial Electric Domestic Water Heaters' },
{ code: '22 33 36', title: 'Commercial Domestic Water Electric Booster Heaters' },
{ code: '22 33 36.13', title: 'Commercial Domestic Water Electric Booster Heaters' },
{ code: '22 33 36.16', title: 'Commercial Storage Electric Domestic Water Heaters' },
{ code: '22 34 00', title: 'Fuel-Fired Domestic Water Heaters' },
{ code: '22 34 13', title: 'Instantaneous, Tankless, Gas Domestic Water Heaters' },
{ code: '22 34 30', title: 'Residential Gas Domestic Water Heaters' },
{ code: '22 34 30.13', title: 'Residential, Atmospheric, Gas Domestic Water Heaters' },
{ code: '22 34 30.16', title: 'Residential, Direct-Vent, Gas Domestic Water Heaters' },
{ code: '22 34 30.19', title: 'Residential, Power-Vent, Gas Domestic Water Heaters' },
{ code: '22 34 36', title: 'Commercial Gas Domestic Water Heaters' },
{ code: '22 34 36.13', title: 'Commercial, Atmospheric, Gas Domestic Water Heaters' },
{ code: '22 34 36.16', title: 'Commercial, Power-Burner, Gas Domestic Water Heaters' },
{ code: '22 34 36.19', title: 'Commercial, Power-Vent, Gas Domestic Water Heaters' },
{ code: '22 34 36.23', title: 'Commercial, High-Efficiency, Gas Domestic Water Heaters' },
{ code: '22 34 36.26', title: 'Commercial, Coil-Type, Finned-Tube, Gas Domestic Water Heaters' },
{ code: '22 34 36.29', title: 'Commercial, Grid-Type, Finned-Tube, Gas Domestic Water Heaters' },
{ code: '22 34 46', title: 'Oil-Fired Domestic Water Heaters' },
{ code: '22 34 46.13', title: 'Large-Capacity, Oil-Fired Domestic Water Heaters' },
{ code: '22 34 56', title: 'Dual-Fuel-Fired Domestic Water Heaters' },
{ code: '22 35 00', title: 'Domestic Water Heat Exchangers' },
{ code: '22 35 13', title: 'Instantaneous Domestic Water Heat Exchangers' },
{ code: '22 35 13.13', title: 'Heating-Fluid-in-Coil, Instantaneous Domestic Water Heat Exchangers' },
{ code: '22 35 13.16', title: 'Domestic- Water-in-Coil, Instantaneous Domestic Water Heat Exchangers' },
{ code: '22 35 13.19', title: 'Heating-Fluid-in-U-Tube-Coil, Instantaneous Domestic Water Heat Exchangers' },
{ code: '22 35 23', title: 'Circulating, Domestic Water Heat Exchangers' },
{ code: '22 35 23.13', title: 'Circulating, Compact Domestic Water Heat Exchangers' },
{ code: '22 35 23.16', title: 'Circulating, Storage Domestic Water Heat Exchangers' },
{ code: '22 35 29', title: 'Noncirculating, Domestic Water Heat Exchangers' },
{ code: '22 35 29.13', title: 'Noncirculating, Compact Domestic Water Heat Exchangers' },
{ code: '22 35 29.16', title: 'Noncirculating, Storage Domestic Water Heat Exchangers' },
{ code: '22 35 36', title: 'Domestic Water Brazed-Plate Heat Exchangers' },
{ code: '22 35 39', title: 'Domestic Water Frame-and-Plate Heat Exchangers' },
{ code: '22 35 43', title: 'Domestic Water Heat Reclaimers' },
{ code: '22 40 00', title: 'PLUMBING FIXTURES' },
{ code: '22 41 00', title: 'Residential Plumbing Fixtures' },
{ code: '22 41 13', title: 'Residential Water Closets, Urinals, and Bidets' },
{ code: '22 41 16', title: 'Residential Lavatories and Sinks' },
{ code: '22 41 19', title: 'Residential Bathtubs' },
{ code: '22 41 23', title: 'Residential Shower Receptors and Basins' },
{ code: '22 41 26', title: 'Residential Disposers' },
{ code: '22 41 36', title: 'Residential Laundry Trays' },
{ code: '22 41 39', title: 'Residential Faucets, Supplies, and Trim' },
{ code: '22 42 00', title: 'Commercial Plumbing Fixtures' },
{ code: '22 42 13', title: 'Commercial Water Closets, Urinals, and Bidets' },
{ code: '22 42 16', title: 'Commercial Lavatories and Sinks' },
{ code: '22 42 19', title: 'Commercial Bathtubs' },
{ code: '22 42 23', title: 'Commercial Shower Receptors and Basins' },
{ code: '22 42 26', title: 'Commercial Disposers' },
{ code: '22 42 29', title: 'Shampoo Bowls' },
{ code: '22 42 33', title: 'Wash Fountains' },
{ code: '22 42 36', title: 'Commercial Laundry Trays' },
{ code: '22 42 39', title: 'Commercial Faucets, Supplies, and Trim' },
{ code: '22 42 43', title: 'Flushometers' },
{ code: '22 43 00', title: 'Healthcare Plumbing Fixtures' },
{ code: '22 43 13', title: 'Healthcare Water Closets' },
{ code: '22 43 16', title: 'Healthcare Sinks' },
{ code: '22 43 19', title: 'Healthcare Bathtubs and Showers' },
{ code: '22 43 23', title: 'Healthcare Shower Receptors and Basins' },
{ code: '22 43 39', title: 'Healthcare Faucets' },
{ code: '22 43 43', title: 'Healthcare Plumbing Fixture Flushometers' },
{ code: '22 45 00', title: 'Emergency Plumbing Fixtures' },
{ code: '22 45 13', title: 'Emergency Showers' },
{ code: '22 45 16', title: 'Eyewash Equipment' },
{ code: '22 45 19', title: 'Self-Contained Eyewash Equipment' },
{ code: '22 45 23', title: 'Personal Eyewash Equipment' },
{ code: '22 45 26', title: 'Eye/Face Wash Equipment' },
{ code: '22 45 29', title: 'Hand-Held Emergency Drench Hoses' },
{ code: '22 45 33', title: 'Combination Emergency Fixture Units' },
{ code: '22 45 36', title: 'Emergency Fixture Water-Tempering Equipment' },
{ code: '22 46 00', title: 'Security Plumbing Fixtures' },
{ code: '22 46 13', title: 'Security Water Closets and Urinals' },
{ code: '22 46 16', title: 'Security Lavatories and Sinks' },
{ code: '22 46 39', title: 'Security Faucets, Supplies, and Trim' },
{ code: '22 46 43', title: 'Security Plumbing Fixture Flushometers' },
{ code: '22 46 53', title: 'Security Plumbing Fixture Supports' },
{ code: '22 47 00', title: 'Drinking Fountains and Water Coolers' },
{ code: '22 47 13', title: 'Drinking Fountains' },
{ code: '22 47 16', title: 'Pressure Water Coolers' },
{ code: '22 47 19', title: 'Water-Station Water Coolers' },
{ code: '22 47 23', title: 'Remote Water Coolers' },
{ code: '22 50 00', title: 'POOL AND FOUNTAIN PLUMBING SYSTEMS' },
{ code: '22 51 00', title: 'Swimming Pool Plumbing Systems' },
{ code: '22 51 13', title: 'Swimming Pool Piping' },
{ code: '22 51 16', title: 'Swimming Pool Pumps' },
{ code: '22 51 19', title: 'Swimming Pool Water Treatment Equipment' },
{ code: '22 51 23', title: 'Swimming Pool Equipment Controls' },
{ code: '22 52 00', title: 'Fountain Plumbing Systems' },
{ code: '22 52 13', title: 'Fountain Piping' },
{ code: '22 52 16', title: 'Fountain Pumps' },
{ code: '22 52 19', title: 'Fountain Water Treatment Equipment' },
{ code: '22 52 23', title: 'Fountain Equipment Controls' },
{ code: '22 60 00', title: 'GAS AND VACUUM SYSTEMS FOR LABORATORY AND HEALTHCARE FACILITIES' },
{ code: '22 61 00', title: 'Compressed-Air Systems for Laboratory and Healthcare Facilities' },
{ code: '22 61 13', title: 'Compressed-Air Piping for Laboratory and Healthcare Facilities' },
{ code: '22 61 13.53', title: 'Laboratory Compressed-Air Piping' },
{ code: '22 61 13.70', title: 'Healthcare Compressed-Air Piping' },
{ code: '22 61 13.74', title: 'Dental Compressed-Air Piping' },
{ code: '22 61 19', title: 'Compressed-Air Equipment for Laboratory and Healthcare Facilities' },
{ code: '22 61 19.53', title: 'Laboratory Compressed-Air Equipment' },
{ code: '22 61 19.70', title: 'Healthcare Compressed-Air Equipment' },
{ code: '22 61 19.74', title: 'Dental Compressed-Air Equipment' },
{ code: '22 62 00', title: 'Vacuum Systems for Laboratory and Healthcare Facilities' },
{ code: '22 62 13', title: 'Vacuum Piping for Laboratory and Healthcare Facilities' },
{ code: '22 62 13.53', title: 'Laboratory Vacuum Piping' },
{ code: '22 62 13.70', title: 'Healthcare, Surgical Vacuum Piping' },
{ code: '22 62 13.74', title: 'Dental Vacuum Piping' },
{ code: '22 62 19', title: 'Vacuum Equipment for Laboratory and Healthcare Facilities' },
{ code: '22 62 19.53', title: 'Laboratory Vacuum Equipment' },
{ code: '22 62 19.70', title: 'Healthcare Vacuum Equipment' },
{ code: '22 62 19.74', title: 'Dental Vacuum and Evacuation Equipment' },
{ code: '22 62 23', title: 'Waste Anesthesia-Gas Piping' },
{ code: '22 63 00', title: 'Gas Systems for Laboratory and Healthcare Facilities' },
{ code: '22 63 13', title: 'Gas Piping for Laboratory and Healthcare Facilities' },
{ code: '22 63 13.53', title: 'Laboratory Gas Piping' },
{ code: '22 63 13.70', title: 'Healthcare Gas Piping' },
{ code: '22 63 19', title: 'Gas Storage Tanks for Laboratory and Healthcare Facilities' },
{ code: '22 63 19.53', title: 'Laboratory Gas Storage Tanks' },
{ code: '22 63 19.70', title: 'Healthcare Gas Storage Tanks' },
{ code: '22 66 00', title: 'Chemical-Waste Systems for Laboratory and Healthcare Facilities' },
{ code: '22 66 53', title: 'Laboratory Chemical-Waste and Vent Piping' },
{ code: '22 66 70', title: 'Healthcare Chemical-Waste and Vent Piping' },
{ code: '22 66 83', title: 'Chemical-Waste Tanks' },
{ code: '22 66 83.13', title: 'Chemical- Waste Dilution Tanks' },
{ code: '22 66 83.16', title: 'Chemical- Waste Neutralization Tanks' },
{ code: '22 67 00', title: 'Processed Water Systems for Laboratory and Healthcare Facilities' },
{ code: '22 67 13', title: 'Processed Water Piping for Laboratory and Healthcare Facilities' },
{ code: '22 67 13.13', title: 'Distilled- Water Piping' },
{ code: '22 67 13.16', title: 'Reverse-Osmosis Water Piping' },
{ code: '22 67 13.19', title: 'Deionized- Water Piping' },
{ code: '22 67 19', title: 'Processed Water Equipment for Laboratory and Healthcare Facilities' },
{ code: '22 67 19.13', title: 'Distilled-Water Equipment' },
{ code: '22 67 19.16', title: 'Reverse-Osmosis Water Equipment' },
{ code: '22 67 19.19', title: 'Deionized- Water Equipment' },
{ code: '22 70 00', title: 'Unassigned' },
{ code: '22 80 00', title: 'Unassigned' },
{ code: '22 90 00', title: 'Unassigneded' }]
})
}
division_21() {
return ({
division: 21,
divisionTitle: 'Fire Suppression',
codes: [{ code: '21 00 00', title: 'FIRE SUPPRESSION' },
{ code: '21 01 00', title: 'Operation and Maintenance of Fire Suppression' },
{ code: '21 01 10', title: 'Operation and Maintenance of Water-Based Fire-Suppression Systems' },
{ code: '21 01 20', title: 'Operation and Maintenance of Fire-Extinguishing Systems' },
{ code: '21 01 30', title: 'Operation and Maintenance of Fire-Suppression Equipment' },
{ code: '21 05 00', title: 'Common Work Results for Fire Suppression' },
{ code: '21 05 13', title: 'Common Motor Requirements for Fire-Suppression Equipment' },
{ code: '21 05 16', title: 'Expansion Fittings and Loops for Fire-Suppression Piping' },
{ code: '21 05 19', title: 'Meters and Gages for Fire-Suppression Systems' },
{ code: '21 05 23', title: 'General-Duty Valves for Water-Based Fire-Suppression Piping' },
{ code: '21 05 29', title: 'Hangers and Supports for Fire-Suppression Piping and Equipment' },
{ code: '21 05 33', title: 'Heat Tracing for Fire-Suppression Piping' },
{ code: '21 05 48', title: 'Vibration and Seismic Controls for Fire-Suppression Piping and Equipment' },
{ code: '21 05 53', title: 'Identification for Fire-Suppression Piping and Equipment' },
{ code: '21 06 00', title: 'Schedules for Fire Suppression' },
{ code: '21 06 10', title: 'Schedules for Water-Based Fire-Suppression Systems' },
{ code: '21 06 20', title: 'Schedules for Fire-Extinguishing Systems' },
{ code: '21 06 30', title: 'Schedules for Fire-Suppression Equipment' },
{ code: '21 07 00', title: 'Fire Suppression Systems Insulation' },
{ code: '21 07 16', title: 'Fire-Suppression Equipment Insulation' },
{ code: '21 07 19', title: 'Fire-Suppression Piping Insulation' },
{ code: '21 08 00', title: 'Commissioning of Fire Suppression' },
{ code: '21 09 00', title: 'Instrumentation and Control for Fire-Suppression Systems' },
{ code: '21 10 00', title: 'WATER-BASED FIRE-SUPPRESSION SYSTEMS' },
{ code: '21 11 00', title: 'Facility Fire-Suppression Water-Service Piping' },
{ code: '21 11 16', title: 'Facility Fire Hydrants' },
{ code: '21 11 19', title: 'Fire-Department Connections' },
{ code: '21 12 00', title: 'Fire-Suppression Standpipes' },
{ code: '21 12 13', title: 'Fire-Suppression Hoses and Nozzles' },
{ code: '21 12 16', title: 'Fire-Suppression Hose Reels' },
{ code: '21 12 19', title: 'Fire-Suppression Hose Racks' },
{ code: '21 12 23', title: 'Fire-Suppression Hose Valves' },
{ code: '21 12 26', title: 'Fire-Suppression Valve and Hose Cabinets' },
{ code: '21 13 00', title: 'Fire-Suppression Sprinkler Systems' },
{ code: '21 13 13', title: 'Wet-Pipe Sprinkler Systems' },
{ code: '21 13 16', title: 'Dry-Pipe Sprinkler Systems' },
{ code: '21 13 19', title: 'Preaction Sprinkler Systems' },
{ code: '21 13 23', title: 'Combined Dry-Pipe and Preaction Sprinkler Systems' },
{ code: '21 13 26', title: 'Deluge Fire-Suppression Sprinkler Systems' },
{ code: '21 13 29', title: 'Water Spray Fixed Systems' },
{ code: '21 13 36', title: 'Antifreeze Sprinkler Systems' },
{ code: '21 13 39', title: 'Foam-Water Systems' },
{ code: '21 20 00', title: 'FIRE-EXTINGUISHING SYSTEMS' },
{ code: '21 21 00', title: 'Carbon-Dioxide Fire-Extinguishing Systems' },
{ code: '21 21 13', title: 'Carbon-Dioxide Fire-Extinguishing Piping' },
{ code: '21 21 16', title: 'Carbon-Dioxide Fire-Extinguishing Equipment' },
{ code: '21 22 00', title: 'Clean-Agent Fire-Extinguishing Systems' },
{ code: '21 22 13', title: 'Clean-Agent Fire-Extinguishing Piping' },
{ code: '21 22 16', title: 'Clean-Agent Fire-Extinguishing Equipment' },
{ code: '21 23 00', title: 'Wet-Chemical Fire-Extinguishing Systems' },
{ code: '21 23 13', title: 'Wet-Chemical Fire-Extinguishing Piping' },
{ code: '21 23 16', title: 'Wet-Chemical Fire-Extinguishing Equipment' },
{ code: '21 24 00', title: 'Dry-Chemical Fire-Extinguishing Systems' },
{ code: '21 24 13', title: 'Dry-Chemical Fire-Extinguishing Piping' },
{ code: '21 24 16', title: 'Dry-Chemical Fire-Extinguishing Equipment' },
{ code: '21 30 00', title: 'FIRE PUMPS' },
{ code: '21 31 00', title: 'Centrifugal Fire Pumps' },
{ code: '21 31 13', title: 'Electric-Drive, Centrifugal Fire Pumps' },
{ code: '21 31 16', title: 'Diesel-Drive, Centrifugal Fire Pumps' },
{ code: '21 32 00', title: 'Vertical-Turbine Fire Pumps' },
{ code: '21 32 13', title: 'Electric -Drive, Vertical-Turbine Fire Pumps' },
{ code: '21 32 16', title: 'Diesel-Drive, Vertical-Turbine Fire Pumps' },
{ code: '21 33 00', title: 'Positive-Displacement Fire Pumps' },
{ code: '21 33 13', title: 'Electric -Drive, Positive-Displacement Fire Pumps' },
{ code: '21 33 16', title: 'Diesel-Drive, Positive-Displacement Fire Pumps' },
{ code: '21 40 00', title: 'FIRE-SUPPRESSION WATER STORAGE' },
{ code: '21 41 00', title: 'Storage Tanks for Fire-Suppression Water' },
{ code: '21 41 13', title: 'Pressurized Storage Tanks for Fire-Suppression Water' },
{ code: '21 41 16', title: 'Elevated Storage Tanks for Fire-Suppression Water' },
{ code: '21 41 19', title: 'Roof-Mounted Storage Tanks for Fire-Suppression Water' },
{ code: '21 41 23', title: 'Ground Suction Storage Tanks for Fire-Suppression Water' },
{ code: '21 41 26', title: 'Underground Storage Tanks for Fire-Suppression Water' },
{ code: '21 41 29', title: 'Storage Tanks for Fire-Suppression Water Additives' },
{ code: '21 50 00', title: 'Unassigned' },
{ code: '21 60 00', title: 'Unassigned' },
{ code: '21 70 00', title: 'Unassigned' },
{ code: '21 80 00', title: 'Unassigned' },
{ code: '21 90 00', title: 'Unassigned' }]
})
}
division_14() {
return ({
division: 14,
divisionTitle: 'Conveying Equipment',
codes: [{ code: '14 00 00', title: 'CONVEYING EQUIPMENT' },
{ code: '14 01 00', title: 'Operation and Maintenance of Conveying Equipment' },
{ code: '14 01 10', title: 'Operation and Maintenance of Dumbwaiters' },
{ code: '14 01 10.71', title: 'Dumbwaiter Rehabilitation' },
{ code: '14 01 20', title: 'Operation and Maintenance of Elevators' },
{ code: '14 01 20.71', title: 'Elevator Rehabilitation' },
{ code: '14 01 30', title: 'Operation and Maintenance of Escalators and Moving Walks' },
{ code: '14 01 30.71', title: 'Escalators and Moving Walks Rehabilitation' },
{ code: '14 01 40', title: 'Operation and Maintenance of Lifts' },
{ code: '14 01 40.71', title: 'Lifts Rehabilitation' },
{ code: '14 01 70', title: 'Operation and Maintenance ofTurntables' },
{ code: '14 01 80', title: 'Operation and Maintenance of Scaffolding' },
{ code: '14 01 90', title: 'Operation and Maintenance of Other Conveying Equipment' },
{ code: '14 05 00', title: 'Common Work Results for Conveying Equipment' },
{ code: '14 06 00', title: 'Schedules for Conveying Equipment' },
{ code: '14 06 10', title: 'Schedules for Dumbwaiters' },
{ code: '14 06 20', title: 'Schedules for Elevators' },
{ code: '14 06 20.13', title: 'Elevator Equipment Schedule' },
{ code: '14 06 30', title: 'Schedules for Escalators and Moving Walks' },
{ code: '14 06 40', title: 'Schedules for Lifts' },
{ code: '14 06 40.13', title: 'Lift Schedule' },
{ code: '14 06 70', title: 'Schedules for Turntables' },
{ code: '14 06 80', title: 'Schedules for Scaffolding' },
{ code: '14 06 90', title: 'Schedules for Other Conveying Equipment' },
{ code: '14 08 00', title: 'Commissioning of Conveying Equipment' },
{ code: '14 08 10', title: 'Commissioning of Dumbwaiters' },
{ code: '14 08 20', title: 'Commissioning of Elevators' },
{ code: '14 08 30', title: 'Commissioning of Escalators and Moving Walks' },
{ code: '14 08 40', title: 'Commissioning of Lifts' },
{ code: '14 08 70', title: 'Commissioning ofTurntables' },
{ code: '14 08 80', title: 'Commissioning of Scaffolding' },
{ code: '14 10 00', title: 'DUMBWAITERS' },
{ code: '14 11 00', title: 'Manual Dumbwaiters' },
{ code: '14 12 00', title: 'Electric Dumbwaiters' },
{ code: '14 14 00', title: 'Hydraulic Dumbwaiters' },
{ code: '14 20 00', title: 'ELEVATORS' },
{ code: '14 21 00', title: 'Electric Traction Elevators' },
{ code: '14 21 13', title: 'Electric Traction Freight Elevators' },
{ code: '14 21 23', title: 'Electric Traction Passenger Elevators' },
{ code: '14 21 33', title: 'Electric Traction Residential Elevators' },
{ code: '14 21 43', title: 'Electric Traction Service Elevators' },
{ code: '14 24 00', title: 'Hydraulic Elevators' },
{ code: '14 24 13', title: 'Hydraulic Freight Elevators' },
{ code: '14 24 23', title: 'Hydraulic Passenger Elevators' },
{ code: '14 24 33', title: 'Hydraulic Residential Elevators' },
{ code: '14 24 43', title: 'Hydraulic Service Elevators' },
{ code: '14 26 00', title: 'Limited-Use/Limited-Application Elevators' },
{ code: '14 27 00', title: 'Custom Elevator Cabs' },
{ code: '14 27 13', title: 'Custom Elevator Cab Finishes' },
{ code: '14 28 00', title: 'Elevator Equipment and Controls' },
{ code: '14 28 13', title: 'Elevator Doors' },
{ code: '14 28 16', title: 'Elevator Controls' },
{ code: '14 28 19', title: 'Elevator Equipment' },
{ code: '14 28 19.13', title: 'Elevator Safety Equipment' },
{ code: '14 28 19.16', title: 'Elevator Hoistway Equipment' },
{ code: '14 30 00', title: 'ESCALATORS AND MOVING WALKS' },
{ code: '14 31 00', title: 'Escalators' },
{ code: '14 32 00', title: 'Moving Walks' },
{ code: '14 33 00', title: 'Moving Ramps' },
{ code: '14 33 13', title: 'Motorized Ramps' },
{ code: '14 33 16', title: 'Powered Ramps' },
{ code: '14 40 00', title: 'LIFTS' },
{ code: '14 41 00', title: 'People Lifts' },
{ code: '14 41 13', title: 'Counterbalanced People Lifts' },
{ code: '14 41 16', title: 'Endless-Belt People Lifts' },
{ code: '14 42 00', title: 'Wheelchair Lifts' },
{ code: '14 42 13', title: 'Inclined Wheelchair Lifts' },
{ code: '14 42 16', title: 'Vertical Wheelchair Lifts' },
{ code: '14 43 00', title: 'Platform Lifts' },
{ code: '14 43 13', title: 'Orchestra Lifts' },
{ code: '14 43 16', title: 'Stage Lifts' },
{ code: '14 44 00', title: 'Sidewalk Lifts' },
{ code: '14 45 00', title: 'Vehicle Lifts' },
{ code: '14 50 00', title: 'Unassigned' },
{ code: '14 60 00', title: 'Unassigned' },
{ code: '14 70 00', title: 'TURNTABLES' },
{ code: '14 71 00', title: 'Industrial Turntables' },
{ code: '14 71 11', title: 'Vehicle Turntables' },
{ code: '14 72 00', title: 'Hospitality Turntables' },
{ code: '14 72 25', title: 'Restaurant Turntables' },
{ code: '14 73 00', title: 'Exhibit Turntables' },
{ code: '14 73 59', title: 'Display Turntables' },
{ code: '14 74 00', title: 'Entertainment Turntables' },
{ code: '14 74 61', title: 'Stage Turntables' },
{ code: '14 80 00', title: 'SCAFFOLDING' },
{ code: '14 81 00', title: 'Suspended Scaffolding' },
{ code: '14 81 13', title: 'Beam Scaffolding' },
{ code: '14 81 16', title: 'Carriage Scaffolding' },
{ code: '14 81 19', title: 'Hook Scaffolding' },
{ code: '14 82 00', title: 'Rope Climbers' },
{ code: '14 82 13', title: 'Manual Rope Climbers' },
{ code: '14 82 16', title: 'Powered Rope Climbers' },
{ code: '14 83 00', title: 'Elevating Platforms' },
{ code: '14 83 13', title: 'Telescoping Platform Lifts' },
{ code: '14 83 13.13', title: 'Electric and Battery Telescoping PlatformLifts' },
{ code: '14 83 13.16', title: 'Pneumatic Telescoping Platform Lifts' },
{ code: '14 83 16', title: 'Scissor Lift Platforms' },
{ code: '14 83 19', title: 'Multi-Axis Platform Lifts' },
{ code: '14 84 00', title: 'Powered Scaffolding' },
{ code: '14 84 13', title: 'Window Washing Scaffolding' },
{ code: '14 84 23', title: 'Window Washing Hoists' },
{ code: '14 90 00', title: 'OTHER CONVEYING EQUIPMENT' },
{ code: '14 91 00', title: 'Facility Chutes' },
{ code: '14 91 13', title: 'Coal Chutes' },
{ code: '14 91 23', title: 'Escape Chutes' },
{ code: '14 91 33', title: 'Laundry and Linen Chutes' },
{ code: '14 91 82', title: 'Trash Chutes' },
{ code: '14 92 00', title: 'Pneumatic Tube Systems' }]
})
}
division_13() {
return ({
division: 13,
divisionTitle: 'Special Construction',
codes: [{ code: '13 00 00', title: 'SPECIAL CONSTRUCTION' },
{ code: '13 01 00', title: 'Operation and Maintenance of Special Construction' },
{ code: '13 01 10', title: 'Operation and Maintenance of Special Facility Components' },
{ code: '13 01 11', title: 'Operation and Maintenance of Swimming Pools' },
{ code: '13 01 12', title: 'Operation and Maintenance of Fountains' },
{ code: '13 01 13', title: 'Operation and Maintenance of Aquariums' },
{ code: '13 01 14', title: 'Operation and Maintenance of Amusement Park Structures and Equipment' },
{ code: '13 01 18', title: 'Operation and Maintenance of Ice Rinks' },
{ code: '13 01 20', title: 'Operation and Maintenance of Special Purpose Rooms' },
{ code: '13 01 21', title: 'Operation and Maintenance of Controlled Environment Rooms' },
{ code: '13 01 23', title: 'Operation and Maintenance of Planetariums' },
{ code: '13 01 30', title: 'Operation and Maintenance of Special Structures' },
{ code: '13 01 40', title: 'Operation and Maintenance of Integrated Construction' },
{ code: '13 01 49', title: 'Operation and Maintenance of Radiation Protection' },
{ code: '13 01 50', title: 'Operation and Maintenance of Special Instrumentation' },
{ code: '13 01 51', title: 'Operation and Maintenance of Stress Instrumentation' },
{ code: '13 01 52', title: 'Operation and Maintenance of Seismic Instrumentation' },
{ code: '13 01 53', title: 'Operation and Maintenance of Meteorological Instrumentation' },
{ code: '13 05 00', title: 'Common Work Results for Special Construction' },
{ code: '13 06 00', title: 'Schedules for Special Construction' },
{ code: '13 06 10', title: 'Schedules for Special Facility Components' },
{ code: '13 06 20', title: 'Schedules for Special Purpose Rooms' },
{ code: '13 06 30', title: 'Schedules for Special Structures' },
{ code: '13 06 40', title: 'Schedules for Integrated Construction' },
{ code: '13 06 50', title: 'Schedules for Special Instrumentation' },
{ code: '13 08 00', title: 'Commissioning of Special Construction' },
{ code: '13 08 10', title: 'Commissioning of Special Facility Components' },
{ code: '13 08 11', title: 'Commissioning of Swimming Pools' },
{ code: '13 08 12', title: 'Commissioning of Fountains' },
{ code: '13 08 13', title: 'Commissioning of Aquariums' },
{ code: '13 08 14', title: 'Commissioning of Amusement Park Structures and Equipment' },
{ code: '13 08 18', title: 'Commissioning of Ice Rinks' },
{ code: '13 08 20', title: 'Commissioning of Special Purpose Rooms' },
{ code: '13 08 21', title: 'Commissioning of Controlled Environment Rooms' },
{ code: '13 08 23', title: 'Commissioning of Planetariums' },
{ code: '13 08 30', title: 'Commissioning of Special Structures' },
{ code: '13 08 40', title: 'Commissioning of Integrated Construction' },
{ code: '13 08 50', title: 'Commissioning of Special Instrumentation' },
{ code: '13 10 00', title: 'SPECIAL FACILITY COMPONENTS' },
{ code: '13 11 00', title: 'Swimming Pools' },
{ code: '13 11 13', title: 'Below-Grade Swimming Pools' },
{ code: '13 11 23', title: 'On-Grade Swimming Pools' },
{ code: '13 11 33', title: 'Elevated Swimming Pools' },
{ code: '13 11 43', title: 'Recirculating Gutter Systems' },
{ code: '13 11 46', title: 'Swimming Pool Accessories' },
{ code: '13 11 49', title: 'Swimming Pool Cleaning Equipment' },
{ code: '13 11 53', title: 'Movable Pool Bulkheads' },
{ code: '13 11 56', title: 'Movable Pool Floors' },
{ code: '13 12 00', title: 'Fountains' },
{ code: '13 12 13', title: 'Exterior Fountains' },
{ code: '13 12 23', title: 'Interior Fountains' },
{ code: '13 13 00', title: 'Aquariums' },
{ code: '13 14 00', title: 'Amusement Park Structures and Equipment' },
{ code: '13 14 13', title: 'Water Slides' },
{ code: '13 14 16', title: 'Wave Generating Equipment' },
{ code: '13 14 23', title: 'Amusement Park Rides' },
{ code: '13 17 00', title: 'Tubs and Pools' },
{ code: '13 17 13', title: 'Hot Tubs' },
{ code: '13 17 23', title: 'Therapeutic Pools' },
{ code: '13 17 33', title: 'Whirlpool Tubs' },
{ code: '13 18 00', title: 'Ice Rinks' },
{ code: '13 18 13', title: 'Ice Rink Floor Systems' },
{ code: '13 18 16', title: 'Ice Rink Dasher Boards' },
{ code: '13 19 00', title: 'Kennels and Animal Shelters' },
{ code: '13 19 13', title: 'Kennel Enclosures and Gates' },
{ code: '13 19 16', title: 'Kennel Feeding Devices' },
{ code: '13 20 00', title: 'SPECIAL PURPOSE ROOMS' },
{ code: '13 21 00', title: 'Controlled Environment Rooms' },
{ code: '13 21 13', title: 'Clean Rooms' },
{ code: '13 21 16', title: 'Hyperbaric Rooms' },
{ code: '13 21 23', title: 'Insulated Rooms' },
{ code: '13 21 26', title: 'Cold Storage Rooms' },
{ code: '13 21 29', title: 'Constant Temperature Rooms' },
{ code: '13 21 48', title: 'Sound-Conditioned Rooms' },
{ code: '13 22 00', title: 'Office Shelters and Booths' },
{ code: '13 23 00', title: 'Planetariums' },
{ code: '13 24 00', title: 'Special Activity Rooms' },
{ code: '13 24 16', title: 'Saunas' },
{ code: '13 24 26', title: 'Steam Baths' },
{ code: '13 24 66', title: 'Athletic Rooms' },
{ code: '13 26 00', title: 'Fabricated Rooms' },
{ code: '13 27 00', title: 'Vaults' },
{ code: '13 27 16', title: 'Modular Fire Vaults' },
{ code: '13 27 53', title: 'Security Vaults' },
{ code: '13 27 53.13', title: 'Modular Concrete Security Vaults' },
{ code: '13 27 53.16', title: 'Modular Metal-Clad Laminated Security Vaults' },
{ code: '13 28 00', title: 'Athletic and Recreational Special Construction' },
{ code: '13 28 13', title: 'Indoor Soccer Boards' },
{ code: '13 28 16', title: 'Safety Netting' },
{ code: '13 28 19', title: 'Arena Football Boards' },
{ code: '13 28 26', title: 'Floor Sockets' },
{ code: '13 28 33', title: 'Athletic and Recreational Court Walls' },
{ code: '13 28 66', title: 'Demountable Athletic Surfaces' },
{ code: '13 30 00', title: 'SPECIAL STRUCTURES' },
{ code: '13 31 00', title: 'Fabric Structures' },
{ code: '13 31 13', title: 'Air-Supported Fabric Structures' },
{ code: '13 31 13.13', title: 'Single-Walled Air-Supported Structures' },
{ code: '13 31 13.16', title: 'Multiple- Walled Air-Supported Structures' },
{ code: '13 31 23', title: 'Tensioned Fabric Structures' },
{ code: '13 31 33', title: 'Framed Fabric Structures' },
{ code: '13 32 00', title: 'Space Frames' },
{ code: '13 32 13', title: 'Metal Space Frames' },
{ code: '13 32 23', title: 'Wood Space Frames' },
{ code: '13 33 00', title: 'Geodesic Structures' },
{ code: '13 33 13', title: 'Geodesic Domes' },
{ code: '13 34 00', title: 'Fabricated Engineered Structures' },
{ code: '13 34 13', title: 'Glazed Structures' },
{ code: '13 34 13.13', title: 'Greenhouses' },
{ code: '13 34 13.16', title: 'Solariums' },
{ code: '13 34 13.19', title: 'Swimming Pool Enclosures' },
{ code: '13 34 13.23', title: 'Sunrooms' },
{ code: '13 34 13.26', title: 'Conservatories' },
{ code: '13 34 16', title: 'Grandstands and Bleachers' },
{ code: '13 34 16.13', title: 'Grandstands' },
{ code: '13 34 16.53', title: 'Bleachers' },
{ code: '13 34 19', title: 'Metal Building Systems' },
{ code: '13 34 23', title: 'Fabricated Structures' },
{ code: '13 34 23.13', title: 'Portable and Mobile Buildings' },
{ code: '13 34 23.16', title: 'Fabricated Control Booths' },
{ code: '13 34 23.19', title: 'Fabricated Dome Structures' },
{ code: '13 34 23.23', title: 'Fabricated Substation Control Rooms' },
{ code: '13 34 56', title: 'Observatories' },
{ code: '13 36 00', title: 'Towers' },
{ code: '13 36 13', title: 'Metal Towers' },
{ code: '13 36 13.13', title: 'Steel Towers' },
{ code: '13 36 23', title: 'Wood Towers' },
{ code: '13 40 00', title: 'INTEGRATED CONSTRUCTION' },
{ code: '13 42 00', title: 'Building Modules' },
{ code: '13 42 25', title: 'Hospitality Unit Modules' },
{ code: '13 42 33', title: 'Apartment Unit Modules' },
{ code: '13 42 43', title: 'Dormitory Unit Modules' },
{ code: '13 42 63', title: 'Detention Cell Modules' },
{ code: '13 42 63.13', title: 'Precast-Concrete Detention Cell Modules' },
{ code: '13 42 63.16', title: 'Steel Detention Cell Modules' },
{ code: '13 44 00', title: 'Modular Mezzanines' },
{ code: '13 48 00', title: 'Sound, Vibration, and Seismic Control' },
{ code: '13 48 13', title: 'Manufactured Sound and Vibration Control Components' },
{ code: '13 48 23', title: 'Fabricated Sound and Vibration Control Assemblies' },
{ code: '13 48 53', title: 'Manufactured Seismic Control Components' },
{ code: '13 48 63', title: 'Fabricated Seismic Control Assemblies' },
{ code: '13 49 00', title: 'Radiation Protection' },
{ code: '13 49 13', title: 'Lead Sheet' },
{ code: '13 49 16', title: 'Lead Bricks' },
{ code: '13 49 19', title: 'Lead-Lined Materials' },
{ code: '13 49 19.13', title: 'Lead-Lined Lath' },
{ code: '13 49 23', title: 'Modular Shielding Partitions' },
{ code: '13 50 00', title: 'SPECIAL INSTRUMENTATION' },
{ code: '13 51 00', title: 'Stress Instrumentation' },
{ code: '13 52 00', title: 'Seismic Instrumentation' },
{ code: '13 53 00', title: 'Meteorological Instrumentation' },
{ code: '13 53 13', title: 'Solar Instrumentation' },
{ code: '13 53 23', title: 'Wind Instrumentation' },
{ code: '13 60 00', title: 'Unassigned' },
{ code: '13 70 00', title: 'Unassigned' },
{ code: '13 80 00', title: 'Unassigned' },
{ code: '13 90 00', title: 'Unassigned' }]
})
}
division_12() {
return ({
division: 12,
divisionTitle: 'Furnishings',
codes: [{ code: ' 12 00 00', title: 'FURNISHINGS' },
{ code: ' 12 01 00', title: 'Operation and Maintenance of Furnishings' },
{ code: ' 12 01 10', title: 'Operation and Maintenance of Art' },
{ code: ' 12 01 20', title: 'Operation and Maintenance of Window Treatments' },
{ code: ' 12 01 30', title: 'Operation and Maintenance of Casework' },
{ code: ' 12 01 40', title: 'Operation and Maintenance of Furnishings and Accessories' },
{ code: ' 12 01 50', title: 'Operation and Maintenance of Furniture' },
{ code: ' 12 01 60', title: 'Operation and Maintenance ofMultiple Seating' },
{ code: ' 12 01 90', title: 'Operation and Maintenance of Other Furnishings' },
{ code: ' 12 05 00', title: 'Common Work Results for Furnishings' },
{ code: ' 12 05 13', title: 'Fabrics' },
{ code: ' 12 06 00', title: 'Schedules for Furnishings' },
{ code: ' 12 06 10', title: 'Schedules for Art' },
{ code: ' 12 06 20', title: 'Schedules for Window Treatments' },
{ code: ' 12 06 20.13', title: 'Window Treatment Schedule' },
{ code: ' 12 06 30', title: 'Schedules for Casework' },
{ code: ' 12 06 30.13', title: 'Manufactured Casework Schedule' },
{ code: ' 12 06 40', title: 'Schedules for Furnishings and Accessories' },
{ code: ' 12 06 40.13', title: 'Furnishings Schedule' },
{ code: ' 12 06 50', title: 'Schedules for Furniture' },
{ code: ' 12 06 60', title: 'Schedules for Multiple Seating' },
{ code: ' 12 06 90', title: 'Schedules for Other Furnishings' },
{ code: ' 12 08 00', title: 'Commissioning of Furnishings' },
{ code: ' 12 10 00', title: 'ART' },
{ code: ' 12 11 00', title: 'Murals' },
{ code: ' 12 11 13', title: 'Photo Murals' },
{ code: ' 12 11 16', title: 'Sculptured Brick Panels' },
{ code: ' 12 11 23', title: 'Brick Murals' },
{ code: ' 12 11 26', title: 'Ceramic Tile Murals' },
{ code: ' 12 11 33', title: "Trompe l'oeil" },
{ code: ' 12 12 00', title: 'Wall Decorations' },
{ code: ' 12 12 13', title: 'Commissioned Paintings' },
{ code: ' 12 12 16', title: 'Framed Paintings' },
{ code: ' 12 12 19', title: 'Framed Prints' },
{ code: ' 12 12 23', title: 'Tapestries' },
{ code: ' 12 12 26', title: 'Wall Hangings' },
{ code: ' 12 14 00', title: 'Sculptures' },
{ code: ' 12 14 13', title: 'Carved Sculpture' },
{ code: ' 12 14 16', title: 'Cast Sculpture' },
{ code: ' 12 14 19', title: 'Constructed Sculpture' },
{ code: ' 12 14 23', title: 'Relief Art' },
{ code: ' 12 17 00', title: 'Art Glass' },
{ code: ' 12 17 13', title: 'Etched Glass' },
{ code: ' 12 17 16', title: 'Stained Glass' },
{ code: ' 12 19 00', title: 'Religious Art' },
{ code: ' 12 20 00', title: 'WINDOW TREATMENTS' },
{ code: ' 12 21 00', title: 'Window Blinds' },
{ code: ' 12 21 13', title: 'Horizontal Louver Blinds' },
{ code: ' 12 21 13.13', title: 'Metal Horizontal Louver Blinds' },
{ code: ' 12 21 13.23', title: 'Wood Horizontal Louver Blinds' },
{ code: ' 12 21 13.33', title: 'Plastic Horizontal Louver Blinds' },
{ code: ' 12 21 16', title: 'Vertical Louver Blinds' },
{ code: ' 12 21 16.13', title: 'Metal Vertical Louver Blinds' },
{ code: ' 12 21 16.23', title: 'Wood Vertical Louver Blinds' },
{ code: ' 12 21 16.33', title: 'Plastic Vertical Louver Blinds' },
{ code: ' 12 21 23', title: 'Roll-Down Blinds' },
{ code: ' 12 21 26', title: 'Black-Out Blinds' },
{ code: ' 12 22 00', title: 'Curtains and Drapes' },
{ code: ' 12 22 13', title: 'Draperies' },
{ code: ' 12 22 16', title: 'Drapery Track and Accessories' },
{ code: ' 12 23 00', title: 'Interior Shutters' },
{ code: ' 12 24 00', title: 'Window Shades' },
{ code: ' 12 24 13', title: 'Roller Window Shades' },
{ code: ' 12 24 16', title: 'Pleated Window Shades' },
{ code: ' 12 25 00', title: 'Window Treatment Operating Hardware' },
{ code: ' 12 25 13', title: 'Motorized Drapery Rods' },
{ code: ' 12 30 00', title: 'CASEWORK' },
{ code: ' 12 31 00', title: 'Manufactured Metal Casework' },
{ code: ' 12 31 16', title: 'Manufactured Metal Sandwich Panel Casework' },
{ code: ' 12 32 00', title: 'Manufactured Wood Casework' },
{ code: ' 12 32 13', title: 'Manufactured Wood-Veneer-Faced Casework' },
{ code: ' 12 32 16', title: 'Manufactured Plastic -Laminate-Clad Casework' },
{ code: ' 12 34 00', title: 'Manufactured Plastic Casework' },
{ code: ' 12 34 16', title: 'Manufactured Solid-Plastic Casework' },
{ code: ' 12 35 00', title: 'Specialty Casework' },
{ code: ' 12 35 17', title: 'Bank Casework' },
{ code: ' 12 35 25', title: 'Hospitality Casework' },
{ code: ' 12 35 30', title: 'Residential Casework' },
{ code: ' 12 35 30.13', title: 'Kitchen Casework' },
{ code: ' 12 35 30.23', title: 'Bathroom Casework' },
{ code: ' 12 35 30.43', title: 'Dormitory Casework' },
{ code: ' 12 35 33', title: 'Utility Room Casework' },
{ code: ' 12 35 50', title: 'Educational/Library Casework' },
{ code: ' 12 35 50.13', title: 'Educational Casework' },
{ code: ' 12 35 50.53', title: 'Library Casework' },
{ code: ' 12 35 50.56', title: 'Built-In Study Carrels' },
{ code: ' 12 35 53', title: 'Laboratory Casework' },
{ code: ' 12 35 53.13', title: 'Metal Laboratory Casework' },
{ code: ' 12 35 53.16', title: 'Plastic-Laminate-Clad Laboratory Casework' },
{ code: ' 12 35 53.19', title: 'Wood Laboratory Casework' },
{ code: ' 12 35 53.23', title: 'Solid-Plastic Laboratory Casework' },
{ code: ' 12 35 59', title: 'Display Casework' },
{ code: ' 12 35 70', title: 'Healthcare Casework' },
{ code: ' 12 35 70.13', title: 'Hospital Casework' },
{ code: ' 12 35 70.16', title: 'Nurse Station Casework' },
{ code: ' 12 35 70.19', title: 'Exam Room Casework' },
{ code: ' 12 35 70.74', title: 'Dental Casework' },
{ code: ' 12 35 91', title: 'Religious Casework' },
{ code: ' 12 36 00', title: 'Countertops' },
{ code: ' 12 36 13', title: 'Concrete Countertops' },
{ code: ' 12 36 16', title: 'Metal Countertops' },
{ code: ' 12 36 19', title: 'Wood Countertops' },
{ code: ' 12 36 23', title: 'Plastic Countertops' },
{ code: ' 12 36 23.13', title: 'Plastic-Laminate-Clad Countertops' },
{ code: ' 12 36 40', title: 'Stone Countertops' },
{ code: ' 12 36 53', title: 'Laboratory Countertops' },
{ code: ' 12 36 61', title: 'Simulated Stone Countertops' },
{ code: ' 12 36 61.13', title: 'Cultured Marble Countertops' },
{ code: ' 12 36 61.16', title: 'Solid Surfacing Countertops' },
{ code: ' 12 36 61.19', title: 'Quartz Surfacing Countertops' },
{ code: ' 12 40 00', title: 'FURNISHINGS AND ACCESSORIES' },
{ code: ' 12 41 00', title: 'Office Accessories' },
{ code: ' 12 41 13', title: 'Desk Accessories' },
{ code: ' 12 42 00', title: 'Table Accessories' },
{ code: ' 12 42 13', title: 'Ceramics' },
{ code: ' 12 42 16', title: 'Flatware' },
{ code: ' 12 42 16.13', title: 'Silverware' },
{ code: ' 12 42 19', title: 'Hollowware' },
{ code: ' 12 42 23', title: 'Glassware' },
{ code: ' 12 42 26', title: 'Table Linens' },
{ code: ' 12 42 26.13', title: 'Napery' },
{ code: ' 12 43 00', title: 'Portable Lamps' },
{ code: ' 12 43 13', title: 'Lamps' },
{ code: ' 12 43 13.13', title: 'Desk Lamps' },
{ code: ' 12 43 13.16', title: 'Table Lamps' },
{ code: ' 12 43 13.19', title: 'Floor Lamps' },
{ code: ' 12 44 00', title: 'Bath Furnishings' },
{ code: ' 12 44 13', title: 'Bath Linens' },
{ code: ' 12 44 13.13', title: 'Bath Mats' },
{ code: ' 12 44 13.16', title: 'Bath Towels' },
{ code: ' 12 44 16', title: 'Shower Curtains' },
{ code: ' 12 45 00', title: 'Bedroom Furnishings' },
{ code: ' 12 45 13', title: 'Bed Linens' },
{ code: ' 12 45 13.13', title: 'Blankets' },
{ code: ' 12 45 13.16', title: 'Comforters' },
{ code: ' 12 45 16', title: 'Pillows' },
{ code: ' 12 46 00', title: 'Furnishing Accessories' },
{ code: ' 12 46 13', title: 'Ash Receptacles' },
{ code: ' 12 46 16', title: 'Bowls' },
{ code: ' 12 46 19', title: 'Clocks' },
{ code: ' 12 46 23', title: 'Decorative Crafts' },
{ code: ' 12 46 26', title: 'Decorative Screens' },
{ code: ' 12 46 29', title: 'Vases' },
{ code: ' 12 46 33', title: 'Waste Receptacles' },
{ code: ' 12 48 00', title: 'Rugs and Mats' },
{ code: ' 12 48 13', title: 'Entrance Floor Mats and Frames' },
{ code: ' 12 48 13.13', title: 'Entrance Floor Mats' },
{ code: ' 12 48 13.16', title: 'Entrance Floor Mat Frames' },
{ code: ' 12 48 16', title: 'Entrance Floor Grilles' },
{ code: ' 12 48 19', title: 'Entrance Floor Gratings' },
{ code: ' 12 48 23', title: 'Entrance Floor Grids' },
{ code: ' 12 48 26', title: 'Entrance Tile' },
{ code: ' 12 48 43', title: 'Floor Mats' },
{ code: ' 12 48 43.13', title: 'Chair Mats' },
{ code: ' 12 48 53', title: 'Rugs' },
{ code: ' 12 48 53.13', title: 'Runners' },
{ code: ' 12 48 53.16', title: 'Oriental Rugs' },
{ code: ' 12 50 00', title: 'FURNITURE' },
{ code: ' 12 51 00', title: 'Office Furniture' },
{ code: ' 12 51 16', title: 'Case Goods' },
{ code: ' 12 51 16.13', title: 'Metal Case Goods' },
{ code: ' 12 51 16.16', title: 'Wood Case Goods' },
{ code: ' 12 51 16.19', title: 'Plastic-Laminate-Clad Case Goods' },
{ code: ' 12 51 19', title: 'Filing Cabinets' },
{ code: ' 12 51 19.13', title: 'Lateral Filing Cabinets' },
{ code: ' 12 51 19.16', title: 'Vertical Filing Cabinets' },
{ code: ' 12 51 83', title: 'Custom Office Furniture' },
{ code: ' 12 52 00', title: 'Seating' },
{ code: ' 12 52 13', title: 'Chairs' },
{ code: ' 12 52 19', title: 'Upholstered Seating' },
{ code: ' 12 52 23', title: 'Office Seating' },
{ code: ' 12 52 70', title: 'Healthcare Seating' },
{ code: ' 12 52 83', title: 'Custom Seating' },
{ code: ' 12 53 00', title: 'Retail Furniture' },
{ code: ' 12 53 83', title: 'Custom Retail Furniture' },
{ code: ' 12 54 00', title: 'Hospitality Furniture' },
{ code: ' 12 54 13', title: 'Hotel and Motel Furniture' },
{ code: ' 12 54 16', title: 'Restaurant Furniture' },
{ code: ' 12 54 83', title: 'Custom Hospitality Furniture' },
{ code: ' 12 55 00', title: 'Detention Furniture' },
{ code: ' 12 55 13', title: 'Detention Bunks' },
{ code: ' 12 55 16', title: 'Detention Desks' },
{ code: ' 12 55 19', title: 'Detention Stools' },
{ code: ' 12 55 23', title: 'Detention Tables' },
{ code: ' 12 55 26', title: 'Detention Safety Clothes Hooks' },
{ code: ' 12 55 83', title: 'Custom Detention Furniture' },
{ code: ' 12 56 00', title: 'Institutional Furniture' },
{ code: ' 12 56 33', title: 'Classroom Furniture' },
{ code: ' 12 56 39', title: 'Lecterns' },
{ code: ' 12 56 43', title: 'Dormitory Furniture' },
{ code: ' 12 56 51', title: 'Library Furniture' },
{ code: ' 12 56 51.13', title: 'Book Shelves' },
{ code: ' 12 56 51.16', title: 'Study Carrels' },
{ code: ' 12 56 51.19', title: 'Index Card File Cabinets' },
{ code: ' 12 56 52', title: 'Audio-Visual Furniture' },
{ code: ' 12 56 53', title: 'Laboratory Furniture' },
{ code: ' 12 56 70', title: 'Healthcare Furniture' },
{ code: ' 12 56 83', title: 'Custom Institutional Furniture' },
{ code: ' 12 57 00', title: 'Industrial Furniture' },
{ code: ' 12 57 13', title: 'Welding Benches' },
{ code: ' 12 57 16', title: 'Welding Screens' },
{ code: ' 12 57 83', title: 'Custom Industrial Furniture' },
{ code: ' 12 58 00', title: 'Residential Furniture' },
{ code: ' 12 58 13', title: 'Couches and Loveseats' },
{ code: ' 12 58 13.13', title: 'Futons' },
{ code: ' 12 58 16', title: 'Residential Chairs' },
{ code: ' 12 58 16.13', title: 'Reclining Chairs' },
{ code: ' 12 58 19', title: 'Dining Tables and Chairs' },
{ code: ' 12 58 23', title: 'Coffee Tables' },
{ code: ' 12 58 26', title: 'Entertainment Centers' },
{ code: ' 12 58 29', title: 'Beds' },
{ code: ' 12 58 29.13', title: 'Daybeds' },
{ code: ' 12 58 33', title: 'Dressers' },
{ code: ' 12 58 33.13', title: 'Armoires' },
{ code: ' 12 58 36', title: 'Nightstands' },
{ code: ' 12 58 83', title: 'Custom Residential Furniture' },
{ code: ' 12 59 00', title: 'Systems Furniture' },
{ code: ' 12 59 13', title: 'Panel-Hung Component System Furniture' },
{ code: ' 12 59 16', title: 'Free-Standing Component System Furniture' },
{ code: ' 12 59 19', title: 'Beam System Furniture' },
{ code: ' 12 59 23', title: 'Desk System Furniture' },
{ code: ' 12 59 83', title: 'Custom Systems Furniture' },
{ code: ' 12 60 00', title: 'MULTIPLE SEATING' },
{ code: ' 12 61 00', title: 'Fixed Audience Seating' },
{ code: ' 12 61 13', title: 'Upholstered Audience Seating' },
{ code: ' 12 61 16', title: 'Molded-Plastic Audience Seating' },
{ code: ' 12 62 00', title: 'Portable Audience Seating' },
{ code: ' 12 62 13', title: 'Folding Chairs' },
{ code: ' 12 62 16', title: 'Interlocking Chairs' },
{ code: ' 12 62 19', title: 'Stacking Chairs' },
{ code: ' 12 63 00', title: 'Stadium and Arena Seating' },
{ code: ' 12 63 13', title: 'Stadium and Arena Bench Seating' },
{ code: ' 12 63 23', title: 'Stadium and Arena Seats' },
{ code: ' 12 64 00', title: 'Booths and Tables' },
{ code: ' 12 65 00', title: 'Multiple-Use Fixed Seating' },
{ code: ' 12 66 00', title: 'Telescoping Stands' },
{ code: ' 12 66 13', title: 'Telescoping Bleachers' },
{ code: ' 12 66 23', title: 'Telescoping Chair Platforms' },
{ code: ' 12 67 00', title: 'Pews and Benches' },
{ code: ' 12 67 13', title: 'Pews' },
{ code: ' 12 67 23', title: 'Benches' },
{ code: ' 12 68 00', title: 'Seat and Table Assemblies' },
{ code: ' 12 68 13', title: 'Pedestal Tablet Arm Chairs' },
{ code: ' 12 70 00', title: 'Unassigned' },
{ code: ' 12 80 00', title: 'Unassigned' },
{ code: ' 12 90 00', title: 'OTHER FURNISHINGS' },
{ code: ' 12 92 00', title: 'Interior Planters and Artificial Plants' },
{ code: ' 12 92 13', title: 'Interior Artificial Plants' },
{ code: ' 12 92 33', title: 'Interior Planters' },
{ code: ' 12 92 43', title: 'Interior Landscaping Accessories' },
{ code: ' 12 93 00', title: 'Site Furnishings' },
{ code: ' 12 93 13', title: 'Bicycle Racks' },
{ code: ' 12 93 23', title: 'Trash and Litter Receptors' },
{ code: ' 12 93 33', title: 'Manufactured Planters' },
{ code: ' 12 93 43', title: 'Site Seating and Tables' },
{ code: ' 12 93 43.13', title: 'Site Seating' },
{ code: ' 12 93 43.53', title: 'Site Tables' }]
})
}
division_11() {
return ({
division: 11,
divisionTitle: 'Equipment',
codes: [{ code: ' 11 00 00', title: 'EQUIPMENT' },
{ code: ' 11 01 00', title: 'Operation and Maintenance of Equipment' },
{ code: ' 11 01 10', title: 'Operation and Maintenance of Vehicle and Pedestrian Equipment' },
{ code: ' 11 01 15', title: 'Operation and Maintenance of Security, Bank, and Detention Equipment' },
{ code: ' 11 01 20', title: 'Operation and Maintenance of Commercial Equipment' },
{ code: ' 11 01 30', title: 'Operation and Maintenance of Residential Equipment' },
{ code: ' 11 01 40', title: 'Operation and Maintenance of Foodservice Equipment' },
{ code: ' 11 01 50', title: 'Operation and Maintenance of Educational and Scientific Equipment' },
{ code: ' 11 01 56', title: 'Operation and Maintenance of Observatory Equipment' },
{ code: ' 11 01 60', title: 'Operation and Maintenance of Entertainment Equipment' },
{ code: ' 11 01 65', title: 'Operation and Maintenance of Athletic and Recreational Equipment' },
{ code: ' 11 01 70', title: 'Operation and Maintenance of Healthcare Equipment' },
{ code: ' 11 01 80', title: 'Operation and Maintenance of Collection and Disposal Equipment' },
{ code: ' 11 01 90', title: 'Operation and Maintenance of Other Equipment' },
{ code: ' 11 05 00', title: 'Common Work Results for Equipment' },
{ code: ' 11 06 00', title: 'Schedules for Equipment' },
{ code: ' 11 06 10', title: 'Schedules for Vehicle and Pedestrian Equipment' },
{ code: ' 11 06 15', title: 'Schedules for Security, Bank, and Detention Equipment' },
{ code: ' 11 06 15.13', title: 'Teller and Service Equipment Schedule' },
{ code: ' 11 06 20', title: 'Schedules for Commercial Equipment' },
{ code: ' 11 06 30', title: 'Schedules for Residential Equipment' },
{ code: ' 11 06 40', title: 'Schedules for Foodservice Equipment' },
{ code: ' 11 06 40.13', title: 'Foodservice Equipment Schedule' },
{ code: ' 11 06 50', title: 'Schedules for Educational and Scientific Equipment' },
{ code: ' 11 06 60', title: 'Schedules for Entertainment Equipment' },
{ code: ' 11 06 65', title: 'Schedules for Athletic and Recreational Equipment' },
{ code: ' 11 06 70', title: 'Schedules for Healthcare Equipment' },
{ code: ' 11 06 70.13', title: 'Healthcare Equipment Schedule' },
{ code: ' 11 06 80', title: 'Schedules for Collection and Disposal Equipment' },
{ code: ' 11 06 90', title: 'Schedules for Other Equipment' },
{ code: ' 11 08 00', title: 'Commissioning of Equipment' },
{ code: ' 11 10 00', title: 'VEHICLE AND PEDESTRIAN EQUIPMENT' },
{ code: ' 11 11 00', title: 'Vehicle Service Equipment' },
{ code: ' 11 11 13', title: 'Compressed-Air Vehicle Service Equipment' },
{ code: ' 11 11 19', title: 'Vehicle Lubrication Equipment' },
{ code: ' 11 11 23', title: 'Tire-Changing Equipment' },
{ code: ' 11 11 26', title: 'Vehicle-Washing Equipment' },
{ code: ' 11 12 00', title: 'Parking Control Equipment' },
{ code: ' 11 12 13', title: 'Parking Key and Card Control Units' },
{ code: ' 11 12 16', title: 'Parking Ticket Dispensers' },
{ code: ' 11 12 23', title: 'Parking Meters' },
{ code: ' 11 12 26', title: 'Parking Fee Collection Equipment' },
{ code: ' 11 12 26.13', title: 'Parking Fee Coin Collection Equipment' },
{ code: ' 11 12 33', title: 'Parking Gates' },
{ code: ' 11 13 00', title: 'Loading Dock Equipment' },
{ code: ' 11 13 13', title: 'Loading Dock Bumpers' },
{ code: ' 11 13 16', title: 'Loading Dock Seals and Shelters' },
{ code: ' 11 13 16.13', title: 'Loading Dock Seals' },
{ code: ' 11 13 16.23', title: 'Loading Dock Shelters' },
{ code: ' 11 13 16.33', title: 'Loading Dock Rail Shelters' },
{ code: ' 11 13 19', title: 'Stationary Loading Dock Equipment' },
{ code: ' 11 13 19.13', title: 'Loading Dock Levelers' },
{ code: ' 11 13 19.23', title: 'Stationary Loading Dock Lifts' },
{ code: ' 11 13 19.26', title: 'Loading Dock Truck Lifts' },
{ code: ' 11 13 19.33', title: 'Loading Dock Truck Restraints' },
{ code: ' 11 13 23', title: 'Portable Dock Equipment' },
{ code: ' 11 13 23.13', title: 'Portable Dock Lifts' },
{ code: ' 11 13 23.16', title: 'Portable Dock Ramps' },
{ code: ' 11 13 23.19', title: 'Portable Dock Bridges' },
{ code: ' 11 13 23.23', title: 'Portable Dock Platforms' },
{ code: ' 11 13 26', title: 'Loading Dock Lights' },
{ code: ' 11 14 00', title: 'Pedestrian Control Equipment' },
{ code: ' 11 14 13', title: 'Pedestrian Gates' },
{ code: ' 11 14 13.13', title: 'Portable Posts and Railings' },
{ code: ' 11 14 13.16', title: 'Rotary Gates' },
{ code: ' 11 14 13.19', title: 'Turnstiles' },
{ code: ' 11 14 16', title: 'Money-Changing Equipment' },
{ code: ' 11 14 16.19', title: 'Money-Changing Machines' },
{ code: ' 11 14 26', title: 'Pedestrian Fare Collection Equipment' },
{ code: ' 11 14 26.13', title: 'Pedestrian Coin Fare Collection Equipment' },
{ code: ' 11 14 43', title: 'Pedestrian Detection Equipment' },
{ code: ' 11 14 43.13', title: 'Electronic Detection and Counting Systems' },
{ code: ' 11 14 53', title: 'Pedestrian Security Equipment' },
{ code: ' 11 15 00', title: 'SECURITY, DETENTION AND BANKING EQUIPMENT' },
{ code: ' 11 16 00', title: 'Vault Equipment' },
{ code: ' 11 16 13', title: 'Safe Deposit Boxes' },
{ code: ' 11 16 16', title: 'Safes' },
{ code: ' 11 16 23', title: 'Vault Ventilators' },
{ code: ' 11 17 00', title: 'Teller and Service Equipment' },
{ code: ' 11 17 13', title: 'Teller Equipment Systems' },
{ code: ' 11 17 16', title: 'Automatic Banking Systems' },
{ code: ' 11 17 23', title: 'Money Handling Equipment' },
{ code: ' 11 17 33', title: 'Money Cart Pass-Through' },
{ code: ' 11 17 36', title: 'Package Transfer Units' },
{ code: ' 11 18 00', title: 'Security Equipment' },
{ code: ' 11 18 13', title: 'Deal Drawers' },
{ code: ' 11 18 16', title: 'Gun Ports' },
{ code: ' 11 18 23', title: 'Valuable Material Storage' },
{ code: ' 11 19 00', title: 'Detention Equipment' },
{ code: ' 11 19 13', title: 'Detention Pass-Through Doors' },
{ code: ' 11 19 16', title: 'Detention Gun Lockers' },
{ code: ' 11 20 00', title: 'COMMERCIAL EQUIPMENT' },
{ code: ' 11 21 00', title: 'Mercantile and Service Equipment' },
{ code: ' 11 21 13', title: 'Cash Registers and Checking Equipment' },
{ code: ' 11 21 23', title: 'Vending Equipment' },
{ code: ' 11 21 23.13', title: 'Vending Machines' },
{ code: ' 11 21 33', title: 'Checkroom Equipment' },
{ code: ' 11 21 43', title: 'Weighing and Wrapping Equipment' },
{ code: ' 11 21 53', title: 'Barber and Beauty Shop Equipment' },
{ code: ' 11 22 00', title: 'Refrigerated Display Equipment' },
{ code: ' 11 23 00', title: 'Commercial Laundry and Dry Cleaning Equipment' },
{ code: ' 11 23 13', title: 'Dry Cleaning Equipment' },
{ code: ' 11 23 16', title: 'Drying and Conditioning Equipment' },
{ code: ' 11 23 19', title: 'Finishing Equipment' },
{ code: ' 11 23 23', title: 'Commercial Ironing Equipment' },
{ code: ' 11 23 26', title: 'Commercial Washers and Extractors' },
{ code: ' 11 23 33', title: 'Coin-Operated Laundry Equipment' },
{ code: ' 11 23 43', title: 'Hanging Garment Conveyors' },
{ code: ' 11 24 00', title: 'Maintenance Equipment' },
{ code: ' 11 24 13', title: 'Floor and Wall Cleaning Equipment' },
{ code: ' 11 24 16', title: 'Housekeeping Carts' },
{ code: ' 11 24 19', title: 'Vacuum Cleaning Systems' },
{ code: ' 11 24 23', title: 'Window Washing Systems' },
{ code: ' 11 25 00', title: 'Hospitality Equipment' },
{ code: ' 11 25 13', title: 'Registration Equipment' },
{ code: ' 11 26 00', title: 'Unit Kitchens' },
{ code: ' 11 26 13', title: 'Metal Unit Kitchens' },
{ code: ' 11 26 16', title: 'Wood Unit Kitchens' },
{ code: ' 11 26 19', title: 'Plastic -Laminate-Clad Unit Kitchens' },
{ code: ' 11 27 00', title: 'Photographic Processing Equipment' },
{ code: ' 11 27 13', title: 'Darkroom Processing Equipment' },
{ code: ' 11 27 16', title: 'Film Transfer Cabinets' },
{ code: ' 11 28 00', title: 'Office Equipment' },
{ code: ' 11 28 13', title: 'Computers' },
{ code: ' 11 28 16', title: 'Printers' },
{ code: ' 11 28 19', title: 'Self-Contained Facsimile Machines' },
{ code: ' 11 28 23', title: 'Copiers' },
{ code: ' 11 29 00', title: 'Postal, Packaging, and Shipping Equipment' },
{ code: ' 11 29 23', title: 'Packaging Equipment' },
{ code: ' 11 29 33', title: 'Shipping Equipment' },
{ code: ' 11 29 55', title: 'Postal Equipment' },
{ code: ' 11 30 00', title: 'RESIDENTIAL EQUIPMENT' },
{ code: ' 11 31 00', title: 'Residential Appliances' },
{ code: ' 11 31 13', title: 'Residential Kitchen Appliances' },
{ code: ' 11 31 23', title: 'Residential Laundry Appliances' },
{ code: ' 11 33 00', title: 'Retractable Stairs' },
{ code: ' 11 40 00', title: 'FOODSERVICE EQUIPMENT' },
{ code: ' 11 41 00', title: 'Food Storage Equipment' },
{ code: ' 11 41 13', title: 'Refrigerated Food Storage Cases' },
{ code: ' 11 41 23', title: 'Walk-In Coolers' },
{ code: ' 11 41 26', title: 'Walk-In Freezers' },
{ code: ' 11 42 00', title: 'Food Preparation Equipment' },
{ code: ' 11 43 00', title: 'Food Delivery Carts and Conveyors' },
{ code: ' 11 43 13', title: 'Food Delivery Carts' },
{ code: ' 11 43 16', title: 'Food Delivery Conveyors' },
{ code: ' 11 44 00', title: 'Food Cooking Equipment' },
{ code: ' 11 44 13', title: 'Commercial Ranges' },
{ code: ' 11 44 16', title: 'Commercial Ovens' },
{ code: ' 11 46 00', title: 'Food Dispensing Equipment' },
{ code: ' 11 46 13', title: 'Bar Equipment' },
{ code: ' 11 46 16', title: 'Service Line Equipment' },
{ code: ' 11 46 19', title: 'Soda Fountain Equipment' },
{ code: ' 11 47 00', title: 'Ice Machines' },
{ code: ' 11 48 00', title: 'Cleaning and Disposal Equipment' },
{ code: ' 11 48 13', title: 'Commercial Dishwashers' },
{ code: ' 11 50 00', title: 'EDUCATIONAL AND SCIENTIFIC EQUIPMENT' },
{ code: ' 11 51 00', title: 'Library Equipment' },
{ code: ' 11 51 13', title: 'Automated Book Storage and Retrieval Systems' },
{ code: ' 11 51 16', title: 'Book Depositories' },
{ code: ' 11 51 19', title: 'Book Theft Protection Equipment' },
{ code: ' 11 51 23', title: 'Library Stack Systems' },
{ code: ' 11 51 23.13', title: 'Metal Library Shelving' },
{ code: ' 11 52 00', title: 'Audio-Visual Equipment' },
{ code: ' 11 52 13', title: 'Projection Screens' },
{ code: ' 11 52 13.13', title: 'Fixed Projection Screens' },
{ code: ' 11 52 13.16', title: 'Portable Projection Screens' },
{ code: ' 11 52 13.19', title: 'Rear Projection Screens' },
{ code: ' 11 52 16', title: 'Projectors' },
{ code: ' 11 52 16.13', title: 'Movie Projectors' },
{ code: ' 11 52 16.16', title: 'Slide Projectors' },
{ code: ' 11 52 16.19', title: 'Overhead Projectors' },
{ code: ' 11 52 16.23', title: 'Opaque Projectors' },
{ code: ' 11 52 16.26', title: 'Video Projectors' },
{ code: ' 11 52 19', title: 'Players and Recorders' },
{ code: ' 11 53 00', title: 'Laboratory Equipment' },
{ code: ' 11 53 13', title: 'Laboratory Fume Hoods' },
{ code: ' 11 53 13.13', title: 'Recirculating Laboratory Fume Hoods' },
{ code: ' 11 53 16', title: 'Laboratory Incubators' },
{ code: ' 11 53 19', title: 'Laboratory Sterilizers' },
{ code: ' 11 53 23', title: 'Laboratory Refrigerators' },
{ code: ' 11 53 33', title: 'Emergency Safety Appliances' },
{ code: ' 11 53 43', title: 'Service Fittings and Accessories' },
{ code: ' 11 53 53', title: 'Biological Safety Cabinets' },
{ code: ' 11 55 00', title: 'Planetarium Equipment' },
{ code: ' 11 55 13', title: 'Planetarium Projectors' },
{ code: ' 11 55 16', title: 'Planetarium Pendulums' },
{ code: ' 11 56 00', title: 'Observatory Equipment' },
{ code: ' 11 56 13', title: 'Telescopes' },
{ code: ' 11 56 16', title: 'Telescope Mounts' },
{ code: ' 11 56 19', title: 'Telescope Drive Mechanisms' },
{ code: ' 11 56 23', title: 'Telescope Domes' },
{ code: ' 11 57 00', title: 'Vocational Shop Equipment' },
{ code: ' 11 59 00', title: 'Exhibit Equipment' },
{ code: ' 11 60 00', title: 'ENTERTAINMENT EQUIPMENT' },
{ code: ' 11 61 00', title: 'Theater and Stage Equipment' },
{ code: ' 11 61 13', title: 'Acoustical Shells' },
{ code: ' 11 61 23', title: 'Folding and Portable Stages' },
{ code: ' 11 61 33', title: 'Rigging Systems and Controls' },
{ code: ' 11 61 43', title: 'Stage Curtains' },
{ code: ' 11 62 00', title: 'Musical Equipment' },
{ code: ' 11 62 13', title: 'Bells' },
{ code: ' 11 62 16', title: 'Carillons' },
{ code: ' 11 62 19', title: 'Organs' },
{ code: ' 11 65 00', title: 'ATHLETIC AND RECREATIONAL EQUIPMENT' },
{ code: ' 11 66 00', title: 'Athletic Equipment' },
{ code: ' 11 66 13', title: 'Exercise Equipment' },
{ code: ' 11 66 23', title: 'Gymnasium Equipment' },
{ code: ' 11 66 23.13', title: 'Basketball Equipment' },
{ code: ' 11 66 23.23', title: 'Volleyball Equipment' },
{ code: ' 11 66 23.33', title: 'Interior Tennis Equipment' },
{ code: ' 11 66 23.43', title: 'Interior Track and Field Equipment' },
{ code: ' 11 66 23.53', title: 'Wall Padding' },
{ code: ' 11 66 23.56', title: 'Mat Storage' },
{ code: ' 11 66 43', title: 'Interior Scoreboards' },
{ code: ' 11 66 53', title: 'Gymnasium Dividers' },
{ code: ' 11 66 53.13', title: 'Batting/Golf Cages' },
{ code: ' 11 67 00', title: 'Recreational Equipment' },
{ code: ' 11 67 13', title: 'Bowling Alley Equipment' },
{ code: ' 11 67 23', title: 'Shooting Range Equipment' },
{ code: ' 11 67 33', title: 'Climbing Walls' },
{ code: ' 11 67 43', title: 'Table Games Equipment' },
{ code: ' 11 67 43.13', title: 'Pool Tables' },
{ code: ' 11 67 43.23', title: 'Ping-Pong Tables' },
{ code: ' 11 67 53', title: 'Game Room Equipment' },
{ code: ' 11 67 53.13', title: 'Video Games' },
{ code: ' 11 67 53.23', title: 'Pinball Machines' },
{ code: ' 11 68 00', title: 'Play Field Equipment and Structures' },
{ code: ' 11 68 13', title: 'Playground Equipment' },
{ code: ' 11 68 16', title: 'Play Structures' },
{ code: ' 11 68 23', title: 'Exterior Court Athletic Equipment' },
{ code: ' 11 68 23.13', title: 'Exterior Basketball Equipment' },
{ code: ' 11 68 23.23', title: 'Exterior Volleyball Equipment' },
{ code: ' 11 68 23.33', title: 'Tennis Equipment' },
{ code: ' 11 68 33', title: 'Athletic Field Equipment' },
{ code: ' 11 68 33.13', title: 'Football Field Equipment' },
{ code: ' 11 68 33.23', title: 'Soccer and Field Hockey Equipment' },
{ code: ' 11 68 33.33', title: 'Baseball Field Equipment' },
{ code: ' 11 68 33.43', title: 'Track and Field Equipment' },
{ code: ' 11 68 43', title: 'Exterior Scoreboards' },
{ code: ' 11 70 00', title: 'HEALTHCARE EQUIPMENT' },
{ code: ' 11 71 00', title: 'Medical Sterilizing Equipment' },
{ code: ' 11 72 00', title: 'Examination and Treatment Equipment' },
{ code: ' 11 72 13', title: 'Examination Equipment' },
{ code: ' 11 72 53', title: 'Treatment Equipment' },
{ code: ' 11 73 00', title: 'Patient Care Equipment' },
{ code: ' 11 74 00', title: 'Dental Equipment' },
{ code: ' 11 75 00', title: 'Optical Equipment' },
{ code: ' 11 76 00', title: 'Operating Room Equipment' },
{ code: ' 11 77 00', title: 'Radiology Equipment' },
{ code: ' 11 78 00', title: 'Mortuary Equipment' },
{ code: ' 11 78 13', title: 'Mortuary Refrigerators' },
{ code: ' 11 78 16', title: 'Crematorium Equipment' },
{ code: ' 11 78 19', title: 'Mortuary Lifts' },
{ code: ' 11 79 00', title: 'Therapy Equipment' },
{ code: ' 11 80 00', title: 'COLLECTION AND DISPOSAL EQUIPMENT' },
{ code: ' 11 82 00', title: 'Solid Waste Handling Equipment' },
{ code: ' 11 82 13', title: 'Solid Waste Bins' },
{ code: ' 11 82 19', title: 'Packaged Incinerators' },
{ code: ' 11 82 23', title: 'Recycling Equipment' },
{ code: ' 11 82 26', title: 'Waste Compactors and Destructors' },
{ code: ' 11 82 29', title: 'Composting Equipment' },
{ code: ' 11 90 00', title: 'OTHER EQUIPMENT' },
{ code: ' 11 91 00', title: 'Religious Equipment' },
{ code: ' 11 91 13', title: 'Baptisteries' },
{ code: ' 11 92 00', title: 'Agricultural Equipment' },
{ code: ' 11 92 13', title: 'Milkers' },
{ code: ' 11 92 16', title: 'Stock Feeders' },
{ code: ' 11 92 19', title: 'Stock Waterers' },
{ code: ' 11 92 23', title: 'Agricultural Waste Clean-Up Equipment' },
{ code: ' 11 93 00', title: 'Horticultural Equipment' },
{ code: ' 11 93 13', title: 'Hydroponic Growing Systems' },
{ code: ' 11 93 16', title: 'Seeders' },
{ code: ' 11 93 19', title: 'Transplanters' },
{ code: ' 11 93 23', title: 'Potting Machines' },
{ code: ' 11 93 26', title: 'Flat Fillers' },
{ code: ' 11 93 29', title: 'Baggers' },
{ code: ' 11 93 33', title: 'Soil Mixers' }]
}
)
}
division_10() {
return ({
division: 10,
divisionTitle: 'Specialties',
codes: [{ code: ' 10 00 00', title: 'SPECIALTIES' },
{ code: ' 10 01 00', title: 'Operation and Maintenance of Specialties' },
{ code: ' 10 01 10', title: 'Operation and Maintenance of Information Specialties' },
{ code: ' 10 01 20', title: 'Operation and Maintenance of Interior Specialties' },
{ code: ' 10 01 30', title: 'Operation and Maintenance of Fireplaces and Stoves' },
{ code: ' 10 01 40', title: 'Operation and Maintenance of Safety Specialties' },
{ code: ' 10 01 50', title: 'Operation and Maintenance of Storage Specialties' },
{ code: ' 10 01 70', title: 'Operation and Maintenance of Exterior Specialties' },
{ code: ' 10 01 80', title: 'Operation and Maintenance of Other Specialties' },
{ code: ' 10 05 00', title: 'Common Work Results for Specialties' },
{ code: ' 10 06 00', title: 'Schedules for Specialties' },
{ code: ' 10 06 10', title: 'Schedules for Information Specialties' },
{ code: ' 10 06 10.13', title: 'Exterior Signage Schedule' },
{ code: ' 10 06 10.16', title: 'Interior Signage Schedule' },
{ code: ' 10 06 20', title: 'Schedules for Interior Specialties' },
{ code: ' 10 06 20.13', title: 'Toilet, Bath, and Laundry Accessory Schedule' },
{ code: ' 10 06 30', title: 'Schedules for Fireplaces and Stoves' },
{ code: ' 10 06 40', title: 'Schedules for Safety Specialties' },
{ code: ' 10 06 50', title: 'Schedules for Storage Specialties' },
{ code: ' 10 06 70', title: 'Schedules for Exterior Specialties' },
{ code: ' 10 06 80', title: 'Schedules for Other Specialties' },
{ code: ' 10 08 00', title: 'Commissioning of Specialties' },
{ code: ' 10 10 00', title: 'INFORMATION SPECIALTIES' },
{ code: ' 10 11 00', title: 'Visual Display Surfaces' },
{ code: ' 10 11 13', title: 'Chalkboards' },
{ code: ' 10 11 13.13', title: 'Fixed Chalkboards' },
{ code: ' 10 11 13.23', title: 'Modular-Support-Mounted Chalkboards' },
{ code: ' 10 11 13.33', title: 'Rail-Mounted Chalkboards' },
{ code: ' 10 11 13.43', title: 'Portable Chalkboards' },
{ code: ' 10 11 16', title: 'Markerboards' },
{ code: ' 10 11 16.13', title: 'Fixed Markerboards' },
{ code: ' 10 11 16.23', title: 'Modular-Support-Mounted Markerboards' },
{ code: ' 10 11 16.33', title: 'Rail-Mounted Markerboards' },
{ code: ' 10 11 16.43', title: 'Portable Markerboards' },
{ code: ' 10 11 16.53', title: 'Electronic Markerboards' },
{ code: ' 10 11 23', title: 'Tackboards' },
{ code: ' 10 11 23.13', title: 'Fixed Tackboards' },
{ code: ' 10 11 23.23', title: 'Modular-Support-Mounted Tackboards' },
{ code: ' 10 11 23.33', title: 'Rail-Mounted Tackboards' },
{ code: ' 10 11 23.43', title: 'Portable Tackboards' },
{ code: ' 10 11 33', title: 'Sliding Visual Display Units' },
{ code: ' 10 11 33.13', title: 'Horizontal-Sliding Visual Display Units' },
{ code: ' 10 11 33.23', title: 'Vertical-Sliding Visual Display Units' },
{ code: ' 10 11 36', title: 'Visual Display Conference Units' },
{ code: ' 10 11 39', title: 'Visual Display Rails' },
{ code: ' 10 11 43', title: 'Visual Display Wall Panels' },
{ code: ' 10 11 46', title: 'Visual Display Fabrics' },
{ code: ' 10 12 00', title: 'Display Cases' },
{ code: ' 10 13 00', title: 'Directories' },
{ code: ' 10 13 13', title: 'Electronic Directories' },
{ code: ' 10 14 00', title: 'Signage' },
{ code: ' 10 14 16', title: 'Plaques' },
{ code: ' 10 14 19', title: 'Dimensional Letter Signage' },
{ code: ' 10 14 23', title: 'Panel Signage' },
{ code: ' 10 14 23.13', title: 'Engraved Panel Signage' },
{ code: ' 10 14 26', title: 'Post and Panel/Pylon Signage' },
{ code: ' 10 14 33', title: 'Illuminated Panel Signage' },
{ code: ' 10 14 36', title: 'Non-Illuminated Panel Signage' },
{ code: ' 10 14 43', title: 'Photolum inescent Signage' },
{ code: ' 10 14 53', title: 'Traffic Signage' },
{ code: ' 10 14 53.13', title: 'Transportation Reference Markers' },
{ code: ' 10 14 63', title: 'Electronic Message Signage' },
{ code: ' 10 14 66', title: 'Floating Signage' },
{ code: ' 10 17 00', title: 'Telephone Specialties' },
{ code: ' 10 17 13', title: 'Telephone Directory Units' },
{ code: ' 10 17 16', title: 'Telephone Enclosures' },
{ code: ' 10 17 16.13', title: 'Telephone Stalls' },
{ code: ' 10 17 16.16', title: 'Telephone Alcoves' },
{ code: ' 10 17 19', title: 'Telephone Shelving' },
{ code: ' 10 18 00', title: 'Informational Kiosks' },
{ code: ' 10 20 00', title: 'INTERIOR SPECIALTIES' },
{ code: ' 10 21 00', title: 'Compartments and Cubicles' },
{ code: ' 10 21 13', title: 'Toilet Compartments' },
{ code: ' 10 21 13.13', title: 'Metal Toilet Compartments' },
{ code: ' 10 21 13.16', title: 'Plastic-Laminate-Clad Toilet Compartments' },
{ code: ' 10 21 13.19', title: 'Plastic Toilet Compartments' },
{ code: ' 10 21 13.23', title: 'Particleboard Toilet Compartments' },
{ code: ' 10 21 13.40', title: 'Stone Toilet Compartments' },
{ code: ' 10 21 16', title: 'Shower and Dressing Compartments' },
{ code: ' 10 21 16.13', title: 'Metal Shower and Dressing Compartments' },
{ code: ' 10 21 16.16', title: 'Plastic-Laminate-Clad Shower and Dressing Compartments' },
{ code: ' 10 21 16.19', title: 'Plastic Shower and Dressing Compartments' },
{ code: ' 10 21 16.23', title: 'Particleboard Shower and Dressing Compartments' },
{ code: ' 10 21 16.40', title: 'Stone Shower and Dressing Compartments' },
{ code: ' 10 21 23', title: 'Cubicles' },
{ code: ' 10 21 23.13', title: 'Cubicle Curtains' },
{ code: ' 10 21 23.16', title: 'Cubicle Track and Hardware' },
{ code: ' 10 22 00', title: 'Partitions' },
{ code: ' 10 22 13', title: 'Wire Mesh Partitions' },
{ code: ' 10 22 16', title: 'Folding Gates' },
{ code: ' 10 22 19', title: 'Demountable Partitions' },
{ code: ' 10 22 19.13', title: 'Demountable Metal Partitions' },
{ code: ' 10 22 19.23', title: 'Demountable Wood Partitions' },
{ code: ' 10 22 19.33', title: 'Demountable Plastic Partitions' },
{ code: ' 10 22 19.43', title: 'Demountable Composite Partitions' },
{ code: ' 10 22 19.53', title: 'Demountable Gypsum Partitions' },
{ code: ' 10 22 23', title: 'Portable Partitions, Screens, and Panels' },
{ code: ' 10 22 23.13', title: 'Wall Screens' },
{ code: ' 10 22 23.23', title: 'Movable Panel Systems' },
{ code: ' 10 22 26', title: 'Operable Partitions' },
{ code: ' 10 22 26.13', title: 'Accordion Folding Partitions' },
{ code: ' 10 22 26.23', title: 'Coiling Partitions' },
{ code: ' 10 22 26.33', title: 'Folding Panel Partitions' },
{ code: ' 10 22 26.43', title: 'Sliding Partitions' },
{ code: ' 10 25 00', title: 'Service Walls' },
{ code: ' 10 25 13', title: 'Patient Bed Service Walls' },
{ code: ' 10 25 16', title: 'Modular Service Walls' },
{ code: ' 10 26 00', title: 'Wall and Door Protection' },
{ code: ' 10 26 13', title: 'Corner Guards' },
{ code: ' 10 26 16', title: 'Bumper Guards' },
{ code: ' 10 26 16.13', title: 'Bumper Rails' },
{ code: ' 10 26 16.16', title: 'Protective Corridor Handrails' },
{ code: ' 10 26 23', title: 'Protective Wall Covering' },
{ code: ' 10 26 23.13', title: 'Impact Resistant Wall Protection' },
{ code: ' 10 26 33', title: 'Door and Frame Protection' },
{ code: ' 10 28 00', title: 'Toilet, Bath, and Laundry Accessories' },
{ code: ' 10 28 13', title: 'Toilet Accessories' },
{ code: ' 10 28 13.13', title: 'Commercial Toilet Accessories' },
{ code: ' 10 28 13.19', title: 'Healthcare Toilet Accessories' },
{ code: ' 10 28 13.53', title: 'Security Toilet Accessories' },
{ code: ' 10 28 13.63', title: 'Detention Toilet Accessories' },
{ code: ' 10 28 16', title: 'Bath Accessories' },
{ code: ' 10 28 16.13', title: 'Residential Bath Accessories' },
{ code: ' 10 28 19', title: 'Tub and Shower Doors' },
{ code: ' 10 28 19.16', title: 'Shower Doors' },
{ code: ' 10 28 19.19', title: 'Tub Doors' },
{ code: ' 10 28 23', title: 'Laundry Accessories' },
{ code: ' 10 28 23.13', title: 'Built-In Ironing Boards' },
{ code: ' 10 28 23.16', title: 'Clothes Drying Racks' },
{ code: ' 10 30 00', title: 'FIREPLACES AND STOVES' },
{ code: ' 10 31 00', title: 'Manufactured Fireplaces' },
{ code: ' 10 31 13', title: 'Manufactured Fireplace Chimneys' },
{ code: ' 10 31 16', title: 'Manufactured Fireplace Forms' },
{ code: ' 10 32 00', title: 'Fireplace Specialties' },
{ code: ' 10 32 13', title: 'Fireplace Dampers' },
{ code: ' 10 32 16', title: 'Fireplace Inserts' },
{ code: ' 10 32 19', title: 'Fireplace Screens' },
{ code: ' 10 32 23', title: 'Fireplace Doors' },
{ code: ' 10 32 26', title: 'Fireplace Water Heaters' },
{ code: ' 10 35 00', title: 'Stoves' },
{ code: ' 10 35 13', title: 'Heating Stoves' },
{ code: ' 10 35 23', title: 'Cooking Stoves' },
{ code: ' 10 40 00', title: 'SAFETY SPECIALTIES' },
{ code: ' 10 41 00', title: 'Emergency Access and Information Cabinets' },
{ code: ' 10 41 13', title: 'Fire Department Plan Cabinets' },
{ code: ' 10 41 16', title: 'Emergency Key Cabinets' },
{ code: ' 10 43 00', title: 'Emergency Aid Specialties' },
{ code: ' 10 43 13', title: 'Defibrillator Cabinets' },
{ code: ' 10 43 16', title: 'First Aid Cabinets' },
{ code: ' 10 44 00', title: 'Fire Protection Specialties' },
{ code: ' 10 44 13', title: 'Fire Extinguisher Cabinets' },
{ code: ' 10 44 13.53', title: 'Security Fire Extinguisher Cabinets' },
{ code: ' 10 44 16', title: 'Fire Extinguishers' },
{ code: ' 10 44 16.13', title: 'Portable Fire Extinguishers' },
{ code: ' 10 44 16.16', title: 'Wheeled Fire Extinguisher Units' },
{ code: ' 10 44 33', title: 'Fire Blankets and Cabinets' },
{ code: ' 10 44 43', title: 'Fire Extinguisher Accessories' },
{ code: ' 10 50 00', title: 'STORAGE SPECIALTIES' },
{ code: ' 10 51 00', title: 'Lockers' },
{ code: ' 10 51 13', title: 'Metal Lockers' },
{ code: ' 10 51 16', title: 'Wood Lockers' },
{ code: ' 10 51 23', title: 'Plastic -Laminate-Clad Lockers' },
{ code: ' 10 51 26', title: 'Plastic Lockers' },
{ code: ' 10 51 26.13', title: 'Recycled Plastic Lockers' },
{ code: ' 10 51 33', title: 'Glass Lockers' },
{ code: ' 10 51 43', title: 'Wire Mesh Storage Lockers' },
{ code: ' 10 51 53', title: 'Locker Room Benches' },
{ code: ' 10 55 00', title: 'Postal Specialties' },
{ code: ' 10 55 13', title: 'Central Mail Delivery Boxes' },
{ code: ' 10 55 13.13', title: 'Cluster Box Units' },
{ code: ' 10 55 16', title: 'Mail Collection Boxes' },
{ code: ' 10 55 19', title: 'Receiving Boxes' },
{ code: ' 10 55 23', title: 'Mail Boxes' },
{ code: ' 10 55 23.13', title: 'Apartment Mail Boxes' },
{ code: ' 10 55 23.16', title: 'Mail Box Directories' },
{ code: ' 10 55 23.19', title: 'Mail Box Key Keepers' },
{ code: ' 10 55 26', title: 'Parcel Lockers' },
{ code: ' 10 55 33', title: 'Data Distribution Boxes' },
{ code: ' 10 55 36', title: 'Package Depositories' },
{ code: ' 10 55 91', title: 'Mail Chutes' },
{ code: ' 10 56 00', title: 'Storage Assemblies' },
{ code: ' 10 56 13', title: 'Metal Storage Shelving' },
{ code: ' 10 56 13.13', title: 'End-Panel-Support Metal Storage Shelving' },
{ code: ' 10 56 13.16', title: 'Post-and-Shelf Metal Storage Shelving' },
{ code: ' 10 56 13.19', title: 'Post-and-Beam Metal Storage Shelving' },
{ code: ' 10 56 13.23', title: 'Cantilever Metal Storage Shelving' },
{ code: ' 10 56 16', title: 'Fabricated Wood Storage Shelving' },
{ code: ' 10 56 19', title: 'Plastic Storage Shelving' },
{ code: ' 10 56 19.13', title: 'Recycled Plastic Storage Shelving' },
{ code: ' 10 56 23', title: 'Wire Storage Shelving' },
{ code: ' 10 56 26', title: 'Mobile Storage Shelving' },
{ code: ' 10 56 26.13', title: 'Manual Mobile Storage Shelving' },
{ code: ' 10 56 26.23', title: 'Motorized Mobile Storage Shelving' },
{ code: ' 10 56 29', title: 'Storage Racks' },
{ code: ' 10 56 29.13', title: 'Flow Storage Racks' },
{ code: ' 10 56 29.16', title: 'Pallet Storage Racks' },
{ code: ' 10 56 29.19', title: 'Movable-Shelf Storage Racks' },
{ code: ' 10 56 29.23', title: 'Stacker Storage Racks' },
{ code: ' 10 56 29.26', title: 'Cantilever Storage Racks' },
{ code: ' 10 56 29.29', title: 'Drive-In Storage Racks' },
{ code: ' 10 56 29.33', title: 'Drive-Through Storage Racks' },
{ code: ' 10 56 33', title: 'Mercantile Storage Assemblies' },
{ code: ' 10 57 00', title: 'Wardrobe and Closet Specialties' },
{ code: ' 10 57 13', title: 'Hat and Coat Racks' },
{ code: ' 10 57 23', title: 'Closet and Utility Shelving' },
{ code: ' 10 57 23.13', title: 'Wire Closet and Utility Shelving' },
{ code: ' 10 57 23.16', title: 'Plastic-Laminate-Clad Closet and Utility Shelving' },
{ code: ' 10 57 23.19', title: 'Wood Closet and Utility Shelving' },
{ code: ' 10 57 33', title: 'Closet and Utility Shelving Hardware' },
{ code: ' 10 60 00', title: 'Unassigned' },
{ code: ' 10 70 00', title: 'EXTERIOR SPECIALTIES' },
{ code: ' 10 71 00', title: 'Exterior Protection' },
{ code: ' 10 71 13', title: 'Exterior Sun Control Devices' },
{ code: ' 10 71 13.13', title: 'Exterior Shutters' },
{ code: ' 10 71 13.19', title: 'Rolling Exterior Shutters' },
{ code: ' 10 71 13.23', title: 'Coiling Exterior Shutters' },
{ code: ' 10 71 13.26', title: 'Decorative Exterior Shutters' },
{ code: ' 10 71 13.29', title: 'Side-Hinged Exterior Shutters' },
{ code: ' 10 71 13.43', title: 'Fixed Sun Screens' },
{ code: ' 10 71 16', title: 'Storm Panels' },
{ code: ' 10 71 16.13', title: 'Demountable Storm Panels' },
{ code: ' 10 71 16.16', title: 'Movable Storm Panels' },
{ code: ' 10 73 00', title: 'Protective Covers' },
{ code: ' 10 73 13', title: 'Awnings' },
{ code: ' 10 73 16', title: 'Canopies' },
{ code: ' 10 73 23', title: 'Car Shelters' },
{ code: ' 10 73 26', title: 'Walkway Coverings' },
{ code: ' 10 73 33', title: 'Marquees' },
{ code: ' 10 73 43', title: 'Transportation Stop Shelters' },
{ code: ' 10 74 00', title: 'Manufactured Exterior Specialties' },
{ code: ' 10 74 13', title: 'Exterior Clocks' },
{ code: ' 10 74 23', title: 'Cupolas' },
{ code: ' 10 74 26', title: 'Spires' },
{ code: ' 10 74 29', title: 'Steeples' },
{ code: ' 10 74 33', title: 'Weathervanes' },
{ code: ' 10 74 43', title: 'Below-Grade Egress Assemblies' },
{ code: ' 10 74 46', title: 'Window Wells' },
{ code: ' 10 75 00', title: 'Flagpoles' },
{ code: ' 10 75 13', title: 'Automatic Flagpoles' },
{ code: ' 10 75 16', title: 'Ground-Set Flagpoles' },
{ code: ' 10 75 19', title: 'Nautical Flagpoles' },
{ code: ' 10 75 23', title: 'Wall-Mounted Flagpoles' },
{ code: ' 10 80 00', title: 'OTHER SPECIALTIES' },
{ code: ' 10 81 00', title: 'Pest Control Devices' },
{ code: ' 10 81 13', title: 'Bird Control Devices' },
{ code: ' 10 81 16', title: 'Insect Control Devices' },
{ code: ' 10 81 19', title: 'Rodent Control Devices' },
{ code: ' 10 82 00', title: 'Grilles and Screens' },
{ code: ' 10 82 13', title: 'Exterior Grilles and Screens' },
{ code: ' 10 82 23', title: 'Interior Grilles and Screens' },
{ code: ' 10 83 00', title: 'Flags and Banners' },
{ code: ' 10 83 13', title: 'Flags' },
{ code: ' 10 83 16', title: 'Banners' },
{ code: ' 10 86 00', title: 'Security Mirrors and Domes' },
{ code: ' 10 88 00', title: 'Scales' },
{ code: ' 10 90 00', title: 'Unassigned' }]
})
}
division_9() {
return ({
division: 9,
divisionTitle: 'Finishes',
codes: [{ code: '09 00 00', title: 'FINISHES' },
{ code: '09 01 00', title: 'Maintenance of Finishes' },
{ code: '09 01 20', title: 'Maintenance of Plaster and Gypsum Board' },
{ code: '09 01 20.91', title: 'Plaster Restoration' },
{ code: '09 01 30', title: 'Maintenance ofTiling' },
{ code: '09 01 30.91', title: 'Tile Restoration' },
{ code: '09 01 50', title: 'Maintenance of Ceilings' },
{ code: '09 01 60', title: 'Maintenance of Flooring' },
{ code: '09 01 60.91', title: 'Flooring Restoration' },
{ code: '09 01 70', title: 'Maintenance of Wall Finishes' },
{ code: '09 01 70.91', title: 'Wall Finish Restoration' },
{ code: '09 01 80', title: 'Maintenance of Acoustic Treatment' },
{ code: '09 01 90', title: 'Maintenance of Painting and Coating' },
{ code: '09 01 90.51', title: 'Paint Cleaning' },
{ code: '09 01 90.52', title: 'Maintenance Repainting' },
{ code: '09 01 90.53', title: 'Maintenance Coatings' },
{ code: '09 01 90.61', title: 'Repainting' },
{ code: '09 01 90.91', title: 'Paint Restoration' },
{ code: '09 01 90.92', title: 'Coating Restoration' },
{ code: '09 01 90.93', title: 'Paint Preservation' },
{ code: '09 05 00', title: 'Common Work Results for Finishes' },
{ code: '09 05 13', title: 'Common Finishes' },
{ code: '09 06 00', title: 'Schedules for Finishes' },
{ code: '09 06 00.13', title: 'Room Finish Schedule' },
{ code: '09 06 20', title: 'Schedules for Plaster and Gypsum Board' },
{ code: '09 06 30', title: 'Schedules for Tiling' },
{ code: '09 06 50', title: 'Schedules for Ceilings' },
{ code: '09 06 60', title: 'Schedules for Flooring' },
{ code: '09 06 70', title: 'Schedules for Wall Finishes' },
{ code: '09 06 80', title: 'Schedules for Acoustical Treatment' },
{ code: '09 06 90', title: 'Schedules for Painting and Coating' },
{ code: '09 06 90.13', title: 'Paint Schedule' },
{ code: '09 08 00', title: 'Commissioning of Finishes' },
{ code: '09 10 00', title: 'Unassigned' },
{ code: '09 20 00', title: 'PLASTER AND GYPSUM BOARD' },
{ code: '09 21 00', title: 'Plaster and Gypsum Board Assemblies' },
{ code: '09 21 13', title: 'Plaster Assemblies' },
{ code: '09 21 16', title: 'Gypsum Board Assemblies' },
{ code: '09 21 16.23', title: 'Gypsum Board Shaft Wall Assemblies' },
{ code: '09 21 16.33', title: 'Gypsum Board Area Separation Wall Assemblies' },
{ code: '09 22 00', title: 'Supports for Plaster and Gypsum Board' },
{ code: '09 22 13', title: 'Metal Furring' },
{ code: '09 22 13.13', title: 'Metal Channel Furring' },
{ code: '09 22 13.23', title: 'Resilient Channel Furring' },
{ code: '09 22 16', title: 'Non-Structural Metal Framing' },
{ code: '09 22 16.13', title: 'Non-Structural Metal Stud Framing' },
{ code: '09 22 26', title: 'Suspension Systems' },
{ code: '09 22 26.23', title: 'Metal Suspension Systems' },
{ code: '09 22 26.33', title: 'Plastic Suspension Systems' },
{ code: '09 22 36', title: 'Lath' },
{ code: '09 22 36.13', title: 'Gypsum Lath' },
{ code: '09 22 36.23', title: 'Metal Lath' },
{ code: '09 22 39', title: 'Veneer Plaster Base' },
{ code: '09 23 00', title: 'Gypsum Plastering' },
{ code: '09 23 13', title: 'Acoustical Gypsum Plastering' },
{ code: '09 23 82', title: 'Fireproof Gypsum Plastering' },
{ code: '09 24 00', title: 'Portland Cement Plastering' },
{ code: '09 24 13', title: 'Adobe Finish' },
{ code: '09 24 23', title: 'Portland Cement Stucco' },
{ code: '09 24 33', title: 'Portland Cement Parging' },
{ code: '09 25 00', title: 'Other Plastering' },
{ code: '09 25 13', title: 'Acrylic Plastering' },
{ code: '09 25 13.13', title: 'Acrylic Plaster Finish' },
{ code: '09 25 23', title: 'Lime Based Plastering' },
{ code: '09 26 00', title: 'Veneer Plastering' },
{ code: '09 26 13', title: 'Gypsum Veneer Plastering' },
{ code: '09 27 00', title: 'Plaster Fabrications' },
{ code: '09 27 13', title: 'Glass-Fiber-Reinforced Plaster Fabrications' },
{ code: '09 27 23', title: 'Simulated Plaster Fabrications' },
{ code: '09 28 00', title: 'Backing Boards and Underlayments' },
{ code: '09 28 13', title: 'Cementitious Backing Boards' },
{ code: '09 28 16', title: 'Glass-Mat Faced Gypsum Backing Boards' },
{ code: '09 28 19', title: 'Fibered Gypsum Backing Boards' },
{ code: '09 29 00', title: 'Gypsum Board' },
{ code: '09 29 82', title: 'Gypsum Board Fireproofing' },
{ code: '09 30 00', title: 'TILING' },
{ code: '09 30 13', title: 'Ceramic Tiling' },
{ code: '09 30 16', title: 'Quarry Tiling' },
{ code: '09 30 19', title: 'Paver Tiling' },
{ code: '09 30 23', title: 'Glass Mosaic Tiling' },
{ code: '09 30 26', title: 'Plastic Tiling' },
{ code: '09 30 29', title: 'Metal Tiling' },
{ code: '09 30 33', title: 'Stone Tiling' },
{ code: '09 31 00', title: 'Thin-Set Tiling' },
{ code: '09 31 13', title: 'Thin-Set Ceramic Tiling' },
{ code: '09 31 16', title: 'Thin-Set Quarry Tiling' },
{ code: '09 31 19', title: 'Thin-Set Paver Tiling' },
{ code: '09 31 23', title: 'Thin-Set Glass Mosaic Tiling' },
{ code: '09 31 26', title: 'Thin-Set Plastic Tiling' },
{ code: '09 31 29', title: 'Thin-Set Metal Tiling' },
{ code: '09 31 33', title: 'Thin-Set Stone Tiling' },
{ code: '09 32 00', title: 'Mortar-Bed Tiling' },
{ code: '09 32 13', title: 'Mortar-Bed Ceramic Tiling' },
{ code: '09 32 16', title: 'Mortar-Bed Quarry Tiling' },
{ code: '09 32 19', title: 'Mortar-Bed Paver Tiling' },
{ code: '09 32 23', title: 'Mortar-Bed Glass Mosaic Tiling' },
{ code: '09 32 26', title: 'Mortar-Bed Plastic Tiling' },
{ code: '09 32 29', title: 'Mortar-Bed Metal Tiling' },
{ code: '09 32 33', title: 'Mortar-Bed Stone Tiling' },
{ code: '09 33 00', title: 'Conductive Tiling' },
{ code: '09 33 13', title: 'Conductive Ceramic Tiling' },
{ code: '09 33 16', title: 'Conductive Quarry Tiling' },
{ code: '09 33 19', title: 'Conductive Paver Tiling' },
{ code: '09 33 23', title: 'Conductive Glass Mosaic Tiling' },
{ code: '09 33 26', title: 'Conductive Plastic Tiling' },
{ code: '09 33 29', title: 'Conductive Metal Tiling' },
{ code: '09 33 33', title: 'Conductive Stone Tiling' },
{ code: '09 34 00', title: 'Waterproofing-Membrane Tiling' },
{ code: '09 34 13', title: 'Waterproofing-Membrane Ceramic Tiling' },
{ code: '09 34 16', title: 'Waterproofing-Membrane Quarry Tiling' },
{ code: '09 34 19', title: 'Waterproofing-Membrane Paver Tiling' },
{ code: '09 34 23', title: 'Waterproofing-Membrane Glass Mosaic Tiling' },
{ code: '09 34 26', title: 'Waterproofing-Membrane Plastic Tiling' },
{ code: '09 34 29', title: 'Waterproofing-Membrane Metal Tiling' },
{ code: '09 34 33', title: 'Waterproofing-Membrane Stone Tiling' },
{ code: '09 35 00', title: 'Chemical-Resistant Tiling' },
{ code: '09 35 13', title: 'Chemical-Resistant Ceramic Tiling' },
{ code: '09 35 16', title: 'Chemical-Resistant Quarry Tiling' },
{ code: '09 35 19', title: 'Chemical-Resistant Paver Tiling' },
{ code: '09 35 23', title: 'Chemical-Resistant Glass Mosaic Tiling' },
{ code: '09 35 26', title: 'Chemical-Resistant Plastic Tiling' },
{ code: '09 35 29', title: 'Chemical-Resistant Metal Tiling' },
{ code: '09 35 33', title: 'Chemical-Resistant Stone Tiling' },
{ code: '09 40 00', title: 'Unassigned' },
{ code: '09 50 00', title: 'CEILINGS' },
{ code: '09 51 00', title: 'Acoustical Ceilings' },
{ code: '09 51 13', title: 'Acoustical Panel Ceilings' },
{ code: '09 51 23', title: 'Acoustical Tile Ceilings' },
{ code: '09 51 33', title: 'Acoustical Metal Pan Ceilings' },
{ code: '09 51 33.13', title: 'Acoustical Snap- in Metal Pan Ceilings' },
{ code: '09 51 53', title: 'Direct-Applied Acoustical Ceilings' },
{ code: '09 53 00', title: 'Acoustical Ceiling Suspension Assemblies' },
{ code: '09 53 13', title: 'Curved Profile Ceiling Suspension Assemblies' },
{ code: '09 53 23', title: 'Metal Acoustical Ceiling Suspension Assemblies' },
{ code: '09 53 33', title: 'Plastic Acoustical Ceiling Suspension Assemblies' },
{ code: '09 54 00', title: 'Specialty Ceilings' },
{ code: '09 54 13', title: 'Open Metal Mesh Ceilings' },
{ code: '09 54 16', title: 'Luminous Ceilings' },
{ code: '09 54 19', title: 'Mirror Panel Ceilings' },
{ code: '09 54 23', title: 'Linear Metal Ceilings' },
{ code: '09 54 26', title: 'Linear Wood Ceilings' },
{ code: '09 54 33', title: 'Decorative Panel Ceilings' },
{ code: '09 54 36', title: 'Suspended Decorative Grids' },
{ code: '09 54 43', title: 'Stretched-Fabric Ceiling Systems' },
{ code: '09 54 46', title: 'Fabric -Wrapped Ceiling Panels' },
{ code: '09 56 00', title: 'Textured Ceilings' },
{ code: '09 56 13', title: 'Gypsum-Panel Textured Ceilings' },
{ code: '09 56 16', title: 'Metal-Panel Textured Ceilings' },
{ code: '09 57 00', title: 'Special Function Ceilings' },
{ code: '09 57 53', title: 'Security Ceiling Assemblies' },
{ code: '09 58 00', title: 'Integrated Ceiling Assemblies' },
{ code: '09 60 00', title: 'FLOORING' },
{ code: '09 61 00', title: 'Flooring Treatment' },
{ code: '09 61 13', title: 'Slip-Resistant Flooring Treatment' },
{ code: '09 61 36', title: 'Static-Resistant Flooring Treatment' },
{ code: '09 62 00', title: 'Specialty Flooring' },
{ code: '09 62 13', title: 'Asphaltic Plank Flooring' },
{ code: '09 62 19', title: 'Laminate Flooring' },
{ code: '09 62 23', title: 'Bamboo Flooring' },
{ code: '09 62 26', title: 'Leather Flooring' },
{ code: '09 62 29', title: 'Cork Flooring' },
{ code: '09 62 35', title: 'Acid-Resistant Flooring' },
{ code: '09 62 48', title: 'Acoustic Flooring' },
{ code: '09 63 00', title: 'Masonry Flooring' },
{ code: '09 63 13', title: 'Brick Flooring' },
{ code: '09 63 13.35', title: 'Chemical-Resistant Brick Flooring' },
{ code: '09 63 40', title: 'Stone Flooring' },
{ code: '09 63 43', title: 'Composition Stone Flooring' },
{ code: '09 64 00', title: 'Wood Flooring' },
{ code: '09 64 16', title: 'Wood Block Flooring' },
{ code: '09 64 19', title: 'Wood Composition Flooring' },
{ code: '09 64 23', title: 'Wood Parquet Flooring' },
{ code: '09 64 23.13', title: 'Acrylic-Impregnated Wood Parquet Flooring' },
{ code: '09 64 29', title: 'Wood Strip and Plank Flooring' },
{ code: '09 64 33', title: 'Laminated Wood Flooring' },
{ code: '09 64 53', title: 'Resilient Wood Flooring Assemblies' },
{ code: '09 64 66', title: 'Wood Athletic Flooring' },
{ code: '09 65 00', title: 'Resilient Flooring' },
{ code: '09 65 13', title: 'Resilient Base and Accessories' },
{ code: '09 65 13.13', title: 'Resilient Base' },
{ code: '09 65 13.23', title: 'Resilient Stair Treads and Risers' },
{ code: '09 65 13.26', title: 'Resilient Stair Nosings' },
{ code: '09 65 13.33', title: 'Resilient Accessories' },
{ code: '09 65 13.36', title: 'Resilient Carpet Transitions' },
{ code: '09 65 16', title: 'Resilient Sheet Flooring' },
{ code: '09 65 16.13', title: 'Linoleum Flooring' },
{ code: '09 65 19', title: 'Resilient Tile Flooring' },
{ code: '09 65 33', title: 'Conductive Resilient Flooring' },
{ code: '09 65 36', title: 'Static-Control Resilient Flooring' },
{ code: '09 65 36.13', title: 'Static-Dissipative Resilient Flooring' },
{ code: '09 65 36.16', title: 'Static-Resistant Resilient Flooring' },
{ code: '09 65 66', title: 'Resilient Athletic Flooring' },
{ code: '09 66 00', title: 'Terrazzo Flooring' },
{ code: '09 66 13', title: 'Portland Cement Terrazzo Flooring' },
{ code: '09 66 13.13', title: 'Sand Cushion Terrazzo Flooring' },
{ code: '09 66 13.16', title: 'Monolithic Terrazzo Flooring' },
{ code: '09 66 13.19', title: 'Bonded Terrazzo Flooring' },
{ code: '09 66 13.23', title: 'Palladina Terrazzo Flooring' },
{ code: '09 66 13.26', title: 'Rustic Terrazzo Flooring' },
{ code: '09 66 13.33', title: 'Structural Terrazzo Flooring' },
{ code: '09 66 16', title: 'Terrazzo Floor Tile' },
{ code: '09 66 16.13', title: 'Portland Cement Terrazzo Floor Tile' },
{ code: '09 66 16.16', title: 'Plastic-Matrix Terrazzo Floor Tile' },
{ code: '09 66 23', title: 'Resinous Matrix Terrazzo Flooring' },
{ code: '09 66 23.13', title: 'Polyacrylate Modified Cementitious Terrazzo Flooring' },
{ code: '09 66 23.16', title: 'Epoxy-Resin Terrazzo Flooring' },
{ code: '09 66 23.19', title: 'Polyester-Resin Terrazzo Flooring' },
{ code: '09 66 33', title: 'Conductive Terrazzo Flooring' },
{ code: '09 66 33.13', title: 'Conductive Epoxy-Resin Terrazzo' },
{ code: '09 66 33.16', title: 'Conductive Polyester-Resin Terrazzo Flooring' },
{ code: '09 66 33.19', title: 'Conductive Plastic-Matrix Terrazzo Flooring' },
{ code: '09 67 00', title: 'Fluid-Applied Flooring' },
{ code: '09 67 13', title: 'Elastomeric Liquid Flooring' },
{ code: '09 67 13.33', title: 'Conductive Elastomeric Liquid Flooring' },
{ code: '09 67 16', title: 'Epoxy-Marble Chip Flooring' },
{ code: '09 67 19', title: 'Magnesium -Oxychloride Flooring' },
{ code: '09 67 23', title: 'Resinous Flooring' },
{ code: '09 67 26', title: 'Quartz Flooring' },
{ code: '09 67 66', title: 'Fluid-Applied Athletic Flooring' },
{ code: '09 68 00', title: 'Carpeting' },
{ code: '09 68 13', title: 'Tile Carpeting' },
{ code: '09 68 16', title: 'Sheet Carpeting' },
{ code: '09 69 00', title: 'Access Flooring' },
{ code: '09 69 13', title: 'Rigid-Grid Access Flooring' },
{ code: '09 69 16', title: 'Snap-on Stringer Access Flooring' },
{ code: '09 69 19', title: 'Stringerless Access Flooring' },
{ code: '09 69 53', title: 'Access Flooring Accessories' },
{ code: '09 69 56', title: 'Access Flooring Stairs and Stringers' },
{ code: '09 70 00', title: 'WALL FINISHES' },
{ code: '09 72 00', title: 'Wall Coverings' },
{ code: '09 72 13', title: 'Cork Wall Coverings' },
{ code: '09 72 16', title: 'Vinyl-Coated Fabric Wall Coverings' },
{ code: '09 72 16.13', title: 'Flexible Vinyl Wall Coverings' },
{ code: '09 72 16.16', title: 'Rigid-Sheet Vinyl Wall Coverings' },
{ code: '09 72 19', title: 'Textile Wall Coverings' },
{ code: '09 72 23', title: 'Wallpapering' },
{ code: '09 73 00', title: 'Wall Carpeting' },
{ code: '09 74 00', title: 'Flexible Wood Sheets' },
{ code: '09 74 13', title: 'Wood Wall Coverings' },
{ code: '09 74 16', title: 'Flexible Wood Veneers' },
{ code: '09 75 00', title: 'Stone Facing' },
{ code: '09 76 00', title: 'Plastic Blocks' },
{ code: '09 77 00', title: 'Special Wall Surfacing' },
{ code: '09 77 13', title: 'Stretched-Fabric Wall Systems' },
{ code: '09 77 23', title: 'Fabric -Wrapped Panels' },
{ code: '09 80 00', title: 'ACOUSTIC TREATMENT' },
{ code: '09 81 00', title: 'Acoustic Insulation' },
{ code: '09 81 13', title: 'Acoustic Board Insulation' },
{ code: '09 81 16', title: 'Acoustic Blanket Insulation' },
{ code: '09 81 29', title: 'Sprayed Acoustic Insulation' },
{ code: '09 83 00', title: 'Acoustic Finishes' },
{ code: '09 83 13', title: 'Acoustic Wall Coating' },
{ code: '09 83 16', title: 'Acoustic Ceiling Coating' },
{ code: '09 83 22', title: 'Acoustic Drapery' },
{ code: '09 84 00', title: 'Acoustic Room Components' },
{ code: '09 84 13', title: 'Fixed Sound-Absorptive Panels' },
{ code: '09 84 16', title: 'Fixed Sound-Reflective Panels' },
{ code: '09 84 23', title: 'Moveable Sound-Absorptive Panels' },
{ code: '09 84 26', title: 'Moveable Sound-Reflective Panels' },
{ code: '09 84 33', title: 'Sound-Absorbing Wall Units' },
{ code: '09 84 36', title: 'Sound-Absorbing Ceiling Units' },
{ code: '09 90 00', title: 'PAINTING AND COATING' },
{ code: '09 91 00', title: 'Painting' },
{ code: '09 91 13', title: 'Exterior Painting' },
{ code: '09 91 23', title: 'Interior Painting' },
{ code: '09 93 00', title: 'Staining and Transparent Finishing' },
{ code: '09 93 13', title: 'Exterior Staining and Finishing' },
{ code: '09 93 13.13', title: 'Exterior Staining' },
{ code: '09 93 13.53', title: 'Exterior Finishing' },
{ code: '09 93 23', title: 'Interior Staining and Finishing' },
{ code: '09 93 23.13', title: 'Interior Staining' },
{ code: '09 93 23.53', title: 'Interior Finishing' },
{ code: '09 94 00', title: 'Decorative Finishing' },
{ code: '09 94 13', title: 'Textured Finishing' },
{ code: '09 94 16', title: 'Faux Finishing' },
{ code: '09 94 19', title: 'Multicolor Interior Finishing' },
{ code: '09 96 00', title: 'High-Performance Coatings' },
{ code: '09 96 13', title: 'Abrasion-Resistant Coatings' },
{ code: '09 96 23', title: 'Graffiti-Resistant Coatings' },
{ code: '09 96 26', title: 'Marine Coatings' },
{ code: '09 96 33', title: 'High-Temperature-Resistant Coatings' },
{ code: '09 96 35', title: 'Chemical-Resistant Coatings' },
{ code: '09 96 43', title: 'Fire-Retardant Coatings' },
{ code: '09 96 46', title: 'Intumescent Painting' },
{ code: '09 96 53', title: 'Elastomeric Coatings' },
{ code: '09 96 56', title: 'Epoxy Coatings' },
{ code: '09 96 59', title: 'High-Build Glazed Coatings' },
{ code: '09 96 63', title: 'Textured Plastic Coatings' },
{ code: '09 96 66', title: 'Aggregate Wall Coatings' },
{ code: '09 97 00', title: 'Special Coatings' },
{ code: '09 97 13', title: 'Steel Coatings' },
{ code: '09 97 13.13', title: 'Interior Steel Coatings' },
{ code: '09 97 13.23', title: 'Exterior Steel Coatings' },
{ code: '09 97 23', title: 'Concrete and Masonry Coatings' },
{ code: '09 97 26', title: 'Cementitious Coatings' },
{ code: '09 97 26.13', title: 'Interior Cementitious Coatings' },
{ code: '09 97 26.23', title: 'Exterior Cementitious Coatings' }]
})
}
division_8() {
return ({
division: 8,
divisionTitle: 'Openings',
codes: [
{ code: ' 08 00 00', title: 'OPENINGS' },
{ code: ' 08 01 00', title: 'Operation and Maintenance of Openings' },
{ code: ' 08 01 10', title: 'Operation and Maintenance of Doors and Frames' },
{ code: ' 08 01 11', title: 'Operation and Maintenance of Metal Doors and Frames' },
{ code: ' 08 01 14', title: 'Operation and Maintenance of Wood Doors' },
{ code: ' 08 01 15', title: 'Operation and Maintenance of Plastic Doors' },
{ code: ' 08 01 16', title: 'Operation and Maintenance of Composite Doors' },
{ code: ' 08 01 17', title: 'Operation and Maintenance of Integrated Door Opening Assemblies' },
{ code: ' 08 01 30', title: 'Operation and Maintenance of Specialty Doors and Frames' },
{ code: ' 08 01 32', title: 'Operation and Maintenance of Sliding Glass Doors' },
{ code: ' 08 01 33', title: 'Operation and Maintenance of Coiling Doors and Grilles' },
{ code: ' 08 01 34', title: 'Operation and Maintenance of Special Function Doors' },
{ code: ' 08 01 35', title: 'Operation and Maintenance of Folding Doors and Grilles' },
{ code: ' 08 01 36', title: 'Operation and Maintenance of Panel Doors' },
{ code: ' 08 01 39', title: 'Operation and Maintenance of Traffic Doors' },
{ code: ' 08 01 40', title: 'Operation and Maintenance of Entrances, Storefronts, and Curtain Walls' },
{ code: ' 08 01 41', title: 'Operation and Maintenance of Entrances' },
{ code: ' 08 01 42', title: 'Operation and Maintenance of Storefronts' },
{ code: ' 08 01 44', title: 'Operation and Maintenance of Curtain ' },
{ code: ' 08 01 50', title: 'Operation and Maintenance of Windows' },
{ code: ' 08 01 51', title: 'Operation and Maintenance of Metal Windows' },
{ code: ' 08 01 52', title: 'Operation and Maintenance of Wood Windows' },
{ code: ' 08 01 52.61', title: 'Wood Window Repairs' },
{ code: ' 08 01 52.71', title: 'Wood Window Rehabilitation' },
{ code: ' 08 01 52.81', title: 'Wood Window Replacement' },
{ code: ' 08 01 52.91', title: 'Wood Window Restoration' },
{ code: ' 08 01 52.93', title: 'Historic Treatment of Wood Windows' },
{ code: ' 08 01 53', title: 'Operation and Maintenance of Plastic Windows' },
{ code: ' 08 01 54', title: 'Operation and Maintenance of Composite Windows' },
{ code: ' 08 01 56', title: 'Operation and Maintenance of Special Function Windows' },
{ code: ' 08 01 60', title: 'Operation and Maintenance of Skylights and Roof Windows' },
{ code: ' 08 01 61', title: 'Operation and Maintenance of Roof Windows' },
{ code: ' 08 01 62', title: 'Operation and Maintenance of Unit Skylights' },
{ code: ' 08 01 63', title: 'Operation and Maintenance of Metal-Framed Skylights' },
{ code: ' 08 01 64', title: 'Operation and Maintenance of Plastic -Framed Skylights' },
{ code: ' 08 01 70', title: 'Operation and Maintenance of Hardware' },
{ code: ' 08 01 71', title: 'Operation and Maintenance of Door Hardware' },
{ code: ' 08 01 74', title: 'Operation and Maintenance of Access Control Hardware' },
{ code: ' 08 01 75', title: 'Operation and Maintenance of Window Hardware' },
{ code: ' 08 01 80', title: 'Maintenance of Glazing' },
{ code: ' 08 01 81', title: 'Maintenance of Glass Glazing' },
{ code: ' 08 01 84', title: 'Maintenance of Plastic Glazing' },
{ code: ' 08 01 88', title: 'Maintenance of Special Function Glazing' },
{ code: ' 08 01 90', title: 'Operation and Maintenance of Louvers and Vents' },
{ code: ' 08 01 91', title: 'Operation and Maintenance of Louvers' },
{ code: ' 08 01 92', title: 'Operation and Maintenance of Louvered Equipment Enclosures' },
{ code: ' 08 01 95', title: 'Operation and Maintenance of Vents' },
{ code: ' 08 05 00', title: 'Common Work Results for Openings' },
{ code: ' 08 06 00', title: 'Schedules for Openings' },
{ code: ' 08 06 10', title: 'Door Schedule' },
{ code: ' 08 06 10.13', title: 'Door Type Schedule' },
{ code: ' 08 06 10.16', title: 'Frame Type Schedule' },
{ code: ' 08 06 40', title: 'Schedules for Entrances, Storefronts, and Curtain Walls' },
{ code: ' 08 06 41', title: 'Entrance Schedule' },
{ code: ' 08 06 42', title: 'Storefront Schedule' },
{ code: ' 08 06 50', title: 'Window Schedule' },
{ code: ' 08 06 60', title: 'Skylight Schedule' },
{ code: ' 08 06 70', title: 'Hardware Schedule' },
{ code: ' 08 06 71', title: 'Door Hardware Schedule' },
{ code: ' 08 06 80', title: 'Glazing Schedule' },
{ code: ' 08 06 90', title: 'Louver and Vent Schedule' },
{ code: ' 08 08 00', title: 'Commissioning of Openings' },
{ code: ' 08 10 00', title: 'DOORS AND FRAMES' },
{ code: ' 08 11 00', title: 'Metal Doors and Frames' },
{ code: ' 08 11 13', title: 'Hollow Metal Doors and Frames' },
{ code: ' 08 11 13.13', title: 'Standard Hollow Metal Doors and Frames' },
{ code: ' 08 11 13.16', title: 'Custom Hollow Metal Doors and Frames' },
{ code: ' 08 11 16', title: 'Aluminum Doors and Frames' },
{ code: ' 08 11 19', title: 'Stainless-Steel Doors and Frames' },
{ code: ' 08 11 23', title: 'Bronze Doors and Frames' },
{ code: ' 08 11 63', title: 'Metal Screen and Storm Doors and Frames' },
{ code: ' 08 11 63.13', title: 'Steel Screen and Storm Doors and Frames' },
{ code: ' 08 11 63.23', title: 'Aluminum Screen and Storm Doors and Frames' },
{ code: ' 08 11 66', title: 'Metal Screen Doors and Frames' },
{ code: ' 08 11 66.13', title: 'Steel Screen Doors and Frames' },
{ code: ' 08 11 66.23', title: 'Aluminum Screen Doors and Frames' },
{ code: ' 08 11 69', title: 'Metal Storm Doors and Frames' },
{ code: ' 08 11 69.13', title: 'Steel Storm Doors and Frames' },
{ code: ' 08 11 69.23', title: 'Aluminum Storm Doors and Frames' },
{ code: ' 08 11 73', title: 'Sliding Metal Firedoors' },
{ code: ' 08 11 74', title: 'Sliding Metal Grilles' },
{ code: ' 08 12 00', title: 'Metal Frames' },
{ code: ' 08 12 13', title: 'Hollow Metal Frames' },
{ code: ' 08 12 13.13', title: 'Standard Hollow Metal Frames' },
{ code: ' 08 12 13.53', title: 'Custom Hollow Metal Frames' },
{ code: ' 08 12 16', title: 'Aluminum Frames' },
{ code: ' 08 12 19', title: 'Stainless-Steel Frames' },
{ code: ' 08 12 23', title: 'Bronze Frames' },
{ code: ' 08 13 00', title: 'Metal Doors' },
{ code: ' 08 13 13', title: 'Hollow Metal Doors' },
{ code: ' 08 13 13.13', title: 'Standard Hollow Metal Doors' },
{ code: ' 08 13 13.53', title: 'Custom Hollow Metal Doors' },
{ code: ' 08 13 16', title: 'Aluminum Doors' },
{ code: ' 08 13 19', title: 'Stainless-Steel Doors' },
{ code: ' 08 13 23', title: 'Bronze Doors' },
{ code: ' 08 13 73', title: 'Sliding Metal Doors' },
{ code: ' 08 13 76', title: 'Bifolding Metal Doors' },
{ code: ' 08 14 00', title: 'Wood Doors' },
{ code: ' 08 14 13', title: 'Carved Wood Doors' },
{ code: ' 08 14 16', title: 'Flush Wood Doors' },
{ code: ' 08 14 23', title: 'Clad Wood Doors' },
{ code: ' 08 14 23.13', title: 'Metal-Faced Wood Doors' },
{ code: ' 08 14 23.16', title: 'Plastic-Laminate-Faced Wood Doors' },
{ code: ' 08 14 23.19', title: 'Molded-Hardboard-Faced Wood Doors' },
{ code: ' 08 14 29', title: 'Prefinished Wood Doors' },
{ code: ' 08 14 33', title: 'Stile and Rail Wood Doors' },
{ code: ' 08 14 66', title: 'Wood Screen Doors' },
{ code: ' 08 14 69', title: 'Wood Storm Doors' },
{ code: ' 08 14 73', title: 'Sliding Wood Doors' },
{ code: ' 08 14 76', title: 'Bifolding Wood Doors' },
{ code: ' 08 15 00', title: 'Plastic Doors' },
{ code: ' 08 15 13', title: 'Laminated Plastic Doors' },
{ code: ' 08 15 16', title: 'Solid Plastic Doors' },
{ code: ' 08 15 66', title: 'Plastic Screen Doors' },
{ code: ' 08 15 69', title: 'Plastic Storm Doors' },
{ code: ' 08 15 73', title: 'Sliding Plastic Doors' },
{ code: ' 08 15 76', title: 'Bifolding Plastic Doors' },
{ code: ' 08 16 00', title: 'Composite Doors' },
{ code: ' 08 16 13', title: 'Fiberglass Doors' },
{ code: ' 08 16 73', title: 'Sliding Composite Doors' },
{ code: ' 08 16 76', title: 'Bifolding Composite Doors' },
{ code: ' 08 17 00', title: 'Integrated Door Opening Assemblies' },
{ code: ' 08 17 13', title: 'Integrated Metal Door Opening Assemblies' },
{ code: ' 08 17 23', title: 'Integrated Wood Door Opening Assemblies' },
{ code: ' 08 17 33', title: 'Integrated Plastic Door Opening Assemblies' },
{ code: ' 08 17 43', title: 'Integrated Composite Door Opening Assemblies' },
{ code: ' 08 20 00', title: 'Unassigned' },
{ code: ' 08 30 00', title: 'SPECIALTY DOORS AND FRAMES' },
{ code: ' 08 31 00', title: 'Access Doors and Panels' },
{ code: ' 08 31 13', title: 'Access Doors and Frames' },
{ code: ' 08 31 13.53', title: 'Security Access Doors and Frames' },
{ code: ' 08 31 16', title: 'Access Panels and Frames' },
{ code: ' 08 32 00', title: 'Sliding Glass Doors' },
{ code: ' 08 32 13', title: 'Sliding Aluminum -Framed Glass Doors' },
{ code: ' 08 32 16', title: 'Sliding Plastic-Framed Glass Doors' },
{ code: ' 08 32 19', title: 'Sliding Wood-Framed Glass Doors' },
{ code: ' 08 33 00', title: 'Coiling Doors and Grilles' },
{ code: ' 08 33 13', title: 'Coiling Counter Doors' },
{ code: ' 08 33 16', title: 'Coiling Counter Grilles' },
{ code: ' 08 33 23', title: 'Overhead Coiling Doors' },
{ code: ' 08 33 26', title: 'Overhead Coiling Grilles' },
{ code: ' 08 33 33', title: 'Side Coiling Doors' },
{ code: ' 08 33 36', title: 'Side Coiling Grilles' },
{ code: ' 08 34 00', title: 'Special Function Doors' },
{ code: ' 08 34 13', title: 'Cold Storage Doors' },
{ code: ' 08 34 16', title: 'Hangar Doors' },
{ code: ' 08 34 19', title: 'Industrial Doors' },
{ code: ' 08 34 33', title: 'Lightproof Doors' },
{ code: ' 08 34 36', title: 'Darkroom Doors' },
{ code: ' 08 34 46', title: 'Radio-Frequency-Interference Shielding Doors' },
{ code: ' 08 34 49', title: 'Radiation Shielding Doors and Frames' },
{ code: ' 08 34 49.13', title: 'Neutron Shielding Doors and Frames' },
{ code: ' 08 34 53', title: 'Security Doors and Frames' },
{ code: ' 08 34 56', title: 'Security Gates' },
{ code: ' 08 34 59', title: 'Vault Doors and Day Gates' },
{ code: ' 08 34 63', title: 'Detention Doors and Frames' },
{ code: ' 08 34 63.13', title: 'Steel Detention Doors and Frames' },
{ code: ' 08 34 63.16', title: 'Steel Plate Detention Doors and Frames' },
{ code: ' 08 34 63.33', title: 'Detention Door Frame Protection' },
{ code: ' 08 34 73', title: 'Sound Control Door Assemblies' },
{ code: ' 08 35 00', title: 'Folding Doors and Grilles' },
{ code: ' 08 35 13', title: 'Folding Doors' },
{ code: ' 08 35 13.13', title: 'Accordion Folding Doors' },
{ code: ' 08 35 13.23', title: 'Folding Fire Doors' },
{ code: ' 08 35 13.33', title: 'Panel Folding Doors' },
{ code: ' 08 35 16', title: 'Folding Grilles' },
{ code: ' 08 35 16.13', title: 'Accordion Folding Grilles' },
{ code: ' 08 36 00', title: 'Panel Doors' },
{ code: ' 08 36 13', title: 'Sectional Doors' },
{ code: ' 08 36 16', title: 'Single-Panel Doors' },
{ code: ' 08 36 19', title: 'Multi-Leaf Vertical Lift Doors' },
{ code: ' 08 36 23', title: 'Telescoping Vertical Lift Doors' },
{ code: ' 08 38 00', title: 'Traffic Doors' },
{ code: ' 08 38 13', title: 'Flexible Strip Doors' },
{ code: ' 08 38 16', title: 'Flexible Traffic Doors' },
{ code: ' 08 38 19', title: 'Rigid Traffic Doors' },
{ code: ' 08 39 00', title: 'Pressure-Resistant Doors' },
{ code: ' 08 39 13', title: 'Airtight Doors' },
{ code: ' 08 39 19', title: 'Watertight Doors' },
{ code: ' 08 39 53', title: 'Blast-Resistant Doors' },
{ code: ' 08 40 00', title: 'ENTRANCES, STOREFRONTS, AND CURTAIN WALLS' },
{ code: ' 08 41 00', title: 'Entrances and Storefronts' },
{ code: ' 08 41 13', title: 'Aluminum -Framed Entrances and Storefronts' },
{ code: ' 08 41 16', title: 'Bronze-Framed Entrances and Storefronts' },
{ code: ' 08 41 19', title: 'Stainless-Steel-Framed Entrances and Storefronts' },
{ code: ' 08 41 23', title: 'Steel-Framed Entrances and Storefronts' },
{ code: ' 08 41 26', title: 'All-Glass Entrances and Storefronts' },
{ code: ' 08 42 00', title: 'Entrances' },
{ code: ' 08 42 26', title: 'All-Glass Entrances' },
{ code: ' 08 42 29', title: 'Automatic Entrances' },
{ code: ' 08 42 29.13', title: 'Folding Automatic Entrances' },
{ code: ' 08 42 29.23', title: 'Sliding Automatic Entrances' },
{ code: ' 08 42 29.33', title: 'Swinging Automatic Entrances' },
{ code: ' 08 42 33', title: 'Revolving Door Entrances' },
{ code: ' 08 42 33.13', title: 'Security Revolving Door Entrances' },
{ code: ' 08 42 36', title: 'Balanced Door Entrances' },
{ code: ' 08 42 39', title: 'Pressure-Resistant Entrances' },
{ code: ' 08 42 43', title: 'Intensive Care Unit/Critical Care Unit Entrances' },
{ code: ' 08 43 00', title: 'Storefronts' },
{ code: ' 08 43 13', title: 'Aluminum -Framed Storefronts' },
{ code: ' 08 43 16', title: 'Bronze-Framed Storefronts' },
{ code: ' 08 43 19', title: 'Stainless-Steel-Framed Storefronts' },
{ code: ' 08 43 23', title: 'Steel-Framed Storefronts' },
{ code: ' 08 43 26', title: 'All-Glass Storefronts' },
{ code: ' 08 43 29', title: 'Sliding Storefronts' },
{ code: ' 08 44 00', title: 'Curtain Wall and Glazed Assemblies' },
{ code: ' 08 44 13', title: 'Glazed Aluminum Curtain Walls' },
{ code: ' 08 44 16', title: 'Glazed Bronze Curtain Walls' },
{ code: ' 08 44 19', title: 'Glazed Stainless-Steel Curtain Walls' },
{ code: ' 08 44 26', title: 'Structural Glass Curtain Walls' },
{ code: ' 08 44 26.13', title: 'Structural Sealant Glazed Assemblies' },
{ code: ' 08 44 33', title: 'Sloped Glazing Assemblies' },
{ code: ' 08 45 00', title: 'Translucent Wall and Roof Assemblies' },
{ code: ' 08 45 13', title: 'Structured-Polycarbonate-Panel Assemblies' },
{ code: ' 08 45 23', title: 'Fiberglass-Sandwich-Panel Assemblies' },
{ code: ' 08 50 00', title: 'WINDOWS' },
{ code: ' 08 51 00', title: 'Metal Windows' },
{ code: ' 08 51 13', title: 'Aluminum Windows' },
{ code: ' 08 51 16', title: 'Bronze Windows' },
{ code: ' 08 51 19', title: 'Stainless-Steel Windows' },
{ code: ' 08 51 23', title: 'Steel Windows' },
{ code: ' 08 51 66', title: 'Metal Window Screens' },
{ code: ' 08 51 69', title: 'Metal Storm Windows' },
{ code: ' 08 52 00', title: 'Wood Windows' },
{ code: ' 08 52 13', title: 'Metal-Clad Wood Windows' },
{ code: ' 08 52 16', title: 'Plastic -Clad Wood Windows' },
{ code: ' 08 52 66', title: 'Wood Window Screens' },
{ code: ' 08 52 69', title: 'Wood Storm Windows' },
{ code: ' 08 53 00', title: 'Plastic Windows' },
{ code: ' 08 53 13', title: 'Vinyl Windows' },
{ code: ' 08 53 66', title: 'Vinyl Window Screens' },
{ code: ' 08 53 69', title: 'Vinyl Storm Windows' },
{ code: ' 08 54 00', title: 'Composite Windows' },
{ code: ' 08 54 13', title: 'Fiberglass Windows' },
{ code: ' 08 54 66', title: 'Fiberglass Window Screens' },
{ code: ' 08 54 69', title: 'Fiberglass Storm Windows' },
{ code: ' 08 55 00', title: 'Pressure-Resistant Windows' },
{ code: ' 08 56 00', title: 'Special Function Windows' },
{ code: ' 08 56 19', title: 'Pass Windows' },
{ code: ' 08 56 46', title: 'Radio-Frequency-Interference Shielding Windows' },
{ code: ' 08 56 49', title: 'Radiation Shielding Windows' },
{ code: ' 08 56 53', title: 'Security Windows' },
{ code: ' 08 56 56', title: 'Security Window Screens' },
{ code: ' 08 56 59', title: 'Service and Teller Window Units' },
{ code: ' 08 56 63', title: 'Detention Windows' },
{ code: ' 08 56 66', title: 'Detention Window Screens' },
{ code: ' 08 56 73', title: 'Sound Control Windows' },
{ code: ' 08 60 00', title: 'ROOF WINDOWS AND SKYLIGHTS' },
{ code: ' 08 61 00', title: 'Roof Windows' },
{ code: ' 08 61 13', title: 'Metal Roof Windows' },
{ code: ' 08 61 16', title: 'Wood Roof Windows' },
{ code: ' 08 62 00', title: 'Unit Skylights' },
{ code: ' 08 62 13', title: 'Domed Unit Skylights' },
{ code: ' 08 62 16', title: 'Pyramidal Unit Skylights' },
{ code: ' 08 62 19', title: 'Vaulted Unit Skylights' },
{ code: ' 08 63 00', title: 'Metal-Framed Skylights' },
{ code: ' 08 63 13', title: 'Domed Metal-Framed Skylights' },
{ code: ' 08 63 16', title: 'Pyramidal Metal-Framed Skylights' },
{ code: ' 08 63 19', title: 'Vaulted Metal-Framed Skylights' },
{ code: ' 08 63 23', title: 'Ridge Metal-Framed Skylights' },
{ code: ' 08 63 53', title: 'Motorized Metal-Framed Skylights' },
{ code: ' 08 64 00', title: 'Plastic-Framed Skylights' },
{ code: ' 08 67 00', title: 'Skylight Protection and Screens' },
{ code: ' 08 70 00', title: 'HARDWARE' },
{ code: ' 08 71 00', title: 'Door Hardware' },
{ code: ' 08 71 13', title: 'Automatic Door Operators' },
{ code: ' 08 71 53', title: 'Security Door Hardware' },
{ code: ' 08 71 63', title: 'Detention Door Hardware' },
{ code: ' 08 74 00', title: 'Access Control Hardware' },
{ code: ' 08 74 13', title: 'Card Key Access Control Hardware' },
{ code: ' 08 74 16', title: 'Keypad Access Control Hardware' },
{ code: ' 08 74 19', title: 'Biometric Identity Access Control Hardware' },
{ code: ' 08 75 00', title: 'Window Hardware' },
{ code: ' 08 75 13', title: 'Automatic Window Equipment' },
{ code: ' 08 75 16', title: 'Window Operators' },
{ code: ' 08 78 00', title: 'Special Function Hardware' },
{ code: ' 08 79 00', title: 'Hardware Accessories' },
{ code: ' 08 79 13', title: 'Key Storage Equipment' },
{ code: ' 08 80 00', title: 'GLAZING' },
{ code: ' 08 81 00', title: 'Glass Glazing' },
{ code: ' 08 81 13', title: 'Decorative Glass Glazing' },
{ code: ' 08 83 00', title: 'Mirrors' },
{ code: ' 08 83 13', title: 'Mirrored Glass Glazing' },
{ code: ' 08 83 16', title: 'Mirrored Plastic Glazing' },
{ code: ' 08 84 00', title: 'Plastic Glazing' },
{ code: ' 08 84 13', title: 'Decorative Plastic Glazing' },
{ code: ' 08 85 00', title: 'Glazing Accessories' },
{ code: ' 08 87 00', title: 'Glazing Surface Films' },
{ code: ' 08 87 13', title: 'Solar Control Films' },
{ code: ' 08 87 16', title: 'Safety Films' },
{ code: ' 08 87 53', title: 'Security Films' },
{ code: ' 08 88 00', title: 'Special Function Glazing' },
{ code: ' 08 88 19', title: 'Hurricane-Resistant Glazing' },
{ code: ' 08 88 23', title: 'Cable Suspended Glazing' },
{ code: ' 08 88 33', title: 'Transparent Mirrored Glazing' },
{ code: ' 08 88 39', title: 'Pressure-Resistant Glazing' },
{ code: ' 08 88 49', title: 'Radiation-Resistant Glazing' },
{ code: ' 08 88 53', title: 'Security Glazing' },
{ code: ' 08 88 56', title: 'Ballistics-Resistant Glazing' },
{ code: ' 08 90 00', title: 'LOUVERS AND VENTS' },
{ code: ' 08 91 00', title: 'Louvers' },
{ code: ' 08 91 13', title: 'Motorized Wall Louvers' },
{ code: ' 08 91 16', title: 'Operable Wall Louvers' },
{ code: ' 08 91 19', title: 'Fixed Louvers' },
{ code: ' 08 91 26', title: 'Door Louvers' },
{ code: ' 08 92 00', title: 'Louvered Equipment Enclosures' },
{ code: ' 08 95 00', title: 'Vents' },
{ code: ' 08 95 13', title: 'Soffit Vents' },
{ code: ' 08 95 16', title: 'Wall Vents' }
]
})
}
division_7() {
return (
{
division: 7,
divisionTitle: 'Thermal and Moisture Protection',
codes: [{ code: '07 00 00', title: ' THERMAL AND MOISTURE PROTECTION' },
{ code: '07 01 00', title: ' Operation and Maintenance of Thermal and Moisture Protection' },
{ code: '07 01 10', title: 'Maintenance of Dampproofing and Waterproofing' },
{ code: '07 01 10.81', title: 'Waterproofing Replacement' },
{ code: '07 01 20', title: 'Maintenance ofThermal Protection' },
{ code: '07 01 30', title: 'Maintenance of Steep Slope Roofing' },
{ code: '07 01 40', title: 'Maintenance of Roofing and Siding Panels' },
{ code: '07 01 50', title: 'Maintenance of Membrane Roofing' },
{ code: '07 01 50.13', title: 'Roof Moisture Survey' },
{ code: '07 01 50.16', title: 'Roof Maintenance Program' },
{ code: '07 01 50.19', title: 'Preparation for Re-Roofing' },
{ code: '07 01 50.23', title: 'Roof Removal' },
{ code: '07 01 50.61', title: 'Roof Re-Coating' },
{ code: '07 01 50.81', title: 'Roof Replacement' },
{ code: '07 01 50.91', title: 'Roofing Restoration' },
{ code: '07 01 60', title: 'Maintenance of Flashing and Sheet Metal' },
{ code: '07 01 60.71', title: 'Flashing and Sheet Metal Rehabilitation' },
{ code: '07 01 60.91', title: 'Flashing and Sheet Metal Restoration' },
{ code: '07 01 60.92', title: 'Flashing and Sheet Metal Preservation' },
{ code: '07 01 70', title: 'Operation and Maintenance of Roof Specialties and Accessories' },
{ code: '07 01 80', title: 'Maintenance of Fire and Smoke Protection' },
{ code: '07 01 90', title: 'Maintenance of Joint Protection' },
{ code: '07 01 90.71', title: 'Joint Sealant Rehabilitation' },
{ code: '07 01 90.81', title: 'Joint Sealant Replacement' },
{ code: '07 05 00', title: 'Common Work Results for Thermal and Moisture Protection' },
{ code: '07 06 00', title: 'Schedules for Thermal and Moisture Protection' },
{ code: '07 06 10', title: 'Schedules for Dampproofing and Waterproofing' },
{ code: '07 06 20', title: 'Schedules for Thermal Protection' },
{ code: '07 06 30', title: 'Schedules for Steep Slope Roofing' },
{ code: '07 06 40', title: 'Schedules for Roofing and Siding Panels' },
{ code: '07 06 50', title: 'Schedules for Membrane Roofing' },
{ code: '07 06 60', title: 'Schedules for Flashing and Sheet Metal' },
{ code: '07 06 70', title: 'Schedules for Roof Specialties and Accessories' },
{ code: '07 06 80', title: 'Schedules for Fire and Smoke Protection' },
{ code: '07 06 80.13', title: 'Fireproofing Schedule' },
{ code: '07 06 80.16', title: 'Firestopping Schedule' },
{ code: '07 06 90', title: 'Schedules for Joint Protection' },
{ code: '07 06 90.13', title: 'Joint Sealant Schedule' },
{ code: '07 08 00', title: 'Commissioning of Thermal and Moisture Protection' },
{ code: '07 10 00', title: 'DAMPPROOFING AND WATERPROOFING' },
{ code: '07 11 00', title: 'Dampproofing' },
{ code: '07 11 13', title: 'Bituminous Dampproofing' },
{ code: '07 11 16', title: 'Cementitious Dampproofing' },
{ code: '07 11 19', title: 'Sheet Dampproofing' },
{ code: '07 12 00', title: 'Built-Up Bituminous Waterproofing' },
{ code: '07 12 13', title: 'Built-Up Asphalt Waterproofing' },
{ code: '07 12 16', title: 'Built-Up Coal Tar Waterproofing' },
{ code: '07 13 00', title: 'Sheet Waterproofing' },
{ code: '07 13 13', title: 'Bituminous Sheet Waterproofing' },
{ code: '07 13 26', title: 'Self-Adhering Sheet Waterproofing' },
{ code: '07 13 52', title: 'Modified Bituminous Sheet Waterproofing' },
{ code: '07 13 53', title: 'Elastomeric Sheet Waterproofing' },
{ code: '07 13 54', title: 'Thermoplastic Sheet Waterproofing' },
{ code: '07 14 00', title: 'Fluid-Applied Waterproofing' },
{ code: '07 14 13', title: 'Hot Fluid-Applied Rubberized Asphalt Waterproofing' },
{ code: '07 14 16', title: 'Cold Fluid-Applied Waterproofing' },
{ code: '07 15 00', title: 'Sheet Metal Waterproofing' },
{ code: '07 16 00', title: 'Cementitious and Reactive Waterproofing' },
{ code: '07 16 13', title: 'Polymer Modified Cement Waterproofing' },
{ code: '07 16 16', title: 'Crystalline Waterproofing' },
{ code: '07 16 19', title: 'Metal Oxide Waterproofing' },
{ code: '07 17 00', title: 'Bentonite Waterproofing' },
{ code: '07 17 13', title: 'Bentonite Panel Waterproofing' },
{ code: '07 17 16', title: 'Bentonite Composite Sheet Waterproofing' },
{ code: '07 18 00', title: 'Traffic Coatings' },
{ code: '07 18 13', title: 'Pedestrian Traffic Coatings' },
{ code: '07 18 16', title: 'Vehicular Traffic Coatings' },
{ code: '07 19 00', title: 'Water Repellents' },
{ code: '07 19 13', title: 'Acrylic Water Repellents' },
{ code: '07 19 16', title: 'Silane Water Repellents' },
{ code: '07 19 19', title: 'Silicone Water Repellents' },
{ code: '07 19 23', title: 'Siloxane Water Repellents' },
{ code: '07 19 26', title: 'Stearate Water Repellents' },
{ code: '07 20 00', title: 'THERMAL PROTECTION' },
{ code: '07 21 00', title: 'Thermal Insulation' },
{ code: '07 21 13', title: 'Board Insulation' },
{ code: '07 21 13.13', title: 'Foam Board Insulation' },
{ code: '07 21 13.16', title: 'Fibrous Board Insulation' },
{ code: '07 21 13.19', title: 'Mineral Board Insulation' },
{ code: '07 21 16', title: 'Blanket Insulation' },
{ code: '07 21 19', title: 'Foamed-in-Place Insulation' },
{ code: '07 21 23', title: 'Loose-Fill Insulation' },
{ code: '07 21 26', title: 'Blown Insulation' },
{ code: '07 21 29', title: 'Sprayed Insulation' },
{ code: '07 22 00', title: 'Roof and Deck Insulation' },
{ code: '07 22 13', title: 'Asphaltic Perlite Concrete Deck' },
{ code: '07 22 16', title: 'Roof Board Insulation' },
{ code: '07 24 00', title: 'Exterior Insulation and Finish Systems' },
{ code: '07 24 13', title: 'Polymer-Based Exterior Insulation and Finish System' },
{ code: '07 24 16', title: 'Polymer-Modified Exterior Insulation and Finish System' },
{ code: '07 24 19', title: 'Water-Drainage Exterior Insulation and Finish System' },
{ code: '07 25 00', title: 'WEATHERBARRIERS' },
{ code: '07 26 00', title: 'Vapor Retarders' },
{ code: '07 26 13', title: 'Above-Grade Vapor Retarders' },
{ code: '07 26 16', title: 'Below-Grade Vapor Retarders' },
{ code: '07 26 23', title: 'Below-Grade Gas Retarders' },
{ code: '07 27 00', title: 'Air Barriers' },
{ code: '07 27 13', title: 'Modified Bituminous Sheet Air Barriers' },
{ code: '07 27 16', title: 'Sheet Metal Membrane Air Barriers' },
{ code: '07 27 19', title: 'Plastic Sheet Air Barriers' },
{ code: '07 27 23', title: 'Board Product Air Barriers' },
{ code: '07 27 26', title: 'Fluid-Applied Membrane Air Barriers' },
{ code: '07 30 00', title: 'STEEP SLOPE ROOFING' },
{ code: '07 30 91', title: 'Canvas Roofing' },
{ code: '07 31 00', title: 'Shingles and Shakes' },
{ code: '07 31 13', title: 'Asphalt Shingles' },
{ code: '07 31 13.13', title: 'Fiberglass-Reinforced Asphalt Shingles' },
{ code: '07 31 16', title: 'Metal Shingles' },
{ code: '07 31 19', title: 'Mineral-Fiber Cement Shingles' },
{ code: '07 31 23', title: 'Porcelain Enamel Shingles' },
{ code: '07 31 26', title: 'Slate Shingles' },
{ code: '07 31 29', title: 'Wood Shingles and Shakes' },
{ code: '07 31 29.13', title: 'Wood Shingles' },
{ code: '07 31 29.16', title: 'Wood Shakes' },
{ code: '07 31 33', title: 'Composite Rubber Shingles' },
{ code: '07 31 53', title: 'Plastic Shakes' },
{ code: '07 32 00', title: 'Roof Tiles' },
{ code: '07 32 13', title: 'Clay Roof Tiles' },
{ code: '07 32 16', title: 'Concrete Roof Tiles' },
{ code: '07 32 19', title: 'Metal Roof Tiles' },
{ code: '07 32 23', title: 'Mineral-Fiber Cement Roof Tiles' },
{ code: '07 32 26', title: 'Plastic Roof Tiles' },
{ code: '07 32 29', title: 'Rubber Tiles/Panels' },
{ code: '07 33 00', title: 'Natural Roof Coverings' },
{ code: '07 33 13', title: 'Sod Roofing' },
{ code: '07 33 16', title: 'Thatched Roofing' },
{ code: '07 33 63', title: 'Vegetated Roofing' },
{ code: '07 40 00', title: 'ROOFING AND SIDING PANELS' },
{ code: '07 41 00', title: 'Roof Panels' },
{ code: '07 41 13', title: 'Metal Roof Panels' },
{ code: '07 41 23', title: 'Wood Roof Panels' },
{ code: '07 41 33', title: 'Plastic Roof Panels' },
{ code: '07 41 43', title: 'Composite Roof Panels' },
{ code: '07 41 63', title: 'Fabricated Roof Panel Assemblies' },
{ code: '07 42 00', title: 'Wall Panels' },
{ code: '07 42 13', title: 'Metal Wall Panels' },
{ code: '07 42 23', title: 'Wood Wall Panels' },
{ code: '07 42 33', title: 'Plastic Wall Panels' },
{ code: '07 42 43', title: 'Composite Wall Panels' },
{ code: '07 42 63', title: 'Fabricated Wall Panel Assemblies' },
{ code: '07 44 00', title: 'Faced Panels' },
{ code: '07 44 13', title: 'Aggregate Coated Panels' },
{ code: '07 44 16', title: 'Porcelain Enameled Faced Panels' },
{ code: '07 44 19', title: 'Tile-Faced Panels' },
{ code: '07 44 23', title: 'Ceramic -Tile-Faced Panels' },
{ code: '07 44 53', title: 'Glass-Fiber-Reinforced Cementitious Panels' },
{ code: '07 44 56', title: 'Mineral-Fiber-Reinforced Cementitious Panels' },
{ code: '07 44 63', title: 'Fabricated Faced Panel Assemblies' },
{ code: '07 46 00', title: 'Siding' },
{ code: '07 46 16', title: 'Aluminum Siding' },
{ code: '07 46 19', title: 'Steel Siding' },
{ code: '07 46 23', title: 'Wood Siding' },
{ code: '07 46 26', title: 'Hardboard Siding' },
{ code: '07 46 29', title: 'Plywood Siding' },
{ code: '07 46 33', title: 'Plastic Siding' },
{ code: '07 46 43', title: 'Composition Siding' },
{ code: '07 46 46', title: 'Mineral-Fiber Cement Siding' },
{ code: '07 46 63', title: 'Fabricated Panel Assemblies with Siding' },
{ code: '07 50 00', title: 'MEMBRANE ROOFING' },
{ code: '07 51 00', title: 'Built-Up Bituminous Roofing' },
{ code: '07 51 13', title: 'Built-Up Asphalt Roofing' },
{ code: '07 51 13.13', title: 'Cold-Applied Built-Up Asphalt Roofing' },
{ code: '07 51 16', title: 'Built-Up Coal Tar Roofing' },
{ code: '07 51 23', title: 'Glass-Fiber-Reinforced Asphalt Emulsion Roofing' },
{ code: '07 52 00', title: 'Modified Bituminous Membrane Roofing' },
{ code: '07 52 13', title: 'Atactic-Polypropylene-Modified Bituminous Membrane Roofing' },
{ code: '07 52 16', title: 'Styrene-Butadiene-Styrene Modified Bituminous Membrane Roofing' },
{ code: '07 52 19', title: 'Self-Adhering Modified Bituminous Membrane Roofing' },
{ code: '07 53 00', title: 'Elastomeric Membrane Roofing' },
{ code: '07 53 13', title: 'Chlorinated-Polyethylene Roofing' },
{ code: '07 53 16', title: 'Chlorosulfonate-Polyethylene Roofing' },
{ code: '07 53 23', title: 'Ethylene-Propylene-Diene-Monomer Roofing' },
{ code: '07 53 29', title: 'Polyisobutylene Roofing' },
{ code: '07 54 00', title: 'Thermoplastic Membrane Roofing' },
{ code: '07 54 13', title: 'Copolymer-Alloy Roofing' },
{ code: '07 54 16', title: 'Ethylene-Interpolymer Roofing' },
{ code: '07 54 19', title: 'Polyvinyl-Chloride Roofing' },
{ code: '07 54 23', title: 'Thermoplastic -Polyolefin Roofing' },
{ code: '07 54 26', title: 'Nitrile-Butadiene-Polymer Roofing' },
{ code: '07 55 00', title: 'Protected Membrane Roofing' },
{ code: '07 55 51', title: 'Built-Up Bituminous Protected Membrane Roofing' },
{ code: '07 55 52', title: 'Modified Bituminous Protected Membrane Roofing' },
{ code: '07 55 53', title: 'Elastomeric Protected Membrane Roofing' },
{ code: '07 55 54', title: 'Thermoplastic Protected Membrane Roofing' },
{ code: '07 55 56', title: 'Fluid-Applied Protected Membrane Roofing' },
{ code: '07 55 56.13', title: 'Hot-Applied Rubberized Asphalt Protected Membrane Roofing' },
{ code: '07 55 63', title: 'Vegetated Protected Membrane Roofing' },
{ code: '07 56 00', title: 'Fluid-Applied Roofing' },
{ code: '07 57 00', title: 'Coated Foamed Roofing' },
{ code: '07 57 13', title: 'Sprayed Polyurethane Foam Roofing' },
{ code: '07 58 00', title: 'Roll Roofing' },
{ code: '07 60 00', title: 'FLASHING AND SHEET METAL' },
{ code: '07 61 00', title: 'Sheet Metal Roofing' },
{ code: '07 61 13', title: 'Standing Seam Sheet Metal Roofing' },
{ code: '07 61 16', title: 'Batten Seam Sheet Metal Roofing' },
{ code: '07 61 19', title: 'Flat Seam Sheet Metal Roofing' },
{ code: '07 61 91', title: 'Tinplate and Ternplate Roofing' },
{ code: '07 62 00', title: 'Sheet Metal Flashing and Trim' },
{ code: '07 63 00', title: 'Sheet Metal Roofing Specialties' },
{ code: '07 65 00', title: 'Flexible Flashing' },
{ code: '07 65 13', title: 'Laminated Sheet Flashing' },
{ code: '07 65 16', title: 'Modified Bituminous Sheet Flashing' },
{ code: '07 65 19', title: 'Plastic Sheet Flashing' },
{ code: '07 65 23', title: 'Rubber Sheet Flashing' },
{ code: '07 65 26', title: 'Self-Adhering Sheet Flashing' },
{ code: '07 70 00', title: 'ROOF AND WALL SPECIALTIES AND ACCESSORIES' },
{ code: '07 71 00', title: 'Roof Specialties' },
{ code: '07 71 13', title: 'Manufactured Copings' },
{ code: '07 71 16', title: 'Manufactured Counterflashing Systems' },
{ code: '07 71 19', title: 'Manufactured Gravel Stops and Facias' },
{ code: '07 71 23', title: 'Manufactured Gutters and Downspouts' },
{ code: '07 71 26', title: 'Reglets' },
{ code: '07 71 29', title: 'Manufactured Roof Expansion Joints' },
{ code: '07 71 33', title: 'Manufactured Scuppers' },
{ code: '07 72 00', title: 'Roof Accessories' },
{ code: '07 72 13', title: 'Manufactured Curbs' },
{ code: '07 72 23', title: 'Relief Vents' },
{ code: '07 72 26', title: 'Ridge Vents' },
{ code: '07 72 33', title: 'Roof Hatches' },
{ code: '07 72 36', title: 'Smoke Vents' },
{ code: '07 72 43', title: 'Roof Walk Boards' },
{ code: '07 72 46', title: 'Roof Walkways' },
{ code: '07 72 53', title: 'Snow Guards' },
{ code: '07 72 63', title: 'Waste Containment Assemblies' },
{ code: '07 76 00', title: 'Roof Pavers' },
{ code: '07 76 13', title: 'Roof Ballast Pavers' },
{ code: '07 76 16', title: 'Roof Decking Pavers' },
{ code: '07 77 00', title: 'Wall Specialties' },
{ code: '07 80 00', title: 'FIRE AND SMOKE PROTECTION' },
{ code: '07 81 00', title: 'Applied Fireproofing' },
{ code: '07 81 13', title: 'Cement Aggregate Fireproofing' },
{ code: '07 81 16', title: 'Cementitious Fireproofing' },
{ code: '07 81 19', title: 'Foamed Magnesium -Oxychloride Fireproofing' },
{ code: '07 81 23', title: 'Intumescent Mastic Fireproofing' },
{ code: '07 81 26', title: 'Magnesium Cement Fireproofing' },
{ code: '07 81 29', title: 'Mineral-Fiber Cementitious Fireproofing' },
{ code: '07 81 33', title: 'Mineral-Fiber Fireproofing' },
{ code: '07 82 00', title: 'Board Fireproofing' },
{ code: '07 82 13', title: 'Calcium -Silicate Board Fireproofing' },
{ code: '07 82 16', title: 'Slag-Fiber Board Fireproofing' },
{ code: '07 84 00', title: 'Firestopping' },
{ code: '07 84 13', title: 'Penetration Firestopping' },
{ code: '07 84 13.13', title: 'Penetration Firestopping Mortars' },
{ code: '07 84 13.16', title: 'Penetration Firestopping Devices' },
{ code: '07 84 16', title: 'Annular Space Protection' },
{ code: '07 84 23', title: 'Silicone Firestopping Foams' },
{ code: '07 84 26', title: 'Thermal Barriers for Plastics' },
{ code: '07 84 43', title: 'Fire-Resistant Joint Sealants' },
{ code: '07 84 53', title: 'Building Perimeter Firestopping' },
{ code: '07 84 56', title: 'Fire Safing' },
{ code: '07 84 56.13', title: 'Fibrous Fire Safing' },
{ code: '07 86 00', title: 'Smoke Seals' },
{ code: '07 87 00', title: 'Smoke Containment Barriers' },
{ code: '07 90 00', title: 'JOINT PROTECTION' },
{ code: '07 91 00', title: 'Preformed Joint Seals' },
{ code: '07 91 13', title: 'Compression Seals' },
{ code: '07 91 16', title: 'Joint Gaskets' },
{ code: '07 91 23', title: 'Backer Rods' },
{ code: '07 91 26', title: 'Joint Fillers' },
{ code: '07 92 00', title: 'Joint Sealants' },
{ code: '07 92 13', title: 'Elastomeric Joint Sealants' },
{ code: '07 92 16', title: 'Rigid Joint Sealants' },
{ code: '07 92 19', title: 'Acoustical Joint Sealants' },
{ code: '07 95 00', title: 'Expansion Control' },
{ code: '07 95 13', title: 'Expansion Joint Cover Assemblies' },
{ code: '07 95 53', title: 'Joint Slide Bearings' },
{ code: '07 95 63', title: 'Bridge Expansion Joint Cover Assemblies' }]
}
)
}
division_6() {
return (
{
division: 6,
divisionTitle: 'Wood, Plastics, and Composites',
codes: [{ code: '06 00 00', title: ' WOOD, PLASTICS, AND COMPOSITES' },
{ code: '06 01 00', title: ' Maintenance of Wood, Plastics, and Composites' },
{ code: '06 01 10', title: ' Maintenance of Rough Carpentry' },
{ code: '06 01 10.71', title: ' Rough Carpentry Rehabilitation' },
{ code: '06 01 10.91', title: ' Rough Carpentry Restoration' },
{ code: '06 01 10.92', title: ' Rough Carpentry Preservation' },
{ code: '06 01 20', title: ' Maintenance of Finish Carpentry' },
{ code: '06 01 20.71', title: ' Finish Carpentry Rehabilitation' },
{ code: '06 01 20.91', title: ' Finish Carpentry Restoration' },
{ code: '06 01 20.92', title: ' Finish Carpentry Preservation' },
{ code: '06 01 40', title: ' Maintenance of Architectural Woodwork' },
{ code: '06 01 40.51', title: ' Architectural Woodwork Cleaning' },
{ code: '06 01 40.61', title: ' Architectural Woodwork Refinishing' },
{ code: '06 01 40.91', title: ' Architectural Woodwork Restoration' },
{ code: '06 01 50', title: ' Maintenance of Structural Plastics' },
{ code: '06 01 60', title: ' Maintenance of Plastic Fabrications' },
{ code: '06 01 60.51', title: ' Plastic Cleaning' },
{ code: '06 01 60.71', title: ' Plastic Rehabilitation' },
{ code: '06 01 60.91', title: ' Plastic Restoration' },
{ code: '06 01 60.92', title: ' Plastic Preservation' },
{ code: '06 01 70', title: ' Maintenance of Structural Composites' },
{ code: '06 01 80', title: ' Maintenance of Composite Assemblies' },
{ code: '06 01 80.51', title: ' Composite Cleaning' },
{ code: '06 01 80.71', title: ' Composite Rehabilitation' },
{ code: '06 01 80.91', title: ' Composite Restoration' },
{ code: '06 01 80.92', title: ' Composite Preservation' },
{ code: '06 05 00', title: ' Common Work Results for Wood, Plastics, and Composites' },
{ code: '06 05 23', title: ' Wood, Plastic, and Composite Fastenings' },
{ code: '06 05 73', title: ' Wood Treatment' },
{ code: '06 05 73.13', title: ' Fire-Retardant Wood Treatment' },
{ code: '06 05 73.33', title: ' Preservative Wood Treatment' },
{ code: '06 05 73.91', title: ' Long-Term Wood Treatment' },
{ code: '06 05 73.93', title: ' Eradication of Insects in Wood' },
{ code: '06 05 73.96', title: ' Antiseptic Treatment of Wood' },
{ code: '06 05 83', title: ' Shop-Applied Wood Coatings' },
{ code: '06 06 00', title: ' Schedules for Wood, Plastics, and Composites' },
{ code: '06 06 10', title: ' Schedules for Rough Carpentry' },
{ code: '06 06 10.13', title: ' Nailing Schedule' },
{ code: '06 06 10.16', title: ' Wood Beam Schedule' },
{ code: '06 06 10.19', title: ' Plywood Shear Wall Schedule' },
{ code: '06 06 10.23', title: ' Plywood Web Joist Schedule' },
{ code: '06 06 10.26', title: ' Wood Truss Schedule' },
{ code: '06 06 20', title: ' Schedules for Finish Carpentry' },
{ code: '06 06 40', title: ' Schedules for Architectural Woodwork' },
{ code: '06 06 50', title: ' Schedules for Structural Plastics' },
{ code: '06 06 60', title: ' Schedules for Plastic Fabrications' },
{ code: '06 06 70', title: ' Schedules for Structural Composites' },
{ code: '06 06 80', title: ' Schedules for Composite Assemblies' },
{ code: '06 08 00', title: ' Commissioning of Wood, Plastics, and Composites' },
{ code: '06 10 00', title: ' ROUGH CARPENTRY' },
{ code: '06 10 53', title: ' Miscellaneous Rough Carpentry' },
{ code: '06 10 91', title: ' Curved Wood Members' },
{ code: '06 11 00', title: ' Wood Framing' },
{ code: '06 11 13', title: ' Engineered Wood Products' },
{ code: '06 11 16', title: ' Mechanically Graded Lumber' },
{ code: '06 12 00', title: ' Structural Panels' },
{ code: '06 12 13', title: ' Cementitious Reinforced Panels' },
{ code: '06 12 16', title: ' Stressed Skin Panels' },
{ code: '06 13 00', title: ' Heavy Timber' },
{ code: '06 13 13', title: ' Log Construction' },
{ code: '06 13 13.91', title: ' Period Horizontal Log Work' },
{ code: '06 13 16', title: ' Pole Construction' },
{ code: '06 13 23', title: ' Heavy Timber Construction' },
{ code: '06 13 33', title: ' Heavy Timber Pier Construction' },
{ code: '06 14 00', title: ' Treated Wood Foundations' },
{ code: '06 15 00', title: ' Wood Decking' },
{ code: '06 15 13', title: ' Wood Floor Decking' },
{ code: '06 15 13.91', title: ' Carvel Planking' },
{ code: '06 15 16', title: ' Wood Roof Decking' },
{ code: '06 15 19', title: ' Timber Decking' },
{ code: '06 15 23', title: ' Laminated Wood Decking' },
{ code: '06 15 33', title: ' Wood Patio Decking' },
{ code: '06 16 00', title: ' Sheathing' },
{ code: '06 16 13', title: ' Insulating Sheathing' },
{ code: '06 16 23', title: ' Subflooring' },
{ code: '06 16 26', title: ' Underlayment' },
{ code: '06 16 29', title: ' Acoustical Underlayment' },
{ code: '06 16 33', title: ' Wood Board Sheathing' },
{ code: '06 16 36', title: ' Wood Panel Product Sheathing' },
{ code: '06 16 43', title: ' Gypsum Sheathing' },
{ code: '06 16 53', title: ' Moisture-Resistant Sheathing Board' },
{ code: '06 16 63', title: ' Cementitious Sheathing' },
{ code: '06 17 00', title: ' Shop-Fabricated Structural Wood' },
{ code: '06 17 13', title: ' Laminated Veneer Lumber' },
{ code: '06 17 23', title: ' Parallel Strand Lumber' },
{ code: '06 17 33', title: ' Wood I-Joists' },
{ code: '06 17 36', title: ' Metal-Web Wood Joists' },
{ code: '06 17 43', title: ' Rim Boards' },
{ code: '06 17 53', title: ' Shop-Fabricated Wood Trusses' },
{ code: '06 18 00', title: ' Glued-Laminated Construction' },
{ code: '06 18 13', title: ' Glued-Laminated Beams' },
{ code: '06 18 16', title: ' Glued-Laminated Columns' },
{ code: '06 20 00', title: ' FINISH CARPENTRY' },
{ code: '06 20 13 ', title: 'Exterior Finish Carpentry' },
{ code: '06 20 23', title: ' Interior Finish Carpentry' },
{ code: '06 22 00', title: ' Millwork' },
{ code: '06 22 13', title: ' Standard Pattern Wood Trim' },
{ code: '06 25 00', title: ' Prefinished Paneling' },
{ code: '06 25 13', title: ' Prefinished Hardboard Paneling' },
{ code: '06 25 16', title: ' Prefinished Plywood Paneling' },
{ code: '06 26 00', title: ' Board Paneling' },
{ code: '06 26 13', title: ' Profile Board Paneling' },
{ code: '06 30 00', title: ' Unassigned' },
{ code: '06 40 00', title: ' ARCHITECTURAL WOODWORK' },
{ code: '06 40 13', title: ' Exterior Architectural Woodwork' },
{ code: '06 40 23', title: ' Interior Architectural Woodwork' },
{ code: '06 41 00', title: ' Architectural Wood Casework' },
{ code: '06 41 13', title: ' Wood-Veneer-Faced Architectural Cabinets' },
{ code: '06 41 16', title: ' Plastic -Laminate-Clad Architectural Cabinets' },
{ code: '06 42 00', title: ' Wood Paneling' },
{ code: '06 42 13', title: ' Solid Lumber Paneling' },
{ code: '06 42 16', title: ' Wood-Veneer Paneling' },
{ code: '06 42 19', title: ' Plastic -Laminate-Faced Wood Paneling' },
{ code: '06 43 00', title: ' Wood Stairs and Railings' },
{ code: '06 43 13', title: ' Wood Stairs' },
{ code: '06 43 16', title: ' Wood Railings' },
{ code: '06 44 00', title: ' Ornamental Woodwork' },
{ code: '06 44 13', title: ' Wood Turnings' },
{ code: '06 44 16', title: ' Wood Pilasters' },
{ code: '06 44 19', title: ' Wood Grilles' },
{ code: '06 44 23', title: ' Wood Corbels' },
{ code: '06 44 26', title: ' Wood Cupolas' },
{ code: '06 44 29', title: ' Wood Finials' },
{ code: '06 44 33', title: ' Wood Mantels' },
{ code: '06 44 36', title: ' Wood Pediment Heads' },
{ code: '06 44 39', title: ' Wood Posts and Columns' },
{ code: '06 46 00', title: ' Wood Trim' },
{ code: '06 46 13', title: ' Wood Door and Window Casings' },
{ code: '06 46 16', title: ' Wood Aprons' },
{ code: '06 46 19', title: ' Wood Base and Shoe Moldings' },
{ code: '06 46 23', title: ' Wood Chair Rails' },
{ code: '06 46 26', title: ' Wood Cornices' },
{ code: '06 46 29', title: ' Wood Fascia and Soffits' },
{ code: '06 46 33', title: ' Wood Stops, Stools, and Sills' },
{ code: '06 46 91', title: ' Splicing of Wooden Components' },
{ code: '06 48 00', title: ' Wood Frames' },
{ code: '06 48 13', title: ' Exterior Wood Door Frames' },
{ code: '06 48 16', title: ' Interior Wood Door Frames' },
{ code: '06 48 19', title: ' Ornamental Wood Frames' },
{ code: '06 48 23', title: ' Stick-Built Wood Windows' },
{ code: '06 48 26', title: ' Wood-Veneer Frames' },
{ code: '06 49 00', title: ' Wood Screens and Exterior Wood Shutters' },
{ code: '06 49 13', title: ' Wood Screens' },
{ code: '06 49 16', title: ' Exterior Wood Blinds' },
{ code: '06 49 19', title: ' Exterior Wood Shutters' },
{ code: '06 50 00', title: ' STRUCTURAL PLASTICS' },
{ code: '06 51 00', title: ' Structural Plastic Shapes and Plates' },
{ code: '06 51 13', title: ' Plastic Lumber' },
{ code: '06 52 00', title: ' Plastic Structural Assemblies' },
{ code: '06 53 00', title: ' Plastic Decking' },
{ code: '06 53 13', title: ' Solid Plastic Decking' },
{ code: '06 60 00', title: ' PLASTIC FABRICATIONS' },
{ code: '06 61 00', title: ' Simulated Stone Fabrications' },
{ code: '06 61 13', title: ' Cultured Marble Fabrications' },
{ code: '06 61 16', title: ' Solid Surfacing Fabrications' },
{ code: '06 61 19', title: ' Quartz Surfacing Fabrications' },
{ code: '06 63 00', title: ' Plastic Railings' },
{ code: '06 64 00', title: ' Plastic Paneling' },
{ code: '06 65 00', title: ' Plastic Simulated Wood Trim' },
{ code: '06 66 00', title: ' Custom Ornamental Simulated Woodwork' },
{ code: '06 70 00', title: ' STRUCTURAL COMPOSITES' },
{ code: '06 71 00', title: ' Structural Composite Shapes and Plates' },
{ code: '06 71 13', title: ' Composite Lumber' },
{ code: '06 72 00', title: ' Composite Structural Assemblies' },
{ code: '06 72 13', title: ' Composite Joist Assemblies' },
{ code: '06 73 00', title: ' Composite Decking' },
{ code: '06 73 13', title: ' Composite Structural Decking' },
{ code: '06 80 00', title: ' COMPOSITE FABRICATIONS' },
{ code: '06 81 00', title: ' Composite Railings' },
{ code: '06 82 00', title: ' Glass-Fiber-Reinforced Plastic' },
{ code: '06 90 00', title: ' Unassigned' }]
}
)
}
division_5() {
return (
{
divsion: 5,
divisionTitle: 'Metals',
codes: [{ code: '05 00 00', title: 'METALS' },
{ code: '05 01 00 ', title: 'Maintenance of Metals' },
{ code: '05 01 10 ', title: 'Maintenance of Structural Metal Framing' },
{ code: '05 01 20 ', title: 'Maintenance of Metal Joists' },
{ code: '05 01 30 ', title: 'Maintenance of Metal Decking' },
{ code: '05 01 40 ', title: 'Maintenance of Cold-Formed Metal Framing' },
{ code: '05 01 50 ', title: 'Maintenance of Metal Fabrications' },
{ code: '05 01 70 ', title: 'Maintenance of Decorative Metal' },
{ code: '05 01 70.91', title: ' Historic Treatment of Decorative Metal' },
{ code: '05 05 00', title: ' Common Work Results for Metals' },
{ code: '05 05 13', title: ' Shop-Applied Coatings for Metal' },
{ code: '05 05 23', title: ' Metal Fastenings' },
{ code: '05 05 53', title: ' Security Metal Fastenings' },
{ code: '05 06 00', title: ' Schedules for Metals' },
{ code: '05 06 10', title: ' Schedules for Structural Metal Framing' },
{ code: '05 06 10.13', title: ' Steel Column Schedule' },
{ code: '05 06 10.16', title: ' Steel Beam Schedule' },
{ code: '05 06 20 Schedules for Metal Joists' },
{ code: '05 06 20.13', title: ' Steel Joist Schedule' },
{ code: '05 06 30', title: ' Schedules for Metal Decking' },
{ code: '05 06 40', title: ' Schedules for Cold-Formed Metal Framing' },
{ code: '05 06 50', title: ' Schedules for Metal Fabrications' },
{ code: '05 06 70', title: ' Schedules for Decorative Metal' },
{ code: '05 08 00', title: ' Commissioning of Metals' },
{ code: '05 10 00', title: ' STRUCTURAL METAL FRAMING' },
{ code: '05 12 00', title: ' Structural Steel Framing' },
{ code: '05 12 13', title: ' Architecturally-Exposed Structural Steel Framing' },
{ code: '05 12 16', title: ' Fabricated Fireproofed Steel Columns' },
{ code: '05 12 23', title: ' Structural Steel for Buildings' },
{ code: '05 12 33', title: ' Structural Steel for Bridges' },
{ code: '05 13 00', title: ' Structural Stainless-Steel Framing' },
{ code: '05 14 00', title: ' Structural Aluminum Framing' },
{ code: '05 14 13', title: ' Architecturally-Exposed Structural Aluminum Framing' },
{ code: '05 15 00', title: ' Wire Rope Assemblies' },
{ code: '05 15 13', title: ' Aluminum Wire Rope Assemblies' },
{ code: '05 15 16', title: ' Steel Wire Rope Assemblies' },
{ code: '05 15 19', title: ' Stainless-Steel Wire Rope Assemblies' },
{ code: '05 16 00', title: ' Structural Cabling' },
{ code: '05 16 33', title: ' Bridge Cabling' },
{ code: '05 20 00', title: ' METAL JOISTS' },
{ code: '05 21 00', title: ' Steel Joist Framing' },
{ code: '05 21 13', title: ' Deep Longspan Steel Joist Framing' },
{ code: '05 21 16', title: ' Longspan Steel Joist Framing' },
{ code: '05 21 19', title: ' Open Web Steel Joist Framing' },
{ code: '05 21 23', title: ' Steel Joist Girder Framing' },
{ code: '05 25 00', title: ' Aluminum Joist Framing' },
{ code: '05 30 00', title: ' METAL DECKING' },
{ code: '05 31 00', title: ' Steel Decking' },
{ code: '05 31 13', title: ' Steel Floor Decking' },
{ code: '05 31 23', title: ' Steel Roof Decking' },
{ code: '05 31 33', title: ' Steel Form Decking' },
{ code: '05 33 00', title: ' Aluminum Decking' },
{ code: '05 33 13', title: ' Aluminum Floor Decking' },
{ code: '05 33 23', title: ' Aluminum Roof Decking' },
{ code: '05 34 00', title: ' Acoustical Metal Decking' },
{ code: '05 35 00', title: ' Raceway Decking Assemblies' },
{ code: '05 36 00', title: ' Composite Metal Decking' },
{ code: '05 36 13', title: ' Composite Steel Plate and Elastomer Decking' },
{ code: '05 40 00', title: ' COLD-FORMED METAL FRAMING' },
{ code: '05 41 00', title: ' Structural Metal Stud Framing' },
{ code: '05 42 00', title: ' Cold-Formed Metal Joist Framing' },
{ code: '05 42 13', title: ' Cold-Formed Metal Floor Joist Framing' },
{ code: '05 42 23', title: ' Cold-Formed Metal Roof Joist Framing' },
{ code: '05 43 00', title: ' Slotted Channel Framing' },
{ code: '05 44 00', title: ' Cold-Formed Metal Trusses' },
{ code: '05 45 00', title: ' Metal Support Assemblies' },
{ code: '05 45 13', title: ' Mechanical Metal Supports' },
{ code: '05 45 16', title: ' Electrical Metal Supports' },
{ code: '05 45 19', title: ' Communications Metal Supports' },
{ code: '05 45 23', title: ' Healthcare Metal Supports' },
{ code: '05 50 00', title: ' METAL FABRICATIONS' },
{ code: '05 51 00', title: ' Metal Stairs' },
{ code: '05 51 13', title: ' Metal Pan Stairs' },
{ code: '05 51 16', title: ' Metal Floor Plate Stairs' },
{ code: '05 51 19', title: ' Metal Grating Stairs' },
{ code: '05 51 23', title: ' Metal Fire Escapes' },
{ code: '05 51 33', title: ' Metal Ladders' },
{ code: '05 51 33.13', title: ' Vertical Metal Ladders' },
{ code: '05 51 33.16', title: ' Inclined Metal Ladders' },
{ code: '05 51 33.23', title: ' Alternating Tread Ladders' },
{ code: '05 51 36', title: ' Catwalks' },
{ code: '05 51 36.13', title: ' Metal Catwalks' },
{ code: '05 52 00 ', title: 'Metal Railings' },
{ code: '05 52 13', title: ' Pipe and Tube Railings' },
{ code: '05 53 00', title: ' Metal Gratings' },
{ code: '05 54 00', title: ' Metal Floor Plates' },
{ code: '05 55 00', title: ' Metal Stair Treads and Nosings' },
{ code: '05 55 13', title: ' Metal Stair Treads' },
{ code: '05 55 16', title: ' Metal Stair Nosings' },
{ code: '05 56 00', title: ' Metal Castings' },
{ code: '05 58 00', title: ' Formed Metal Fabrications' },
{ code: '05 58 13', title: ' Column Covers' },
{ code: '05 58 16', title: 'Formed Metal Enclosures' },
{ code: '05 58 19', title: 'Heating/Cooling Unit Covers' },
{ code: '05 59 00', title: 'Metal Specialties' },
{ code: '05 59 63', title: 'Detention Enclosures' },
{ code: '05 60 00', title: 'Unassigned' },
{ code: '05 70 00', title: 'DECORATIVE METAL' },
{ code: '05 71 00', title: 'Decorative Metal Stairs' },
{ code: '05 71 13', title: 'Fabricated Metal Spiral Stairs' },
{ code: '05 73 00', title: 'Decorative Metal Railings' },
{ code: '05 73 13', title: 'Glazed Decorative Metal Railings' },
{ code: '05 73 16', title: 'Wire Rope Decorative Metal Railings' },
{ code: '05 74 00', title: 'Decorative Metal Castings' },
{ code: '05 75 00', title: 'Decorative Formed Metal' },
{ code: '05 76 00', title: 'Decorative Forged Metal' },
{ code: '05 80 00', title: 'Unassigned' },
{ code: '05 90 00', title: 'Unassigned' }]
})
}
division_4() {
return ({
division: 4,
divisionTitle: 'Masonry',
codes: [
{ code: '04 00 00', title: 'MASONRY' },
{ code: '04 01 00', title: ' Maintenance of Masonry' },
{ code: '04 01 20', title: ' Maintenance of Unit Masonry' },
{ code: '04 01 20.51', title: ' Unit Masonry Maintenance' },
{ code: '04 01 20.52', title: ' Unit Masonry Cleaning' },
{ code: '04 01 20.91', title: ' Unit Masonry Restoration' },
{ code: '04 01 20.93', title: ' Testing and Sampling Brick Units for Restoration' },
{ code: '04 01 40', title: ' Maintenance of Stone Assemblies' },
{ code: '04 01 40.51', title: ' Stone Maintenance' },
{ code: '04 01 40.52', title: ' Stone Cleaning' },
{ code: '04 01 40.91', title: ' Stone Restoration' },
{ code: '04 01 50', title: ' Maintenance of Refractory Masonry' },
{ code: '04 01 60', title: ' Maintenance of Corrosion-Resistant Masonry' },
{ code: '04 01 70', title: ' Maintenance of Manufactured Masonry' },
{ code: '04 05 00', title: ' Common Work Results for Masonry' },
{ code: '04 05 13', title: ' Masonry Mortaring' },
{ code: '04 05 13.16', title: ' Chemical-Resistant Masonry Mortaring' },
{ code: '04 05 13.19', title: ' Epoxy Masonry Mortaring' },
{ code: '04 05 13.23', title: ' Surface Bonding Masonry Mortaring' },
{ code: '04 05 13.26', title: ' Engineered Masonry Mortaring' },
{ code: '04 05 13.29', title: ' Refractory Masonry Mortaring' },
{ code: '04 05 13.91', title: ' Masonry Restoration Mortaring' },
{ code: '04 05 16', title: ' Masonry Grouting' },
{ code: '04 05 16.16', title: ' Chemical-Resistant Masonry Grouting' },
{ code: '04 05 16.26', title: ' Engineered Masonry Grouting' },
{ code: '04 05 19', title: ' Masonry Anchorage and Reinforcing' },
{ code: '04 05 19.13', title: ' Continuous Joint Reinforcing' },
{ code: '04 05 19.16', title: ' Masonry Anchors' },
{ code: '04 05 19.26', title: ' Masonry Reinforcing Bars' },
{ code: '04 05 19.29', title: ' Stone Anchors' },
{ code: '04 05 23', title: ' Masonry Accessories' },
{ code: '04 05 23.13', title: ' Masonry Control and Expansion Joints' },
{ code: '04 05 23.16', title: ' Masonry Embedded Flashing' },
{ code: '04 05 23.19', title: ' Masonry Cavity Drainage, Weepholes, and Vents' },
{ code: '04 06 00', title: ' Schedules for Masonry' },
{ code: '04 06 20', title: ' Schedules for Unit Masonry' },
{ code: '04 06 20.13', title: ' Masonry Unit Schedule' },
{ code: '04 06 40', title: ' Schedules for Stone Assemblies' },
{ code: '04 06 50', title: ' Schedules for Refractory Masonry' },
{ code: '04 06 60', title: ' Schedules for Corrosion-Resistant Masonry' },
{ code: '04 06 70', title: ' Schedules for Manufactured Masonry' },
{ code: '04 08 00', title: ' Commissioning of Masonry' },
{ code: '04 10 00', title: ' Unassigned' },
{ code: '04 20 00', title: ' UNIT MASONRY' },
{ code: '04 21 00', title: ' Clay Unit Masonry' },
{ code: '04 21 13', title: ' Brick Masonry' },
{ code: '04 21 13.13', title: ' Brick Veneer Masonry' },
{ code: '04 21 13.23', title: ' Surface-Bonded Brick Masonry' },
{ code: '04 21 16', title: ' Ceramic Glazed Clay Masonry' },
{ code: '04 21 19', title: ' Clay Tile Masonry' },
{ code: '04 21 23', title: ' Structural Clay Tile Masonry' },
{ code: '04 21 26', title: ' Glazed Structural Clay Tile Masonry' },
{ code: '04 21 29', title: ' Terra Cotta Masonry' },
{ code: '04 22 00', title: ' Concrete Unit Masonry' },
{ code: '04 22 00.13', title: ' Concrete Unit Veneer Masonry' },
{ code: '04 22 00.16', title: ' Surface-Bonded Concrete Unit Masonry' },
{ code: '04 22 19', title: ' Insulated Concrete Unit Masonry' },
{ code: '04 22 23', title: ' Architectural Concrete Unit Masonry' },
{ code: '04 22 23.13', title: ' Exposed Aggregate Concrete Unit Masonry' },
{ code: '04 22 23.16', title: ' Fluted Concrete Unit Masonry' },
{ code: '04 22 23.19', title: ' Molded-Face Concrete Unit Masonry' },
{ code: '04 22 23.23', title: ' Prefaced Concrete Unit Masonry' },
{ code: '04 22 23.26', title: ' Sound-Absorbing Concrete Unit Masonry' },
{ code: '04 22 23.29', title: ' Split-Face Concrete Unit Masonry' },
{ code: '04 22 33', title: ' Interlocking Concrete Unit Masonry' },
{ code: '04 23 00', title: ' Glass Unit Masonry' },
{ code: '04 23 13', title: ' Vertical Glass Unit Masonry' },
{ code: '04 23 16', title: ' Glass Unit Masonry Floors' },
{ code: '04 23 19', title: ' Glass Unit Masonry Skylights' },
{ code: '04 24 00', title: ' Adobe Unit Masonry' },
{ code: '04 24 13', title: ' Site-Cast Adobe Unit Masonry' },
{ code: '04 24 16', title: ' Manufactured Adobe Unit Masonry' },
{ code: '04 25 00', title: ' Unit Masonry Panels' },
{ code: '04 25 13', title: ' Metal-Supported Unit Masonry Panels' },
{ code: '04 27 00', title: ' Multiple-Wythe Unit Masonry' },
{ code: '04 27 13', title: ' Composite Unit Masonry' },
{ code: '04 27 23', title: ' Cavity Wall Unit Masonry' },
{ code: '04 28 00', title: ' Concrete Form Masonry Units' },
{ code: '04 28 13', title: ' Dry-Stacked, Concrete-Filled Masonry Units' },
{ code: '04 28 23', title: ' Mortar-Set, Concrete-Filled Masonry Units' },
{ code: '04 30 00', title: ' Unassigned' },
{ code: '04 40 00', title: ' STONE ASSEMBLIES' },
{ code: '04 41 00', title: ' Dry-Placed Stone' },
{ code: '04 42 00', title: ' Exterior Stone Cladding' },
{ code: '04 42 13', title: ' Masonry-Supported Stone Cladding' },
{ code: '04 42 16', title: ' Steel-Stud-Supported Stone Cladding' },
{ code: '04 42 19', title: ' Strongback-Frame-Supported Stone Cladding' },
{ code: '04 42 23', title: ' Truss-Supported Stone Cladding' },
{ code: '04 42 26 ', title: 'Grid-System-Supported Stone Cladding' },
{ code: '04 42 43 ', title: 'Stone Panels for Curtain Walls' },
{ code: '04 43 00', title: ' Stone Masonry' },
{ code: '04 50 00', title: ' REFRACTORY MASONRY' },
{ code: '04 51 00', title: ' Flue Liner Masonry' },
{ code: '04 52 00', title: ' Combustion Chamber Masonry' },
{ code: '04 53 00', title: ' Castable Refractory Masonry' },
{ code: '04 54 00', title: ' Refractory Brick Masonry' },
{ code: '04 57 00', title: ' Masonry Fireplaces' },
{ code: '04 60 00 ', title: 'CORROSION-RESISTANT MASONRY' },
{ code: '04 61 00 ', title: 'Chemical-Resistant Brick Masonry' },
{ code: '04 62 00 ', title: 'Vitrified Clay Liner Plate' },
{ code: '04 70 00 ', title: 'MANUFACTUREDMASONRY' },
{ code: '04 71 00 ', title: 'Manufactured Brick Masonry' },
{ code: '04 71 13 ', title: 'Calcium Silicate Manufactured Brick Masonry' },
{ code: '04 72 00 ', title: 'Cast Stone Masonry' },
{ code: '04 73 00 ', title: 'Manufactured Stone Masonry' },
{ code: '04 73 13 ', title: 'Calcium Silicate Manufactured Stone Masonry' },
{ code: '04 80 00 ', title: 'Unassigned' },
{ code: '04 90 00 ', title: 'Unassigned' }
]
})
}
division_3() {
return ({
division: 3,
divisionTitle: 'Concrete',
codes: [
{ code: '03 00 00', title: ' CONCRETE' },
{ code: '03 01 00', title: ' Maintenance of Concrete' },
{ code: '03 01 10', title: ' Maintenance of Concrete Forming and Accessories' },
{ code: '03 01 20', title: ' Maintenance of Concrete Reinforcing' },
{ code: '03 01 23', title: ' Maintenance of Stressing Tendons' },
{ code: '03 01 30', title: ' Maintenance of Cast-in-Place Concrete' },
{ code: '03 01 30.51', title: ' Cleaning of Cast-in-Place Concrete' },
{ code: '03 01 30.61', title: ' Resurfacing of Cast-in-Place Concrete' },
{ code: '03 01 30.71', title: ' Rehabilitation of Cast-in-Place Concrete' },
{ code: '03 01 30.72', title: ' Strengthening of Cast-in-Place Concrete' },
{ code: '03 01 40', title: ' Maintenance of Precast Concrete' },
{ code: '03 01 40.51', title: ' Cleaning of Precast Concrete' },
{ code: '03 01 40.61', title: ' Resurfacing of Precast Concrete' },
{ code: '03 01 40.71', title: ' Rehabilitation of Precast Concrete' },
{ code: '03 01 40.72', title: ' Strengthening of Precast Concrete' },
{ code: '03 01 50', title: ' Maintenance of Cast Decks and Underlayment' },
{ code: '03 01 50.51', title: ' Cleaning Cast Decks and Underlayment' },
{ code: '03 01 50.61', title: ' Resurfacing of Cast Decks and Underlayment' },
{ code: '03 01 50.71', title: ' Rehabilitation of Cast Decks and Underlayment' },
{ code: '03 01 50.72', title: ' Strengthening of Cast Decks and Underlayment' },
{ code: '03 01 60', title: ' Maintenance of Grouting' },
{ code: '03 01 70', title: ' Maintenance of Mass Concrete' },
{ code: '03 01 80', title: ' Maintenance of Concrete Cutting and Boring' },
{ code: '03 05 00', title: ' Common Work Results for Concrete' },
{ code: '03 06 00', title: ' Schedules for Concrete' },
{ code: '03 06 10', title: ' Schedules for Concrete Forming and Accessories' },
{ code: '03 06 20', title: ' Schedules for Concrete Reinforcing' },
{ code: '03 06 20.13', title: ' Concrete Beam Reinforcing Schedule' },
{ code: '03 06 20.16', title: ' Concrete Slab Reinforcing Schedule' },
{ code: '03 06 30', title: ' Schedules for Cast-in-Place Concrete' },
{ code: '03 06 30.13', title: ' Concrete Footing Schedule' },
{ code: '03 06 30.16', title: ' Concrete Column Schedule' },
{ code: '03 06 30.19', title: ' Concrete Slab Schedule' },
{ code: '03 06 30.23', title: ' Concrete Shaft Schedule' },
{ code: '03 06 30.26', title: ' Concrete Beam Schedule' },
{ code: '03 06 40', title: ' Schedules for Precast Concrete' },
{ code: '03 06 40.13', title: ' Precast Concrete Panel Schedule' },
{ code: '03 06 50', title: ' Schedules for Cast Decks and Underlayment' },
{ code: '03 06 60', title: ' Schedules for Grouting' },
{ code: '03 06 70', title: ' Schedules for Mass Concrete' },
{ code: '03 06 80', title: ' Schedules for Concrete Cutting and Boring' },
{ code: '03 08 00', title: ' Commissioning of Concrete' },
{ code: '03 10 00', title: ' CONCRETE FORMING AND ACCESSORIES' },
{ code: '03 11 00 ', title: 'Concrete Forming' },
{ code: '03 11 13', title: ' Structural Cast-in-Place Concrete Forming' },
{ code: '03 11 13.13', title: ' Concrete Slip Forming' },
{ code: '03 11 13.16', title: ' Concrete Shoring' },
{ code: '03 11 13.19', title: ' Falsework' },
{ code: '03 11 16 ', title: 'Architectural Cast-in Place Concrete Forming' },
{ code: '03 11 16.13', title: ' Concrete Form Liners' },
{ code: '03 11 19', title: ' Insulating Concrete Forming' },
{ code: '03 11 23', title: ' Permanent Stair Forming' },
{ code: '03 15 00', title: ' Waterstops' },
{ code: '03 20 00', title: ' CONCRETE REINFORCING' },
{ code: '03 21 00', title: ' Reinforcing Steel' },
{ code: '03 21 13 ', title: 'Galvanized Reinforcing Steel' },
{ code: '03 21 16 ', title: 'Epoxy-Coated Reinforcing Steel' },
{ code: '03 22 00', title: ' Welded Wire Fabric Reinforcing' },
{ code: '03 22 13 ', title: 'Galvanized Welded Wire Fabric Reinforcing' },
{ code: '03 22 16 ', title: 'Epoxy-Coated Welded Wire Fabric Reinforcing' },
{ code: '03 23 00 ', title: 'Stressing Tendons' },
{ code: '03 24 00 ', title: 'Fibrous Reinforcing' },
{ code: '03 30 00 ', title: 'CAST-IN-PLACE CONCRETE' },
{ code: '03 30 53 ', title: 'Miscellaneous Cast-in-Place Concrete' },
{ code: '03 31 00 ', title: 'Structural Concrete' },
{ code: '03 31 13 ', title: 'Heavyweight Structural Concrete' },
{ code: '03 31 16 ', title: 'Lightweight Structural Concrete' },
{ code: '03 31 19 ', title: 'Shrinkage-Compensating Structural Concrete' },
{ code: '03 31 23 ', title: 'High-Performance Structural Concrete' },
{ code: '03 31 26 ', title: 'Self-Compacting Concrete' },
{ code: '03 33 00', title: ' Architectural Concrete' },
{ code: '03 33 13', title: ' Heavyweight Architectural Concrete' },
{ code: '03 33 16', title: ' Lightweight Architectural Concrete' },
{ code: '03 34 00 ', title: 'Low Density Concrete' },
{ code: '03 35 00', title: ' Concrete Finishing' },
{ code: '03 35 13', title: ' High-Tolerance Concrete Floor Finishing' },
{ code: '03 35 16', title: ' Heavy-Duty Concrete Floor Finishing' },
{ code: '03 35 19', title: ' Colored Concrete Finishing' },
{ code: '03 35 23', title: ' Exposed Aggregate Concrete Finishing' },
{ code: '03 35 26', title: ' Grooved Concrete Surface Finishing' },
{ code: '03 35 29', title: ' Tooled Concrete Finishing' },
{ code: '03 35 33', title: ' Stamped Concrete Finishing' },
{ code: '03 37 00', title: ' Specialty Placed Concrete' },
{ code: '03 37 13', title: ' Shotcrete' },
{ code: '03 37 16', title: ' Pumped Concrete' },
{ code: '03 37 19', title: ' Pneumatically Placed Concrete' },
{ code: '03 37 23', title: ' Roller-Compacted Concrete' },
{ code: '03 37 26', title: ' Underwater Placed Concrete' },
{ code: '03 38 00', title: ' Post-Tensioned Concrete' },
{ code: '03 38 13', title: ' Post-Tensioned Concrete Preparation' },
{ code: '03 38 16', title: ' Unbonded Post-Tensioned Concrete' },
{ code: '03 38 19', title: ' Bonded Post-Tensioned Concrete' },
{ code: '03 39 00', title: ' Concrete Curing' },
{ code: '03 39 13', title: ' Water Concrete Curing' },
{ code: '03 39 16', title: ' Sand Concrete Curing' },
{ code: '03 39 23', title: ' Membrane Concrete Curing' },
{ code: '03 39 23.13', title: ' Chemical Compound Membrane Concrete Curing' },
{ code: '03 39 23.23', title: ' Sheet Membrane Concrete Curing' },
{ code: '03 40 00', title: ' PRECAST CONCRETE' },
{ code: '03 41 00', title: ' Precast Structural Concrete' },
{ code: '03 41 13', title: ' Precast Concrete Hollow Core Planks' },
{ code: '03 41 16', title: ' Precast Concrete Slabs' },
{ code: '03 41 23', title: ' Precast Concrete Stairs' },
{ code: '03 41 33', title: ' Precast Structural Pretensioned Concrete' },
{ code: '03 41 36', title: ' Precast Structural Post-Tensioned Concrete' },
{ code: '03 45 00', title: ' Precast Architectural Concrete' },
{ code: '03 45 13', title: ' Faced Architectural Precast Concrete' },
{ code: '03 45 33', title: ' Precast Architectural Pretensioned Concrete' },
{ code: '03 45 36', title: ' Precast Architectural Post-Tensioned Concrete' },
{ code: '03 47 00 ', title: 'Site-Cast Concrete' },
{ code: '03 47 13 ', title: 'Tilt-Up Concrete' },
{ code: '03 47 16 ', title: 'Lift-Slab Concrete' },
{ code: '03 48 00 ', title: 'Precast Concrete Specialties' },
{ code: '03 48 13 ', title: 'Precast Concrete Bollards' },
{ code: '03 48 16 ', title: 'Precast Concrete Splash Blocks' },
{ code: '03 48 19 ', title: 'Precast Concrete Stair Treads' },
{ code: '03 48 43 ', title: 'Precast Concrete Trim' },
{ code: '03 49 00 ', title: 'Glass-Fiber-Reinforced Concrete' },
{ code: '03 49 13 ', title: 'Glass-Fiber-Reinforced Concrete Column Covers' },
{ code: '03 49 16 ', title: 'Glass-Fiber-Reinforced Concrete Spandrels' },
{ code: '03 49 43 ', title: 'Glass-Fiber-Reinforced Concrete Trim' },
{ code: '03 50 00 ', title: 'CAST DECKS AND UNDERLAYMENT' },
{ code: '03 51 00 ', title: 'Cast Roof Decks' },
{ code: '03 51 13 ', title: 'Cementitious Wood Fiber Decks' },
{ code: '03 51 16 ', title: 'Gypsum Concrete Roof Decks' },
{ code: '03 52 00 ', title: 'Lightweight Concrete Roof Insulation' },
{ code: '03 52 13 ', title: 'Composite Concrete Roof Insulation' },
{ code: '03 52 16 ', title: 'Lightweight Insulating Concrete' },
{ code: '03 52 16.13 ', title: 'Lightweight Cellular Insulating Concrete' },
{ code: '03 52 16.16 ', title: 'Lightweight Aggregate Insulating Concrete' },
{ code: '03 53 00 ', title: 'Concrete Topping' },
{ code: '03 53 13 ', title: 'Emery-Aggregate Concrete Topping' },
{ code: '03 53 16 ', title: 'Iron-Aggregate Concrete Topping' },
{ code: '03 54 00 ', title: 'Cast Underlayment' },
{ code: '03 54 13 ', title: 'Gypsum Cement Underlayment' },
{ code: '03 54 16 ', title: 'Hydraulic Cement Underlayment' },
{ code: '03 60 00 ', title: 'GROUTING' },
{ code: '03 61 00 ', title: 'Cementitious Grouting' },
{ code: '03 61 13 ', title: 'Dry-Pack Grouting' },
{ code: '03 62 00 ', title: 'non-Shrink Grouting' },
{ code: '03 62 13', title: ' Non-Metallic Non-Shrink Grouting' },
{ code: '03 62 16', title: ' Metallic Non-Shrink Grouting' },
{ code: '03 63 00', title: ' Epoxy Grouting' },
{ code: '03 64 00', title: ' Injection Grouting' },
{ code: '03 64 23', title: ' Epoxy Injection Grouting' },
{ code: '03 70 00', title: ' MASS CONCRETE' },
{ code: '03 71 00', title: ' Mass Concrete for Raft Foundations' },
{ code: '03 72 00 ', title: 'Mass Concrete for Dams' },
{ code: '03 80 00 ', title: 'CONCRETE CUTTING AND BORING' },
{ code: '03 81 00', title: ' Concrete Cutting' },
{ code: '03 81 13', title: ' Flat Concrete Sawing' },
{ code: '03 81 16', title: ' Track Mounted Concrete Wall Sawing' },
{ code: '03 81 19', title: ' Wire Concrete Wall Sawing' },
{ code: '03 81 23', title: ' Hand Concrete Wall Sawing' },
{ code: '03 81 26', title: ' Chain Concrete Wall Sawing' },
{ code: '03 82 00', title: ' Concrete Boring' },
{ code: '03 82 13', title: ' Concrete Core Drilling' },
{ code: '03 90 00', title: ' Unassigned' }
]
})
}
division_2() {
return ({
division: 2,
divisionTitle: 'Existing Conditions',
codes: [
{ code: '02 00 00', title: 'EXISTING CONDITIONS' },
{ code: '02 01 00', title: ' Maintenance of Existing Conditions' },
{ code: '02 01 50', title: ' Maintenance of Site Remediation' },
{ code: '02 01 65', title: ' Maintenance of Underground Storage Tank Removal' },
{ code: '02 01 80', title: ' Maintenance of Facility Remediation' },
{ code: '02 01 86', title: ' Maintenance of Hazardous Waste Drum Handling' },
{ code: '02 05 00', title: ' Common Work Results for Existing Conditions' },
{ code: '02 05 19', title: ' Geosynthetics for Existing Conditions' },
{ code: '02 05 19.13', title: ' Geotextiles for Existing Conditions' },
{ code: '02 05 19.16', title: ' Geomembranes for Existing Conditions' },
{ code: '02 05 19.19', title: ' Geogrids for Existing Conditions' },
{ code: '02 06 00', title: ' Schedules for Existing Conditions' },
{ code: '02 06 30', title: ' Schedules for Subsurface Investigations' },
{ code: '02 06 30.13', title: ' Boring or Test Pit Log Schedule' },
{ code: '02 06 50', title: ' Schedules for Site Remediation' },
{ code: '02 06 65', title: ' Schedules for Underground Storage Tank Removal' },
{ code: '02 06 80', title: ' Schedules for Facility Remediation' },
{ code: '02 06 86', title: ' Schedules for Hazardous Waste Drum Handling' },
{ code: '02 08 00', title: ' Commissioning of Existing Conditions' },
{ code: '02 10 00', title: ' Unassigned' },
{ code: '02 20 00', title: ' ASSESSMENT' },
{ code: '02 21 00', title: ' Surveys' },
{ code: '02 21 13', title: ' Site Surveys' },
{ code: '02 21 13.13', title: ' Boundary and Survey Markers' },
{ code: '02 21 16', title: ' Measured Drawings' },
{ code: '02 22 00', title: ' Existing Conditions Assessment' },
{ code: '02 22 13', title: ' Movement and Vibration Assessment' },
{ code: '02 22 16', title: ' Acoustic Assessment' },
{ code: '02 22 19', title: ' Traffic Assessment' },
{ code: '02 22 23', title: ' Accessibility Assessment' },
{ code: '02 24 00', title: ' Environmental Assessment' },
{ code: '02 24 13', title: ' Natural Environment Assessment' },
{ code: '02 24 13.13', title: ' Air Assessment' },
{ code: '02 24 13.43', title: ' Water Assessment' },
{ code: '02 24 13.73', title: ' Land Assessment' },
{ code: '02 24 23', title: ' Chemical Sampling and Analysis of Soils' },
{ code: '02 24 43', title: ' Transboundary and Global Environmental Aspects Assessment' },
{ code: '02 25 00', title: ' Existing Material Assessment' },
{ code: '02 25 16', title: ' Existing Concrete Assessment' },
{ code: '02 25 16.13', title: ' Concrete Assessment Drilling' },
{ code: '02 25 19', title: ' Existing Masonry Assessment' },
{ code: '02 25 19.13', title: ' Masonry Assessment Drilling' },
{ code: '02 25 23', title: ' Existing Metals Assessment' },
{ code: '02 25 23.13', title: ' Welding Investigations' },
{ code: '02 25 26', title: ' Existing Wood, Plastics, and Composites Assessment' },
{ code: '02 25 29', title: ' Existing Thermal and Moisture Protection Assessment' },
{ code: '02 25 29.13', title: ' Waterproofing Investigations' },
{ code: '02 25 29.23', title: ' Roofing Investigations' },
{ code: '02 26 00 ', title: 'Hazardous Material Assessment' },
{ code: '02 26 23', title: ' Asbestos Assessment' },
{ code: '02 26 26', title: ' Lead Assessment' },
{ code: '02 26 29', title: ' Polychlorinate Biphenyl Assessment' },
{ code: '02 26 33', title: ' Biological Assessment' },
{ code: '02 26 33.13', title: ' Mold Assessment' },
{ code: '02 26 36 ', title: 'Hazardous Waste Drum Assessment' },
{ code: '02 30 00', title: ' SUBSURFACE INVESTIGATION' },
{ code: '02 31 00', title: ' Geophysical Investigations' },
{ code: '02 31 13', title: ' Seismic Investigations' },
{ code: '02 31 16', title: ' Gravity Investigations' },
{ code: '02 31 19', title: ' Magnetic Investigations' },
{ code: '02 31 23', title: ' Electromagnetic Investigations' },
{ code: '02 31 26', title: ' Electrical Resistivity Investigations' },
{ code: '02 31 29', title: ' Magnetotelluric Investigations' },
{ code: '02 32 00', title: ' Geotechnical Investigations' },
{ code: '02 32 13', title: ' Subsurface Drilling and Sampling' },
{ code: '02 32 16', title: ' Material Testing' },
{ code: '02 32 19', title: ' Exploratory Excavations' },
{ code: '02 32 23', title: ' Geotechnical Monitoring Before Construction' },
{ code: '02 32 23.13', title: ' Groundwater Monitoring Before Construction' },
{ code: '02 40 00', title: ' DEMOLITION AND STRUCTURE MOVING' },
{ code: '02 41 00', title: ' Demolition' },
{ code: '02 41 13 ', title: 'Selective Site Demolition' },
{ code: '02 41 13.13', title: ' Paving Removal' },
{ code: '02 41 13.23', title: ' Utility Line Removal' },
{ code: '02 41 13.33', title: ' Railtrack Removal' },
{ code: '02 41 16', title: ' Structure Demolition' },
{ code: '02 41 16.13', title: ' Building Demolition' },
{ code: '02 41 16.23', title: ' Tower Demolition' },
{ code: '02 41 16.33', title: ' Bridge Demolition' },
{ code: '02 41 16.43', title: ' Dam Demolition' },
{ code: '02 41 19 ', title: 'Selective Structure Demolition' },
{ code: '02 41 19.13', title: ' Selective Building Demolition' },
{ code: '02 41 91', title: ' Selective Historic Demolition' },
{ code: '02 42 00', title: ' Removal and Salvage of Construction Materials' },
{ code: '02 42 91', title: ' Removal and Salvage of Historic Construction Materials' },
{ code: '02 43 00', title: ' Structure Moving' },
{ code: '02 43 13', title: ' Structure Relocation' },
{ code: '02 43 13.13', title: ' Building Relocation' },
{ code: '02 43 16', title: ' Structure Raising' },
{ code: '02 43 16.13', title: ' Building Raising' },
{ code: '02 50 00', title: ' SITE REMEDIATION' },
{ code: '02 51 00', title: ' Physical Decontamination' },
{ code: '02 51 13', title: ' Coagulation and Flocculation Decontamination' },
{ code: '02 51 16', title: ' Reverse-Osmosis Decontamination' },
{ code: '02 51 19', title: ' Solidification and Stabilization Decontamination' },
{ code: '02 51 23', title: ' Mechanical Filtration Decontamination' },
{ code: '02 51 26', title: ' Radioactive Decontamination' },
{ code: '02 51 29', title: ' Surface Cleaning Decontamination' },
{ code: '02 51 29.13', title: ' High-Pressure Water Cleaning Decontamination' },
{ code: '02 51 29.16', title: ' Vacuum Sweeping Cleaning Decontamination' },
{ code: '02 51 33', title: ' Surface Removal Decontamination' },
{ code: '02 51 33.13', title: ' Surface Removal Decontamination by Grinding' },
{ code: '02 51 33.16', title: ' Surface Removal Decontamination by Sand Blasting' },
{ code: '02 51 33.19', title: ' Surface Removal Decontamination by Ultrasound' },
{ code: '02 52 00', title: ' Chemical Decontamination' },
{ code: '02 52 13', title: ' Chemical Precipitation Decontamination' },
{ code: '02 52 16', title: ' Ion Change Decontamination' },
{ code: '02 52 19', title: ' Neutralization Decontamination' },
{ code: '02 53 00', title: ' Thermal Decontamination' },
{ code: '02 53 13', title: ' Incineration Decontamination' },
{ code: '02 53 13.13', title: ' Remediation of Contaminated Soils and Sludges by Incineration' },
{ code: '02 53 16', title: ' Thermal Desorption Decontamination' },
{ code: '02 53 16.13', title: ' Remediation of Contaminated Soils by Thermal Desorption' },
{ code: '02 53 19', title: ' Vitrification Decontamination' },
{ code: '02 54 00', title: ' Biological Decontamination' },
{ code: '02 54 13', title: ' Aerobic Processes Decontamination' },
{ code: '02 54 16', title: ' Anaerobic Processes Decontamination' },
{ code: '02 54 19', title: ' Bioremediation Decontamination' },
{ code: '02 54 19.13', title: ' Bioremediation Using Landfarming' },
{ code: '02 54 19.16', title: ' Bioremediation of Soils Using Windrow Composting' },
{ code: '02 54 19.19', title: ' Bioremediation Using Bacteria Injection' },
{ code: '02 54 23', title: ' Soil Washing through Separation/Solubilization' },
{ code: '02 54 26', title: ' Organic Decontamination' },
{ code: '02 55 00', title: ' Remediation Soil Stabilization' },
{ code: '02 56 00', title: ' Site Containment' },
{ code: '02 56 13', title: ' Waste Containment' },
{ code: '02 56 13.13', title: ' Geomembrane Waste Containment' },
{ code: '02 56 19', title: ' Gas Containment' },
{ code: '02 56 19.13', title: ' Fluid-Applied Gas Barrier' },
{ code: '02 57 00', title: ' Sinkhole Remediation' },
{ code: '02 57 13', title: ' Sinkhole Remediation by Grouting' },
{ code: '02 57 13.13', title: ' Sinkhole Remediation by Compaction Grouting' },
{ code: '02 57 13.16', title: ' Sinkhole Remediation by Cap Grouting' },
{ code: '02 57 16', title: ' Sinkhole Remediation by Backfilling' },
{ code: '02 58 00', title: ' Snow Control' },
{ code: '02 58 13', title: ' Snow Fencing' },
{ code: '02 58 16', title: ' Snow Avalanche Control' },
{ code: '02 60 00', title: ' CONTAMINATED SITE MATERIAL REMOVAL' },
{ code: '02 61 00', title: ' Removal and Disposal of Contaminated Soils' },
{ code: '02 61 13', title: ' Excavation and Handling of Contaminated Material' },
{ code: '02 61 23', title: ' Removal and Disposal of Polychlorinate Biphenyl Contaminated Soils' },
{ code: '02 61 26', title: ' Removal and Disposal of Asbestos Contaminated Soils' },
{ code: '02 61 29', title: ' Removal and Disposal of Organically Contaminated Soils' },
{ code: '02 62 00', title: ' Hazardous Waste Recovery Processes' },
{ code: '02 62 13 ', title: 'Air and Steam Stripping' },
{ code: '02 62 16 ', title: 'Soil Vapor Extraction' },
{ code: '02 62 19', title: 'Soil Washing and Flushing' },
{ code: '02 65 00', title: ' Underground Storage Tank Removal' },
{ code: '02 66 00', title: ' Landfill Construction and Storage' },
{ code: '02 70 00', title: ' WATER REMEDIATION' },
{ code: '02 71 00', title: ' Groundwater Treatment' },
{ code: '02 72 00', title: ' Water Decontamination' },
{ code: '02 72 13', title: ' Chemical Water Decontamination' },
{ code: '02 72 16', title: ' Biological Water Decontamination' },
{ code: '02 72 19', title: ' Electrolysis Water Decontamination' },
{ code: '02 80 00', title: ' FACILITY REMEDIATION' },
{ code: '02 81 00', title: ' Transportation and Disposal of Hazardous Materials' },
{ code: '02 82 00', title: ' Asbestos Remediation' },
{ code: '02 82 13', title: ' Asbestos Abatement' },
{ code: '02 82 13.13', title: ' Glovebag Asbestos Abatement' },
{ code: '02 82 13.16', title: ' Precautions for Asbestos Abatement' },
{ code: '02 82 13.19', title: ' Asbestos Floor Tile and Mastic Abatement' },
{ code: '02 82 16', title: ' Engineering Control of Asbestos Containing Materials' },
{ code: '02 82 33', title: ' Removal and Disposal of Asbestos Containing ' },
{ code: '02 83 00', title: ' Lead Remediation' },
{ code: '02 83 13', title: ' Lead Hazard Control Activities' },
{ code: '02 83 19', title: ' Lead-Based Paint Remediation' },
{ code: '02 83 19.13', title: ' Lead-Based Paint Abatement' },
{ code: '02 83 33', title: ' Removal and Disposal of Material Containing Lead' },
{ code: '02 83 33.13', title: ' Lead-Based Paint Removal and Disposal' },
{ code: '02 84 00', title: ' Polychlorinate Biphenyl Remediation' },
{ code: '02 84 16', title: ' Handling of Lighting Ballasts and Lamps Containing PCBs and Mercury' },
{ code: '02 84 33', title: ' Removal and Disposal of Polychlorinate Biphenyls' },
{ code: '02 85 00', title: ' Mold Remediation' },
{ code: '02 85 13', title: ' Precautions for Mold Remediation' },
{ code: '02 85 16', title: ' Mold Remediation Preparation and Containment' },
{ code: '02 85 19', title: ' Mold Remediation Clearance Air Sampling' },
{ code: '02 85 33', title: ' Removal and Disposal of Materials with Mold' },
{ code: '02 86 00', title: ' Hazardous Waste Drum Handling' },
{ code: '02 90 00', title: ' Unassigned' }
]
})
}
division_1() {
return (
{
division: 1,
divisionTitle: 'General Requirements',
codes: [
{ code: '01 00 00', title: 'GENERAL REQUIREMENTS' },
{ code: '01 10 00 ', title: 'SUMMARY' },
{ code: '01 11 00 ', title: 'Summary of Work' },
{ code: '01 11 13 ', title: 'Work Covered by Contract Documents' },
{ code: '01 11 16 ', title: 'Work by Owner' },
{ code: '01 11 19 ', title: 'Purchase Contracts' },
{ code: '01 12 00 ', title: 'Multiple Contract Summary' },
{ code: '01 12 13 ', title: 'Summary of Contracts' },
{ code: '01 12 16 ', title: 'Work Sequence' },
{ code: '01 12 19 ', title: 'Contract Interface' },
{ code: '01 14 00 ', title: 'Work Restrictions' },
{ code: '01 14 13 ', title: 'Access to Site' },
{ code: '01 14 16 ', title: 'Coordination with Occupants' },
{ code: '01 14 19 ', title: 'Use of Site' },
{ code: '01 18 00 ', title: 'Project Utility Sources' },
{ code: '01 20 00 ', title: 'PRICE AND PAYMENT PROCEDURES' },
{ code: '01 21 00 ', title: 'Allowances' },
{ code: '01 21 13 ', title: 'Cash Allowances' },
{ code: '01 21 16 ', title: 'Contingency Allowances' },
{ code: '01 21 19 ', title: 'Testing and Inspecting Allowances' },
{ code: '01 21 23 ', title: 'Installation Allowances' },
{ code: '01 21 26 ', title: 'Product Allowances' },
{ code: '01 21 29 ', title: 'Quantity Allowances' },
{ code: '01 21 43 ', title: 'Time Allowances' },
{ code: '01 22 00 ', title: 'Unit Prices' },
{ code: '01 22 13 ', title: 'Unit Price Measurement' },
{ code: '01 22 16 ', title: 'Unit Price Payment' },
{ code: '01 23 00 ', title: 'Alternates' },
{ code: '01 24 00 ', title: 'Value Analysis' },
{ code: '01 24 13 ', title: 'Value Engineering' },
{ code: '01 25 00 ', title: 'Substitution Procedures' },
{ code: '01 25 13 ', title: 'Product Substitution Procedures' },
{ code: '01 25 16 ', title: 'Execution Substitution Procedures' },
{ code: '01 26 00 ', title: 'Contract Modification Procedures' },
{ code: '01 26 13 ', title: 'Requests for Interpretation' },
{ code: '01 26 19 ', title: 'Clarification Notices' },
{ code: '01 26 33 ', title: 'Minor Changes in the Work' },
{ code: '01 26 36 ', title: 'Supplemental Instructions' },
{ code: '01 26 39 ', title: 'Field Orders' },
{ code: '01 26 43 ', title: 'Amendments' },
{ code: '01 26 46 ', title: 'Construction Change Directives' },
{ code: '01 26 49 ', title: 'Work Change Directives' },
{ code: '01 26 53 ', title: 'Proposal Requests' },
{ code: '01 26 54 ', title: 'Proposal Worksheet Summaries' },
{ code: '01 26 57 ', title: 'Change Order Requests' },
{ code: '01 26 63 ', title: 'Change Orders' },
{ code: '01 29 00 ', title: 'Payment Procedures' },
{ code: '01 29 73 ', title: 'Schedule of Values' },
{ code: '01 29 76 ', title: 'Progress Payment Procedures' },
{ code: '01 29 83 ', title: 'Payment Procedures for Testing Laboratory Services' },
{ code: '01 30 00 ', title: 'ADMINISTRATIVE REQUIREMENTS' },
{ code: '01 31 00 ', title: 'Project Management and Coordination' },
{ code: '01 31 13 ', title: 'Project Coordination' },
{ code: '01 31 16 ', title: 'Multiple Contract Coordination' },
{ code: '01 31 19 ', title: 'Project Meetings' },
{ code: '01 31 19.13 ', title: 'Preconstruction Meetings' },
{ code: '01 31 19.16 ', title: 'Site Mobilization Meetings' },
{ code: '01 31 19.23 ', title: 'Progress Meetings' },
{ code: '01 31 19.33 ', title: 'Preinstallation Meetings' },
{ code: '01 31 23 ', title: 'Project Web Site' },
{ code: '01 32 00 ', title: 'Construction Progress Documentation' },
{ code: '01 32 13 ', title: 'Scheduling of Work' },
{ code: '01 32 16 ', title: 'Construction Progress Schedule' },
{ code: '01 32 16.13 ', title: 'Network Analysis Schedules' },
{ code: '01 32 19 ', title: 'Submittals Schedule' },
{ code: '01 32 23 ', title: 'Survey and Layout Data' },
{ code: '01 32 26 ', title: 'Construction Progress Reporting' },
{ code: '01 32 29 ', title: 'Periodic Work Observation' },
{ code: '01 32 33 ', title: 'Photographic Documentation' },
{ code: '01 32 43 ', title: 'Purchase Order Tracking' },
{ code: '01 33 00 ', title: 'Submittal Procedures' },
{ code: '01 33 13 ', title: 'Certificates' },
{ code: '01 33 16 ', title: 'Design Data' },
{ code: '01 33 19 ', title: 'Field Test Reporting' },
{ code: '01 33 23 ', title: 'Shop Drawings, Product Data, and Samples' },
{ code: '01 33 26 ', title: 'Source Quality Control Reporting' },
{ code: '01 33 29 ', title: 'Sustainable Design Reporting' },
{ code: '01 35 00 ', title: 'Special Procedures' },
{ code: '01 35 13 ', title: 'Special Project Procedures' },
{ code: '01 35 13.13 ', title: 'Special Project Procedures for Airport Facilities' },
{ code: '01 35 13.16 ', title: 'Special Project Procedures for Detention Facilities' },
{ code: '01 35 13.19 ', title: 'Special Project Procedures for Health care Facilities' },
{ code: '01 35 13.43 ', title: 'Special Project Procedures for Contaminated Sites' },
{ code: '01 35 16 ', title: 'Alteration Project Procedures' },
{ code: '01 35 23 ', title: 'Owner Safety Requirements' },
{ code: '01 35 26 ', title: 'Governmental Safety Requirements' },
{ code: '01 35 29 ', title: 'Health, Safety, and Emergency Response Procedures' },
{ code: '01 35 29.13 ', title: 'Health, Safety, and Emergency Response Procedures for Contaminated Sites' },
{ code: '01 35 33 ', title: 'Infection Control Procedures' },
{ code: '01 35 43 ', title: 'Environmental Procedures' },
{ code: '01 35 43.13 ', title: 'Environmental Procedures for Hazardous Materials' },
{ code: '01 35 43.16 ', title: 'Environmental Procedures for Toxic Materials' },
{ code: '01 35 53 ', title: 'Security Procedures' },
{ code: '01 35 91 ', title: 'Historic Treatment Procedures' },
{ code: '01 40 00 ', title: 'QUALITY REQUIREMENTS' },
{ code: '01 41 00 ', title: 'Regulatory Requirements' },
{ code: '01 41 13 ', title: 'Codes' },
{ code: '01 41 16 ', title: 'Laws' },
{ code: '01 41 19 ', title: 'Rules' },
{ code: '01 41 23 ', title: 'Fees' },
{ code: '01 41 26 ', title: 'Permits' },
{ code: '01 42 00 ', title: 'References' },
{ code: '01 42 13 ', title: 'Abbreviations and Acronyms' },
{ code: '01 42 16 ', title: 'Definitions' },
{ code: '01 42 19 ', title: 'Reference Standards' },
{ code: '01 43 00 ', title: 'Quality Assurance' },
{ code: '01 43 13 ', title: 'Manufacturer Qualifications' },
{ code: '01 43 16 ', title: 'Supplier Qualifications' },
{ code: '01 43 19 ', title: 'Fabricator Qualifications' },
{ code: '01 43 23 ', title: 'Installer Qualifications' },
{ code: '01 43 26 ', title: 'Testing and Inspecting Agency Qualifications' },
{ code: '01 43 29 ', title: 'Code-Required Special Inspector Qualifications' },
{ code: '01 43 33 ', title: "Manufacturer’s Field Services" },
{ code: '01 43 36 ', title: 'Field Samples' },
{ code: '01 43 39 ', title: 'Mockups' },
{ code: '01 45 00 ', title: 'Quality Control' },
{ code: '01 45 13 ', title: 'Source Quality Control Procedures' },
{ code: '01 45 16 ', title: 'Field Quality Control Procedures' },
{ code: '01 45 16.13 ', title: 'Contractor Quality Control' },
{ code: '01 45 23 ', title: 'Testing and Inspecting Services' },
{ code: '01 45 26 ', title: 'Plant Inspection Procedures' },
{ code: '01 45 29 ', title: 'Testing Laboratory Services' },
{ code: '01 45 33 ', title: 'Code-Required Special Inspections and Procedures' },
{ code: '01 50 00 ', title: 'TEMPORARY FACILITIES AND CONTROLS' },
{ code: '01 51 00 ', title: 'Temporary Utilities' },
{ code: '01 51 13 ', title: 'Temporary Electricity' },
{ code: '01 51 16 ', title: 'Temporary Fire Protection' },
{ code: '01 51 19 ', title: 'Temporary Fuel Oil' },
{ code: '01 51 23 ', title: 'Temporary Heating, Cooling, and Ventilating' },
{ code: '01 51 26 ', title: 'Temporary Lighting' },
{ code: '01 51 29 ', title: 'Temporary Natural-Gas' },
{ code: '01 51 33 ', title: 'Temporary Telecommunications' },
{ code: '01 51 36 ', title: 'Temporary Water' },
{ code: '01 52 00 ', title: 'Construction Facilities' },
{ code: '01 52 13 ', title: 'Field Offices and Sheds' },
{ code: '01 52 16 ', title: 'First Aid Facilities' },
{ code: '01 52 19 ', title: 'Sanitary Facilities' },
{ code: '01 53 00 ', title: 'Temporary Construction' },
{ code: '01 53 13 ', title: 'Temporary Bridges' },
{ code: '01 53 16 ', title: 'Temporary Decking' },
{ code: '01 53 19 ', title: 'Temporary Overpasses' },
{ code: '01 53 23 ', title: 'Temporary Ramps' },
{ code: '01 53 26 ', title: 'Temporary Runarounds' },
{ code: '01 54 00 ', title: 'Construction Aids' },
{ code: '01 54 13 ', title: 'Temporary Elevators' },
{ code: '01 54 16 ', title: 'Temporary Hoists' },
{ code: '01 54 19 ', title: 'Temporary Cranes' },
{ code: '01 54 23 ', title: 'Temporary Scaffolding and Platforms' },
{ code: '01 54 26 ', title: 'Temporary Swing Staging' },
{ code: '01 55 00 ', title: 'Vehicular Access and Parking' },
{ code: '01 55 13 ', title: 'Temporary Access Roads' },
{ code: '01 55 16 ', title: 'Haul Routes' },
{ code: '01 55 19 ', title: 'Temporary Parking Areas' },
{ code: '01 55 23 ', title: 'Temporary Roads' },
{ code: '01 55 26 ', title: 'Traffic Control' },
{ code: '01 55 29 ', title: 'Staging Areas' },
{ code: '01 56 00 ', title: 'Temporary Barriers and Enclosures' },
{ code: '01 56 13 ', title: 'Temporary Air Barriers' },
{ code: '01 56 16 ', title: 'Temporary Dust Barriers' },
{ code: '01 56 19 ', title: 'Temporary Noise Barriers' },
{ code: '01 56 23 ', title: 'Temporary Barricades' },
{ code: '01 56 26 ', title: 'Temporary Fencing' },
{ code: '01 56 29 ', title: 'Temporary Protective Walkways' },
{ code: '01 56 33 ', title: 'Temporary Security Barriers' },
{ code: '01 56 36 ', title: 'Temporary Security Enclosures' },
{ code: '01 56 39 ', title: 'Temporary Tree and Plant Protection' },
{ code: '01 57 00 ', title: 'Temporary Controls' },
{ code: '01 57 13 ', title: 'Temporary Erosion and Sediment Control' },
{ code: '01 57 16 ', title: 'Temporary Pest Control' },
{ code: '01 57 19 ', title: 'Temporary Environmental Controls' },
{ code: '01 57 23 ', title: 'Temporary Storm Water Pollution Control' },
{ code: '01 58 00 ', title: 'Project Identification' },
{ code: '01 58 13 ', title: 'Temporary Project Signage' },
{ code: '01 58 16 ', title: 'Temporary Interior Signage' },
{ code: '01 60 00 ', title: 'PRODUCT REQUIREMENTS' },
{ code: '01 61 00 ', title: 'Common Product Requirements' },
{ code: '01 61 13 ', title: 'Software Licensing Requirements' },
{ code: '01 62 00 ', title: 'Product Options' },
{ code: '01 64 00 ', title: 'Owner-Furnished Products' },
{ code: '01 65 00 ', title: 'Product Delivery Requirements' },
{ code: '01 66 00 ', title: 'Product Storage and Handling Requirements' },
{ code: '01 66 13 ', title: 'Product Storage and Handling Requirements for Hazardous Materials' },
{ code: '01 66 16 ', title: 'Product Storage and Handling Requirements for Toxic Materials' },
{ code: '01 70 00 ', title: 'EXECUTION AND CLOSEOUT REQUIREMENTS' },
{ code: '01 71 00 ', title: 'Examination and Preparation' },
{ code: '01 71 13 ', title: 'Mobilization' },
{ code: '01 71 16 ', title: 'Acceptance of Conditions' },
{ code: '01 71 23 ', title: 'Field Engineering' },
{ code: '01 71 23.13 ', title: 'Construction Layout' },
{ code: '01 71 23.16 ', title: 'Construction Surveying' },
{ code: '01 71 33 ', title: 'Protection of Adjacent Construction' },
{ code: '01 73 00 ', title: 'Execution' },
{ code: '01 73 13 ', title: 'Application' },
{ code: '01 73 16 ', title: 'Erection' },
{ code: '01 73 19 ', title: 'Installation' },
{ code: '01 73 23 ', title: 'Bracing and Anchoring' },
{ code: '01 73 26 ', title: 'Existing Products' },
{ code: '01 73 29 ', title: 'Cutting and Patching' },
{ code: '01 74 00 ', title: 'Cleaning and Waste Management' },
{ code: '01 74 13 ', title: 'Progress Cleaning' },
{ code: '01 74 16 ', title: 'Site Maintenance' },
{ code: '01 74 19 ', title: 'Construction Waste Management and Disposal' },
{ code: '01 74 23 ', title: 'Final Cleaning' },
{ code: '01 75 00 ', title: 'Starting and Adjusting' },
{ code: '01 75 13 ', title: 'Checkout Procedures' },
{ code: '01 75 16 ', title: 'Startup Procedures' },
{ code: '01 76 00 ', title: 'Protecting Installed Construction' },
{ code: '01 77 00 ', title: 'Closeout Procedures' },
{ code: '01 77 13 ', title: 'Preliminary Closeout Reviews' },
{ code: '01 77 16 ', title: 'Final Closeout Review' },
{ code: '01 77 19 ', title: 'Closeout Requirements' },
{ code: '01 78 00 ', title: 'Closeout Submittals' },
{ code: '01 78 13 ', title: 'Completion and Correction List' },
{ code: '01 78 19 ', title: 'Maintenance Contracts' },
{ code: '01 78 23 ', title: 'Operation and Maintenance Data' },
{ code: '01 78 23.13', title: ' Operation Data' },
{ code: '01 78 23.16', title: ' Maintenance Data' },
{ code: '01 78 23.19', title: ' Preventative Maintenance Instructions' },
{ code: '01 78 29', title: ' Final Site Survey' },
{ code: '01 78 33', title: ' Bonds' },
{ code: '01 78 36', title: ' Warranties' },
{ code: '01 78 39', title: ' Project Record Documents' },
{ code: '01 78 43', title: ' Spare Parts' },
{ code: '01 78 46', title: ' Extra Stock Materials' },
{ code: '01 78 53', title: ' Sustainable Design Closeout Documentation' },
{ code: '01 79 00', title: ' Demonstration and Training' },
{ code: '01 80 00', title: ' PERFORMANCE REQUIREMENTS' },
{ code: '01 81 00', title: ' Facility Performance Requirements' },
{ code: '01 81 13', title: ' Sustainable Design Requirements' },
{ code: '01 81 16', title: ' Facility Environmental Requirements' },
{ code: '01 81 19', title: ' Indoor Air Quality Requirements' },
{ code: '01 82 00', title: ' Facility Substructure Performance Requirements' },
{ code: '01 82 13', title: ' Foundation Performance Requirements' },
{ code: '01 82 16', title: ' Basement Construction Performance Requirements' },
{ code: '01 83 00', title: ' Facility Shell Performance Requirements' },
{ code: '01 83 13', title: ' Superstructure Performance Requirements' },
{ code: '01 83 16', title: ' Exterior Enclosure Performance Requirements' },
{ code: '01 83 19', title: ' Roofing Performance Requirements' },
{ code: '01 84 00', title: ' Interiors Performance Requirements' },
{ code: '01 84 13', title: ' Interior Construction Performance Requirements' },
{ code: '01 84 16', title: ' Stairways Performance Requirements' },
{ code: '01 84 19', title: ' Interior Finishes Performance Requirements' },
{ code: '01 85 00', title: ' Conveying Equipment Performance Requirements' },
{ code: '01 86 00', title: ' Facility Services Performance Requirements' },
{ code: '01 86 13', title: ' Fire Suppression Performance Requirements' },
{ code: '01 86 16', title: ' Plumbing Performance Requirements' },
{ code: '01 86 19', title: ' HVAC Performance Requirements' },
{ code: '01 86 23', title: ' Integrated Automation Performance Requirements' },
{ code: '01 86 26', title: ' Electrical Performance Requirements' },
{ code: '01 86 29', title: ' Communications Performance Requirements' },
{ code: '01 86 33', title: ' Electronic Safety and Security Performance Requirements' },
{ code: '01 87 00', title: 'Equipment and Furnishings Performance Requirements' },
{ code: '01 87 13', title: ' Equipment Performance Requirements' },
{ code: '01 87 16', title: ' Furnishings Performance Requirements' },
{ code: '01 88 00', title: ' Other Facility Construction Performance Requirements' },
{ code: '01 88 13', title: ' Special Construction Performance Requirements' },
{ code: '01 88 16', title: ' Selective Construction Performance Requirements' },
{ code: '01 89 00', title: ' Site Construction Performance Requirements' },
{ code: '01 89 13', title: ' Site Preparation Performance Requirements' },
{ code: '01 89 16', title: ' Site Improvements Performance Requirements' },
{ code: '01 89 19', title: ' Site Plumbing Utilities Performance Requirements' },
{ code: '01 89 23', title: ' Site HVAC Utilities Performance Requirements' },
{ code: '01 89 26', title: ' Site Electrical Utilities Performance Requirements' },
{ code: '01 89 29', title: ' Other Site Construction Performance Requirements' },
{ code: '01 90 00', title: ' LIFE CYCLE ACTIVITIES' },
{ code: '01 91 00', title: ' Commissioning' },
{ code: '01 91 13', title: ' General Commissioning Requirements' },
{ code: '01 91 16', title: ' Facility Substructure Commissioning' },
{ code: '01 91 16.13', title: ' Foundation Commissioning' },
{ code: '01 91 16.53', title: ' Basement Construction Commissioning' },
{ code: '01 91 19', title: ' Facility Shell Commissioning' },
{ code: '01 91 19.13', title: ' Superstructure Commissioning' },
{ code: '01 91 19.43', title: ' Exterior Enclosure Commissioning' },
{ code: '01 91 19.73', title: ' Roofing Commissioning' },
{ code: '01 91 23', title: ' Interiors Commissioning' },
{ code: '01 91 23.13', title: ' Interior Construction Commissioning' },
{ code: '01 91 23.43', title: ' Stairways Commissioning' },
{ code: '01 91 23.73', title: ' Interior Finishes Commissioning' },
{ code: '01 92 00', title: ' Facility Operation' },
{ code: '01 92 13', title: ' Facility Operation Procedures' },
{ code: '01 93 00', title: ' Facility Maintenance' },
{ code: '01 93 13', title: ' Facility Maintenance Procedures' },
{ code: '01 93 16', title: ' Recycling Programs' },
{ code: '01 94 00', title: ' Facility Decommissioning' },
{ code: '01 94 13', title: ' Facility Decommissioning Procedures' }
]
}
)
}
division_0() {
return ({
division: 0,
divisionTitle: 'Procurement and Contracting Requirements',
codes: [
{ code: '00 00 00', title: 'PROCUREMENT AND CONTRACTING REQUIREMENTS' },
{ code: '00 01 01', title: 'Project Title Page' },
{ code: '00 01 05', title: 'Certifications Page' },
{ code: '00 01 07', title: 'Seals Page' },
{ code: '00 01 10', title: 'Table of Contents' },
{ code: '00 01 15', title: 'List of Drawing Sheets' },
{ code: '00 10 00', title: 'OLICITATION' },
{ code: '00 11 00', title: 'Advertisements and Invitations' },
{ code: '00 11 13', title: 'Advertisement for Bids' },
{ code: '00 11 16', title: 'nvitation to Bid' },
{ code: '00 11 19', title: 'Request for Proposal' },
{ code: '00 11 53', title: 'Request for Qualifications' },
{ code: '00 20 00', title: 'INSTRUCTIONS FOR PROCUREMENT' },
{ code: '00 21 00', title: 'Instructions' },
{ code: '00 21 13', title: 'Instructions to Bidders' },
{ code: '00 21 16', title: 'Instructions to Proposers' },
{ code: '00 22 00', title: 'Supplementary Instructions' },
{ code: '00 22 13', title: 'Supplementary Instructions to Bidders' },
{ code: '00 22 16', title: 'Supplementary Instructions to Proposers' },
{ code: '00 23 00', title: 'Procurement Definitions' },
{ code: '00 24 00', title: 'Procurement Scopes' },
{ code: '00 24 13', title: 'copes of Bids' },
{ code: '00 24 13.13', title: 'Scopes of Bids (Multiple Contracts)' },
{ code: '00 24 13.16', title: 'Scopes of Bids (Multiple-Prime Contract)' },
{ code: '00 24 16', title: 'Scopes of Proposals' },
{ code: '00 24 16.13', title: 'Scopes of Proposals (Multiple Contracts)' },
{ code: '00 24 16.16', title: 'Scopes of Proposals (Multiple-Prime Contract)' },
{ code: '00 25 00', title: 'Procurement Meetings' },
{ code: '00 25 13', title: 'Pre-Bid Meetings' },
{ code: '00 25 16', title: 'Pre-Proposal Meetings' },
{ code: '00 26 00', title: 'Procurement Substitution Procedures' },
{ code: '00 30 00', title: 'AVAILABLE INFORMATION' },
{ code: '00 31 00', title: 'Available Project Information' },
{ code: '00 31 13', title: 'Preliminary Schedules' },
{ code: '00 31 13.13', title: 'Preliminary Project Schedule' },
{ code: '00 31 13.16', title: 'Preliminary Construction Schedule' },
{ code: '00 31 13.23', title: 'Preliminary Project Phases' },
{ code: '00 31 13.26', title: 'Preliminary Project Sequencing' },
{ code: '00 31 13.33', title: 'Preliminary Project Milestones' },
{ code: '00 31 16', title: 'Project Budget Information' },
{ code: '00 31 19', title: 'Existing Condition Information' },
{ code: '00 31 19.13', title: 'Movement and Vibration Information' },
{ code: '00 31 19.16', title: 'Acoustic Information' },
{ code: '00 31 19.19', title: 'Traffic Information' },
{ code: '00 31 21', title: 'Survey Information' },
{ code: '00 31 21.13', title: 'Site Survey Information' },
{ code: '00 31 21.16', title: 'Measured Drawing Information' },
{ code: '00 31 21.19', title: 'Photographic Information' },
{ code: '00 31 24', title: 'Environmental Assessment Information' },
{ code: '00 31 24.13', title: 'Soil Contamination Report' },
{ code: '00 31 24.23', title: 'Environmental Impact Study Report' },
{ code: '00 31 24.26', title: 'Environmental Impact Report Evaluation' },
{ code: '00 31 24.29', title: 'Record of Environmental Impact Decision' },
{ code: '00 31 24.33', title: 'Environmental Impact Mitigation Report' },
{ code: '00 31 25', title: 'Existing Material Information' },
{ code: '00 31 25.16', title: 'Existing Concrete Information' },
{ code: '00 31 25.19', title: 'Existing Masonry Information' },
{ code: '00 31 25.23', title: 'Existing Metals Information' },
{ code: '00 31 25.26', title: 'Existing Wood, Plastics, and Composites Information' },
{ code: '00 31 25.29', title: 'Existing Thermal and Moisture Protection Information' },
{ code: '00 31 26', title: 'Existing Hazardous Material Information' },
{ code: '00 31 26.23', title: 'Existing Asbestos Information' },
{ code: '00 31 26.26', title: 'Existing Lead Information' },
{ code: '00 31 26.29', title: 'Existing Polychlorinate Biphenyl Information' },
{ code: '00 31 26.33', title: 'Existing Mold Information' },
{ code: '00 31 26.36', title: 'Existing Hazardous Waste Drum Information' },
{ code: '00 31 31', title: 'Geophysical Data' },
{ code: '00 31 31.13', title: 'Seismic Investigations Information' },
{ code: '00 31 31.16', title: 'Gravity Investigations Information' },
{ code: '00 31 31.19', title: 'Magnetic Investigations Information' },
{ code: '00 31 31.23', title: 'Electromagnetic Investigations Information' },
{ code: '00 31 31.26', title: 'Electrical Resistivity Investigations Information' },
{ code: '00 31 31.29', title: 'Magnetotelluric Investigations Information' },
{ code: '00 31 32', title: 'Geotechnical Data' },
{ code: '00 31 32.13', title: 'Subsurface Drilling and Sampling Information' },
{ code: '00 31 32.16', title: 'Material Testing Information' },
{ code: '00 31 32.19', title: 'Exploratory Excavation Information' },
{ code: '00 31 32.23', title: 'Geotechnical Monitoring Information' },
{ code: '00 31 43', title: 'Permit Application' },
{ code: '00 40 00', title: 'PROCUREMENT FORMS AND SUPPLEMENTS' },
{ code: '00 41 00', title: 'Bid Forms' },
{ code: '00 41 13', title: 'Bid Form – Stipulated Sum (Single-Prime Contract)' },
{ code: '00 41 16', title: 'Bid Form – Stipulated Sum (Multiple-Prime Contract)' },
{ code: '00 41 23', title: 'Bid Form – Construction Management (Single-Prime Contract)' },
{ code: '00 41 26', title: 'Bid Form – Construction Management (Multiple-Prime Contract)' },
{ code: '00 41 33', title: 'Bid Form – Cost Plus-Fee (Single-Prime Contract)' },
{ code: '00 41 36', title: 'Bid Form – Cost-Plus-Fee (Multiple-Prime Contract)' },
{ code: '00 41 46', title: 'Bid Form – Unit Price (Multiple-Prime Contract)' },
{ code: '00 41 53', title: 'Bid Form – Design/Build (Single-Prime Contract)' },
{ code: '00 41 56', title: 'Bid Form – Design/Build (Multiple-Prime Contract)' },
{ code: '00 41 63', title: 'Bid Form – Purchase Contract' },
{ code: '00 42 00', title: 'Proposal Forms' },
{ code: '00 42 13', title: 'Proposal Form – Stipulated Sum (Single-Prime Contract)' },
{ code: '00 42 16', title: 'Proposal Form – Stipulated Sum (Multiple-Prime Contract)' },
{ code: '00 42 23', title: 'Proposal Form – Construction Management (Single-Prime Contract)' },
{ code: '00 42 26', title: 'Proposal Form – Construction Management (Multiple-Prime Contract)' },
{ code: '00 42 33', title: 'Proposal Form – Cost-Plus-Fee (Single-Prime Contract)' },
{ code: '00 42 36', title: 'Proposal Form – Cost-Plus-Fee (Multiple-Prime Contract)' },
{ code: '00 42 43', title: 'Proposal Form – Unit Price (Single-Prime Contract)' },
{ code: '00 42 46', title: 'Proposal Form – Unit Price (Multiple-Prime Contract)' },
{ code: '00 42 53 Proposal Form – Design/Build (Single-Prime Contract)' },
{ code: '00 42 56', title: 'Proposal Form – Design/Build (Multiple-Prime Contract)' },
{ code: '00 42 63', title: 'Proposal Form – Purchase Contract' },
{ code: '00 43 00', title: 'Procurement Form Supplements' },
{ code: '00 43 13', title: 'Bid Security Form' },
{ code: '0 43 21', title: 'Allowance Form' },
{ code: '00 43 22', title: 'Unit Prices Form' },
{ code: '00 43 23', title: 'Alternates Form' },
{ code: '00 43 25', title: 'Substitution Request Form (During Procurement)' },
{ code: '00 43 26', title: 'Estimated Quantities Form' },
{ code: '00 43 33', title: 'Proposed Products Form' },
{ code: '00 43 36', title: 'Proposed Subcontractors Form' },
{ code: '00 43 39', title: 'Minority Business Enterprise Statement of Intent Form' },
{ code: '00 43 43', title: 'Wage Rates Form' },
{ code: '00 43 73', title: 'Proposed Schedule of Values Form' },
{ code: '00 43 83', title: 'Proposed Construction Schedule Form' },
{ code: '00 43 86', title: 'Proposed Work Plan Schedule Form' },
{ code: '00 43 93', title: 'Bid Submittal Checklist' },
{ code: '00 45 00', title: 'Representations and Certifications' },
{ code: '00 45 13', title: "Bidder’s Qualifications" },
{ code: '00 45 16', title: "Proposer's Qualifications" },
{ code: '00 45 19', title: 'Non-Collusion Affidavit' },
{ code: '00 45 23', title: 'Statement of Disposal Facility' },
{ code: '00 45 26', title: 'Worker’s Compensation Certificate Schedule' },
{ code: '00 45 33', title: 'Non-Segregated Facilities Affidavit' },
{ code: '00 45 36', title: 'Equal Employment Opportunity Affidavit' },
{ code: '00 45 39', title: 'Minority Business Enterprise Affidavit' },
{ code: '00 45 43', title: 'Corporate Resolutions' },
{ code: '00 45 46', title: 'Governmental Certifications' },
{ code: '00 50 00', title: 'CONTRACTING FORMS AND SUPPLEMENTS' },
{ code: '00 51 00', title: 'Notice of Award' },
{ code: '00 52 00', title: 'Agreement Forms' },
{ code: '00 52 13', title: 'Agreement Form – Stipulated Sum (Single-Prime Contract)' },
{ code: '00 52 16', title: 'Agreement Form – Stipulated Sum (Multiple-Prime Contract)' },
{ code: '00 52 23', title: 'Agreement Form – Construction Management (Single-Prime Contract)' },
{ code: '00 52 26', title: 'Agreement Form – Construction Management (Multiple-Prime Contract)' },
{ code: '00 52 33', title: 'Agreement Form – Cost Plus-Fee (Single-Prime Contract)' },
{ code: '00 52 36', title: 'Agreement Form – Cost-Plus-Fee (Multiple-Prime Contract)' },
{ code: '00 52 43', title: 'Agreement Form – Unit Price (Single-Prime Contract)' },
{ code: '00 52 46', title: 'Agreement Form – Unit Price (Multiple-Prime Contract)' },
{ code: '00 52 53', title: 'Agreement Form – Design/Build (Single-Prime Contract)' },
{ code: '00 52 56', title: 'Agreement Form – Design/Build (Multiple-Prime Contract)' },
{ code: '00 52 63', title: 'Agreement Form – Purchase' },
{ code: '00 54 00', title: 'Agreement Form Supplements' },
{ code: '00 54 13', title: 'Supplementary Scope Statement' },
{ code: '00 41 43', title: 'Bid Form – Unit Price (Single-Prime Contract)' },
{ code: '00 54 21', title: 'Allowances Schedule' },
{ code: '00 54 22', title: 'Unit Prices Schedule' },
{ code: '00 55 00', title: 'Notice to Proceed' },
{ code: '00 60 00', title: 'PROJECT FORMS' },
{ code: '00 61 00', title: 'Bond Forms' },
{ code: '00 61 13', title: 'Performance and Payment Bond Form' },
{ code: '00 61 13.13', title: 'Performance Bond Form' },
{ code: '00 61 13.16', title: 'Payment Bond Form' },
{ code: '00 61 16', title: 'Lien Bond Form' },
{ code: '00 61 19', title: 'Maintenance Bond Form' },
{ code: '00 61 23', title: 'Retainage Bond Form' },
{ code: '00 61 26', title: 'Special Bond Form' },
{ code: '00 62 00', title: 'Certificates and Other Forms' },
{ code: '00 62 11', title: 'Submittal Transmittal Form' },
{ code: '00 62 16', title: 'Certificate of Insurance Form' },
{ code: '00 62 19', title: 'Infection Control Form' },
{ code: '00 62 23', title: 'Construction Waste Diversion Form' },
{ code: '00 62 33', title: 'Products Form' },
{ code: '00 62 34', title: 'Recycled Content of Materials Form' },
{ code: '00 62 39', title: 'Minority Business Enterprise Certification Form' },
{ code: '00 62 73', title: 'Schedule of Values Form' },
{ code: '00 62 76', title: 'Application for Payment Form' },
{ code: '00 62 76.13', title: 'Sales Tax Form' },
{ code: '00 62 76.16', title: 'Consent of Surety to Reduction of Retainage Form' },
{ code: '00 62 79', title: 'Stored Material Form' },
{ code: '00 62 83', title: 'Construction Schedule Form' },
{ code: '00 62 86', title: 'Work Plan Schedule Form' },
{ code: '00 62 89', title: 'Construction Equipment Form' },
{ code: '00 63 00', title: 'Clarification and Modification Forms' },
{ code: '00 63 13', title: 'Request for Interpretation Form' },
{ code: '00 63 19', title: 'Clarification Form' },
{ code: '00 63 25', title: 'Substitution Request Form (During Construction)' },
{ code: '00 63 33', title: 'Supplemental Instruction Form' },
{ code: '00 63 36', title: 'Field Order Form' },
{ code: '00 63 43', title: 'Written Amendment Form' },
{ code: '00 63 46', title: 'Construction Change Directive Form' },
{ code: '00 63 49', title: 'Work Change Directive Form' },
{ code: '00 63 53', title: 'Request for Proposal Form' },
{ code: '00 63 54', title: 'Proposal Worksheet Summary Form' },
{ code: '00 63 55', title: 'Proposal Worksheet Detail Form' },
{ code: '00 63 57', title: 'Change Order Request Form' },
{ code: '00 63 63', title: 'Change Order Form' },
{ code: '00 65 00', title: 'Closeout Forms' },
{ code: '00 65 13', title: 'Certificate of Compliance Form' },
{ code: '00 65 16', title: 'Certificate of Substantial Completion Form' },
{ code: '00 65 19', title: 'Certificate of Completion Form' },
{ code: '00 65 19.13', title: 'Affidavit of Payment of Debts and Claims Form' },
{ code: '00 65 19.16', title: 'Affidavit of Release of Liens Form' },
{ code: '00 65 19.19 Consent of Surety to Final Payment Form' },
{ code: '00 65 19.23', title: 'Acceptance Certificate Form' },
{ code: '00 65 19.26', title: 'Final Settlement Certificate Form' },
{ code: '00 65 36', title: 'Warranty Form' },
{ code: '00 65 73', title: 'Statutory Declaration Form' },
{ code: '00 70 00', title: 'CONDITIONS OF THE CONTRACT' },
{ code: '00 71 00', title: 'Contracting Definitions' },
{ code: '00 72 00', title: 'General Conditions' },
{ code: '00 72 13', title: 'General Conditions – Stipulated Sum (Single-Prime Contract)' },
{ code: '00 72 16', title: 'General Conditions – Stipulated Sum (Multiple-Prime Contract)' },
{ code: '00 72 23', title: 'General Conditions – Construction Management (Single-Prime Contract)' },
{ code: '00 72 26', title: 'General Conditions – Construction Management (Multiple-Prime Contract)' },
{ code: '00 72 33', title: 'General Conditions – Cost Plus-Fee (Single-Prime Contract)' },
{ code: '00 72 36', title: 'General Conditions – Cost-Plus-Fee (Multiple-Prime Contract)' },
{ code: '00 72 43', title: 'General Conditions – Unit Price (Single-Prime Contract)' },
{ code: '00 72 46', title: 'General Conditions – Unit Price (Multiple-Prime Contract)' },
{ code: '00 72 53', title: 'General Conditions – Design/Build (Single-Prime Contract)' },
{ code: '00 72 56', title: 'General Conditions – Design/Build (Multiple-Prime Contract)' },
{ code: '00 73 00', title: 'Supplementary Conditions' },
{ code: '00 73 16', title: 'Insurance Requirements' },
{ code: '00 93 13', title: 'Record Requests for Interpretation' },
{ code: '00 93 00', title: 'Record Clarifications and Proposals' },
{ code: '00 93 19', title: 'Record Clarification Notices' },
{ code: '00 93 53', title: 'Record Proposal Requests' },
{ code: '00 93 54', title: 'Record Proposal Worksheet Summaries' },
{ code: '00 93 57', title: 'Record Change Order Requests' },
{ code: '00 94 00', title: 'Record Modifications' },
{ code: '00 94 33', title: 'Record Minor Changes in the Work' },
{ code: '00 94 36', title: 'Record Supplemental Instructions' },
{ code: '00 94 39', title: 'Record Field Orders' },
{ code: '00 94 43', title: 'Record Amendments' },
{ code: '00 94 46', title: 'Record Construction Change Directives' },
{ code: '00 94 49', title: 'Record Work Change Directives' },
{ code: '00 94 63', title: 'Record Change Orders' },
{ code: '00 73 19', title: 'Health and Safety Requirements' },
{ code: '00 73 23', title: 'Purchase Contracts' },
{ code: '00 73 26', title: 'Assigned Contracts' },
{ code: '00 73 33', title: 'Non-Segregated Facilities Requirements' },
{ code: '00 73 36', title: 'Equal Employment Opportunity Requirements' },
{ code: '00 73 43', title: 'Wage Rate Requirements' },
{ code: '00 73 46', title: 'Wage Determination Schedule' },
{ code: '00 73 49', title: 'Labor Stabilization Agreement' },
{ code: '00 73 53 ', title: 'Anti-Pollution Measures' },
{ code: '00 73 63', title: ' Security Requirements' },
{ code: '00 73 73 ', title: 'Statutory Requirements' },
{ code: '00 80 00', title: 'Unassigned' },
{ code: '00 90 00', title: 'REVISIONS, CLARIFICATIONS, AND MODIFICATIONS' },
{ code: '00 91 00', title: 'Precontract Revisions' },
{ code: '00 91 13', title: 'Addenda' },
{ code: '00 91 16', title: 'Bid Revisions' },
{ code: '00 91 19', title: 'Proposal Revisions' },
]
})
}
getCSIFormat() {
}
}
export default MasterFormat;
|
// todo 未启用
module.exports = {
namespaced: true,
state: { openCreateDialog: false, openEditDialog: false },
getters: {
// menuTree: function(state) {
// return state.menuTree;
// }
},
mutations: {
// setMenuTree: function(state, data) {
// state.menuTree = data;
// }
},
actions: {},
modules: {}
}
|
import React from 'react'
const backStyles = {
// marginTop: 85,
// paddingLeft: 45,
// color: "black",
// position: "fixed"
}
const TopBar = ({title}) => {
return (
<div className="topbar">
<a href="/work"><span id="logo" style={{color:"black", fontSize:"20px", fontWeight:"bold", position:"relative", top: 29, left: 29}}>Zachary Rowden</span></a>
<span id="backButton" style={backStyles}><a className="backy" style={{cursor:"pointer"}} onClick={()=>window.history.back()}>↼ back</a></span><h1 style={{color: "black", textAlign:"center"}}>{title}</h1>
</div>
)
}
export default TopBar
|
window.onload = function () {
//设置背景
function setBodyBg() {
}
//获取select
var select = document.getElementById("select");
//设置改变监听
select.onchange = function () {
//获取当前改变的想
var bgColor = select.options[select.selectedIndex].value;
if(bgColor == ""){
document.body.style.background = "#fff";
}
else {
document.body.style.background = bgColor;
}
};
};
|
const puppeteer = require("puppeteer-extra")
const StealthPlugin = require("puppeteer-extra-plugin-stealth")
const util = require("./util")
puppeteer.use(StealthPlugin())
module.exports = async (twitchCookies, riotUsername, riotPassword, cb) => {
let args = ["--lang=fr-FR,fr", "--window-position=-1000,0"]
puppeteer.launch({ headless: false, executablePath: "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe", args /*, args: ["--proxy-server=socks5://127.0.0.1:1010"] */}).then(async browser => {
const page = (await browser.pages())[0]
console.log("Cookie twitch chargée.")
await page.setCookie(...twitchCookies.cookies)
//console.log("Cookie riotgames chargée.")
//await page.setCookie(...riotCookies.cookies)
console.log("Chargement de la page de connection twitch...")
await page.goto("https://www.twitch.tv/settings/connections")
await page.waitFor(4000)
console.log("Clique sur le bouton de connexion.")
await page.waitFor("#root > div > div.tw-flex.tw-flex-column.tw-flex-nowrap.tw-full-height > div.tw-flex.tw-flex-nowrap.tw-full-height.tw-overflow-hidden.tw-relative > main > div.root-scrollable.scrollable-area > div.simplebar-scroll-content > div > div > div > div > div:nth-child(2) > div:nth-child(5) > div > div.connection-component__right.tw-flex.tw-flex-column.tw-flex-grow-1.tw-full-width.tw-pd-x-1 > div.connection-component__header.tw-align-items-center.tw-flex.tw-flex-row > button")
await page.click("#root > div > div.tw-flex.tw-flex-column.tw-flex-nowrap.tw-full-height > div.tw-flex.tw-flex-nowrap.tw-full-height.tw-overflow-hidden.tw-relative > main > div.root-scrollable.scrollable-area > div.simplebar-scroll-content > div > div > div > div > div:nth-child(2) > div:nth-child(5) > div > div.connection-component__right.tw-flex.tw-flex-column.tw-flex-grow-1.tw-full-width.tw-pd-x-1 > div.connection-component__header.tw-align-items-center.tw-flex.tw-flex-row > button")
try {
console.log("Compte déjà lier ? ")
await page.waitFor("body > div.ReactModalPortal > div > div > div > div > div", {timeout: 1000})
console.log("Oui, passage au compte suivant. ")
await page.waitFor(1000);
await browser.close();
return;
}
catch {
console.log("Non.")
}
console.log("Ouverture de la page de connexion riot.")
const popup = await new Promise(x => browser.once("targetcreated", target => x(target.page())))
await page.waitFor(5000)
console.log("Ecriture du pseudo.")
await popup.waitFor("body > div > div > div > div.grid.grid-direction__row.grid-page-web__content > div.grid.grid-direction__column.grid-page-web__wrapper > div > div.grid.grid-align-center.grid-justify-space-between.grid-fill.grid-direction__column.grid-panel-web__content.grid-panel__content > div > div > div > div:nth-child(1) > div > input", { timeout: 30000 })
await popup.type("body > div > div > div > div.grid.grid-direction__row.grid-page-web__content > div.grid.grid-direction__column.grid-page-web__wrapper > div > div.grid.grid-align-center.grid-justify-space-between.grid-fill.grid-direction__column.grid-panel-web__content.grid-panel__content > div > div > div > div:nth-child(1) > div > input", riotUsername)
console.log("Ecriture du mot de passe.")
await popup.waitFor("body > div > div > div > div.grid.grid-direction__row.grid-page-web__content > div.grid.grid-direction__column.grid-page-web__wrapper > div > div.grid.grid-align-center.grid-justify-space-between.grid-fill.grid-direction__column.grid-panel-web__content.grid-panel__content > div > div > div > div.field.password-field.field--animate > div > input")
await popup.type("body > div > div > div > div.grid.grid-direction__row.grid-page-web__content > div.grid.grid-direction__column.grid-page-web__wrapper > div > div.grid.grid-align-center.grid-justify-space-between.grid-fill.grid-direction__column.grid-panel-web__content.grid-panel__content > div > div > div > div.field.password-field.field--animate > div > input", riotPassword)
console.log("Valider connexion.")
await popup.waitFor("body > div > div > div > div.grid.grid-direction__row.grid-page-web__content > div.grid.grid-direction__column.grid-page-web__wrapper > div > button")
await popup.click("body > div > div > div > div.grid.grid-direction__row.grid-page-web__content > div.grid.grid-direction__column.grid-page-web__wrapper > div > button")
try {
console.log("Compte valide ? ")
await popup.waitFor("body > div > div > div > div.grid.grid-direction__row.grid-page-web__content > div.grid.grid-direction__column.grid-page-web__wrapper > div > div.grid.grid-align-center.grid-justify-space-between.grid-fill.grid-direction__column.grid-panel-web__content.grid-panel__content > div > div > div > span", {timeout: 3000})
console.log("Non, passage au compte suivant.");
await page.waitFor(1000);
await browser.close();
return;
}
catch {
console.log("Oui, continuer")
}
try {
await popup.waitFor("body > div > div > div > div.grid.grid-direction__row.grid-page-web__content > div.grid.grid-direction__column.grid-page-web__wrapper > div > div.grid.grid-direction__column.grid-size-17.grid-panel-web.grid-panel.grid-panel-web-has-links.grid-panel-web-has-header > button", {timeout: 10000})
await popup.click("body > div > div > div > div.grid.grid-direction__row.grid-page-web__content > div.grid.grid-direction__column.grid-page-web__wrapper > div > div.grid.grid-direction__column.grid-size-17.grid-panel-web.grid-panel.grid-panel-web-has-links.grid-panel-web-has-header > button")
}
catch {
}
console.log("Connexion reussi !")
await page.waitFor(5000);
await browser.close();
})
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.